jsoneditor-rails 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/jsoneditor/rails/version.rb +1 -1
- data/vendor/assets/javascripts/jsoneditor-minimalist.js +648 -495
- data/vendor/assets/javascripts/jsoneditor-minimalist.map +1 -1
- data/vendor/assets/javascripts/jsoneditor.js +3841 -3215
- data/vendor/assets/javascripts/jsoneditor.map +1 -1
- data/vendor/assets/stylesheets/jsoneditor.scss +31 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be5f026ccec561a1f01c54729101d5f93135c20a
|
4
|
+
data.tar.gz: fa5b221511aa17167002f295d2180d9c08904429
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f0557998e4c0d3037f0c00dd17942a6a51dae98de9e7aba17f2c6df43daa6c88dd76dd73078b60c537e4d1e6e858f110cb1d883fb33b878e04e537ede8f524
|
7
|
+
data.tar.gz: 0c71eac98713101aed6cf89db4a7a77421d38ea84a01c3eda3bb9543f35e60b25439ef29789853a61dc4f43246cb13628b49b2d87f5e0d5e56832cae7c9be078
|
data/CHANGELOG.md
ADDED
@@ -24,8 +24,8 @@
|
|
24
24
|
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
25
25
|
*
|
26
26
|
* @author Jos de Jong, <wjosdejong@gmail.com>
|
27
|
-
* @version 5.
|
28
|
-
* @date 2017-
|
27
|
+
* @version 5.9.0
|
28
|
+
* @date 2017-07-10
|
29
29
|
*/
|
30
30
|
(function webpackUniversalModuleDefinition(root, factory) {
|
31
31
|
if(typeof exports === 'object' && typeof module === 'object')
|
@@ -94,7 +94,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
94
94
|
}
|
95
95
|
|
96
96
|
var treemode = __webpack_require__(1);
|
97
|
-
var textmode = __webpack_require__(
|
97
|
+
var textmode = __webpack_require__(13);
|
98
98
|
var util = __webpack_require__(4);
|
99
99
|
|
100
100
|
/**
|
@@ -164,8 +164,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
164
164
|
// validate options
|
165
165
|
if (options) {
|
166
166
|
var VALID_OPTIONS = [
|
167
|
-
'
|
168
|
-
'
|
167
|
+
'ajv', 'schema', 'schemaRefs','templates',
|
168
|
+
'ace', 'theme','autocomplete',
|
169
169
|
'onChange', 'onEditable', 'onError', 'onModeChange',
|
170
170
|
'escapeUnicode', 'history', 'search', 'mode', 'modes', 'name', 'indentation', 'sortObjectKeys'
|
171
171
|
];
|
@@ -215,7 +215,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
215
215
|
this.options = options || {};
|
216
216
|
this.json = json || {};
|
217
217
|
|
218
|
-
var mode = this.options.mode || 'tree';
|
218
|
+
var mode = this.options.mode || (this.options.modes && this.options.modes[0]) || 'tree';
|
219
219
|
this.setMode(mode);
|
220
220
|
};
|
221
221
|
|
@@ -358,8 +358,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
358
358
|
* Set a JSON schema for validation of the JSON object.
|
359
359
|
* To remove the schema, call JSONEditor.setSchema(null)
|
360
360
|
* @param {Object | null} schema
|
361
|
+
* @param {Object.<string, Object>=} schemaRefs Schemas that are referenced using the `$ref` property from the JSON schema that are set in the `schema` option,
|
362
|
+
+ the object structure in the form of `{reference_key: schemaObject}`
|
361
363
|
*/
|
362
|
-
JSONEditor.prototype.setSchema = function (schema) {
|
364
|
+
JSONEditor.prototype.setSchema = function (schema, schemaRefs) {
|
363
365
|
// compile a JSON schema validator if a JSON schema is provided
|
364
366
|
if (schema) {
|
365
367
|
var ajv;
|
@@ -373,6 +375,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
373
375
|
}
|
374
376
|
|
375
377
|
if (ajv) {
|
378
|
+
if(schemaRefs) {
|
379
|
+
for (var ref in schemaRefs) {
|
380
|
+
ajv.removeSchema(ref); // When updating a schema - old refs has to be removed first
|
381
|
+
if(schemaRefs[ref]) {
|
382
|
+
ajv.addSchema(schemaRefs[ref], ref);
|
383
|
+
}
|
384
|
+
}
|
385
|
+
this.options.schemaRefs = schemaRefs;
|
386
|
+
}
|
376
387
|
this.validateSchema = ajv.compile(schema);
|
377
388
|
|
378
389
|
// add schema to the options, so that when switching to an other mode,
|
@@ -389,6 +400,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
389
400
|
// remove current schema
|
390
401
|
this.validateSchema = null;
|
391
402
|
this.options.schema = null;
|
403
|
+
this.options.schemaRefs = null;
|
392
404
|
this.validate(); // to clear current error messages
|
393
405
|
this.refresh(); // update DOM
|
394
406
|
}
|
@@ -484,6 +496,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
484
496
|
var Node = __webpack_require__(8);
|
485
497
|
var ModeSwitcher = __webpack_require__(11);
|
486
498
|
var util = __webpack_require__(4);
|
499
|
+
var autocomplete = __webpack_require__(12);
|
487
500
|
|
488
501
|
// create a mixin with the functions for tree mode
|
489
502
|
var treemode = {};
|
@@ -527,6 +540,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
527
540
|
|
528
541
|
this._setOptions(options);
|
529
542
|
|
543
|
+
if (options.autocomplete)
|
544
|
+
this.autocomplete = new autocomplete(options.autocomplete);
|
545
|
+
|
530
546
|
if (this.options.history && this.options.mode !== 'view') {
|
531
547
|
this.history = new History(this);
|
532
548
|
}
|
@@ -583,7 +599,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
583
599
|
history: true,
|
584
600
|
mode: 'tree',
|
585
601
|
name: undefined, // field name of root node
|
586
|
-
schema: null
|
602
|
+
schema: null,
|
603
|
+
schemaRefs: null,
|
604
|
+
autocomplete: null
|
587
605
|
};
|
588
606
|
|
589
607
|
// copy all options
|
@@ -596,7 +614,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
596
614
|
}
|
597
615
|
|
598
616
|
// compile a JSON schema validator if a JSON schema is provided
|
599
|
-
this.setSchema(this.options.schema);
|
617
|
+
this.setSchema(this.options.schema, this.options.schemaRefs);
|
600
618
|
|
601
619
|
// create a debounced validate function
|
602
620
|
this._debouncedValidate = util.debounce(this.validate.bind(this), this.DEBOUNCE_INTERVAL);
|
@@ -1527,7 +1545,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1527
1545
|
*/
|
1528
1546
|
treemode._onKeyDown = function (event) {
|
1529
1547
|
var keynum = event.which || event.keyCode;
|
1548
|
+
var altKey = event.altKey;
|
1530
1549
|
var ctrlKey = event.ctrlKey;
|
1550
|
+
var metaKey = event.metaKey;
|
1531
1551
|
var shiftKey = event.shiftKey;
|
1532
1552
|
var handled = false;
|
1533
1553
|
|
@@ -1573,6 +1593,41 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1573
1593
|
}
|
1574
1594
|
}
|
1575
1595
|
|
1596
|
+
if ((this.options.autocomplete) && (!handled)) {
|
1597
|
+
if (!ctrlKey && !altKey && !metaKey && (event.key.length == 1 || keynum == 8 || keynum == 46)) {
|
1598
|
+
handled = false;
|
1599
|
+
var jsonElementType = "";
|
1600
|
+
if (event.target.className.indexOf("jsoneditor-value") >= 0) jsonElementType = "value";
|
1601
|
+
if (event.target.className.indexOf("jsoneditor-field") >= 0) jsonElementType = "field";
|
1602
|
+
|
1603
|
+
var node = Node.getNodeFromTarget(event.target);
|
1604
|
+
// Activate autocomplete
|
1605
|
+
setTimeout(function (hnode, element) {
|
1606
|
+
if (element.innerText.length > 0) {
|
1607
|
+
var result = this.options.autocomplete.getOptions(element.innerText, hnode.getPath(), jsonElementType, hnode.editor);
|
1608
|
+
if (typeof result.then === 'function') {
|
1609
|
+
// probably a promise
|
1610
|
+
if (result.then(function (obj) {
|
1611
|
+
if (obj.options)
|
1612
|
+
this.autocomplete.show(element, obj.startFrom, obj.options);
|
1613
|
+
else
|
1614
|
+
this.autocomplete.show(element, 0, obj);
|
1615
|
+
}.bind(this)));
|
1616
|
+
} else {
|
1617
|
+
// definitely not a promise
|
1618
|
+
if (result.options)
|
1619
|
+
this.autocomplete.show(element, result.startFrom, result.options);
|
1620
|
+
else
|
1621
|
+
this.autocomplete.show(element, 0, result);
|
1622
|
+
}
|
1623
|
+
}
|
1624
|
+
else
|
1625
|
+
this.autocomplete.hideDropDown();
|
1626
|
+
|
1627
|
+
}.bind(this, node, event.target), 50);
|
1628
|
+
}
|
1629
|
+
}
|
1630
|
+
|
1576
1631
|
if (handled) {
|
1577
1632
|
event.preventDefault();
|
1578
1633
|
event.stopPropagation();
|
@@ -2822,6 +2877,34 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2822
2877
|
return {start: start, end: newEnd};
|
2823
2878
|
};
|
2824
2879
|
|
2880
|
+
if (typeof Element !== 'undefined') {
|
2881
|
+
// Polyfill for array remove
|
2882
|
+
(function (arr) {
|
2883
|
+
arr.forEach(function (item) {
|
2884
|
+
if (item.hasOwnProperty('remove')) {
|
2885
|
+
return;
|
2886
|
+
}
|
2887
|
+
Object.defineProperty(item, 'remove', {
|
2888
|
+
configurable: true,
|
2889
|
+
enumerable: true,
|
2890
|
+
writable: true,
|
2891
|
+
value: function remove() {
|
2892
|
+
if (this.parentNode != null)
|
2893
|
+
this.parentNode.removeChild(this);
|
2894
|
+
}
|
2895
|
+
});
|
2896
|
+
});
|
2897
|
+
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
|
2898
|
+
}
|
2899
|
+
|
2900
|
+
|
2901
|
+
// Polyfill for startsWith
|
2902
|
+
if (!String.prototype.startsWith) {
|
2903
|
+
String.prototype.startsWith = function (searchString, position) {
|
2904
|
+
position = position || 0;
|
2905
|
+
return this.substr(position, searchString.length) === searchString;
|
2906
|
+
};
|
2907
|
+
}
|
2825
2908
|
|
2826
2909
|
/***/ },
|
2827
2910
|
/* 5 */
|
@@ -3895,7 +3978,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3895
3978
|
var height = ul.clientHeight; // force a reflow in Firefox
|
3896
3979
|
setTimeout(function () {
|
3897
3980
|
if (me.expandedItem == domItem) {
|
3898
|
-
|
3981
|
+
var childsHeight = 0;
|
3982
|
+
for (var i = 0; i < ul.childNodes.length; i++) {
|
3983
|
+
childsHeight += ul.childNodes[i].clientHeight;
|
3984
|
+
}
|
3985
|
+
ul.style.height = childsHeight + 'px';
|
3899
3986
|
ul.style.padding = '5px 10px';
|
3900
3987
|
}
|
3901
3988
|
}, 0);
|
@@ -4412,16 +4499,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4412
4499
|
return (this.parent ? this.parent.getLevel() + 1 : 0);
|
4413
4500
|
};
|
4414
4501
|
|
4415
|
-
/**
|
4416
|
-
* Get path of the root node till the current node
|
4417
|
-
* @return {Node[]} Returns an array with nodes
|
4418
|
-
*/
|
4419
|
-
Node.prototype.getNodePath = function() {
|
4420
|
-
var path = this.parent ? this.parent.getNodePath() : [];
|
4421
|
-
path.push(this);
|
4422
|
-
return path;
|
4423
|
-
};
|
4424
|
-
|
4425
4502
|
/**
|
4426
4503
|
* Create a clone of a node
|
4427
4504
|
* The complete state of a clone is copied, including whether it is expanded or
|
@@ -4896,7 +4973,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4896
4973
|
|
4897
4974
|
case 'value':
|
4898
4975
|
default:
|
4899
|
-
if (dom.
|
4976
|
+
if (dom.select) {
|
4977
|
+
// enum select box
|
4978
|
+
dom.select.focus();
|
4979
|
+
}
|
4980
|
+
else if (dom.value && !this._hasChilds()) {
|
4900
4981
|
dom.value.focus();
|
4901
4982
|
util.selectContentEditable(dom.value);
|
4902
4983
|
}
|
@@ -7211,6 +7292,32 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7211
7292
|
'but always returned as string.'
|
7212
7293
|
};
|
7213
7294
|
|
7295
|
+
Node.prototype.addTemplates = function (menu, append) {
|
7296
|
+
var node = this;
|
7297
|
+
var templates = node.editor.options.templates;
|
7298
|
+
if (templates == null) return;
|
7299
|
+
if (templates.length) {
|
7300
|
+
// create a separator
|
7301
|
+
menu.push({
|
7302
|
+
'type': 'separator'
|
7303
|
+
});
|
7304
|
+
}
|
7305
|
+
var appendData = function (name, data) {
|
7306
|
+
node._onAppend(name, data);
|
7307
|
+
};
|
7308
|
+
var insertData = function (name, data) {
|
7309
|
+
node._onInsertBefore(name, data);
|
7310
|
+
};
|
7311
|
+
templates.forEach(function (template) {
|
7312
|
+
menu.push({
|
7313
|
+
text: template.text,
|
7314
|
+
className: (template.className || 'jsoneditor-type-object'),
|
7315
|
+
title: template.title,
|
7316
|
+
click: (append ? appendData.bind(this, template.field, template.value) : insertData.bind(this, template.field, template.value))
|
7317
|
+
});
|
7318
|
+
});
|
7319
|
+
};
|
7320
|
+
|
7214
7321
|
/**
|
7215
7322
|
* Show a contextmenu for this node
|
7216
7323
|
* @param {HTMLElement} anchor Anchor element to attach the context menu to
|
@@ -7310,52 +7417,91 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7310
7417
|
// create append button (for last child node only)
|
7311
7418
|
var childs = node.parent.childs;
|
7312
7419
|
if (node == childs[childs.length - 1]) {
|
7313
|
-
|
7314
|
-
|
7315
|
-
|
7316
|
-
|
7317
|
-
|
7318
|
-
|
7319
|
-
|
7320
|
-
|
7321
|
-
|
7322
|
-
|
7420
|
+
var appendSubmenu = [
|
7421
|
+
{
|
7422
|
+
text: 'Auto',
|
7423
|
+
className: 'jsoneditor-type-auto',
|
7424
|
+
title: titles.auto,
|
7425
|
+
click: function () {
|
7426
|
+
node._onAppend('', '', 'auto');
|
7427
|
+
}
|
7428
|
+
},
|
7429
|
+
{
|
7430
|
+
text: 'Array',
|
7431
|
+
className: 'jsoneditor-type-array',
|
7432
|
+
title: titles.array,
|
7433
|
+
click: function () {
|
7434
|
+
node._onAppend('', []);
|
7435
|
+
}
|
7436
|
+
},
|
7437
|
+
{
|
7438
|
+
text: 'Object',
|
7439
|
+
className: 'jsoneditor-type-object',
|
7440
|
+
title: titles.object,
|
7441
|
+
click: function () {
|
7442
|
+
node._onAppend('', {});
|
7443
|
+
}
|
7444
|
+
},
|
7445
|
+
{
|
7446
|
+
text: 'String',
|
7447
|
+
className: 'jsoneditor-type-string',
|
7448
|
+
title: titles.string,
|
7449
|
+
click: function () {
|
7450
|
+
node._onAppend('', '', 'string');
|
7451
|
+
}
|
7452
|
+
}
|
7453
|
+
];
|
7454
|
+
node.addTemplates(appendSubmenu, true);
|
7455
|
+
items.push({
|
7456
|
+
text: 'Append',
|
7457
|
+
title: 'Append a new field with type \'auto\' after this field (Ctrl+Shift+Ins)',
|
7458
|
+
submenuTitle: 'Select the type of the field to be appended',
|
7459
|
+
className: 'jsoneditor-append',
|
7460
|
+
click: function () {
|
7461
|
+
node._onAppend('', '', 'auto');
|
7462
|
+
},
|
7463
|
+
submenu: appendSubmenu
|
7464
|
+
});
|
7465
|
+
}
|
7466
|
+
|
7467
|
+
|
7468
|
+
|
7469
|
+
// create insert button
|
7470
|
+
var insertSubmenu = [
|
7471
|
+
{
|
7323
7472
|
text: 'Auto',
|
7324
7473
|
className: 'jsoneditor-type-auto',
|
7325
7474
|
title: titles.auto,
|
7326
7475
|
click: function () {
|
7327
|
-
|
7476
|
+
node._onInsertBefore('', '', 'auto');
|
7328
7477
|
}
|
7329
|
-
|
7330
|
-
|
7478
|
+
},
|
7479
|
+
{
|
7331
7480
|
text: 'Array',
|
7332
7481
|
className: 'jsoneditor-type-array',
|
7333
7482
|
title: titles.array,
|
7334
7483
|
click: function () {
|
7335
|
-
|
7484
|
+
node._onInsertBefore('', []);
|
7336
7485
|
}
|
7337
|
-
|
7338
|
-
|
7486
|
+
},
|
7487
|
+
{
|
7339
7488
|
text: 'Object',
|
7340
7489
|
className: 'jsoneditor-type-object',
|
7341
7490
|
title: titles.object,
|
7342
7491
|
click: function () {
|
7343
|
-
|
7492
|
+
node._onInsertBefore('', {});
|
7344
7493
|
}
|
7345
|
-
|
7346
|
-
|
7494
|
+
},
|
7495
|
+
{
|
7347
7496
|
text: 'String',
|
7348
7497
|
className: 'jsoneditor-type-string',
|
7349
7498
|
title: titles.string,
|
7350
7499
|
click: function () {
|
7351
|
-
|
7500
|
+
node._onInsertBefore('', '', 'string');
|
7352
7501
|
}
|
7353
|
-
|
7354
|
-
|
7355
|
-
|
7356
|
-
}
|
7357
|
-
|
7358
|
-
// create insert button
|
7502
|
+
}
|
7503
|
+
];
|
7504
|
+
node.addTemplates(insertSubmenu, false);
|
7359
7505
|
items.push({
|
7360
7506
|
text: 'Insert',
|
7361
7507
|
title: 'Insert a new field with type \'auto\' before this field (Ctrl+Ins)',
|
@@ -7364,40 +7510,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7364
7510
|
click: function () {
|
7365
7511
|
node._onInsertBefore('', '', 'auto');
|
7366
7512
|
},
|
7367
|
-
submenu:
|
7368
|
-
{
|
7369
|
-
text: 'Auto',
|
7370
|
-
className: 'jsoneditor-type-auto',
|
7371
|
-
title: titles.auto,
|
7372
|
-
click: function () {
|
7373
|
-
node._onInsertBefore('', '', 'auto');
|
7374
|
-
}
|
7375
|
-
},
|
7376
|
-
{
|
7377
|
-
text: 'Array',
|
7378
|
-
className: 'jsoneditor-type-array',
|
7379
|
-
title: titles.array,
|
7380
|
-
click: function () {
|
7381
|
-
node._onInsertBefore('', []);
|
7382
|
-
}
|
7383
|
-
},
|
7384
|
-
{
|
7385
|
-
text: 'Object',
|
7386
|
-
className: 'jsoneditor-type-object',
|
7387
|
-
title: titles.object,
|
7388
|
-
click: function () {
|
7389
|
-
node._onInsertBefore('', {});
|
7390
|
-
}
|
7391
|
-
},
|
7392
|
-
{
|
7393
|
-
text: 'String',
|
7394
|
-
className: 'jsoneditor-type-string',
|
7395
|
-
title: titles.string,
|
7396
|
-
click: function () {
|
7397
|
-
node._onInsertBefore('', '', 'string');
|
7398
|
-
}
|
7399
|
-
}
|
7400
|
-
]
|
7513
|
+
submenu: insertSubmenu
|
7401
7514
|
});
|
7402
7515
|
|
7403
7516
|
if (this.editable.field) {
|
@@ -7761,50 +7874,52 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7761
7874
|
AppendNode.prototype.showContextMenu = function (anchor, onClose) {
|
7762
7875
|
var node = this;
|
7763
7876
|
var titles = Node.TYPE_TITLES;
|
7877
|
+
var appendSubmenu = [
|
7878
|
+
{
|
7879
|
+
text: 'Auto',
|
7880
|
+
className: 'jsoneditor-type-auto',
|
7881
|
+
title: titles.auto,
|
7882
|
+
click: function () {
|
7883
|
+
node._onAppend('', '', 'auto');
|
7884
|
+
}
|
7885
|
+
},
|
7886
|
+
{
|
7887
|
+
text: 'Array',
|
7888
|
+
className: 'jsoneditor-type-array',
|
7889
|
+
title: titles.array,
|
7890
|
+
click: function () {
|
7891
|
+
node._onAppend('', []);
|
7892
|
+
}
|
7893
|
+
},
|
7894
|
+
{
|
7895
|
+
text: 'Object',
|
7896
|
+
className: 'jsoneditor-type-object',
|
7897
|
+
title: titles.object,
|
7898
|
+
click: function () {
|
7899
|
+
node._onAppend('', {});
|
7900
|
+
}
|
7901
|
+
},
|
7902
|
+
{
|
7903
|
+
text: 'String',
|
7904
|
+
className: 'jsoneditor-type-string',
|
7905
|
+
title: titles.string,
|
7906
|
+
click: function () {
|
7907
|
+
node._onAppend('', '', 'string');
|
7908
|
+
}
|
7909
|
+
}
|
7910
|
+
];
|
7911
|
+
node.addTemplates(appendSubmenu, true);
|
7764
7912
|
var items = [
|
7765
7913
|
// create append button
|
7766
7914
|
{
|
7767
|
-
'text': 'Append',
|
7915
|
+
'text': 'Append!',
|
7768
7916
|
'title': 'Append a new field with type \'auto\' (Ctrl+Shift+Ins)',
|
7769
7917
|
'submenuTitle': 'Select the type of the field to be appended',
|
7770
7918
|
'className': 'jsoneditor-insert',
|
7771
7919
|
'click': function () {
|
7772
7920
|
node._onAppend('', '', 'auto');
|
7773
7921
|
},
|
7774
|
-
'submenu':
|
7775
|
-
{
|
7776
|
-
'text': 'Auto',
|
7777
|
-
'className': 'jsoneditor-type-auto',
|
7778
|
-
'title': titles.auto,
|
7779
|
-
'click': function () {
|
7780
|
-
node._onAppend('', '', 'auto');
|
7781
|
-
}
|
7782
|
-
},
|
7783
|
-
{
|
7784
|
-
'text': 'Array',
|
7785
|
-
'className': 'jsoneditor-type-array',
|
7786
|
-
'title': titles.array,
|
7787
|
-
'click': function () {
|
7788
|
-
node._onAppend('', []);
|
7789
|
-
}
|
7790
|
-
},
|
7791
|
-
{
|
7792
|
-
'text': 'Object',
|
7793
|
-
'className': 'jsoneditor-type-object',
|
7794
|
-
'title': titles.object,
|
7795
|
-
'click': function () {
|
7796
|
-
node._onAppend('', {});
|
7797
|
-
}
|
7798
|
-
},
|
7799
|
-
{
|
7800
|
-
'text': 'String',
|
7801
|
-
'className': 'jsoneditor-type-string',
|
7802
|
-
'title': titles.string,
|
7803
|
-
'click': function () {
|
7804
|
-
node._onAppend('', '', 'string');
|
7805
|
-
}
|
7806
|
-
}
|
7807
|
-
]
|
7922
|
+
'submenu': appendSubmenu
|
7808
7923
|
}
|
7809
7924
|
];
|
7810
7925
|
|
@@ -7979,18 +8094,383 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7979
8094
|
|
7980
8095
|
/***/ },
|
7981
8096
|
/* 12 */
|
7982
|
-
/***/ function(module, exports
|
8097
|
+
/***/ function(module, exports) {
|
7983
8098
|
|
7984
8099
|
'use strict';
|
7985
8100
|
|
7986
|
-
|
7987
|
-
|
7988
|
-
|
7989
|
-
|
7990
|
-
|
7991
|
-
|
8101
|
+
function completely(config) {
|
8102
|
+
config = config || {};
|
8103
|
+
config.confirmKeys = config.confirmKeys || [39, 35, 9] // right, end, tab
|
8104
|
+
|
8105
|
+
var fontSize = '';
|
8106
|
+
var fontFamily = '';
|
8107
|
+
|
8108
|
+
var wrapper = document.createElement('div');
|
8109
|
+
wrapper.style.position = 'relative';
|
8110
|
+
wrapper.style.outline = '0';
|
8111
|
+
wrapper.style.border = '0';
|
8112
|
+
wrapper.style.margin = '0';
|
8113
|
+
wrapper.style.padding = '0';
|
8114
|
+
|
8115
|
+
var dropDown = document.createElement('div');
|
8116
|
+
dropDown.className = 'autocomplete dropdown';
|
8117
|
+
dropDown.style.position = 'absolute';
|
8118
|
+
dropDown.style.visibility = 'hidden';
|
8119
|
+
|
8120
|
+
var spacer;
|
8121
|
+
var leftSide; // <-- it will contain the leftSide part of the textfield (the bit that was already autocompleted)
|
8122
|
+
var createDropDownController = function (elem, rs) {
|
8123
|
+
var rows = [];
|
8124
|
+
var ix = 0;
|
8125
|
+
var oldIndex = -1;
|
8126
|
+
|
8127
|
+
var onMouseOver = function () { this.style.outline = '1px solid #ddd'; }
|
8128
|
+
var onMouseOut = function () { this.style.outline = '0'; }
|
8129
|
+
var onMouseDown = function () { p.hide(); p.onmouseselection(this.__hint, p.rs); }
|
8130
|
+
|
8131
|
+
var p = {
|
8132
|
+
rs: rs,
|
8133
|
+
hide: function () {
|
8134
|
+
elem.style.visibility = 'hidden';
|
8135
|
+
//rs.hideDropDown();
|
8136
|
+
},
|
8137
|
+
refresh: function (token, array) {
|
8138
|
+
elem.style.visibility = 'hidden';
|
8139
|
+
ix = 0;
|
8140
|
+
elem.innerHTML = '';
|
8141
|
+
var vph = (window.innerHeight || document.documentElement.clientHeight);
|
8142
|
+
var rect = elem.parentNode.getBoundingClientRect();
|
8143
|
+
var distanceToTop = rect.top - 6; // heuristic give 6px
|
8144
|
+
var distanceToBottom = vph - rect.bottom - 6; // distance from the browser border.
|
8145
|
+
|
8146
|
+
rows = [];
|
8147
|
+
for (var i = 0; i < array.length; i++) {
|
8148
|
+
if (array[i].indexOf(token) !== 0) { continue; }
|
8149
|
+
var divRow = document.createElement('div');
|
8150
|
+
divRow.className = 'item';
|
8151
|
+
//divRow.style.color = config.color;
|
8152
|
+
divRow.onmouseover = onMouseOver;
|
8153
|
+
divRow.onmouseout = onMouseOut;
|
8154
|
+
divRow.onmousedown = onMouseDown;
|
8155
|
+
divRow.__hint = array[i];
|
8156
|
+
divRow.innerHTML = token + '<b>' + array[i].substring(token.length) + '</b>';
|
8157
|
+
rows.push(divRow);
|
8158
|
+
elem.appendChild(divRow);
|
8159
|
+
}
|
8160
|
+
if (rows.length === 0) {
|
8161
|
+
return; // nothing to show.
|
8162
|
+
}
|
8163
|
+
if (rows.length === 1 && token === rows[0].__hint) {
|
8164
|
+
return; // do not show the dropDown if it has only one element which matches what we have just displayed.
|
8165
|
+
}
|
8166
|
+
|
8167
|
+
if (rows.length < 2) return;
|
8168
|
+
p.highlight(0);
|
8169
|
+
|
8170
|
+
if (distanceToTop > distanceToBottom * 3) { // Heuristic (only when the distance to the to top is 4 times more than distance to the bottom
|
8171
|
+
elem.style.maxHeight = distanceToTop + 'px'; // we display the dropDown on the top of the input text
|
8172
|
+
elem.style.top = '';
|
8173
|
+
elem.style.bottom = '100%';
|
8174
|
+
} else {
|
8175
|
+
elem.style.top = '100%';
|
8176
|
+
elem.style.bottom = '';
|
8177
|
+
elem.style.maxHeight = distanceToBottom + 'px';
|
8178
|
+
}
|
8179
|
+
elem.style.visibility = 'visible';
|
8180
|
+
},
|
8181
|
+
highlight: function (index) {
|
8182
|
+
if (oldIndex != -1 && rows[oldIndex]) {
|
8183
|
+
rows[oldIndex].className = "item";
|
8184
|
+
}
|
8185
|
+
rows[index].className = "item hover";
|
8186
|
+
oldIndex = index;
|
8187
|
+
},
|
8188
|
+
move: function (step) { // moves the selection either up or down (unless it's not possible) step is either +1 or -1.
|
8189
|
+
if (elem.style.visibility === 'hidden') return ''; // nothing to move if there is no dropDown. (this happens if the user hits escape and then down or up)
|
8190
|
+
if (ix + step === -1 || ix + step === rows.length) return rows[ix].__hint; // NO CIRCULAR SCROLLING.
|
8191
|
+
ix += step;
|
8192
|
+
p.highlight(ix);
|
8193
|
+
return rows[ix].__hint;//txtShadow.value = uRows[uIndex].__hint ;
|
8194
|
+
},
|
8195
|
+
onmouseselection: function () { } // it will be overwritten.
|
8196
|
+
};
|
8197
|
+
return p;
|
8198
|
+
}
|
8199
|
+
|
8200
|
+
function setEndOfContenteditable(contentEditableElement) {
|
8201
|
+
var range, selection;
|
8202
|
+
if (document.createRange)//Firefox, Chrome, Opera, Safari, IE 9+
|
8203
|
+
{
|
8204
|
+
range = document.createRange();//Create a range (a range is a like the selection but invisible)
|
8205
|
+
range.selectNodeContents(contentEditableElement);//Select the entire contents of the element with the range
|
8206
|
+
range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start
|
8207
|
+
selection = window.getSelection();//get the selection object (allows you to change selection)
|
8208
|
+
selection.removeAllRanges();//remove any selections already made
|
8209
|
+
selection.addRange(range);//make the range you have just created the visible selection
|
8210
|
+
}
|
8211
|
+
else if (document.selection)//IE 8 and lower
|
8212
|
+
{
|
8213
|
+
range = document.body.createTextRange();//Create a range (a range is a like the selection but invisible)
|
8214
|
+
range.moveToElementText(contentEditableElement);//Select the entire contents of the element with the range
|
8215
|
+
range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start
|
8216
|
+
range.select();//Select the range (make it the visible selection
|
8217
|
+
}
|
8218
|
+
}
|
8219
|
+
|
8220
|
+
function calculateWidthForText(text) {
|
8221
|
+
if (spacer === undefined) { // on first call only.
|
8222
|
+
spacer = document.createElement('span');
|
8223
|
+
spacer.style.visibility = 'hidden';
|
8224
|
+
spacer.style.position = 'fixed';
|
8225
|
+
spacer.style.outline = '0';
|
8226
|
+
spacer.style.margin = '0';
|
8227
|
+
spacer.style.padding = '0';
|
8228
|
+
spacer.style.border = '0';
|
8229
|
+
spacer.style.left = '0';
|
8230
|
+
spacer.style.whiteSpace = 'pre';
|
8231
|
+
spacer.style.fontSize = fontSize;
|
8232
|
+
spacer.style.fontFamily = fontFamily;
|
8233
|
+
spacer.style.fontWeight = 'normal';
|
8234
|
+
document.body.appendChild(spacer);
|
8235
|
+
}
|
8236
|
+
|
8237
|
+
// Used to encode an HTML string into a plain text.
|
8238
|
+
// taken from http://stackoverflow.com/questions/1219860/javascript-jquery-html-encoding
|
8239
|
+
spacer.innerHTML = String(text).replace(/&/g, '&')
|
8240
|
+
.replace(/"/g, '"')
|
8241
|
+
.replace(/'/g, ''')
|
8242
|
+
.replace(/</g, '<')
|
8243
|
+
.replace(/>/g, '>');
|
8244
|
+
return spacer.getBoundingClientRect().right;
|
8245
|
+
}
|
8246
|
+
|
8247
|
+
var rs = {
|
8248
|
+
onArrowDown: function () { }, // defaults to no action.
|
8249
|
+
onArrowUp: function () { }, // defaults to no action.
|
8250
|
+
onEnter: function () { }, // defaults to no action.
|
8251
|
+
onTab: function () { }, // defaults to no action.
|
8252
|
+
startFrom: 0,
|
8253
|
+
options: [],
|
8254
|
+
element: null,
|
8255
|
+
elementHint: null,
|
8256
|
+
elementStyle: null,
|
8257
|
+
wrapper: wrapper, // Only to allow easy access to the HTML elements to the final user (possibly for minor customizations)
|
8258
|
+
show: function (element, startPos, options) {
|
8259
|
+
this.startFrom = startPos;
|
8260
|
+
this.wrapper.remove();
|
8261
|
+
if (this.elementHint) {
|
8262
|
+
this.elementHint.remove();
|
8263
|
+
this.elementHint = null;
|
8264
|
+
}
|
8265
|
+
|
8266
|
+
if (fontSize == '') {
|
8267
|
+
fontSize = window.getComputedStyle(element).getPropertyValue('font-size');
|
8268
|
+
}
|
8269
|
+
if (fontFamily == '') {
|
8270
|
+
fontFamily = window.getComputedStyle(element).getPropertyValue('font-family');
|
8271
|
+
}
|
8272
|
+
|
8273
|
+
var w = element.getBoundingClientRect().right - element.getBoundingClientRect().left;
|
8274
|
+
dropDown.style.marginLeft = '0';
|
8275
|
+
dropDown.style.marginTop = element.getBoundingClientRect().height + 'px';
|
8276
|
+
this.options = options;
|
8277
|
+
|
8278
|
+
if (this.element != element) {
|
8279
|
+
this.element = element;
|
8280
|
+
this.elementStyle = {
|
8281
|
+
zIndex: this.element.style.zIndex,
|
8282
|
+
position: this.element.style.position,
|
8283
|
+
backgroundColor: this.element.style.backgroundColor,
|
8284
|
+
borderColor: this.element.style.borderColor
|
8285
|
+
}
|
8286
|
+
}
|
8287
|
+
|
8288
|
+
this.element.style.zIndex = 3;
|
8289
|
+
this.element.style.position = 'relative';
|
8290
|
+
this.element.style.backgroundColor = 'transparent';
|
8291
|
+
this.element.style.borderColor = 'transparent';
|
8292
|
+
|
8293
|
+
this.elementHint = element.cloneNode();
|
8294
|
+
this.elementHint.className = 'autocomplete hint';
|
8295
|
+
this.elementHint.style.zIndex = 2;
|
8296
|
+
this.elementHint.style.position = 'absolute';
|
8297
|
+
this.elementHint.onfocus = function () { this.element.focus(); }.bind(this);
|
8298
|
+
|
8299
|
+
|
8300
|
+
|
8301
|
+
if (this.element.addEventListener) {
|
8302
|
+
this.element.removeEventListener("keydown", keyDownHandler);
|
8303
|
+
this.element.addEventListener("keydown", keyDownHandler, false);
|
8304
|
+
this.element.removeEventListener("blur", onBlurHandler);
|
8305
|
+
this.element.addEventListener("blur", onBlurHandler, false);
|
8306
|
+
}
|
8307
|
+
|
8308
|
+
wrapper.appendChild(this.elementHint);
|
8309
|
+
wrapper.appendChild(dropDown);
|
8310
|
+
element.parentElement.appendChild(wrapper);
|
8311
|
+
|
8312
|
+
|
8313
|
+
this.repaint(element);
|
8314
|
+
},
|
8315
|
+
setText: function (text) {
|
8316
|
+
this.element.innerText = text;
|
8317
|
+
},
|
8318
|
+
getText: function () {
|
8319
|
+
return this.element.innerText;
|
8320
|
+
},
|
8321
|
+
hideDropDown: function () {
|
8322
|
+
this.wrapper.remove();
|
8323
|
+
if (this.elementHint) {
|
8324
|
+
this.elementHint.remove();
|
8325
|
+
this.elementHint = null;
|
8326
|
+
dropDownController.hide();
|
8327
|
+
this.element.style.zIndex = this.elementStyle.zIndex;
|
8328
|
+
this.element.style.position = this.elementStyle.position;
|
8329
|
+
this.element.style.backgroundColor = this.elementStyle.backgroundColor;
|
8330
|
+
this.element.style.borderColor = this.elementStyle.borderColor;
|
8331
|
+
}
|
8332
|
+
|
8333
|
+
},
|
8334
|
+
repaint: function (element) {
|
8335
|
+
var text = element.innerText;
|
8336
|
+
text = text.replace('\n', '');
|
8337
|
+
|
8338
|
+
var startFrom = this.startFrom;
|
8339
|
+
var options = this.options;
|
8340
|
+
var optionsLength = this.options.length;
|
8341
|
+
|
8342
|
+
// breaking text in leftSide and token.
|
8343
|
+
|
8344
|
+
var token = text.substring(this.startFrom);
|
8345
|
+
leftSide = text.substring(0, this.startFrom);
|
8346
|
+
|
8347
|
+
for (var i = 0; i < optionsLength; i++) {
|
8348
|
+
var opt = this.options[i];
|
8349
|
+
if (opt.indexOf(token) === 0) { // <-- how about upperCase vs. lowercase
|
8350
|
+
this.elementHint.innerText = leftSide + opt;
|
8351
|
+
break;
|
8352
|
+
}
|
8353
|
+
}
|
8354
|
+
// moving the dropDown and refreshing it.
|
8355
|
+
dropDown.style.left = calculateWidthForText(leftSide) + 'px';
|
8356
|
+
dropDownController.refresh(token, this.options);
|
8357
|
+
this.elementHint.style.width = calculateWidthForText(this.elementHint.innerText) + 10 + 'px'
|
8358
|
+
var wasDropDownHidden = (dropDown.style.visibility == 'hidden');
|
8359
|
+
if (!wasDropDownHidden)
|
8360
|
+
this.elementHint.style.width = calculateWidthForText(this.elementHint.innerText) + dropDown.clientWidth + 'px';
|
8361
|
+
}
|
8362
|
+
};
|
8363
|
+
|
8364
|
+
var dropDownController = createDropDownController(dropDown, rs);
|
8365
|
+
|
8366
|
+
var keyDownHandler = function (e) {
|
8367
|
+
//console.log("Keydown:" + e.keyCode);
|
8368
|
+
e = e || window.event;
|
8369
|
+
var keyCode = e.keyCode;
|
8370
|
+
|
8371
|
+
if (this.elementHint == null) return;
|
8372
|
+
|
8373
|
+
if (keyCode == 33) { return; } // page up (do nothing)
|
8374
|
+
if (keyCode == 34) { return; } // page down (do nothing);
|
8375
|
+
|
8376
|
+
if (keyCode == 27) { //escape
|
8377
|
+
rs.hideDropDown();
|
8378
|
+
rs.element.focus();
|
8379
|
+
e.preventDefault();
|
8380
|
+
e.stopPropagation();
|
8381
|
+
return;
|
8382
|
+
}
|
8383
|
+
|
8384
|
+
if (config.confirmKeys.indexOf(keyCode) >= 0) { // (autocomplete triggered)
|
8385
|
+
if (keyCode == 9) {
|
8386
|
+
if (this.elementHint.innerText.length == 0) {
|
8387
|
+
rs.onTab();
|
8388
|
+
}
|
8389
|
+
}
|
8390
|
+
if (this.elementHint.innerText.length > 0) { // if there is a hint
|
8391
|
+
if (this.element.innerText != this.elementHint.innerText) {
|
8392
|
+
this.element.innerText = this.elementHint.innerText;
|
8393
|
+
rs.hideDropDown();
|
8394
|
+
setEndOfContenteditable(this.element);
|
8395
|
+
if (keyCode == 9) {
|
8396
|
+
rs.element.focus();
|
8397
|
+
e.preventDefault();
|
8398
|
+
e.stopPropagation();
|
8399
|
+
}
|
8400
|
+
}
|
8401
|
+
}
|
8402
|
+
return;
|
8403
|
+
}
|
8404
|
+
|
8405
|
+
if (keyCode == 13) { // enter (autocomplete triggered)
|
8406
|
+
if (this.elementHint.innerText.length == 0) { // if there is a hint
|
8407
|
+
rs.onEnter();
|
8408
|
+
} else {
|
8409
|
+
var wasDropDownHidden = (dropDown.style.visibility == 'hidden');
|
8410
|
+
dropDownController.hide();
|
8411
|
+
|
8412
|
+
if (wasDropDownHidden) {
|
8413
|
+
rs.hideDropDown();
|
8414
|
+
rs.element.focus();
|
8415
|
+
rs.onEnter();
|
8416
|
+
return;
|
8417
|
+
}
|
8418
|
+
|
8419
|
+
this.element.innerText = this.elementHint.innerText;
|
8420
|
+
rs.hideDropDown();
|
8421
|
+
setEndOfContenteditable(this.element);
|
8422
|
+
e.preventDefault();
|
8423
|
+
e.stopPropagation();
|
8424
|
+
}
|
8425
|
+
return;
|
8426
|
+
}
|
8427
|
+
|
8428
|
+
if (keyCode == 40) { // down
|
8429
|
+
var m = dropDownController.move(+1);
|
8430
|
+
if (m == '') { rs.onArrowDown(); }
|
8431
|
+
this.elementHint.innerText = leftSide + m;
|
8432
|
+
e.preventDefault();
|
8433
|
+
e.stopPropagation();
|
8434
|
+
return;
|
8435
|
+
}
|
8436
|
+
|
8437
|
+
if (keyCode == 38) { // up
|
8438
|
+
var m = dropDownController.move(-1);
|
8439
|
+
if (m == '') { rs.onArrowUp(); }
|
8440
|
+
this.elementHint.innerText = leftSide + m;
|
8441
|
+
e.preventDefault();
|
8442
|
+
e.stopPropagation();
|
8443
|
+
return;
|
8444
|
+
}
|
8445
|
+
|
8446
|
+
}.bind(rs);
|
8447
|
+
|
8448
|
+
var onBlurHandler = function (e) {
|
8449
|
+
rs.hideDropDown();
|
8450
|
+
//console.log("Lost focus.");
|
8451
|
+
}.bind(rs);
|
8452
|
+
|
8453
|
+
dropDownController.onmouseselection = function (text, rs) {
|
8454
|
+
rs.element.innerText = rs.elementHint.innerText = leftSide + text;
|
8455
|
+
rs.hideDropDown();
|
8456
|
+
window.setTimeout(function () {
|
8457
|
+
rs.element.focus();
|
8458
|
+
setEndOfContenteditable(rs.element);
|
8459
|
+
}, 1);
|
8460
|
+
};
|
8461
|
+
|
8462
|
+
return rs;
|
7992
8463
|
}
|
7993
8464
|
|
8465
|
+
module.exports = completely;
|
8466
|
+
|
8467
|
+
/***/ },
|
8468
|
+
/* 13 */
|
8469
|
+
/***/ function(module, exports, __webpack_require__) {
|
8470
|
+
|
8471
|
+
'use strict';
|
8472
|
+
|
8473
|
+
var ace = __webpack_require__(14);
|
7994
8474
|
var ModeSwitcher = __webpack_require__(11);
|
7995
8475
|
var util = __webpack_require__(4);
|
7996
8476
|
|
@@ -8014,6 +8494,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8014
8494
|
* triggered on change
|
8015
8495
|
* {function} onModeChange Callback method
|
8016
8496
|
* triggered after setMode
|
8497
|
+
* {function} onEditable Determine if textarea is readOnly
|
8498
|
+
* readOnly defaults true
|
8017
8499
|
* {Object} ace A custom instance of
|
8018
8500
|
* Ace editor.
|
8019
8501
|
* {boolean} escapeUnicode If true, unicode
|
@@ -8036,6 +8518,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8036
8518
|
|
8037
8519
|
// grab ace from options if provided
|
8038
8520
|
var _ace = options.ace ? options.ace : ace;
|
8521
|
+
// TODO: make the option options.ace deprecated, it's not needed anymore (see #309)
|
8039
8522
|
|
8040
8523
|
// determine mode
|
8041
8524
|
this.mode = (options.mode == 'code') ? 'code' : 'text';
|
@@ -8049,8 +8532,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8049
8532
|
|
8050
8533
|
// determine theme
|
8051
8534
|
this.theme = options.theme || DEFAULT_THEME;
|
8052
|
-
if (this.theme === DEFAULT_THEME &&
|
8053
|
-
|
8535
|
+
if (this.theme === DEFAULT_THEME && _ace) {
|
8536
|
+
try {
|
8537
|
+
__webpack_require__(18);
|
8538
|
+
}
|
8539
|
+
catch (err) {
|
8540
|
+
console.error(err);
|
8541
|
+
}
|
8054
8542
|
}
|
8055
8543
|
|
8056
8544
|
var me = this;
|
@@ -8122,6 +8610,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8122
8610
|
});
|
8123
8611
|
}
|
8124
8612
|
|
8613
|
+
var emptyNode = {};
|
8614
|
+
var isReadOnly = (this.options.onEditable
|
8615
|
+
&& typeof(this.options.onEditable === 'function')
|
8616
|
+
&& !this.options.onEditable(emptyNode));
|
8617
|
+
|
8125
8618
|
this.content = document.createElement('div');
|
8126
8619
|
this.content.className = 'jsoneditor-outer';
|
8127
8620
|
this.frame.appendChild(this.content);
|
@@ -8137,6 +8630,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8137
8630
|
var aceEditor = _ace.edit(this.editorDom);
|
8138
8631
|
aceEditor.$blockScrolling = Infinity;
|
8139
8632
|
aceEditor.setTheme(this.theme);
|
8633
|
+
aceEditor.setOptions({ readOnly: isReadOnly });
|
8140
8634
|
aceEditor.setShowPrintMargin(false);
|
8141
8635
|
aceEditor.setFontSize(13);
|
8142
8636
|
aceEditor.getSession().setMode('ace/mode/json');
|
@@ -8184,6 +8678,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8184
8678
|
textarea.spellcheck = false;
|
8185
8679
|
this.content.appendChild(textarea);
|
8186
8680
|
this.textarea = textarea;
|
8681
|
+
this.textarea.readOnly = isReadOnly;
|
8187
8682
|
|
8188
8683
|
// register onchange event
|
8189
8684
|
if (this.textarea.oninput === null) {
|
@@ -8195,7 +8690,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8195
8690
|
}
|
8196
8691
|
}
|
8197
8692
|
|
8198
|
-
this.setSchema(this.options.schema);
|
8693
|
+
this.setSchema(this.options.schema, this.options.schemaRefs);
|
8199
8694
|
};
|
8200
8695
|
|
8201
8696
|
/**
|
@@ -8480,21 +8975,34 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8480
8975
|
|
8481
8976
|
|
8482
8977
|
/***/ },
|
8483
|
-
/*
|
8978
|
+
/* 14 */
|
8484
8979
|
/***/ function(module, exports, __webpack_require__) {
|
8485
8980
|
|
8486
|
-
|
8487
|
-
|
8981
|
+
var ace
|
8982
|
+
if (window.ace) {
|
8983
|
+
// use the already loaded instance of Ace
|
8984
|
+
ace = window.ace
|
8985
|
+
}
|
8986
|
+
else {
|
8987
|
+
try {
|
8988
|
+
// load brace
|
8989
|
+
ace = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"brace\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
|
8488
8990
|
|
8489
|
-
|
8490
|
-
|
8491
|
-
|
8991
|
+
// load required Ace plugins
|
8992
|
+
__webpack_require__(15);
|
8993
|
+
__webpack_require__(17);
|
8994
|
+
}
|
8995
|
+
catch (err) {
|
8996
|
+
// failed to load brace (can be minimalist bundle).
|
8997
|
+
// No worries, the editor will fall back to plain text if needed.
|
8998
|
+
}
|
8999
|
+
}
|
8492
9000
|
|
8493
9001
|
module.exports = ace;
|
8494
9002
|
|
8495
9003
|
|
8496
9004
|
/***/ },
|
8497
|
-
/*
|
9005
|
+
/* 15 */
|
8498
9006
|
/***/ function(module, exports, __webpack_require__) {
|
8499
9007
|
|
8500
9008
|
ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) {
|
@@ -8605,363 +9113,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8605
9113
|
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
8606
9114
|
});
|
8607
9115
|
|
8608
|
-
ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(acequire, exports, module) {
|
8609
|
-
"use strict";
|
8610
|
-
|
8611
|
-
var oop = acequire("../../lib/oop");
|
8612
|
-
var Behaviour = acequire("../behaviour").Behaviour;
|
8613
|
-
var TokenIterator = acequire("../../token_iterator").TokenIterator;
|
8614
|
-
var lang = acequire("../../lib/lang");
|
8615
|
-
|
8616
|
-
var SAFE_INSERT_IN_TOKENS =
|
8617
|
-
["text", "paren.rparen", "punctuation.operator"];
|
8618
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
8619
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
8620
|
-
|
8621
|
-
var context;
|
8622
|
-
var contextCache = {};
|
8623
|
-
var initContext = function(editor) {
|
8624
|
-
var id = -1;
|
8625
|
-
if (editor.multiSelect) {
|
8626
|
-
id = editor.selection.index;
|
8627
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
8628
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
8629
|
-
}
|
8630
|
-
if (contextCache[id])
|
8631
|
-
return context = contextCache[id];
|
8632
|
-
context = contextCache[id] = {
|
8633
|
-
autoInsertedBrackets: 0,
|
8634
|
-
autoInsertedRow: -1,
|
8635
|
-
autoInsertedLineEnd: "",
|
8636
|
-
maybeInsertedBrackets: 0,
|
8637
|
-
maybeInsertedRow: -1,
|
8638
|
-
maybeInsertedLineStart: "",
|
8639
|
-
maybeInsertedLineEnd: ""
|
8640
|
-
};
|
8641
|
-
};
|
8642
|
-
|
8643
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
8644
|
-
var rowDiff = selection.end.row - selection.start.row;
|
8645
|
-
return {
|
8646
|
-
text: opening + selected + closing,
|
8647
|
-
selection: [
|
8648
|
-
0,
|
8649
|
-
selection.start.column + 1,
|
8650
|
-
rowDiff,
|
8651
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
8652
|
-
]
|
8653
|
-
};
|
8654
|
-
};
|
8655
|
-
|
8656
|
-
var CstyleBehaviour = function() {
|
8657
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
8658
|
-
var cursor = editor.getCursorPosition();
|
8659
|
-
var line = session.doc.getLine(cursor.row);
|
8660
|
-
if (text == '{') {
|
8661
|
-
initContext(editor);
|
8662
|
-
var selection = editor.getSelectionRange();
|
8663
|
-
var selected = session.doc.getTextRange(selection);
|
8664
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
8665
|
-
return getWrapped(selection, selected, '{', '}');
|
8666
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
8667
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
8668
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
8669
|
-
return {
|
8670
|
-
text: '{}',
|
8671
|
-
selection: [1, 1]
|
8672
|
-
};
|
8673
|
-
} else {
|
8674
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
8675
|
-
return {
|
8676
|
-
text: '{',
|
8677
|
-
selection: [1, 1]
|
8678
|
-
};
|
8679
|
-
}
|
8680
|
-
}
|
8681
|
-
} else if (text == '}') {
|
8682
|
-
initContext(editor);
|
8683
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
8684
|
-
if (rightChar == '}') {
|
8685
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
8686
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
8687
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
8688
|
-
return {
|
8689
|
-
text: '',
|
8690
|
-
selection: [1, 1]
|
8691
|
-
};
|
8692
|
-
}
|
8693
|
-
}
|
8694
|
-
} else if (text == "\n" || text == "\r\n") {
|
8695
|
-
initContext(editor);
|
8696
|
-
var closing = "";
|
8697
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
8698
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
8699
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
8700
|
-
}
|
8701
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
8702
|
-
if (rightChar === '}') {
|
8703
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
8704
|
-
if (!openBracePos)
|
8705
|
-
return null;
|
8706
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
8707
|
-
} else if (closing) {
|
8708
|
-
var next_indent = this.$getIndent(line);
|
8709
|
-
} else {
|
8710
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
8711
|
-
return;
|
8712
|
-
}
|
8713
|
-
var indent = next_indent + session.getTabString();
|
8714
|
-
|
8715
|
-
return {
|
8716
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
8717
|
-
selection: [1, indent.length, 1, indent.length]
|
8718
|
-
};
|
8719
|
-
} else {
|
8720
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
8721
|
-
}
|
8722
|
-
});
|
8723
|
-
|
8724
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
8725
|
-
var selected = session.doc.getTextRange(range);
|
8726
|
-
if (!range.isMultiLine() && selected == '{') {
|
8727
|
-
initContext(editor);
|
8728
|
-
var line = session.doc.getLine(range.start.row);
|
8729
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
8730
|
-
if (rightChar == '}') {
|
8731
|
-
range.end.column++;
|
8732
|
-
return range;
|
8733
|
-
} else {
|
8734
|
-
context.maybeInsertedBrackets--;
|
8735
|
-
}
|
8736
|
-
}
|
8737
|
-
});
|
8738
|
-
|
8739
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
8740
|
-
if (text == '(') {
|
8741
|
-
initContext(editor);
|
8742
|
-
var selection = editor.getSelectionRange();
|
8743
|
-
var selected = session.doc.getTextRange(selection);
|
8744
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
8745
|
-
return getWrapped(selection, selected, '(', ')');
|
8746
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
8747
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
8748
|
-
return {
|
8749
|
-
text: '()',
|
8750
|
-
selection: [1, 1]
|
8751
|
-
};
|
8752
|
-
}
|
8753
|
-
} else if (text == ')') {
|
8754
|
-
initContext(editor);
|
8755
|
-
var cursor = editor.getCursorPosition();
|
8756
|
-
var line = session.doc.getLine(cursor.row);
|
8757
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
8758
|
-
if (rightChar == ')') {
|
8759
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
8760
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
8761
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
8762
|
-
return {
|
8763
|
-
text: '',
|
8764
|
-
selection: [1, 1]
|
8765
|
-
};
|
8766
|
-
}
|
8767
|
-
}
|
8768
|
-
}
|
8769
|
-
});
|
8770
|
-
|
8771
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
8772
|
-
var selected = session.doc.getTextRange(range);
|
8773
|
-
if (!range.isMultiLine() && selected == '(') {
|
8774
|
-
initContext(editor);
|
8775
|
-
var line = session.doc.getLine(range.start.row);
|
8776
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
8777
|
-
if (rightChar == ')') {
|
8778
|
-
range.end.column++;
|
8779
|
-
return range;
|
8780
|
-
}
|
8781
|
-
}
|
8782
|
-
});
|
8783
|
-
|
8784
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
8785
|
-
if (text == '[') {
|
8786
|
-
initContext(editor);
|
8787
|
-
var selection = editor.getSelectionRange();
|
8788
|
-
var selected = session.doc.getTextRange(selection);
|
8789
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
8790
|
-
return getWrapped(selection, selected, '[', ']');
|
8791
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
8792
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
8793
|
-
return {
|
8794
|
-
text: '[]',
|
8795
|
-
selection: [1, 1]
|
8796
|
-
};
|
8797
|
-
}
|
8798
|
-
} else if (text == ']') {
|
8799
|
-
initContext(editor);
|
8800
|
-
var cursor = editor.getCursorPosition();
|
8801
|
-
var line = session.doc.getLine(cursor.row);
|
8802
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
8803
|
-
if (rightChar == ']') {
|
8804
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
8805
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
8806
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
8807
|
-
return {
|
8808
|
-
text: '',
|
8809
|
-
selection: [1, 1]
|
8810
|
-
};
|
8811
|
-
}
|
8812
|
-
}
|
8813
|
-
}
|
8814
|
-
});
|
8815
|
-
|
8816
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
8817
|
-
var selected = session.doc.getTextRange(range);
|
8818
|
-
if (!range.isMultiLine() && selected == '[') {
|
8819
|
-
initContext(editor);
|
8820
|
-
var line = session.doc.getLine(range.start.row);
|
8821
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
8822
|
-
if (rightChar == ']') {
|
8823
|
-
range.end.column++;
|
8824
|
-
return range;
|
8825
|
-
}
|
8826
|
-
}
|
8827
|
-
});
|
8828
|
-
|
8829
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
8830
|
-
if (text == '"' || text == "'") {
|
8831
|
-
initContext(editor);
|
8832
|
-
var quote = text;
|
8833
|
-
var selection = editor.getSelectionRange();
|
8834
|
-
var selected = session.doc.getTextRange(selection);
|
8835
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
8836
|
-
return getWrapped(selection, selected, quote, quote);
|
8837
|
-
} else if (!selected) {
|
8838
|
-
var cursor = editor.getCursorPosition();
|
8839
|
-
var line = session.doc.getLine(cursor.row);
|
8840
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
8841
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
8842
|
-
|
8843
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
8844
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
8845
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
8846
|
-
return null;
|
8847
|
-
|
8848
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
8849
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
8850
|
-
|
8851
|
-
var pair;
|
8852
|
-
if (rightChar == quote) {
|
8853
|
-
pair = stringBefore !== stringAfter;
|
8854
|
-
} else {
|
8855
|
-
if (stringBefore && !stringAfter)
|
8856
|
-
return null; // wrap string with different quote
|
8857
|
-
if (stringBefore && stringAfter)
|
8858
|
-
return null; // do not pair quotes inside strings
|
8859
|
-
var wordRe = session.$mode.tokenRe;
|
8860
|
-
wordRe.lastIndex = 0;
|
8861
|
-
var isWordBefore = wordRe.test(leftChar);
|
8862
|
-
wordRe.lastIndex = 0;
|
8863
|
-
var isWordAfter = wordRe.test(leftChar);
|
8864
|
-
if (isWordBefore || isWordAfter)
|
8865
|
-
return null; // before or after alphanumeric
|
8866
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
8867
|
-
return null; // there is rightChar and it isn't closing
|
8868
|
-
pair = true;
|
8869
|
-
}
|
8870
|
-
return {
|
8871
|
-
text: pair ? quote + quote : "",
|
8872
|
-
selection: [1,1]
|
8873
|
-
};
|
8874
|
-
}
|
8875
|
-
}
|
8876
|
-
});
|
8877
|
-
|
8878
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
8879
|
-
var selected = session.doc.getTextRange(range);
|
8880
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
8881
|
-
initContext(editor);
|
8882
|
-
var line = session.doc.getLine(range.start.row);
|
8883
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
8884
|
-
if (rightChar == selected) {
|
8885
|
-
range.end.column++;
|
8886
|
-
return range;
|
8887
|
-
}
|
8888
|
-
}
|
8889
|
-
});
|
8890
|
-
|
8891
|
-
};
|
8892
|
-
|
8893
|
-
|
8894
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
8895
|
-
var cursor = editor.getCursorPosition();
|
8896
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
8897
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
8898
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
8899
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
8900
|
-
return false;
|
8901
|
-
}
|
8902
|
-
iterator.stepForward();
|
8903
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
8904
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
8905
|
-
};
|
8906
|
-
|
8907
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
8908
|
-
return types.indexOf(token.type || token) > -1;
|
8909
|
-
};
|
8910
|
-
|
8911
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
8912
|
-
var cursor = editor.getCursorPosition();
|
8913
|
-
var line = session.doc.getLine(cursor.row);
|
8914
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
8915
|
-
context.autoInsertedBrackets = 0;
|
8916
|
-
context.autoInsertedRow = cursor.row;
|
8917
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
8918
|
-
context.autoInsertedBrackets++;
|
8919
|
-
};
|
8920
|
-
|
8921
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
8922
|
-
var cursor = editor.getCursorPosition();
|
8923
|
-
var line = session.doc.getLine(cursor.row);
|
8924
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
8925
|
-
context.maybeInsertedBrackets = 0;
|
8926
|
-
context.maybeInsertedRow = cursor.row;
|
8927
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
8928
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
8929
|
-
context.maybeInsertedBrackets++;
|
8930
|
-
};
|
8931
|
-
|
8932
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
8933
|
-
return context.autoInsertedBrackets > 0 &&
|
8934
|
-
cursor.row === context.autoInsertedRow &&
|
8935
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
8936
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
8937
|
-
};
|
8938
|
-
|
8939
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
8940
|
-
return context.maybeInsertedBrackets > 0 &&
|
8941
|
-
cursor.row === context.maybeInsertedRow &&
|
8942
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
8943
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
8944
|
-
};
|
8945
|
-
|
8946
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
8947
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
8948
|
-
context.autoInsertedBrackets--;
|
8949
|
-
};
|
8950
|
-
|
8951
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
8952
|
-
if (context) {
|
8953
|
-
context.maybeInsertedBrackets = 0;
|
8954
|
-
context.maybeInsertedRow = -1;
|
8955
|
-
}
|
8956
|
-
};
|
8957
|
-
|
8958
|
-
|
8959
|
-
|
8960
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
8961
|
-
|
8962
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
8963
|
-
});
|
8964
|
-
|
8965
9116
|
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(acequire, exports, module) {
|
8966
9117
|
"use strict";
|
8967
9118
|
|
@@ -9145,7 +9296,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9145
9296
|
};
|
9146
9297
|
|
9147
9298
|
this.createWorker = function(session) {
|
9148
|
-
var worker = new WorkerClient(["ace"], __webpack_require__(
|
9299
|
+
var worker = new WorkerClient(["ace"], __webpack_require__(16), "JsonWorker");
|
9149
9300
|
worker.attachToDocument(session.getDocument());
|
9150
9301
|
|
9151
9302
|
worker.on("annotate", function(e) {
|
@@ -9168,14 +9319,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9168
9319
|
|
9169
9320
|
|
9170
9321
|
/***/ },
|
9171
|
-
/*
|
9322
|
+
/* 16 */
|
9172
9323
|
/***/ function(module, exports) {
|
9173
9324
|
|
9174
9325
|
module.exports.id = 'ace/mode/json_worker';
|
9175
|
-
module.exports.src = "\"no use strict\";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\"\";testPath;){var alias=paths[testPath];if(\"string\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,\"/\")+(tail||alias.main||alias.name);if(alias===!1)return\"\";var i=testPath.lastIndexOf(\"/\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\"error\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return window.normalizeModule(parentId,chunks[0])+\"!\"+window.normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=(base?base+\"/\":\"\")+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,\"\").replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\"worker.js acequire() accepts only (parentId, id) as arguments\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\"unable to load \"+id);var path=resolveModuleId(id,window.acequire.tlns);return\".js\"!=path.slice(-3)&&(path+=\".js\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\"string\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\"function\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\"require\",\"exports\",\"module\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\"require\":return req;case\"exports\":return module.exports;case\"module\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\"ace/lib/event_emitter\").EventEmitter,oop=window.acequire(\"ace/lib/oop\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\"call\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\"event\",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\"Unknown command:\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\"ace/lib/es5-shim\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\"\";switch(delta.action){case\"insert\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\"remove\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert=\"insert\"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),applyDelta=acequire(\"./apply_delta\").applyDelta,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(textOrLines){this.$lines=[\"\"],0===textOrLines.length?this.$lines=[\"\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0===\"aaa\".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\",this._signal(\"changeNewLineMode\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine||\"\\n\"}},this.$autoNewLine=\"\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\"changeNewLineMode\"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\r\\n\"==text||\"\\r\"==text||\"\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\"\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\"),this.insertMergedLines(position,[\"\",\"\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\"insert\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\"\"]),column=0):(lines=[\"\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\"insert\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\"remove\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\"remove\",lines:[\"\",\"\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\"insert\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\"change\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\"\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\"insert\"==delta.action?\"remove\":\"insert\",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if(\"object\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(/</g,\"<\")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define(\"ace/worker/mirror\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/document\",\"ace/lib/lang\"],function(acequire,exports){\"use strict\";acequire(\"../range\").Range;var Document=acequire(\"../document\").Document,lang=acequire(\"../lib/lang\"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(\"\"),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on(\"change\",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:\"insert\",start:data[i],lines:data[i+1]};else var d={action:\"remove\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\"ace/mode/json/json_parse\",[\"require\",\"exports\",\"module\"],function(){\"use strict\";var at,ch,text,value,escapee={'\"':'\"',\"\\\\\":\"\\\\\",\"/\":\"/\",b:\"\\b\",f:\"\\f\",n:\"\\n\",r:\"\\r\",t:\"\t\"},error=function(m){throw{name:\"SyntaxError\",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error(\"Expected '\"+c+\"' instead of '\"+ch+\"'\"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string=\"\";for(\"-\"===ch&&(string=\"-\",next(\"-\"));ch>=\"0\"&&\"9\">=ch;)string+=ch,next();if(\".\"===ch)for(string+=\".\";next()&&ch>=\"0\"&&\"9\">=ch;)string+=ch;if(\"e\"===ch||\"E\"===ch)for(string+=ch,next(),(\"-\"===ch||\"+\"===ch)&&(string+=ch,next());ch>=\"0\"&&\"9\">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error(\"Bad number\"),void 0):number},string=function(){var hex,i,uffff,string=\"\";if('\"'===ch)for(;next();){if('\"'===ch)return next(),string;if(\"\\\\\"===ch)if(next(),\"u\"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if(\"string\"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error(\"Bad string\")},white=function(){for(;ch&&\" \">=ch;)next()},word=function(){switch(ch){case\"t\":return next(\"t\"),next(\"r\"),next(\"u\"),next(\"e\"),!0;case\"f\":return next(\"f\"),next(\"a\"),next(\"l\"),next(\"s\"),next(\"e\"),!1;case\"n\":return next(\"n\"),next(\"u\"),next(\"l\"),next(\"l\"),null}error(\"Unexpected '\"+ch+\"'\")},array=function(){var array=[];if(\"[\"===ch){if(next(\"[\"),white(),\"]\"===ch)return next(\"]\"),array;for(;ch;){if(array.push(value()),white(),\"]\"===ch)return next(\"]\"),array;next(\",\"),white()}}error(\"Bad array\")},object=function(){var key,object={};if(\"{\"===ch){if(next(\"{\"),white(),\"}\"===ch)return next(\"}\"),object;for(;ch;){if(key=string(),white(),next(\":\"),Object.hasOwnProperty.call(object,key)&&error('Duplicate key \"'+key+'\"'),object[key]=value(),white(),\"}\"===ch)return next(\"}\"),object;next(\",\"),white()}}error(\"Bad object\")};return value=function(){switch(white(),ch){case\"{\":return object();case\"[\":return array();case'\"':return string();case\"-\":return number();default:return ch>=\"0\"&&\"9\">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=\" \",result=value(),white(),ch&&error(\"Syntax error\"),\"function\"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&\"object\"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({\"\":result},\"\"):result}}),ace.define(\"ace/mode/json_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/json/json_parse\"],function(acequire,exports){\"use strict\";var oop=acequire(\"../lib/oop\"),Mirror=acequire(\"../worker/mirror\").Mirror,parse=acequire(\"./json/json_parse\"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:\"error\"})}this.sender.emit(\"annotate\",errors)}}.call(JsonWorker.prototype)}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\n\u000b\\f\\r \\u2028\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can't convert \"+o+\" to object\");return Object(o)}});";
|
9326
|
+
module.exports.src = "\"no use strict\";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\"\";testPath;){var alias=paths[testPath];if(\"string\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,\"/\")+(tail||alias.main||alias.name);if(alias===!1)return\"\";var i=testPath.lastIndexOf(\"/\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\"error\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return window.normalizeModule(parentId,chunks[0])+\"!\"+window.normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=(base?base+\"/\":\"\")+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,\"\").replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\"worker.js acequire() accepts only (parentId, id) as arguments\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\"unable to load \"+id);var path=resolveModuleId(id,window.acequire.tlns);return\".js\"!=path.slice(-3)&&(path+=\".js\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\"string\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\"function\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\"require\",\"exports\",\"module\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\"require\":return req;case\"exports\":return module.exports;case\"module\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\"ace/lib/event_emitter\").EventEmitter,oop=window.acequire(\"ace/lib/oop\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\"call\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\"event\",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\"Unknown command:\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\"ace/lib/es5-shim\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\"\";switch(delta.action){case\"insert\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\"remove\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert=\"insert\"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),applyDelta=acequire(\"./apply_delta\").applyDelta,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(textOrLines){this.$lines=[\"\"],0===textOrLines.length?this.$lines=[\"\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0===\"aaa\".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\",this._signal(\"changeNewLineMode\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine||\"\\n\"}},this.$autoNewLine=\"\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\"changeNewLineMode\"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\r\\n\"==text||\"\\r\"==text||\"\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\"\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\"),this.insertMergedLines(position,[\"\",\"\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\"insert\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\"\"]),column=0):(lines=[\"\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\"insert\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\"remove\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\"remove\",lines:[\"\",\"\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\"insert\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\"change\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\"\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\"insert\"==delta.action?\"remove\":\"insert\",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if(\"object\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if(\"[object Object]\"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(/</g,\"<\")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define(\"ace/worker/mirror\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/document\",\"ace/lib/lang\"],function(acequire,exports){\"use strict\";acequire(\"../range\").Range;var Document=acequire(\"../document\").Document,lang=acequire(\"../lib/lang\"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(\"\"),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on(\"change\",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:\"insert\",start:data[i],lines:data[i+1]};else var d={action:\"remove\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\"ace/mode/json/json_parse\",[\"require\",\"exports\",\"module\"],function(){\"use strict\";var at,ch,text,value,escapee={'\"':'\"',\"\\\\\":\"\\\\\",\"/\":\"/\",b:\"\\b\",f:\"\\f\",n:\"\\n\",r:\"\\r\",t:\"\t\"},error=function(m){throw{name:\"SyntaxError\",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error(\"Expected '\"+c+\"' instead of '\"+ch+\"'\"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string=\"\";for(\"-\"===ch&&(string=\"-\",next(\"-\"));ch>=\"0\"&&\"9\">=ch;)string+=ch,next();if(\".\"===ch)for(string+=\".\";next()&&ch>=\"0\"&&\"9\">=ch;)string+=ch;if(\"e\"===ch||\"E\"===ch)for(string+=ch,next(),(\"-\"===ch||\"+\"===ch)&&(string+=ch,next());ch>=\"0\"&&\"9\">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error(\"Bad number\"),void 0):number},string=function(){var hex,i,uffff,string=\"\";if('\"'===ch)for(;next();){if('\"'===ch)return next(),string;if(\"\\\\\"===ch)if(next(),\"u\"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if(\"string\"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error(\"Bad string\")},white=function(){for(;ch&&\" \">=ch;)next()},word=function(){switch(ch){case\"t\":return next(\"t\"),next(\"r\"),next(\"u\"),next(\"e\"),!0;case\"f\":return next(\"f\"),next(\"a\"),next(\"l\"),next(\"s\"),next(\"e\"),!1;case\"n\":return next(\"n\"),next(\"u\"),next(\"l\"),next(\"l\"),null}error(\"Unexpected '\"+ch+\"'\")},array=function(){var array=[];if(\"[\"===ch){if(next(\"[\"),white(),\"]\"===ch)return next(\"]\"),array;for(;ch;){if(array.push(value()),white(),\"]\"===ch)return next(\"]\"),array;next(\",\"),white()}}error(\"Bad array\")},object=function(){var key,object={};if(\"{\"===ch){if(next(\"{\"),white(),\"}\"===ch)return next(\"}\"),object;for(;ch;){if(key=string(),white(),next(\":\"),Object.hasOwnProperty.call(object,key)&&error('Duplicate key \"'+key+'\"'),object[key]=value(),white(),\"}\"===ch)return next(\"}\"),object;next(\",\"),white()}}error(\"Bad object\")};return value=function(){switch(white(),ch){case\"{\":return object();case\"[\":return array();case'\"':return string();case\"-\":return number();default:return ch>=\"0\"&&\"9\">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=\" \",result=value(),white(),ch&&error(\"Syntax error\"),\"function\"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&\"object\"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({\"\":result},\"\"):result}}),ace.define(\"ace/mode/json_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/json/json_parse\"],function(acequire,exports){\"use strict\";var oop=acequire(\"../lib/oop\"),Mirror=acequire(\"../worker/mirror\").Mirror,parse=acequire(\"./json/json_parse\"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:\"error\"})}this.sender.emit(\"annotate\",errors)}}.call(JsonWorker.prototype)}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\n\u000b\\f\\r \\u2028\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can't convert \"+o+\" to object\");return Object(o)}});";
|
9176
9327
|
|
9177
9328
|
/***/ },
|
9178
|
-
/*
|
9329
|
+
/* 17 */
|
9179
9330
|
/***/ function(module, exports) {
|
9180
9331
|
|
9181
9332
|
ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(acequire, exports, module) {
|
@@ -9222,6 +9373,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9222
9373
|
}\
|
9223
9374
|
.ace_search_field {\
|
9224
9375
|
background-color: white;\
|
9376
|
+
color: black;\
|
9225
9377
|
border-right: 1px solid #cbcbcb;\
|
9226
9378
|
border: 0 none;\
|
9227
9379
|
-webkit-box-sizing: border-box;\
|
@@ -9596,7 +9748,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9596
9748
|
|
9597
9749
|
|
9598
9750
|
/***/ },
|
9599
|
-
/*
|
9751
|
+
/* 18 */
|
9600
9752
|
/***/ function(module, exports) {
|
9601
9753
|
|
9602
9754
|
/* ***** BEGIN LICENSE BLOCK *****
|
@@ -9641,6 +9793,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9641
9793
|
.ace-jsoneditor.ace_editor {\
|
9642
9794
|
font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif;\
|
9643
9795
|
line-height: 1.3;\
|
9796
|
+
background-color: #fff;\
|
9644
9797
|
}\
|
9645
9798
|
.ace-jsoneditor .ace_print-margin {\
|
9646
9799
|
width: 1px;\
|