@limetech/lime-elements 38.30.0 → 38.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-code-editor.cjs.entry.js +1673 -1
  4. package/dist/cjs/limel-code-editor.cjs.entry.js.map +1 -1
  5. package/dist/cjs/limel-form.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/code-editor/code-editor.js +30 -2
  9. package/dist/collection/components/code-editor/code-editor.js.map +1 -1
  10. package/dist/collection/components/code-editor/code-editor.types.js.map +1 -1
  11. package/dist/collection/components/form/form.css +47 -62
  12. package/dist/esm/lime-elements.js +1 -1
  13. package/dist/esm/limel-code-editor.entry.js +1673 -1
  14. package/dist/esm/limel-code-editor.entry.js.map +1 -1
  15. package/dist/esm/limel-form.entry.js +1 -1
  16. package/dist/esm/limel-form.entry.js.map +1 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/lime-elements/lime-elements.esm.js +1 -1
  19. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  20. package/dist/lime-elements/p-5a483374.entry.js +2 -0
  21. package/dist/lime-elements/p-5a483374.entry.js.map +1 -0
  22. package/dist/lime-elements/{p-beee38bc.entry.js → p-d6d66daa.entry.js} +5 -5
  23. package/dist/lime-elements/{p-beee38bc.entry.js.map → p-d6d66daa.entry.js.map} +1 -1
  24. package/dist/types/components/code-editor/code-editor.d.ts +9 -1
  25. package/dist/types/components/code-editor/code-editor.types.d.ts +1 -1
  26. package/dist/types/components.d.ts +12 -4
  27. package/package.json +1 -1
  28. package/dist/lime-elements/p-596af3ae.entry.js +0 -2
  29. package/dist/lime-elements/p-596af3ae.entry.js.map +0 -1
@@ -9873,7 +9873,1280 @@ var codemirror = createCommonjsModule(function (module, exports) {
9873
9873
  })));
9874
9874
  });
9875
9875
 
9876
- createCommonjsModule(function (module, exports) {
9876
+ var css = createCommonjsModule(function (module, exports) {
9877
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
9878
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
9879
+
9880
+ (function(mod) {
9881
+ mod(codemirror);
9882
+ })(function(CodeMirror) {
9883
+
9884
+ CodeMirror.defineMode("css", function(config, parserConfig) {
9885
+ var inline = parserConfig.inline;
9886
+ if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
9887
+
9888
+ var indentUnit = config.indentUnit,
9889
+ tokenHooks = parserConfig.tokenHooks,
9890
+ documentTypes = parserConfig.documentTypes || {},
9891
+ mediaTypes = parserConfig.mediaTypes || {},
9892
+ mediaFeatures = parserConfig.mediaFeatures || {},
9893
+ mediaValueKeywords = parserConfig.mediaValueKeywords || {},
9894
+ propertyKeywords = parserConfig.propertyKeywords || {},
9895
+ nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
9896
+ fontProperties = parserConfig.fontProperties || {},
9897
+ counterDescriptors = parserConfig.counterDescriptors || {},
9898
+ colorKeywords = parserConfig.colorKeywords || {},
9899
+ valueKeywords = parserConfig.valueKeywords || {},
9900
+ allowNested = parserConfig.allowNested,
9901
+ lineComment = parserConfig.lineComment,
9902
+ supportsAtComponent = parserConfig.supportsAtComponent === true,
9903
+ highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
9904
+
9905
+ var type, override;
9906
+ function ret(style, tp) { type = tp; return style; }
9907
+
9908
+ // Tokenizers
9909
+
9910
+ function tokenBase(stream, state) {
9911
+ var ch = stream.next();
9912
+ if (tokenHooks[ch]) {
9913
+ var result = tokenHooks[ch](stream, state);
9914
+ if (result !== false) return result;
9915
+ }
9916
+ if (ch == "@") {
9917
+ stream.eatWhile(/[\w\\\-]/);
9918
+ return ret("def", stream.current());
9919
+ } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
9920
+ return ret(null, "compare");
9921
+ } else if (ch == "\"" || ch == "'") {
9922
+ state.tokenize = tokenString(ch);
9923
+ return state.tokenize(stream, state);
9924
+ } else if (ch == "#") {
9925
+ stream.eatWhile(/[\w\\\-]/);
9926
+ return ret("atom", "hash");
9927
+ } else if (ch == "!") {
9928
+ stream.match(/^\s*\w*/);
9929
+ return ret("keyword", "important");
9930
+ } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
9931
+ stream.eatWhile(/[\w.%]/);
9932
+ return ret("number", "unit");
9933
+ } else if (ch === "-") {
9934
+ if (/[\d.]/.test(stream.peek())) {
9935
+ stream.eatWhile(/[\w.%]/);
9936
+ return ret("number", "unit");
9937
+ } else if (stream.match(/^-[\w\\\-]*/)) {
9938
+ stream.eatWhile(/[\w\\\-]/);
9939
+ if (stream.match(/^\s*:/, false))
9940
+ return ret("variable-2", "variable-definition");
9941
+ return ret("variable-2", "variable");
9942
+ } else if (stream.match(/^\w+-/)) {
9943
+ return ret("meta", "meta");
9944
+ }
9945
+ } else if (/[,+>*\/]/.test(ch)) {
9946
+ return ret(null, "select-op");
9947
+ } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
9948
+ return ret("qualifier", "qualifier");
9949
+ } else if (/[:;{}\[\]\(\)]/.test(ch)) {
9950
+ return ret(null, ch);
9951
+ } else if (stream.match(/^[\w-.]+(?=\()/)) {
9952
+ if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
9953
+ state.tokenize = tokenParenthesized;
9954
+ }
9955
+ return ret("variable callee", "variable");
9956
+ } else if (/[\w\\\-]/.test(ch)) {
9957
+ stream.eatWhile(/[\w\\\-]/);
9958
+ return ret("property", "word");
9959
+ } else {
9960
+ return ret(null, null);
9961
+ }
9962
+ }
9963
+
9964
+ function tokenString(quote) {
9965
+ return function(stream, state) {
9966
+ var escaped = false, ch;
9967
+ while ((ch = stream.next()) != null) {
9968
+ if (ch == quote && !escaped) {
9969
+ if (quote == ")") stream.backUp(1);
9970
+ break;
9971
+ }
9972
+ escaped = !escaped && ch == "\\";
9973
+ }
9974
+ if (ch == quote || !escaped && quote != ")") state.tokenize = null;
9975
+ return ret("string", "string");
9976
+ };
9977
+ }
9978
+
9979
+ function tokenParenthesized(stream, state) {
9980
+ stream.next(); // Must be '('
9981
+ if (!stream.match(/^\s*[\"\')]/, false))
9982
+ state.tokenize = tokenString(")");
9983
+ else
9984
+ state.tokenize = null;
9985
+ return ret(null, "(");
9986
+ }
9987
+
9988
+ // Context management
9989
+
9990
+ function Context(type, indent, prev) {
9991
+ this.type = type;
9992
+ this.indent = indent;
9993
+ this.prev = prev;
9994
+ }
9995
+
9996
+ function pushContext(state, stream, type, indent) {
9997
+ state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
9998
+ return type;
9999
+ }
10000
+
10001
+ function popContext(state) {
10002
+ if (state.context.prev)
10003
+ state.context = state.context.prev;
10004
+ return state.context.type;
10005
+ }
10006
+
10007
+ function pass(type, stream, state) {
10008
+ return states[state.context.type](type, stream, state);
10009
+ }
10010
+ function popAndPass(type, stream, state, n) {
10011
+ for (var i = n || 1; i > 0; i--)
10012
+ state.context = state.context.prev;
10013
+ return pass(type, stream, state);
10014
+ }
10015
+
10016
+ // Parser
10017
+
10018
+ function wordAsValue(stream) {
10019
+ var word = stream.current().toLowerCase();
10020
+ if (valueKeywords.hasOwnProperty(word))
10021
+ override = "atom";
10022
+ else if (colorKeywords.hasOwnProperty(word))
10023
+ override = "keyword";
10024
+ else
10025
+ override = "variable";
10026
+ }
10027
+
10028
+ var states = {};
10029
+
10030
+ states.top = function(type, stream, state) {
10031
+ if (type == "{") {
10032
+ return pushContext(state, stream, "block");
10033
+ } else if (type == "}" && state.context.prev) {
10034
+ return popContext(state);
10035
+ } else if (supportsAtComponent && /@component/i.test(type)) {
10036
+ return pushContext(state, stream, "atComponentBlock");
10037
+ } else if (/^@(-moz-)?document$/i.test(type)) {
10038
+ return pushContext(state, stream, "documentTypes");
10039
+ } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
10040
+ return pushContext(state, stream, "atBlock");
10041
+ } else if (/^@(font-face|counter-style)/i.test(type)) {
10042
+ state.stateArg = type;
10043
+ return "restricted_atBlock_before";
10044
+ } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
10045
+ return "keyframes";
10046
+ } else if (type && type.charAt(0) == "@") {
10047
+ return pushContext(state, stream, "at");
10048
+ } else if (type == "hash") {
10049
+ override = "builtin";
10050
+ } else if (type == "word") {
10051
+ override = "tag";
10052
+ } else if (type == "variable-definition") {
10053
+ return "maybeprop";
10054
+ } else if (type == "interpolation") {
10055
+ return pushContext(state, stream, "interpolation");
10056
+ } else if (type == ":") {
10057
+ return "pseudo";
10058
+ } else if (allowNested && type == "(") {
10059
+ return pushContext(state, stream, "parens");
10060
+ }
10061
+ return state.context.type;
10062
+ };
10063
+
10064
+ states.block = function(type, stream, state) {
10065
+ if (type == "word") {
10066
+ var word = stream.current().toLowerCase();
10067
+ if (propertyKeywords.hasOwnProperty(word)) {
10068
+ override = "property";
10069
+ return "maybeprop";
10070
+ } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
10071
+ override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
10072
+ return "maybeprop";
10073
+ } else if (allowNested) {
10074
+ override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
10075
+ return "block";
10076
+ } else {
10077
+ override += " error";
10078
+ return "maybeprop";
10079
+ }
10080
+ } else if (type == "meta") {
10081
+ return "block";
10082
+ } else if (!allowNested && (type == "hash" || type == "qualifier")) {
10083
+ override = "error";
10084
+ return "block";
10085
+ } else {
10086
+ return states.top(type, stream, state);
10087
+ }
10088
+ };
10089
+
10090
+ states.maybeprop = function(type, stream, state) {
10091
+ if (type == ":") return pushContext(state, stream, "prop");
10092
+ return pass(type, stream, state);
10093
+ };
10094
+
10095
+ states.prop = function(type, stream, state) {
10096
+ if (type == ";") return popContext(state);
10097
+ if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
10098
+ if (type == "}" || type == "{") return popAndPass(type, stream, state);
10099
+ if (type == "(") return pushContext(state, stream, "parens");
10100
+
10101
+ if (type == "hash" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) {
10102
+ override += " error";
10103
+ } else if (type == "word") {
10104
+ wordAsValue(stream);
10105
+ } else if (type == "interpolation") {
10106
+ return pushContext(state, stream, "interpolation");
10107
+ }
10108
+ return "prop";
10109
+ };
10110
+
10111
+ states.propBlock = function(type, _stream, state) {
10112
+ if (type == "}") return popContext(state);
10113
+ if (type == "word") { override = "property"; return "maybeprop"; }
10114
+ return state.context.type;
10115
+ };
10116
+
10117
+ states.parens = function(type, stream, state) {
10118
+ if (type == "{" || type == "}") return popAndPass(type, stream, state);
10119
+ if (type == ")") return popContext(state);
10120
+ if (type == "(") return pushContext(state, stream, "parens");
10121
+ if (type == "interpolation") return pushContext(state, stream, "interpolation");
10122
+ if (type == "word") wordAsValue(stream);
10123
+ return "parens";
10124
+ };
10125
+
10126
+ states.pseudo = function(type, stream, state) {
10127
+ if (type == "meta") return "pseudo";
10128
+
10129
+ if (type == "word") {
10130
+ override = "variable-3";
10131
+ return state.context.type;
10132
+ }
10133
+ return pass(type, stream, state);
10134
+ };
10135
+
10136
+ states.documentTypes = function(type, stream, state) {
10137
+ if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
10138
+ override = "tag";
10139
+ return state.context.type;
10140
+ } else {
10141
+ return states.atBlock(type, stream, state);
10142
+ }
10143
+ };
10144
+
10145
+ states.atBlock = function(type, stream, state) {
10146
+ if (type == "(") return pushContext(state, stream, "atBlock_parens");
10147
+ if (type == "}" || type == ";") return popAndPass(type, stream, state);
10148
+ if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
10149
+
10150
+ if (type == "interpolation") return pushContext(state, stream, "interpolation");
10151
+
10152
+ if (type == "word") {
10153
+ var word = stream.current().toLowerCase();
10154
+ if (word == "only" || word == "not" || word == "and" || word == "or")
10155
+ override = "keyword";
10156
+ else if (mediaTypes.hasOwnProperty(word))
10157
+ override = "attribute";
10158
+ else if (mediaFeatures.hasOwnProperty(word))
10159
+ override = "property";
10160
+ else if (mediaValueKeywords.hasOwnProperty(word))
10161
+ override = "keyword";
10162
+ else if (propertyKeywords.hasOwnProperty(word))
10163
+ override = "property";
10164
+ else if (nonStandardPropertyKeywords.hasOwnProperty(word))
10165
+ override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
10166
+ else if (valueKeywords.hasOwnProperty(word))
10167
+ override = "atom";
10168
+ else if (colorKeywords.hasOwnProperty(word))
10169
+ override = "keyword";
10170
+ else
10171
+ override = "error";
10172
+ }
10173
+ return state.context.type;
10174
+ };
10175
+
10176
+ states.atComponentBlock = function(type, stream, state) {
10177
+ if (type == "}")
10178
+ return popAndPass(type, stream, state);
10179
+ if (type == "{")
10180
+ return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
10181
+ if (type == "word")
10182
+ override = "error";
10183
+ return state.context.type;
10184
+ };
10185
+
10186
+ states.atBlock_parens = function(type, stream, state) {
10187
+ if (type == ")") return popContext(state);
10188
+ if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
10189
+ return states.atBlock(type, stream, state);
10190
+ };
10191
+
10192
+ states.restricted_atBlock_before = function(type, stream, state) {
10193
+ if (type == "{")
10194
+ return pushContext(state, stream, "restricted_atBlock");
10195
+ if (type == "word" && state.stateArg == "@counter-style") {
10196
+ override = "variable";
10197
+ return "restricted_atBlock_before";
10198
+ }
10199
+ return pass(type, stream, state);
10200
+ };
10201
+
10202
+ states.restricted_atBlock = function(type, stream, state) {
10203
+ if (type == "}") {
10204
+ state.stateArg = null;
10205
+ return popContext(state);
10206
+ }
10207
+ if (type == "word") {
10208
+ if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
10209
+ (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
10210
+ override = "error";
10211
+ else
10212
+ override = "property";
10213
+ return "maybeprop";
10214
+ }
10215
+ return "restricted_atBlock";
10216
+ };
10217
+
10218
+ states.keyframes = function(type, stream, state) {
10219
+ if (type == "word") { override = "variable"; return "keyframes"; }
10220
+ if (type == "{") return pushContext(state, stream, "top");
10221
+ return pass(type, stream, state);
10222
+ };
10223
+
10224
+ states.at = function(type, stream, state) {
10225
+ if (type == ";") return popContext(state);
10226
+ if (type == "{" || type == "}") return popAndPass(type, stream, state);
10227
+ if (type == "word") override = "tag";
10228
+ else if (type == "hash") override = "builtin";
10229
+ return "at";
10230
+ };
10231
+
10232
+ states.interpolation = function(type, stream, state) {
10233
+ if (type == "}") return popContext(state);
10234
+ if (type == "{" || type == ";") return popAndPass(type, stream, state);
10235
+ if (type == "word") override = "variable";
10236
+ else if (type != "variable" && type != "(" && type != ")") override = "error";
10237
+ return "interpolation";
10238
+ };
10239
+
10240
+ return {
10241
+ startState: function(base) {
10242
+ return {tokenize: null,
10243
+ state: inline ? "block" : "top",
10244
+ stateArg: null,
10245
+ context: new Context(inline ? "block" : "top", base || 0, null)};
10246
+ },
10247
+
10248
+ token: function(stream, state) {
10249
+ if (!state.tokenize && stream.eatSpace()) return null;
10250
+ var style = (state.tokenize || tokenBase)(stream, state);
10251
+ if (style && typeof style == "object") {
10252
+ type = style[1];
10253
+ style = style[0];
10254
+ }
10255
+ override = style;
10256
+ if (type != "comment")
10257
+ state.state = states[state.state](type, stream, state);
10258
+ return override;
10259
+ },
10260
+
10261
+ indent: function(state, textAfter) {
10262
+ var cx = state.context, ch = textAfter && textAfter.charAt(0);
10263
+ var indent = cx.indent;
10264
+ if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
10265
+ if (cx.prev) {
10266
+ if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
10267
+ cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
10268
+ // Resume indentation from parent context.
10269
+ cx = cx.prev;
10270
+ indent = cx.indent;
10271
+ } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
10272
+ ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
10273
+ // Dedent relative to current context.
10274
+ indent = Math.max(0, cx.indent - indentUnit);
10275
+ }
10276
+ }
10277
+ return indent;
10278
+ },
10279
+
10280
+ electricChars: "}",
10281
+ blockCommentStart: "/*",
10282
+ blockCommentEnd: "*/",
10283
+ blockCommentContinue: " * ",
10284
+ lineComment: lineComment,
10285
+ fold: "brace"
10286
+ };
10287
+ });
10288
+
10289
+ function keySet(array) {
10290
+ var keys = {};
10291
+ for (var i = 0; i < array.length; ++i) {
10292
+ keys[array[i].toLowerCase()] = true;
10293
+ }
10294
+ return keys;
10295
+ }
10296
+
10297
+ var documentTypes_ = [
10298
+ "domain", "regexp", "url", "url-prefix"
10299
+ ], documentTypes = keySet(documentTypes_);
10300
+
10301
+ var mediaTypes_ = [
10302
+ "all", "aural", "braille", "handheld", "print", "projection", "screen",
10303
+ "tty", "tv", "embossed"
10304
+ ], mediaTypes = keySet(mediaTypes_);
10305
+
10306
+ var mediaFeatures_ = [
10307
+ "width", "min-width", "max-width", "height", "min-height", "max-height",
10308
+ "device-width", "min-device-width", "max-device-width", "device-height",
10309
+ "min-device-height", "max-device-height", "aspect-ratio",
10310
+ "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
10311
+ "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
10312
+ "max-color", "color-index", "min-color-index", "max-color-index",
10313
+ "monochrome", "min-monochrome", "max-monochrome", "resolution",
10314
+ "min-resolution", "max-resolution", "scan", "grid", "orientation",
10315
+ "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
10316
+ "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",
10317
+ "dynamic-range", "video-dynamic-range"
10318
+ ], mediaFeatures = keySet(mediaFeatures_);
10319
+
10320
+ var mediaValueKeywords_ = [
10321
+ "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
10322
+ "interlace", "progressive",
10323
+ "dark", "light",
10324
+ "standard", "high"
10325
+ ], mediaValueKeywords = keySet(mediaValueKeywords_);
10326
+
10327
+ var propertyKeywords_ = [
10328
+ "align-content", "align-items", "align-self", "alignment-adjust",
10329
+ "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
10330
+ "animation-direction", "animation-duration", "animation-fill-mode",
10331
+ "animation-iteration-count", "animation-name", "animation-play-state",
10332
+ "animation-timing-function", "appearance", "azimuth", "backdrop-filter",
10333
+ "backface-visibility", "background", "background-attachment",
10334
+ "background-blend-mode", "background-clip", "background-color",
10335
+ "background-image", "background-origin", "background-position",
10336
+ "background-position-x", "background-position-y", "background-repeat",
10337
+ "background-size", "baseline-shift", "binding", "bleed", "block-size",
10338
+ "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
10339
+ "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
10340
+ "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
10341
+ "border-collapse", "border-color", "border-image", "border-image-outset",
10342
+ "border-image-repeat", "border-image-slice", "border-image-source",
10343
+ "border-image-width", "border-left", "border-left-color", "border-left-style",
10344
+ "border-left-width", "border-radius", "border-right", "border-right-color",
10345
+ "border-right-style", "border-right-width", "border-spacing", "border-style",
10346
+ "border-top", "border-top-color", "border-top-left-radius",
10347
+ "border-top-right-radius", "border-top-style", "border-top-width",
10348
+ "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
10349
+ "break-after", "break-before", "break-inside", "caption-side", "caret-color",
10350
+ "clear", "clip", "color", "color-profile", "column-count", "column-fill",
10351
+ "column-gap", "column-rule", "column-rule-color", "column-rule-style",
10352
+ "column-rule-width", "column-span", "column-width", "columns", "contain",
10353
+ "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
10354
+ "cue-before", "cursor", "direction", "display", "dominant-baseline",
10355
+ "drop-initial-after-adjust", "drop-initial-after-align",
10356
+ "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
10357
+ "drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
10358
+ "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
10359
+ "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
10360
+ "font", "font-family", "font-feature-settings", "font-kerning",
10361
+ "font-language-override", "font-optical-sizing", "font-size",
10362
+ "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
10363
+ "font-variant", "font-variant-alternates", "font-variant-caps",
10364
+ "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
10365
+ "font-variant-position", "font-variation-settings", "font-weight", "gap",
10366
+ "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
10367
+ "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
10368
+ "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
10369
+ "grid-template", "grid-template-areas", "grid-template-columns",
10370
+ "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
10371
+ "image-orientation", "image-rendering", "image-resolution", "inline-box-align",
10372
+ "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
10373
+ "inset-inline-end", "inset-inline-start", "isolation", "justify-content",
10374
+ "justify-items", "justify-self", "left", "letter-spacing", "line-break",
10375
+ "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
10376
+ "line-stacking-shift", "line-stacking-strategy", "list-style",
10377
+ "list-style-image", "list-style-position", "list-style-type", "margin",
10378
+ "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
10379
+ "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
10380
+ "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
10381
+ "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
10382
+ "max-block-size", "max-height", "max-inline-size",
10383
+ "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
10384
+ "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
10385
+ "nav-up", "object-fit", "object-position", "offset", "offset-anchor",
10386
+ "offset-distance", "offset-path", "offset-position", "offset-rotate",
10387
+ "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
10388
+ "outline-style", "outline-width", "overflow", "overflow-style",
10389
+ "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
10390
+ "padding-left", "padding-right", "padding-top", "page", "page-break-after",
10391
+ "page-break-before", "page-break-inside", "page-policy", "pause",
10392
+ "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
10393
+ "pitch-range", "place-content", "place-items", "place-self", "play-during",
10394
+ "position", "presentation-level", "punctuation-trim", "quotes",
10395
+ "region-break-after", "region-break-before", "region-break-inside",
10396
+ "region-fragment", "rendering-intent", "resize", "rest", "rest-after",
10397
+ "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
10398
+ "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
10399
+ "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
10400
+ "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
10401
+ "scroll-margin-inline", "scroll-margin-inline-end",
10402
+ "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
10403
+ "scroll-margin-top", "scroll-padding", "scroll-padding-block",
10404
+ "scroll-padding-block-end", "scroll-padding-block-start",
10405
+ "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
10406
+ "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
10407
+ "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
10408
+ "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
10409
+ "size", "speak", "speak-as", "speak-header", "speak-numeral",
10410
+ "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
10411
+ "table-layout", "target", "target-name", "target-new", "target-position",
10412
+ "text-align", "text-align-last", "text-combine-upright", "text-decoration",
10413
+ "text-decoration-color", "text-decoration-line", "text-decoration-skip",
10414
+ "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
10415
+ "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
10416
+ "text-height", "text-indent", "text-justify", "text-orientation",
10417
+ "text-outline", "text-overflow", "text-rendering", "text-shadow",
10418
+ "text-size-adjust", "text-space-collapse", "text-transform",
10419
+ "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
10420
+ "transform-style", "transition", "transition-delay", "transition-duration",
10421
+ "transition-property", "transition-timing-function", "translate",
10422
+ "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
10423
+ "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
10424
+ "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
10425
+ "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
10426
+ // SVG-specific
10427
+ "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
10428
+ "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
10429
+ "color-interpolation", "color-interpolation-filters",
10430
+ "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
10431
+ "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
10432
+ "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
10433
+ "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
10434
+ "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
10435
+ "glyph-orientation-vertical", "text-anchor", "writing-mode",
10436
+ ], propertyKeywords = keySet(propertyKeywords_);
10437
+
10438
+ var nonStandardPropertyKeywords_ = [
10439
+ "accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
10440
+ "border-block-end-color", "border-block-end-style", "border-block-end-width",
10441
+ "border-block-start", "border-block-start-color", "border-block-start-style",
10442
+ "border-block-start-width", "border-block-style", "border-block-width",
10443
+ "border-inline", "border-inline-color", "border-inline-end",
10444
+ "border-inline-end-color", "border-inline-end-style",
10445
+ "border-inline-end-width", "border-inline-start", "border-inline-start-color",
10446
+ "border-inline-start-style", "border-inline-start-width",
10447
+ "border-inline-style", "border-inline-width", "content-visibility", "margin-block",
10448
+ "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
10449
+ "margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
10450
+ "padding-block-start", "padding-inline", "padding-inline-end",
10451
+ "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
10452
+ "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
10453
+ "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
10454
+ "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
10455
+ "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
10456
+ ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
10457
+
10458
+ var fontProperties_ = [
10459
+ "font-display", "font-family", "src", "unicode-range", "font-variant",
10460
+ "font-feature-settings", "font-stretch", "font-weight", "font-style"
10461
+ ], fontProperties = keySet(fontProperties_);
10462
+
10463
+ var counterDescriptors_ = [
10464
+ "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
10465
+ "speak-as", "suffix", "symbols", "system"
10466
+ ], counterDescriptors = keySet(counterDescriptors_);
10467
+
10468
+ var colorKeywords_ = [
10469
+ "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
10470
+ "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
10471
+ "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
10472
+ "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
10473
+ "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
10474
+ "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
10475
+ "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
10476
+ "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
10477
+ "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
10478
+ "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
10479
+ "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
10480
+ "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
10481
+ "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
10482
+ "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
10483
+ "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
10484
+ "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
10485
+ "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
10486
+ "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
10487
+ "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
10488
+ "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
10489
+ "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
10490
+ "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
10491
+ "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
10492
+ "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
10493
+ "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
10494
+ "whitesmoke", "yellow", "yellowgreen"
10495
+ ], colorKeywords = keySet(colorKeywords_);
10496
+
10497
+ var valueKeywords_ = [
10498
+ "above", "absolute", "activeborder", "additive", "activecaption", "afar",
10499
+ "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
10500
+ "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
10501
+ "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
10502
+ "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
10503
+ "bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
10504
+ "both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button",
10505
+ "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
10506
+ "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
10507
+ "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
10508
+ "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
10509
+ "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
10510
+ "compact", "condensed", "conic-gradient", "contain", "content", "contents",
10511
+ "content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
10512
+ "cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
10513
+ "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
10514
+ "destination-in", "destination-out", "destination-over", "devanagari", "difference",
10515
+ "disc", "discard", "disclosure-closed", "disclosure-open", "document",
10516
+ "dot-dash", "dot-dot-dash",
10517
+ "dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
10518
+ "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
10519
+ "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
10520
+ "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
10521
+ "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
10522
+ "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
10523
+ "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
10524
+ "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
10525
+ "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
10526
+ "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
10527
+ "forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
10528
+ "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
10529
+ "help", "hidden", "hide", "higher", "highlight", "highlighttext",
10530
+ "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
10531
+ "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
10532
+ "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
10533
+ "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
10534
+ "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
10535
+ "katakana", "katakana-iroha", "keep-all", "khmer",
10536
+ "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
10537
+ "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
10538
+ "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
10539
+ "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
10540
+ "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
10541
+ "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
10542
+ "media-play-button", "media-slider", "media-sliderthumb",
10543
+ "media-volume-slider", "media-volume-sliderthumb", "medium",
10544
+ "menu", "menulist", "menulist-button",
10545
+ "menutext", "message-box", "middle", "min-intrinsic",
10546
+ "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
10547
+ "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
10548
+ "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
10549
+ "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
10550
+ "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
10551
+ "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
10552
+ "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
10553
+ "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
10554
+ "progress", "push-button", "radial-gradient", "radio", "read-only",
10555
+ "read-write", "read-write-plaintext-only", "rectangle", "region",
10556
+ "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient",
10557
+ "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse",
10558
+ "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
10559
+ "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
10560
+ "s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
10561
+ "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
10562
+ "searchfield-cancel-button", "searchfield-decoration",
10563
+ "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
10564
+ "semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
10565
+ "simp-chinese-formal", "simp-chinese-informal", "single",
10566
+ "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
10567
+ "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
10568
+ "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
10569
+ "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
10570
+ "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
10571
+ "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
10572
+ "table-caption", "table-cell", "table-column", "table-column-group",
10573
+ "table-footer-group", "table-header-group", "table-row", "table-row-group",
10574
+ "tamil",
10575
+ "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
10576
+ "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
10577
+ "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
10578
+ "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
10579
+ "trad-chinese-formal", "trad-chinese-informal", "transform",
10580
+ "translate", "translate3d", "translateX", "translateY", "translateZ",
10581
+ "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
10582
+ "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
10583
+ "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
10584
+ "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
10585
+ "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
10586
+ "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
10587
+ "xx-large", "xx-small"
10588
+ ], valueKeywords = keySet(valueKeywords_);
10589
+
10590
+ var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
10591
+ .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
10592
+ .concat(valueKeywords_);
10593
+ CodeMirror.registerHelper("hintWords", "css", allWords);
10594
+
10595
+ function tokenCComment(stream, state) {
10596
+ var maybeEnd = false, ch;
10597
+ while ((ch = stream.next()) != null) {
10598
+ if (maybeEnd && ch == "/") {
10599
+ state.tokenize = null;
10600
+ break;
10601
+ }
10602
+ maybeEnd = (ch == "*");
10603
+ }
10604
+ return ["comment", "comment"];
10605
+ }
10606
+
10607
+ CodeMirror.defineMIME("text/css", {
10608
+ documentTypes: documentTypes,
10609
+ mediaTypes: mediaTypes,
10610
+ mediaFeatures: mediaFeatures,
10611
+ mediaValueKeywords: mediaValueKeywords,
10612
+ propertyKeywords: propertyKeywords,
10613
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10614
+ fontProperties: fontProperties,
10615
+ counterDescriptors: counterDescriptors,
10616
+ colorKeywords: colorKeywords,
10617
+ valueKeywords: valueKeywords,
10618
+ tokenHooks: {
10619
+ "/": function(stream, state) {
10620
+ if (!stream.eat("*")) return false;
10621
+ state.tokenize = tokenCComment;
10622
+ return tokenCComment(stream, state);
10623
+ }
10624
+ },
10625
+ name: "css"
10626
+ });
10627
+
10628
+ CodeMirror.defineMIME("text/x-scss", {
10629
+ mediaTypes: mediaTypes,
10630
+ mediaFeatures: mediaFeatures,
10631
+ mediaValueKeywords: mediaValueKeywords,
10632
+ propertyKeywords: propertyKeywords,
10633
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10634
+ colorKeywords: colorKeywords,
10635
+ valueKeywords: valueKeywords,
10636
+ fontProperties: fontProperties,
10637
+ allowNested: true,
10638
+ lineComment: "//",
10639
+ tokenHooks: {
10640
+ "/": function(stream, state) {
10641
+ if (stream.eat("/")) {
10642
+ stream.skipToEnd();
10643
+ return ["comment", "comment"];
10644
+ } else if (stream.eat("*")) {
10645
+ state.tokenize = tokenCComment;
10646
+ return tokenCComment(stream, state);
10647
+ } else {
10648
+ return ["operator", "operator"];
10649
+ }
10650
+ },
10651
+ ":": function(stream) {
10652
+ if (stream.match(/^\s*\{/, false))
10653
+ return [null, null]
10654
+ return false;
10655
+ },
10656
+ "$": function(stream) {
10657
+ stream.match(/^[\w-]+/);
10658
+ if (stream.match(/^\s*:/, false))
10659
+ return ["variable-2", "variable-definition"];
10660
+ return ["variable-2", "variable"];
10661
+ },
10662
+ "#": function(stream) {
10663
+ if (!stream.eat("{")) return false;
10664
+ return [null, "interpolation"];
10665
+ }
10666
+ },
10667
+ name: "css",
10668
+ helperType: "scss"
10669
+ });
10670
+
10671
+ CodeMirror.defineMIME("text/x-less", {
10672
+ mediaTypes: mediaTypes,
10673
+ mediaFeatures: mediaFeatures,
10674
+ mediaValueKeywords: mediaValueKeywords,
10675
+ propertyKeywords: propertyKeywords,
10676
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10677
+ colorKeywords: colorKeywords,
10678
+ valueKeywords: valueKeywords,
10679
+ fontProperties: fontProperties,
10680
+ allowNested: true,
10681
+ lineComment: "//",
10682
+ tokenHooks: {
10683
+ "/": function(stream, state) {
10684
+ if (stream.eat("/")) {
10685
+ stream.skipToEnd();
10686
+ return ["comment", "comment"];
10687
+ } else if (stream.eat("*")) {
10688
+ state.tokenize = tokenCComment;
10689
+ return tokenCComment(stream, state);
10690
+ } else {
10691
+ return ["operator", "operator"];
10692
+ }
10693
+ },
10694
+ "@": function(stream) {
10695
+ if (stream.eat("{")) return [null, "interpolation"];
10696
+ if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
10697
+ stream.eatWhile(/[\w\\\-]/);
10698
+ if (stream.match(/^\s*:/, false))
10699
+ return ["variable-2", "variable-definition"];
10700
+ return ["variable-2", "variable"];
10701
+ },
10702
+ "&": function() {
10703
+ return ["atom", "atom"];
10704
+ }
10705
+ },
10706
+ name: "css",
10707
+ helperType: "less"
10708
+ });
10709
+
10710
+ CodeMirror.defineMIME("text/x-gss", {
10711
+ documentTypes: documentTypes,
10712
+ mediaTypes: mediaTypes,
10713
+ mediaFeatures: mediaFeatures,
10714
+ propertyKeywords: propertyKeywords,
10715
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10716
+ fontProperties: fontProperties,
10717
+ counterDescriptors: counterDescriptors,
10718
+ colorKeywords: colorKeywords,
10719
+ valueKeywords: valueKeywords,
10720
+ supportsAtComponent: true,
10721
+ tokenHooks: {
10722
+ "/": function(stream, state) {
10723
+ if (!stream.eat("*")) return false;
10724
+ state.tokenize = tokenCComment;
10725
+ return tokenCComment(stream, state);
10726
+ }
10727
+ },
10728
+ name: "css",
10729
+ helperType: "gss"
10730
+ });
10731
+
10732
+ });
10733
+ });
10734
+
10735
+ var xml = createCommonjsModule(function (module, exports) {
10736
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
10737
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
10738
+
10739
+ (function(mod) {
10740
+ mod(codemirror);
10741
+ })(function(CodeMirror) {
10742
+
10743
+ var htmlConfig = {
10744
+ autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
10745
+ 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
10746
+ 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
10747
+ 'track': true, 'wbr': true, 'menuitem': true},
10748
+ implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
10749
+ 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
10750
+ 'th': true, 'tr': true},
10751
+ contextGrabbers: {
10752
+ 'dd': {'dd': true, 'dt': true},
10753
+ 'dt': {'dd': true, 'dt': true},
10754
+ 'li': {'li': true},
10755
+ 'option': {'option': true, 'optgroup': true},
10756
+ 'optgroup': {'optgroup': true},
10757
+ 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
10758
+ 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
10759
+ 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
10760
+ 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
10761
+ 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
10762
+ 'rp': {'rp': true, 'rt': true},
10763
+ 'rt': {'rp': true, 'rt': true},
10764
+ 'tbody': {'tbody': true, 'tfoot': true},
10765
+ 'td': {'td': true, 'th': true},
10766
+ 'tfoot': {'tbody': true},
10767
+ 'th': {'td': true, 'th': true},
10768
+ 'thead': {'tbody': true, 'tfoot': true},
10769
+ 'tr': {'tr': true}
10770
+ },
10771
+ doNotIndent: {"pre": true},
10772
+ allowUnquoted: true,
10773
+ allowMissing: true,
10774
+ caseFold: true
10775
+ };
10776
+
10777
+ var xmlConfig = {
10778
+ autoSelfClosers: {},
10779
+ implicitlyClosed: {},
10780
+ contextGrabbers: {},
10781
+ doNotIndent: {},
10782
+ allowUnquoted: false,
10783
+ allowMissing: false,
10784
+ allowMissingTagName: false,
10785
+ caseFold: false
10786
+ };
10787
+
10788
+ CodeMirror.defineMode("xml", function(editorConf, config_) {
10789
+ var indentUnit = editorConf.indentUnit;
10790
+ var config = {};
10791
+ var defaults = config_.htmlMode ? htmlConfig : xmlConfig;
10792
+ for (var prop in defaults) config[prop] = defaults[prop];
10793
+ for (var prop in config_) config[prop] = config_[prop];
10794
+
10795
+ // Return variables for tokenizers
10796
+ var type, setStyle;
10797
+
10798
+ function inText(stream, state) {
10799
+ function chain(parser) {
10800
+ state.tokenize = parser;
10801
+ return parser(stream, state);
10802
+ }
10803
+
10804
+ var ch = stream.next();
10805
+ if (ch == "<") {
10806
+ if (stream.eat("!")) {
10807
+ if (stream.eat("[")) {
10808
+ if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
10809
+ else return null;
10810
+ } else if (stream.match("--")) {
10811
+ return chain(inBlock("comment", "-->"));
10812
+ } else if (stream.match("DOCTYPE", true, true)) {
10813
+ stream.eatWhile(/[\w\._\-]/);
10814
+ return chain(doctype(1));
10815
+ } else {
10816
+ return null;
10817
+ }
10818
+ } else if (stream.eat("?")) {
10819
+ stream.eatWhile(/[\w\._\-]/);
10820
+ state.tokenize = inBlock("meta", "?>");
10821
+ return "meta";
10822
+ } else {
10823
+ type = stream.eat("/") ? "closeTag" : "openTag";
10824
+ state.tokenize = inTag;
10825
+ return "tag bracket";
10826
+ }
10827
+ } else if (ch == "&") {
10828
+ var ok;
10829
+ if (stream.eat("#")) {
10830
+ if (stream.eat("x")) {
10831
+ ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
10832
+ } else {
10833
+ ok = stream.eatWhile(/[\d]/) && stream.eat(";");
10834
+ }
10835
+ } else {
10836
+ ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
10837
+ }
10838
+ return ok ? "atom" : "error";
10839
+ } else {
10840
+ stream.eatWhile(/[^&<]/);
10841
+ return null;
10842
+ }
10843
+ }
10844
+ inText.isInText = true;
10845
+
10846
+ function inTag(stream, state) {
10847
+ var ch = stream.next();
10848
+ if (ch == ">" || (ch == "/" && stream.eat(">"))) {
10849
+ state.tokenize = inText;
10850
+ type = ch == ">" ? "endTag" : "selfcloseTag";
10851
+ return "tag bracket";
10852
+ } else if (ch == "=") {
10853
+ type = "equals";
10854
+ return null;
10855
+ } else if (ch == "<") {
10856
+ state.tokenize = inText;
10857
+ state.state = baseState;
10858
+ state.tagName = state.tagStart = null;
10859
+ var next = state.tokenize(stream, state);
10860
+ return next ? next + " tag error" : "tag error";
10861
+ } else if (/[\'\"]/.test(ch)) {
10862
+ state.tokenize = inAttribute(ch);
10863
+ state.stringStartCol = stream.column();
10864
+ return state.tokenize(stream, state);
10865
+ } else {
10866
+ stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
10867
+ return "word";
10868
+ }
10869
+ }
10870
+
10871
+ function inAttribute(quote) {
10872
+ var closure = function(stream, state) {
10873
+ while (!stream.eol()) {
10874
+ if (stream.next() == quote) {
10875
+ state.tokenize = inTag;
10876
+ break;
10877
+ }
10878
+ }
10879
+ return "string";
10880
+ };
10881
+ closure.isInAttribute = true;
10882
+ return closure;
10883
+ }
10884
+
10885
+ function inBlock(style, terminator) {
10886
+ return function(stream, state) {
10887
+ while (!stream.eol()) {
10888
+ if (stream.match(terminator)) {
10889
+ state.tokenize = inText;
10890
+ break;
10891
+ }
10892
+ stream.next();
10893
+ }
10894
+ return style;
10895
+ }
10896
+ }
10897
+
10898
+ function doctype(depth) {
10899
+ return function(stream, state) {
10900
+ var ch;
10901
+ while ((ch = stream.next()) != null) {
10902
+ if (ch == "<") {
10903
+ state.tokenize = doctype(depth + 1);
10904
+ return state.tokenize(stream, state);
10905
+ } else if (ch == ">") {
10906
+ if (depth == 1) {
10907
+ state.tokenize = inText;
10908
+ break;
10909
+ } else {
10910
+ state.tokenize = doctype(depth - 1);
10911
+ return state.tokenize(stream, state);
10912
+ }
10913
+ }
10914
+ }
10915
+ return "meta";
10916
+ };
10917
+ }
10918
+
10919
+ function lower(tagName) {
10920
+ return tagName && tagName.toLowerCase();
10921
+ }
10922
+
10923
+ function Context(state, tagName, startOfLine) {
10924
+ this.prev = state.context;
10925
+ this.tagName = tagName || "";
10926
+ this.indent = state.indented;
10927
+ this.startOfLine = startOfLine;
10928
+ if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
10929
+ this.noIndent = true;
10930
+ }
10931
+ function popContext(state) {
10932
+ if (state.context) state.context = state.context.prev;
10933
+ }
10934
+ function maybePopContext(state, nextTagName) {
10935
+ var parentTagName;
10936
+ while (true) {
10937
+ if (!state.context) {
10938
+ return;
10939
+ }
10940
+ parentTagName = state.context.tagName;
10941
+ if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||
10942
+ !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {
10943
+ return;
10944
+ }
10945
+ popContext(state);
10946
+ }
10947
+ }
10948
+
10949
+ function baseState(type, stream, state) {
10950
+ if (type == "openTag") {
10951
+ state.tagStart = stream.column();
10952
+ return tagNameState;
10953
+ } else if (type == "closeTag") {
10954
+ return closeTagNameState;
10955
+ } else {
10956
+ return baseState;
10957
+ }
10958
+ }
10959
+ function tagNameState(type, stream, state) {
10960
+ if (type == "word") {
10961
+ state.tagName = stream.current();
10962
+ setStyle = "tag";
10963
+ return attrState;
10964
+ } else if (config.allowMissingTagName && type == "endTag") {
10965
+ setStyle = "tag bracket";
10966
+ return attrState(type, stream, state);
10967
+ } else {
10968
+ setStyle = "error";
10969
+ return tagNameState;
10970
+ }
10971
+ }
10972
+ function closeTagNameState(type, stream, state) {
10973
+ if (type == "word") {
10974
+ var tagName = stream.current();
10975
+ if (state.context && state.context.tagName != tagName &&
10976
+ config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))
10977
+ popContext(state);
10978
+ if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
10979
+ setStyle = "tag";
10980
+ return closeState;
10981
+ } else {
10982
+ setStyle = "tag error";
10983
+ return closeStateErr;
10984
+ }
10985
+ } else if (config.allowMissingTagName && type == "endTag") {
10986
+ setStyle = "tag bracket";
10987
+ return closeState(type, stream, state);
10988
+ } else {
10989
+ setStyle = "error";
10990
+ return closeStateErr;
10991
+ }
10992
+ }
10993
+
10994
+ function closeState(type, _stream, state) {
10995
+ if (type != "endTag") {
10996
+ setStyle = "error";
10997
+ return closeState;
10998
+ }
10999
+ popContext(state);
11000
+ return baseState;
11001
+ }
11002
+ function closeStateErr(type, stream, state) {
11003
+ setStyle = "error";
11004
+ return closeState(type, stream, state);
11005
+ }
11006
+
11007
+ function attrState(type, _stream, state) {
11008
+ if (type == "word") {
11009
+ setStyle = "attribute";
11010
+ return attrEqState;
11011
+ } else if (type == "endTag" || type == "selfcloseTag") {
11012
+ var tagName = state.tagName, tagStart = state.tagStart;
11013
+ state.tagName = state.tagStart = null;
11014
+ if (type == "selfcloseTag" ||
11015
+ config.autoSelfClosers.hasOwnProperty(lower(tagName))) {
11016
+ maybePopContext(state, tagName);
11017
+ } else {
11018
+ maybePopContext(state, tagName);
11019
+ state.context = new Context(state, tagName, tagStart == state.indented);
11020
+ }
11021
+ return baseState;
11022
+ }
11023
+ setStyle = "error";
11024
+ return attrState;
11025
+ }
11026
+ function attrEqState(type, stream, state) {
11027
+ if (type == "equals") return attrValueState;
11028
+ if (!config.allowMissing) setStyle = "error";
11029
+ return attrState(type, stream, state);
11030
+ }
11031
+ function attrValueState(type, stream, state) {
11032
+ if (type == "string") return attrContinuedState;
11033
+ if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
11034
+ setStyle = "error";
11035
+ return attrState(type, stream, state);
11036
+ }
11037
+ function attrContinuedState(type, stream, state) {
11038
+ if (type == "string") return attrContinuedState;
11039
+ return attrState(type, stream, state);
11040
+ }
11041
+
11042
+ return {
11043
+ startState: function(baseIndent) {
11044
+ var state = {tokenize: inText,
11045
+ state: baseState,
11046
+ indented: baseIndent || 0,
11047
+ tagName: null, tagStart: null,
11048
+ context: null};
11049
+ if (baseIndent != null) state.baseIndent = baseIndent;
11050
+ return state
11051
+ },
11052
+
11053
+ token: function(stream, state) {
11054
+ if (!state.tagName && stream.sol())
11055
+ state.indented = stream.indentation();
11056
+
11057
+ if (stream.eatSpace()) return null;
11058
+ type = null;
11059
+ var style = state.tokenize(stream, state);
11060
+ if ((style || type) && style != "comment") {
11061
+ setStyle = null;
11062
+ state.state = state.state(type || style, stream, state);
11063
+ if (setStyle)
11064
+ style = setStyle == "error" ? style + " error" : setStyle;
11065
+ }
11066
+ return style;
11067
+ },
11068
+
11069
+ indent: function(state, textAfter, fullLine) {
11070
+ var context = state.context;
11071
+ // Indent multi-line strings (e.g. css).
11072
+ if (state.tokenize.isInAttribute) {
11073
+ if (state.tagStart == state.indented)
11074
+ return state.stringStartCol + 1;
11075
+ else
11076
+ return state.indented + indentUnit;
11077
+ }
11078
+ if (context && context.noIndent) return CodeMirror.Pass;
11079
+ if (state.tokenize != inTag && state.tokenize != inText)
11080
+ return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
11081
+ // Indent the starts of attribute names.
11082
+ if (state.tagName) {
11083
+ if (config.multilineTagIndentPastTag !== false)
11084
+ return state.tagStart + state.tagName.length + 2;
11085
+ else
11086
+ return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
11087
+ }
11088
+ if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
11089
+ var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
11090
+ if (tagAfter && tagAfter[1]) { // Closing tag spotted
11091
+ while (context) {
11092
+ if (context.tagName == tagAfter[2]) {
11093
+ context = context.prev;
11094
+ break;
11095
+ } else if (config.implicitlyClosed.hasOwnProperty(lower(context.tagName))) {
11096
+ context = context.prev;
11097
+ } else {
11098
+ break;
11099
+ }
11100
+ }
11101
+ } else if (tagAfter) { // Opening tag spotted
11102
+ while (context) {
11103
+ var grabbers = config.contextGrabbers[lower(context.tagName)];
11104
+ if (grabbers && grabbers.hasOwnProperty(lower(tagAfter[2])))
11105
+ context = context.prev;
11106
+ else
11107
+ break;
11108
+ }
11109
+ }
11110
+ while (context && context.prev && !context.startOfLine)
11111
+ context = context.prev;
11112
+ if (context) return context.indent + indentUnit;
11113
+ else return state.baseIndent || 0;
11114
+ },
11115
+
11116
+ electricInput: /<\/[\s\w:]+>$/,
11117
+ blockCommentStart: "<!--",
11118
+ blockCommentEnd: "-->",
11119
+
11120
+ configuration: config.htmlMode ? "html" : "xml",
11121
+ helperType: config.htmlMode ? "html" : "xml",
11122
+
11123
+ skipAttribute: function(state) {
11124
+ if (state.state == attrValueState)
11125
+ state.state = attrState;
11126
+ },
11127
+
11128
+ xmlCurrentTag: function(state) {
11129
+ return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null
11130
+ },
11131
+
11132
+ xmlCurrentContext: function(state) {
11133
+ var context = [];
11134
+ for (var cx = state.context; cx; cx = cx.prev)
11135
+ context.push(cx.tagName);
11136
+ return context.reverse()
11137
+ }
11138
+ };
11139
+ });
11140
+
11141
+ CodeMirror.defineMIME("text/xml", "xml");
11142
+ CodeMirror.defineMIME("application/xml", "xml");
11143
+ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
11144
+ CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
11145
+
11146
+ });
11147
+ });
11148
+
11149
+ var javascript = createCommonjsModule(function (module, exports) {
9877
11150
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
9878
11151
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
9879
11152
 
@@ -10833,6 +12106,155 @@ createCommonjsModule(function (module, exports) {
10833
12106
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10834
12107
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
10835
12108
 
12109
+ (function(mod) {
12110
+ mod(codemirror, xml, javascript, css);
12111
+ })(function(CodeMirror) {
12112
+
12113
+ var defaultTags = {
12114
+ script: [
12115
+ ["lang", /(javascript|babel)/i, "javascript"],
12116
+ ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
12117
+ ["type", /./, "text/plain"],
12118
+ [null, null, "javascript"]
12119
+ ],
12120
+ style: [
12121
+ ["lang", /^css$/i, "css"],
12122
+ ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
12123
+ ["type", /./, "text/plain"],
12124
+ [null, null, "css"]
12125
+ ]
12126
+ };
12127
+
12128
+ function maybeBackup(stream, pat, style) {
12129
+ var cur = stream.current(), close = cur.search(pat);
12130
+ if (close > -1) {
12131
+ stream.backUp(cur.length - close);
12132
+ } else if (cur.match(/<\/?$/)) {
12133
+ stream.backUp(cur.length);
12134
+ if (!stream.match(pat, false)) stream.match(cur);
12135
+ }
12136
+ return style;
12137
+ }
12138
+
12139
+ var attrRegexpCache = {};
12140
+ function getAttrRegexp(attr) {
12141
+ var regexp = attrRegexpCache[attr];
12142
+ if (regexp) return regexp;
12143
+ return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
12144
+ }
12145
+
12146
+ function getAttrValue(text, attr) {
12147
+ var match = text.match(getAttrRegexp(attr));
12148
+ return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
12149
+ }
12150
+
12151
+ function getTagRegexp(tagName, anchored) {
12152
+ return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i");
12153
+ }
12154
+
12155
+ function addTags(from, to) {
12156
+ for (var tag in from) {
12157
+ var dest = to[tag] || (to[tag] = []);
12158
+ var source = from[tag];
12159
+ for (var i = source.length - 1; i >= 0; i--)
12160
+ dest.unshift(source[i]);
12161
+ }
12162
+ }
12163
+
12164
+ function findMatchingMode(tagInfo, tagText) {
12165
+ for (var i = 0; i < tagInfo.length; i++) {
12166
+ var spec = tagInfo[i];
12167
+ if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
12168
+ }
12169
+ }
12170
+
12171
+ CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
12172
+ var htmlMode = CodeMirror.getMode(config, {
12173
+ name: "xml",
12174
+ htmlMode: true,
12175
+ multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
12176
+ multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
12177
+ allowMissingTagName: parserConfig.allowMissingTagName,
12178
+ });
12179
+
12180
+ var tags = {};
12181
+ var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
12182
+ addTags(defaultTags, tags);
12183
+ if (configTags) addTags(configTags, tags);
12184
+ if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
12185
+ tags.script.unshift(["type", configScript[i].matches, configScript[i].mode]);
12186
+
12187
+ function html(stream, state) {
12188
+ var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName;
12189
+ if (tag && !/[<>\s\/]/.test(stream.current()) &&
12190
+ (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
12191
+ tags.hasOwnProperty(tagName)) {
12192
+ state.inTag = tagName + " ";
12193
+ } else if (state.inTag && tag && />$/.test(stream.current())) {
12194
+ var inTag = /^([\S]+) (.*)/.exec(state.inTag);
12195
+ state.inTag = null;
12196
+ var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2]);
12197
+ var mode = CodeMirror.getMode(config, modeSpec);
12198
+ var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
12199
+ state.token = function (stream, state) {
12200
+ if (stream.match(endTagA, false)) {
12201
+ state.token = html;
12202
+ state.localState = state.localMode = null;
12203
+ return null;
12204
+ }
12205
+ return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
12206
+ };
12207
+ state.localMode = mode;
12208
+ state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
12209
+ } else if (state.inTag) {
12210
+ state.inTag += stream.current();
12211
+ if (stream.eol()) state.inTag += " ";
12212
+ }
12213
+ return style;
12214
+ }
12215
+ return {
12216
+ startState: function () {
12217
+ var state = CodeMirror.startState(htmlMode);
12218
+ return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
12219
+ },
12220
+
12221
+ copyState: function (state) {
12222
+ var local;
12223
+ if (state.localState) {
12224
+ local = CodeMirror.copyState(state.localMode, state.localState);
12225
+ }
12226
+ return {token: state.token, inTag: state.inTag,
12227
+ localMode: state.localMode, localState: local,
12228
+ htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
12229
+ },
12230
+
12231
+ token: function (stream, state) {
12232
+ return state.token(stream, state);
12233
+ },
12234
+
12235
+ indent: function (state, textAfter, line) {
12236
+ if (!state.localMode || /^\s*<\//.test(textAfter))
12237
+ return htmlMode.indent(state.htmlState, textAfter, line);
12238
+ else if (state.localMode.indent)
12239
+ return state.localMode.indent(state.localState, textAfter, line);
12240
+ else
12241
+ return CodeMirror.Pass;
12242
+ },
12243
+
12244
+ innerMode: function (state) {
12245
+ return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
12246
+ }
12247
+ };
12248
+ }, "xml", "javascript", "css");
12249
+
12250
+ CodeMirror.defineMIME("text/html", "htmlmixed");
12251
+ });
12252
+ });
12253
+
12254
+ createCommonjsModule(function (module, exports) {
12255
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
12256
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
12257
+
10836
12258
  (function(mod) {
10837
12259
  mod(codemirror);
10838
12260
  })(function(CodeMirror) {
@@ -11245,6 +12667,250 @@ createCommonjsModule(function (module, exports) {
11245
12667
  });
11246
12668
  });
11247
12669
 
12670
+ var xmlFold = createCommonjsModule(function (module, exports) {
12671
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
12672
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
12673
+
12674
+ (function(mod) {
12675
+ mod(codemirror);
12676
+ })(function(CodeMirror) {
12677
+
12678
+ var Pos = CodeMirror.Pos;
12679
+ function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
12680
+
12681
+ var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
12682
+ var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
12683
+ var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
12684
+
12685
+ function Iter(cm, line, ch, range) {
12686
+ this.line = line; this.ch = ch;
12687
+ this.cm = cm; this.text = cm.getLine(line);
12688
+ this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();
12689
+ this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();
12690
+ }
12691
+
12692
+ function tagAt(iter, ch) {
12693
+ var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));
12694
+ return type && /\btag\b/.test(type);
12695
+ }
12696
+
12697
+ function nextLine(iter) {
12698
+ if (iter.line >= iter.max) return;
12699
+ iter.ch = 0;
12700
+ iter.text = iter.cm.getLine(++iter.line);
12701
+ return true;
12702
+ }
12703
+ function prevLine(iter) {
12704
+ if (iter.line <= iter.min) return;
12705
+ iter.text = iter.cm.getLine(--iter.line);
12706
+ iter.ch = iter.text.length;
12707
+ return true;
12708
+ }
12709
+
12710
+ function toTagEnd(iter) {
12711
+ for (;;) {
12712
+ var gt = iter.text.indexOf(">", iter.ch);
12713
+ if (gt == -1) { if (nextLine(iter)) continue; else return; }
12714
+ if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }
12715
+ var lastSlash = iter.text.lastIndexOf("/", gt);
12716
+ var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
12717
+ iter.ch = gt + 1;
12718
+ return selfClose ? "selfClose" : "regular";
12719
+ }
12720
+ }
12721
+ function toTagStart(iter) {
12722
+ for (;;) {
12723
+ var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;
12724
+ if (lt == -1) { if (prevLine(iter)) continue; else return; }
12725
+ if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }
12726
+ xmlTagStart.lastIndex = lt;
12727
+ iter.ch = lt;
12728
+ var match = xmlTagStart.exec(iter.text);
12729
+ if (match && match.index == lt) return match;
12730
+ }
12731
+ }
12732
+
12733
+ function toNextTag(iter) {
12734
+ for (;;) {
12735
+ xmlTagStart.lastIndex = iter.ch;
12736
+ var found = xmlTagStart.exec(iter.text);
12737
+ if (!found) { if (nextLine(iter)) continue; else return; }
12738
+ if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }
12739
+ iter.ch = found.index + found[0].length;
12740
+ return found;
12741
+ }
12742
+ }
12743
+ function toPrevTag(iter) {
12744
+ for (;;) {
12745
+ var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;
12746
+ if (gt == -1) { if (prevLine(iter)) continue; else return; }
12747
+ if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }
12748
+ var lastSlash = iter.text.lastIndexOf("/", gt);
12749
+ var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
12750
+ iter.ch = gt + 1;
12751
+ return selfClose ? "selfClose" : "regular";
12752
+ }
12753
+ }
12754
+
12755
+ function findMatchingClose(iter, tag) {
12756
+ var stack = [];
12757
+ for (;;) {
12758
+ var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);
12759
+ if (!next || !(end = toTagEnd(iter))) return;
12760
+ if (end == "selfClose") continue;
12761
+ if (next[1]) { // closing tag
12762
+ for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
12763
+ stack.length = i;
12764
+ break;
12765
+ }
12766
+ if (i < 0 && (!tag || tag == next[2])) return {
12767
+ tag: next[2],
12768
+ from: Pos(startLine, startCh),
12769
+ to: Pos(iter.line, iter.ch)
12770
+ };
12771
+ } else { // opening tag
12772
+ stack.push(next[2]);
12773
+ }
12774
+ }
12775
+ }
12776
+ function findMatchingOpen(iter, tag) {
12777
+ var stack = [];
12778
+ for (;;) {
12779
+ var prev = toPrevTag(iter);
12780
+ if (!prev) return;
12781
+ if (prev == "selfClose") { toTagStart(iter); continue; }
12782
+ var endLine = iter.line, endCh = iter.ch;
12783
+ var start = toTagStart(iter);
12784
+ if (!start) return;
12785
+ if (start[1]) { // closing tag
12786
+ stack.push(start[2]);
12787
+ } else { // opening tag
12788
+ for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {
12789
+ stack.length = i;
12790
+ break;
12791
+ }
12792
+ if (i < 0 && (!tag || tag == start[2])) return {
12793
+ tag: start[2],
12794
+ from: Pos(iter.line, iter.ch),
12795
+ to: Pos(endLine, endCh)
12796
+ };
12797
+ }
12798
+ }
12799
+ }
12800
+
12801
+ CodeMirror.registerHelper("fold", "xml", function(cm, start) {
12802
+ var iter = new Iter(cm, start.line, 0);
12803
+ for (;;) {
12804
+ var openTag = toNextTag(iter);
12805
+ if (!openTag || iter.line != start.line) return
12806
+ var end = toTagEnd(iter);
12807
+ if (!end) return
12808
+ if (!openTag[1] && end != "selfClose") {
12809
+ var startPos = Pos(iter.line, iter.ch);
12810
+ var endPos = findMatchingClose(iter, openTag[2]);
12811
+ return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null
12812
+ }
12813
+ }
12814
+ });
12815
+ CodeMirror.findMatchingTag = function(cm, pos, range) {
12816
+ var iter = new Iter(cm, pos.line, pos.ch, range);
12817
+ if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;
12818
+ var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);
12819
+ var start = end && toTagStart(iter);
12820
+ if (!end || !start || cmp(iter, pos) > 0) return;
12821
+ var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};
12822
+ if (end == "selfClose") return {open: here, close: null, at: "open"};
12823
+
12824
+ if (start[1]) { // closing tag
12825
+ return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};
12826
+ } else { // opening tag
12827
+ iter = new Iter(cm, to.line, to.ch, range);
12828
+ return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};
12829
+ }
12830
+ };
12831
+
12832
+ CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {
12833
+ var iter = new Iter(cm, pos.line, pos.ch, range);
12834
+ for (;;) {
12835
+ var open = findMatchingOpen(iter, tag);
12836
+ if (!open) break;
12837
+ var forward = new Iter(cm, pos.line, pos.ch, range);
12838
+ var close = findMatchingClose(forward, open.tag);
12839
+ if (close) return {open: open, close: close};
12840
+ }
12841
+ };
12842
+
12843
+ // Used by addon/edit/closetag.js
12844
+ CodeMirror.scanForClosingTag = function(cm, pos, name, end) {
12845
+ var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);
12846
+ return findMatchingClose(iter, name);
12847
+ };
12848
+ });
12849
+ });
12850
+
12851
+ createCommonjsModule(function (module, exports) {
12852
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
12853
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
12854
+
12855
+ (function(mod) {
12856
+ mod(codemirror, xmlFold);
12857
+ })(function(CodeMirror) {
12858
+
12859
+ CodeMirror.defineOption("matchTags", false, function(cm, val, old) {
12860
+ if (old && old != CodeMirror.Init) {
12861
+ cm.off("cursorActivity", doMatchTags);
12862
+ cm.off("viewportChange", maybeUpdateMatch);
12863
+ clear(cm);
12864
+ }
12865
+ if (val) {
12866
+ cm.state.matchBothTags = typeof val == "object" && val.bothTags;
12867
+ cm.on("cursorActivity", doMatchTags);
12868
+ cm.on("viewportChange", maybeUpdateMatch);
12869
+ doMatchTags(cm);
12870
+ }
12871
+ });
12872
+
12873
+ function clear(cm) {
12874
+ if (cm.state.tagHit) cm.state.tagHit.clear();
12875
+ if (cm.state.tagOther) cm.state.tagOther.clear();
12876
+ cm.state.tagHit = cm.state.tagOther = null;
12877
+ }
12878
+
12879
+ function doMatchTags(cm) {
12880
+ cm.state.failedTagMatch = false;
12881
+ cm.operation(function() {
12882
+ clear(cm);
12883
+ if (cm.somethingSelected()) return;
12884
+ var cur = cm.getCursor(), range = cm.getViewport();
12885
+ range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);
12886
+ var match = CodeMirror.findMatchingTag(cm, cur, range);
12887
+ if (!match) return;
12888
+ if (cm.state.matchBothTags) {
12889
+ var hit = match.at == "open" ? match.open : match.close;
12890
+ if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"});
12891
+ }
12892
+ var other = match.at == "close" ? match.open : match.close;
12893
+ if (other)
12894
+ cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"});
12895
+ else
12896
+ cm.state.failedTagMatch = true;
12897
+ });
12898
+ }
12899
+
12900
+ function maybeUpdateMatch(cm) {
12901
+ if (cm.state.failedTagMatch) doMatchTags(cm);
12902
+ }
12903
+
12904
+ CodeMirror.commands.toMatchingTag = function(cm) {
12905
+ var found = CodeMirror.findMatchingTag(cm, cm.getCursor());
12906
+ if (found) {
12907
+ var other = found.at == "close" ? found.open : found.close;
12908
+ if (other) cm.extendSelection(other.to, other.from);
12909
+ }
12910
+ };
12911
+ });
12912
+ });
12913
+
11248
12914
  createCommonjsModule(function (module, exports) {
11249
12915
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
11250
12916
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -12825,6 +14491,7 @@ const CodeEditor = class {
12825
14491
  this.language = undefined;
12826
14492
  this.readonly = false;
12827
14493
  this.lineNumbers = false;
14494
+ this.lineWrapping = false;
12828
14495
  this.fold = false;
12829
14496
  this.lint = false;
12830
14497
  this.colorScheme = 'auto';
@@ -12905,6 +14572,9 @@ const CodeEditor = class {
12905
14572
  typescript: true,
12906
14573
  };
12907
14574
  }
14575
+ else if (this.language === 'html') {
14576
+ mode = 'htmlmixed';
14577
+ }
12908
14578
  if (this.fold) {
12909
14579
  gutters.push('CodeMirror-foldgutter');
12910
14580
  }
@@ -12916,8 +14586,10 @@ const CodeEditor = class {
12916
14586
  tabSize: TAB_SIZE,
12917
14587
  indentUnit: TAB_SIZE,
12918
14588
  lineNumbers: this.lineNumbers,
14589
+ lineWrapping: this.lineWrapping,
12919
14590
  styleActiveLine: true,
12920
14591
  matchBrackets: true,
14592
+ matchTags: { bothTags: true },
12921
14593
  lint: this.lint,
12922
14594
  foldGutter: this.fold,
12923
14595
  gutters: gutters,