@openui5/sap.ui.codeeditor 1.120.7 → 1.121.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.
- package/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +2 -2
- package/src/sap/ui/codeeditor/.library +2 -2
- package/src/sap/ui/codeeditor/CodeEditor.js +41 -27
- package/src/sap/ui/codeeditor/js/ace/ace.js +16262 -16597
- package/src/sap/ui/codeeditor/js/ace/css/ace.css +358 -86
- package/src/sap/ui/codeeditor/js/ace/css/ambiance-3.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/chrome-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/clouds-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/clouds_midnight-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cobalt-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/crimson_editor-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/dawn-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/dracula-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/dreamweaver-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/eclipse-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/github-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/github_dark-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/github_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gob-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox_dark_hard-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/idle_fingers-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/iplastic-3.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/kr_theme-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/kuroir-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/kuroir-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-10.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-11.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-12.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-22.svg +1 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-5.svg +7 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +7 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +9 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-8.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +4 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-9.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +4 -0
- package/src/sap/ui/codeeditor/js/ace/css/merbivore-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/merbivore_soft-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/mono_industrial-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/monokai-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/one_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/pastel_on_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/solarized_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/solarized_light-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/sqlserver-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/terminal-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/textmate-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/ambiance.css +120 -68
- package/src/sap/ui/codeeditor/js/ace/css/theme/chaos.css +79 -66
- package/src/sap/ui/codeeditor/js/ace/css/theme/chrome.css +82 -43
- package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_day.css +160 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night.css +146 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night_low_color.css +134 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/clouds.css +59 -31
- package/src/sap/ui/codeeditor/js/ace/css/theme/clouds_midnight.css +60 -32
- package/src/sap/ui/codeeditor/js/ace/css/theme/cobalt.css +71 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/crimson_editor.css +79 -42
- package/src/sap/ui/codeeditor/js/ace/css/theme/dawn.css +70 -40
- package/src/sap/ui/codeeditor/js/ace/css/theme/dracula.css +95 -49
- package/src/sap/ui/codeeditor/js/ace/css/theme/dreamweaver.css +95 -49
- package/src/sap/ui/codeeditor/js/ace/css/theme/eclipse.css +62 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/github.css +71 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/github_dark.css +134 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/gob.css +68 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox.css +54 -28
- package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_dark_hard.css +163 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_light_hard.css +167 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/idle_fingers.css +62 -34
- package/src/sap/ui/codeeditor/js/ace/css/theme/iplastic.css +76 -45
- package/src/sap/ui/codeeditor/js/ace/css/theme/katzenmilch.css +91 -53
- package/src/sap/ui/codeeditor/js/ace/css/theme/kr_theme.css +67 -36
- package/src/sap/ui/codeeditor/js/ace/css/theme/kuroir.css +43 -17
- package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore.css +57 -31
- package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore_soft.css +57 -31
- package/src/sap/ui/codeeditor/js/ace/css/theme/mono_industrial.css +66 -36
- package/src/sap/ui/codeeditor/js/ace/css/theme/monokai.css +63 -35
- package/src/sap/ui/codeeditor/js/ace/css/theme/nord_dark.css +55 -29
- package/src/sap/ui/codeeditor/js/ace/css/theme/one_dark.css +88 -47
- package/src/sap/ui/codeeditor/js/ace/css/theme/pastel_on_dark.css +70 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +52 -28
- package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_light.css +55 -29
- package/src/sap/ui/codeeditor/js/ace/css/theme/sqlserver.css +90 -48
- package/src/sap/ui/codeeditor/js/ace/css/theme/terminal.css +64 -34
- package/src/sap/ui/codeeditor/js/ace/css/theme/textmate.css +82 -43
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow.css +61 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night.css +61 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_blue.css +59 -32
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_bright.css +71 -40
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_eighties.css +61 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/twilight.css +66 -36
- package/src/sap/ui/codeeditor/js/ace/css/theme/vibrant_ink.css +59 -32
- package/src/sap/ui/codeeditor/js/ace/css/theme/xcode.css +54 -28
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_blue-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_bright-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_eighties-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/twilight-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/vibrant_ink-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/xcode-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +90 -91
- package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +39 -75
- package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +457 -0
- package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +47 -97
- package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +496 -552
- package/src/sap/ui/codeeditor/js/ace/ext-hardwrap.js +47 -16
- package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +3269 -0
- package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +45 -105
- package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +1438 -1128
- package/src/sap/ui/codeeditor/js/ace/ext-linking.js +8 -16
- package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +198 -185
- package/src/sap/ui/codeeditor/js/ace/ext-options.js +405 -443
- package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +1682 -1508
- package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +26 -28
- package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +160 -332
- package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +409 -446
- package/src/sap/ui/codeeditor/js/ace/ext-simple_tokenizer.js +45 -0
- package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +4 -10
- package/src/sap/ui/codeeditor/js/ace/ext-split.js +41 -63
- package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +19 -27
- package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +45 -41
- package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +62 -83
- package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +442 -551
- package/src/sap/ui/codeeditor/js/ace/keybinding-sublime.js +338 -351
- package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +5242 -4758
- package/src/sap/ui/codeeditor/js/ace/keybinding-vscode.js +228 -235
- package/src/sap/ui/codeeditor/js/ace/mode-abap.js +72 -93
- package/src/sap/ui/codeeditor/js/ace/mode-abc.js +136 -164
- package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +109 -150
- package/src/sap/ui/codeeditor/js/ace/mode-ada.js +45 -74
- package/src/sap/ui/codeeditor/js/ace/mode-alda.js +77 -109
- package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +196 -241
- package/src/sap/ui/codeeditor/js/ace/mode-apex.js +192 -247
- package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +56 -102
- package/src/sap/ui/codeeditor/js/ace/mode-aql.js +85 -95
- package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +120 -158
- package/src/sap/ui/codeeditor/js/ace/mode-asl.js +233 -298
- package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +78 -101
- package/src/sap/ui/codeeditor/js/ace/mode-astro.js +2414 -0
- package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +80 -116
- package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +74 -105
- package/src/sap/ui/codeeditor/js/ace/mode-bibtex.js +318 -0
- package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +72 -115
- package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +171 -257
- package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +97 -115
- package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +126 -119
- package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +48 -67
- package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +203 -268
- package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +1029 -1276
- package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +337 -393
- package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +127 -216
- package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +1539 -1569
- package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +786 -898
- package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +184 -237
- package/src/sap/ui/codeeditor/js/ace/mode-csp.js +37 -37
- package/src/sap/ui/codeeditor/js/ace/mode-css.js +293 -384
- package/src/sap/ui/codeeditor/js/ace/mode-curly.js +1019 -1262
- package/src/sap/ui/codeeditor/js/ace/mode-cuttlefish.js +56 -0
- package/src/sap/ui/codeeditor/js/ace/mode-d.js +163 -233
- package/src/sap/ui/codeeditor/js/ace/mode-dart.js +330 -427
- package/src/sap/ui/codeeditor/js/ace/mode-diff.js +20 -38
- package/src/sap/ui/codeeditor/js/ace/mode-django.js +1032 -1271
- package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +211 -284
- package/src/sap/ui/codeeditor/js/ace/mode-dot.js +131 -200
- package/src/sap/ui/codeeditor/js/ace/mode-drools.js +408 -349
- package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +89 -125
- package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +47 -62
- package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +1350 -1666
- package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +349 -407
- package/src/sap/ui/codeeditor/js/ace/mode-elm.js +136 -168
- package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +707 -881
- package/src/sap/ui/codeeditor/js/ace/mode-flix.js +164 -0
- package/src/sap/ui/codeeditor/js/ace/mode-forth.js +128 -172
- package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +177 -246
- package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +92 -131
- package/src/sap/ui/codeeditor/js/ace/mode-fsl.js +91 -124
- package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +813 -748
- package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +52 -71
- package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +105 -119
- package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +12 -22
- package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +184 -289
- package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +686 -623
- package/src/sap/ui/codeeditor/js/ace/mode-golang.js +167 -239
- package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +48 -88
- package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +577 -471
- package/src/sap/ui/codeeditor/js/ace/mode-haml.js +1062 -1026
- package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +1061 -1305
- package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +199 -255
- package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +81 -87
- package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +111 -184
- package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +164 -199
- package/src/sap/ui/codeeditor/js/ace/mode-html.js +1009 -1239
- package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +1402 -1705
- package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +1390 -1706
- package/src/sap/ui/codeeditor/js/ace/mode-ini.js +58 -82
- package/src/sap/ui/codeeditor/js/ace/mode-io.js +85 -123
- package/src/sap/ui/codeeditor/js/ace/mode-ion.js +477 -0
- package/src/sap/ui/codeeditor/js/ace/mode-jack.js +109 -162
- package/src/sap/ui/codeeditor/js/ace/mode-jade.js +1339 -1344
- package/src/sap/ui/codeeditor/js/ace/mode-java.js +710 -498
- package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +441 -354
- package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +270 -0
- package/src/sap/ui/codeeditor/js/ace/mode-json.js +93 -147
- package/src/sap/ui/codeeditor/js/ace/mode-json5.js +128 -180
- package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +58 -112
- package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +1045 -865
- package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +158 -190
- package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +121 -194
- package/src/sap/ui/codeeditor/js/ace/mode-julia.js +128 -177
- package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +262 -614
- package/src/sap/ui/codeeditor/js/ace/mode-latex.js +94 -138
- package/src/sap/ui/codeeditor/js/ace/mode-latte.js +1120 -1366
- package/src/sap/ui/codeeditor/js/ace/mode-less.js +342 -442
- package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +1353 -1414
- package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +65 -73
- package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +217 -224
- package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +97 -142
- package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +187 -227
- package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +99 -155
- package/src/sap/ui/codeeditor/js/ace/mode-lua.js +152 -211
- package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +1167 -1470
- package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +25 -34
- package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +244 -282
- package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +1858 -2177
- package/src/sap/ui/codeeditor/js/ace/mode-mask.js +964 -1007
- package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +197 -221
- package/src/sap/ui/codeeditor/js/ace/mode-maze.js +127 -163
- package/src/sap/ui/codeeditor/js/ace/mode-mediawiki.js +464 -476
- package/src/sap/ui/codeeditor/js/ace/mode-mel.js +90 -140
- package/src/sap/ui/codeeditor/js/ace/mode-mips.js +101 -134
- package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +63 -75
- package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +537 -576
- package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +85 -102
- package/src/sap/ui/codeeditor/js/ace/mode-nasal.js +513 -0
- package/src/sap/ui/codeeditor/js/ace/mode-nginx.js +119 -155
- package/src/sap/ui/codeeditor/js/ace/mode-nim.js +159 -197
- package/src/sap/ui/codeeditor/js/ace/mode-nix.js +283 -375
- package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +139 -172
- package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +1138 -1378
- package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +400 -514
- package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +77 -120
- package/src/sap/ui/codeeditor/js/ace/mode-odin.js +449 -0
- package/src/sap/ui/codeeditor/js/ace/mode-partiql.js +750 -0
- package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +28 -47
- package/src/sap/ui/codeeditor/js/ace/mode-perl.js +122 -185
- package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +974 -851
- package/src/sap/ui/codeeditor/js/ace/mode-php.js +2282 -1502
- package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +2463 -1696
- package/src/sap/ui/codeeditor/js/ace/mode-pig.js +133 -165
- package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +5 -10
- package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +268 -0
- package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +332 -183
- package/src/sap/ui/codeeditor/js/ace/mode-praat.js +168 -234
- package/src/sap/ui/codeeditor/js/ace/mode-prisma.js +292 -324
- package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +180 -246
- package/src/sap/ui/codeeditor/js/ace/mode-properties.js +26 -37
- package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +232 -327
- package/src/sap/ui/codeeditor/js/ace/mode-prql.js +320 -0
- package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +68 -120
- package/src/sap/ui/codeeditor/js/ace/mode-python.js +338 -370
- package/src/sap/ui/codeeditor/js/ace/mode-qml.js +244 -279
- package/src/sap/ui/codeeditor/js/ace/mode-r.js +295 -220
- package/src/sap/ui/codeeditor/js/ace/mode-raku.js +356 -433
- package/src/sap/ui/codeeditor/js/ace/mode-razor.js +1130 -1374
- package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +214 -171
- package/src/sap/ui/codeeditor/js/ace/mode-red.js +212 -274
- package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +181 -220
- package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +1325 -1443
- package/src/sap/ui/codeeditor/js/ace/mode-robot.js +168 -0
- package/src/sap/ui/codeeditor/js/ace/mode-rst.js +217 -229
- package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +338 -420
- package/src/sap/ui/codeeditor/js/ace/mode-rust.js +258 -155
- package/src/sap/ui/codeeditor/js/ace/mode-sac.js +349 -0
- package/src/sap/ui/codeeditor/js/ace/mode-sass.js +257 -309
- package/src/sap/ui/codeeditor/js/ace/mode-scad.js +127 -191
- package/src/sap/ui/codeeditor/js/ace/mode-scala.js +572 -468
- package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +104 -126
- package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +181 -228
- package/src/sap/ui/codeeditor/js/ace/mode-scss.js +364 -472
- package/src/sap/ui/codeeditor/js/ace/mode-sh.js +204 -266
- package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +477 -405
- package/src/sap/ui/codeeditor/js/ace/mode-slim.js +2631 -3161
- package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +1075 -1334
- package/src/sap/ui/codeeditor/js/ace/mode-smithy.js +276 -327
- package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +78 -102
- package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +1251 -1548
- package/src/sap/ui/codeeditor/js/ace/mode-space.js +47 -63
- package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +139 -171
- package/src/sap/ui/codeeditor/js/ace/mode-sql.js +77 -133
- package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +138 -192
- package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +306 -338
- package/src/sap/ui/codeeditor/js/ace/mode-svg.js +642 -794
- package/src/sap/ui/codeeditor/js/ace/mode-swift.js +96 -150
- package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +151 -200
- package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +78 -132
- package/src/sap/ui/codeeditor/js/ace/mode-tex.js +148 -96
- package/src/sap/ui/codeeditor/js/ace/mode-textile.js +45 -70
- package/src/sap/ui/codeeditor/js/ace/mode-toml.js +63 -87
- package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +462 -384
- package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +119 -151
- package/src/sap/ui/codeeditor/js/ace/mode-twig.js +1099 -1350
- package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +455 -376
- package/src/sap/ui/codeeditor/js/ace/mode-vala.js +382 -505
- package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +231 -264
- package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +1116 -1388
- package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +61 -81
- package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +57 -79
- package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +1046 -1292
- package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +525 -417
- package/src/sap/ui/codeeditor/js/ace/mode-xml.js +182 -389
- package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +58 -112
- package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +202 -137
- package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +237 -274
- package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +5 -34
- package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +5 -160
- package/src/sap/ui/codeeditor/js/ace/snippets/astro.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/bibtex.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +5 -134
- package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +5 -93
- package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +5 -98
- package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +5 -13
- package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +5 -50
- package/src/sap/ui/codeeditor/js/ace/snippets/css.js +5 -970
- package/src/sap/ui/codeeditor/js/ace/snippets/cuttlefish.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +5 -86
- package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +5 -14
- package/src/sap/ui/codeeditor/js/ace/snippets/django.js +5 -111
- package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +5 -22
- package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +8 -246
- package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +5 -163
- package/src/sap/ui/codeeditor/js/ace/snippets/flix.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/fsl.js +6 -4
- package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +5 -1707
- package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +5 -35
- package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +5 -23
- package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +5 -85
- package/src/sap/ui/codeeditor/js/ace/snippets/html.js +5 -856
- package/src/sap/ui/codeeditor/js/ace/snippets/io.js +1 -3
- package/src/sap/ui/codeeditor/js/ace/snippets/ion.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/java.js +5 -243
- package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +5 -198
- package/src/sap/ui/codeeditor/js/ace/snippets/jexl.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +44 -41
- package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +5 -102
- package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +5 -884
- package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +5 -1235
- package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +5 -24
- package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +5 -7
- package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +5 -91
- package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +5 -12
- package/src/sap/ui/codeeditor/js/ace/snippets/nasal.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/odin.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/partiql.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +5 -350
- package/src/sap/ui/codeeditor/js/ace/snippets/php.js +5 -386
- package/src/sap/ui/codeeditor/js/ace/snippets/plsql.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/prql.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/python.js +5 -161
- package/src/sap/ui/codeeditor/js/ace/snippets/r.js +5 -124
- package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +5 -6
- package/src/sap/ui/codeeditor/js/ace/snippets/robot.js +16 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +5 -25
- package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +5 -931
- package/src/sap/ui/codeeditor/js/ace/snippets/sac.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +5 -86
- package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +5 -12
- package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +5 -29
- package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +5 -72
- package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +5 -95
- package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +5 -193
- package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +5 -33
- package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +1 -2
- package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +5 -31
- package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +5 -87
- package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +44 -41
- package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +5 -172
- package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +5 -150
- package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +6 -123
- package/src/sap/ui/codeeditor/js/ace/theme-cloud9_day.js +19 -0
- package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night_low_color.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +6 -90
- package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +6 -91
- package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +6 -108
- package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +6 -113
- package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +6 -122
- package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +7 -137
- package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +6 -92
- package/src/sap/ui/codeeditor/js/ace/theme-github.js +7 -99
- package/src/sap/ui/codeeditor/js/ace/theme-github_dark.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-gob.js +6 -107
- package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +5 -76
- package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_dark_hard.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_light_hard.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +6 -91
- package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +6 -116
- package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +6 -116
- package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +6 -99
- package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +6 -56
- package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +6 -90
- package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +6 -91
- package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +6 -102
- package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +6 -100
- package/src/sap/ui/codeeditor/js/ace/theme-nord_dark.js +6 -89
- package/src/sap/ui/codeeditor/js/ace/theme-one_dark.js +10 -131
- package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +6 -83
- package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +6 -86
- package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +6 -133
- package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +6 -109
- package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +3 -124
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +6 -101
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +6 -116
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +6 -104
- package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +6 -89
- package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +6 -83
- package/src/sap/ui/codeeditor/js/ace/worker-base.js +516 -595
- package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-css.js +501 -578
- package/src/sap/ui/codeeditor/js/ace/worker-html.js +515 -584
- package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +2964 -2551
- package/src/sap/ui/codeeditor/js/ace/worker-json.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-lua.js +497 -576
- package/src/sap/ui/codeeditor/js/ace/worker-php.js +2906 -2795
- package/src/sap/ui/codeeditor/js/ace/worker-xml.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +5851 -0
- package/src/sap/ui/codeeditor/library.js +6 -5
- package/LICENSES/BSD-2-Clause.txt +0 -22
|
@@ -21,11 +21,11 @@ window.ace = window;
|
|
|
21
21
|
window.onerror = function(message, file, line, col, err) {
|
|
22
22
|
postMessage({type: "error", data: {
|
|
23
23
|
message: message,
|
|
24
|
-
data: err.data,
|
|
24
|
+
data: err && err.data,
|
|
25
25
|
file: file,
|
|
26
26
|
line: line,
|
|
27
27
|
col: col,
|
|
28
|
-
stack: err.stack
|
|
28
|
+
stack: err && err.stack
|
|
29
29
|
}});
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -153,10 +153,10 @@ window.define = function(id, deps, factory) {
|
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
155
|
window.define.amd = {};
|
|
156
|
-
require.tlns = {};
|
|
156
|
+
window.require.tlns = {};
|
|
157
157
|
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
|
|
158
158
|
for (var i in topLevelNamespaces)
|
|
159
|
-
require.tlns[i] = topLevelNamespaces[i];
|
|
159
|
+
this.require.tlns[i] = topLevelNamespaces[i];
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
window.initSender = function initSender() {
|
|
@@ -210,16 +210,14 @@ window.onmessage = function(e) {
|
|
|
210
210
|
else if (msg.init) {
|
|
211
211
|
window.initBaseUrls(msg.tlns);
|
|
212
212
|
sender = window.sender = window.initSender();
|
|
213
|
-
var clazz = require(msg.module)[msg.classname];
|
|
213
|
+
var clazz = this.require(msg.module)[msg.classname];
|
|
214
214
|
main = window.main = new clazz(sender);
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
})(this);
|
|
218
218
|
|
|
219
|
-
ace.define("ace/lib/oop",[], function(require, exports, module)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
exports.inherits = function(ctor, superCtor) {
|
|
219
|
+
ace.define("ace/lib/oop",[], function(require, exports, module){"use strict";
|
|
220
|
+
exports.inherits = function (ctor, superCtor) {
|
|
223
221
|
ctor.super_ = superCtor;
|
|
224
222
|
ctor.prototype = Object.create(superCtor.prototype, {
|
|
225
223
|
constructor: {
|
|
@@ -230,729 +228,641 @@ exports.inherits = function(ctor, superCtor) {
|
|
|
230
228
|
}
|
|
231
229
|
});
|
|
232
230
|
};
|
|
233
|
-
|
|
234
|
-
exports.mixin = function(obj, mixin) {
|
|
231
|
+
exports.mixin = function (obj, mixin) {
|
|
235
232
|
for (var key in mixin) {
|
|
236
233
|
obj[key] = mixin[key];
|
|
237
234
|
}
|
|
238
235
|
return obj;
|
|
239
236
|
};
|
|
240
|
-
|
|
241
|
-
exports.implement = function(proto, mixin) {
|
|
237
|
+
exports.implement = function (proto, mixin) {
|
|
242
238
|
exports.mixin(proto, mixin);
|
|
243
239
|
};
|
|
244
240
|
|
|
245
241
|
});
|
|
246
242
|
|
|
247
|
-
ace.define("ace/lib/
|
|
248
|
-
"
|
|
243
|
+
ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
|
|
244
|
+
if (typeof obj !== "object" || !obj)
|
|
245
|
+
return obj;
|
|
246
|
+
var copy;
|
|
247
|
+
if (Array.isArray(obj)) {
|
|
248
|
+
copy = [];
|
|
249
|
+
for (var key = 0; key < obj.length; key++) {
|
|
250
|
+
copy[key] = deepCopy(obj[key]);
|
|
251
|
+
}
|
|
252
|
+
return copy;
|
|
253
|
+
}
|
|
254
|
+
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
|
255
|
+
return obj;
|
|
256
|
+
copy = {};
|
|
257
|
+
for (var key in obj)
|
|
258
|
+
copy[key] = deepCopy(obj[key]);
|
|
259
|
+
return copy;
|
|
260
|
+
};
|
|
249
261
|
|
|
250
|
-
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
|
|
265
|
+
exports.last = function (a) {
|
|
251
266
|
return a[a.length - 1];
|
|
252
267
|
};
|
|
253
|
-
|
|
254
|
-
exports.stringReverse = function(string) {
|
|
268
|
+
exports.stringReverse = function (string) {
|
|
255
269
|
return string.split("").reverse().join("");
|
|
256
270
|
};
|
|
257
|
-
|
|
258
271
|
exports.stringRepeat = function (string, count) {
|
|
259
272
|
var result = '';
|
|
260
273
|
while (count > 0) {
|
|
261
274
|
if (count & 1)
|
|
262
275
|
result += string;
|
|
263
|
-
|
|
264
276
|
if (count >>= 1)
|
|
265
277
|
string += string;
|
|
266
278
|
}
|
|
267
279
|
return result;
|
|
268
280
|
};
|
|
269
|
-
|
|
270
281
|
var trimBeginRegexp = /^\s\s*/;
|
|
271
282
|
var trimEndRegexp = /\s\s*$/;
|
|
272
|
-
|
|
273
283
|
exports.stringTrimLeft = function (string) {
|
|
274
284
|
return string.replace(trimBeginRegexp, '');
|
|
275
285
|
};
|
|
276
|
-
|
|
277
286
|
exports.stringTrimRight = function (string) {
|
|
278
287
|
return string.replace(trimEndRegexp, '');
|
|
279
288
|
};
|
|
280
|
-
|
|
281
|
-
exports.copyObject = function(obj) {
|
|
289
|
+
exports.copyObject = function (obj) {
|
|
282
290
|
var copy = {};
|
|
283
291
|
for (var key in obj) {
|
|
284
292
|
copy[key] = obj[key];
|
|
285
293
|
}
|
|
286
294
|
return copy;
|
|
287
295
|
};
|
|
288
|
-
|
|
289
|
-
exports.copyArray = function(array){
|
|
296
|
+
exports.copyArray = function (array) {
|
|
290
297
|
var copy = [];
|
|
291
|
-
for (var i=0, l=array.length; i<l; i++) {
|
|
298
|
+
for (var i = 0, l = array.length; i < l; i++) {
|
|
292
299
|
if (array[i] && typeof array[i] == "object")
|
|
293
300
|
copy[i] = this.copyObject(array[i]);
|
|
294
|
-
else
|
|
301
|
+
else
|
|
295
302
|
copy[i] = array[i];
|
|
296
303
|
}
|
|
297
304
|
return copy;
|
|
298
305
|
};
|
|
299
|
-
|
|
300
|
-
exports.
|
|
301
|
-
if (typeof obj !== "object" || !obj)
|
|
302
|
-
return obj;
|
|
303
|
-
var copy;
|
|
304
|
-
if (Array.isArray(obj)) {
|
|
305
|
-
copy = [];
|
|
306
|
-
for (var key = 0; key < obj.length; key++) {
|
|
307
|
-
copy[key] = deepCopy(obj[key]);
|
|
308
|
-
}
|
|
309
|
-
return copy;
|
|
310
|
-
}
|
|
311
|
-
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
|
312
|
-
return obj;
|
|
313
|
-
|
|
314
|
-
copy = {};
|
|
315
|
-
for (var key in obj)
|
|
316
|
-
copy[key] = deepCopy(obj[key]);
|
|
317
|
-
return copy;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
exports.arrayToMap = function(arr) {
|
|
306
|
+
exports.deepCopy = require("./deep_copy").deepCopy;
|
|
307
|
+
exports.arrayToMap = function (arr) {
|
|
321
308
|
var map = {};
|
|
322
|
-
for (var i=0; i<arr.length; i++) {
|
|
309
|
+
for (var i = 0; i < arr.length; i++) {
|
|
323
310
|
map[arr[i]] = 1;
|
|
324
311
|
}
|
|
325
312
|
return map;
|
|
326
|
-
|
|
327
313
|
};
|
|
328
|
-
|
|
329
|
-
exports.createMap = function(props) {
|
|
314
|
+
exports.createMap = function (props) {
|
|
330
315
|
var map = Object.create(null);
|
|
331
316
|
for (var i in props) {
|
|
332
317
|
map[i] = props[i];
|
|
333
318
|
}
|
|
334
319
|
return map;
|
|
335
320
|
};
|
|
336
|
-
exports.arrayRemove = function(array, value) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
321
|
+
exports.arrayRemove = function (array, value) {
|
|
322
|
+
for (var i = 0; i <= array.length; i++) {
|
|
323
|
+
if (value === array[i]) {
|
|
324
|
+
array.splice(i, 1);
|
|
325
|
+
}
|
|
340
326
|
}
|
|
341
|
-
}
|
|
342
327
|
};
|
|
343
|
-
|
|
344
|
-
exports.escapeRegExp = function(str) {
|
|
328
|
+
exports.escapeRegExp = function (str) {
|
|
345
329
|
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
|
|
346
330
|
};
|
|
347
|
-
|
|
348
|
-
exports.escapeHTML = function(str) {
|
|
331
|
+
exports.escapeHTML = function (str) {
|
|
349
332
|
return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<");
|
|
350
333
|
};
|
|
351
|
-
|
|
352
|
-
exports.getMatchOffsets = function(string, regExp) {
|
|
334
|
+
exports.getMatchOffsets = function (string, regExp) {
|
|
353
335
|
var matches = [];
|
|
354
|
-
|
|
355
|
-
string.replace(regExp, function(str) {
|
|
336
|
+
string.replace(regExp, function (str) {
|
|
356
337
|
matches.push({
|
|
357
|
-
offset: arguments[arguments.length-2],
|
|
338
|
+
offset: arguments[arguments.length - 2],
|
|
358
339
|
length: str.length
|
|
359
340
|
});
|
|
360
341
|
});
|
|
361
|
-
|
|
362
342
|
return matches;
|
|
363
343
|
};
|
|
364
|
-
exports.deferredCall = function(fcn) {
|
|
344
|
+
exports.deferredCall = function (fcn) {
|
|
365
345
|
var timer = null;
|
|
366
|
-
var callback = function() {
|
|
346
|
+
var callback = function () {
|
|
367
347
|
timer = null;
|
|
368
348
|
fcn();
|
|
369
349
|
};
|
|
370
|
-
|
|
371
|
-
var deferred = function(timeout) {
|
|
350
|
+
var deferred = function (timeout) {
|
|
372
351
|
deferred.cancel();
|
|
373
352
|
timer = setTimeout(callback, timeout || 0);
|
|
374
353
|
return deferred;
|
|
375
354
|
};
|
|
376
|
-
|
|
377
355
|
deferred.schedule = deferred;
|
|
378
|
-
|
|
379
|
-
deferred.call = function() {
|
|
356
|
+
deferred.call = function () {
|
|
380
357
|
this.cancel();
|
|
381
358
|
fcn();
|
|
382
359
|
return deferred;
|
|
383
360
|
};
|
|
384
|
-
|
|
385
|
-
deferred.cancel = function() {
|
|
361
|
+
deferred.cancel = function () {
|
|
386
362
|
clearTimeout(timer);
|
|
387
363
|
timer = null;
|
|
388
364
|
return deferred;
|
|
389
365
|
};
|
|
390
|
-
|
|
391
|
-
deferred.isPending = function() {
|
|
366
|
+
deferred.isPending = function () {
|
|
392
367
|
return timer;
|
|
393
368
|
};
|
|
394
|
-
|
|
395
369
|
return deferred;
|
|
396
370
|
};
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
exports.delayedCall = function(fcn, defaultTimeout) {
|
|
371
|
+
exports.delayedCall = function (fcn, defaultTimeout) {
|
|
400
372
|
var timer = null;
|
|
401
|
-
var callback = function() {
|
|
373
|
+
var callback = function () {
|
|
402
374
|
timer = null;
|
|
403
375
|
fcn();
|
|
404
376
|
};
|
|
405
|
-
|
|
406
|
-
var _self = function(timeout) {
|
|
377
|
+
var _self = function (timeout) {
|
|
407
378
|
if (timer == null)
|
|
408
379
|
timer = setTimeout(callback, timeout || defaultTimeout);
|
|
409
380
|
};
|
|
410
|
-
|
|
411
|
-
_self.delay = function(timeout) {
|
|
381
|
+
_self.delay = function (timeout) {
|
|
412
382
|
timer && clearTimeout(timer);
|
|
413
383
|
timer = setTimeout(callback, timeout || defaultTimeout);
|
|
414
384
|
};
|
|
415
385
|
_self.schedule = _self;
|
|
416
|
-
|
|
417
|
-
_self.call = function() {
|
|
386
|
+
_self.call = function () {
|
|
418
387
|
this.cancel();
|
|
419
388
|
fcn();
|
|
420
389
|
};
|
|
421
|
-
|
|
422
|
-
_self.cancel = function() {
|
|
390
|
+
_self.cancel = function () {
|
|
423
391
|
timer && clearTimeout(timer);
|
|
424
392
|
timer = null;
|
|
425
393
|
};
|
|
426
|
-
|
|
427
|
-
_self.isPending = function() {
|
|
394
|
+
_self.isPending = function () {
|
|
428
395
|
return timer;
|
|
429
396
|
};
|
|
430
|
-
|
|
431
397
|
return _self;
|
|
432
398
|
};
|
|
399
|
+
exports.supportsLookbehind = function () {
|
|
400
|
+
try {
|
|
401
|
+
new RegExp('(?<=.)');
|
|
402
|
+
}
|
|
403
|
+
catch (e) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
return true;
|
|
407
|
+
};
|
|
408
|
+
exports.supportsUnicodeFlag = function () {
|
|
409
|
+
try {
|
|
410
|
+
new RegExp('^.$', 'u');
|
|
411
|
+
}
|
|
412
|
+
catch (error) {
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
return true;
|
|
416
|
+
};
|
|
417
|
+
|
|
433
418
|
});
|
|
434
419
|
|
|
435
|
-
ace.define("ace/
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
420
|
+
ace.define("ace/apply_delta",[], function(require, exports, module){"use strict";
|
|
421
|
+
function throwDeltaError(delta, errorText) {
|
|
422
|
+
console.log("Invalid Delta:", delta);
|
|
423
|
+
throw "Invalid Delta: " + errorText;
|
|
424
|
+
}
|
|
425
|
+
function positionInDocument(docLines, position) {
|
|
426
|
+
return position.row >= 0 && position.row < docLines.length &&
|
|
427
|
+
position.column >= 0 && position.column <= docLines[position.row].length;
|
|
428
|
+
}
|
|
429
|
+
function validateDelta(docLines, delta) {
|
|
430
|
+
if (delta.action != "insert" && delta.action != "remove")
|
|
431
|
+
throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
|
|
432
|
+
if (!(delta.lines instanceof Array))
|
|
433
|
+
throwDeltaError(delta, "delta.lines must be an Array");
|
|
434
|
+
if (!delta.start || !delta.end)
|
|
435
|
+
throwDeltaError(delta, "delta.start/end must be an present");
|
|
436
|
+
var start = delta.start;
|
|
437
|
+
if (!positionInDocument(docLines, delta.start))
|
|
438
|
+
throwDeltaError(delta, "delta.start must be contained in document");
|
|
439
|
+
var end = delta.end;
|
|
440
|
+
if (delta.action == "remove" && !positionInDocument(docLines, end))
|
|
441
|
+
throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
|
|
442
|
+
var numRangeRows = end.row - start.row;
|
|
443
|
+
var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
|
|
444
|
+
if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
|
|
445
|
+
throwDeltaError(delta, "delta.range must match delta lines");
|
|
446
|
+
}
|
|
447
|
+
exports.applyDelta = function (docLines, delta, doNotValidate) {
|
|
448
|
+
var row = delta.start.row;
|
|
449
|
+
var startColumn = delta.start.column;
|
|
450
|
+
var line = docLines[row] || "";
|
|
451
|
+
switch (delta.action) {
|
|
452
|
+
case "insert":
|
|
453
|
+
var lines = delta.lines;
|
|
454
|
+
if (lines.length === 1) {
|
|
455
|
+
docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
var args = [row, 1].concat(delta.lines);
|
|
459
|
+
docLines.splice.apply(docLines, args);
|
|
460
|
+
docLines[row] = line.substring(0, startColumn) + docLines[row];
|
|
461
|
+
docLines[row + delta.lines.length - 1] += line.substring(startColumn);
|
|
462
|
+
}
|
|
463
|
+
break;
|
|
464
|
+
case "remove":
|
|
465
|
+
var endColumn = delta.end.column;
|
|
466
|
+
var endRow = delta.end.row;
|
|
467
|
+
if (row === endRow) {
|
|
468
|
+
docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn));
|
|
472
|
+
}
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
439
475
|
};
|
|
440
|
-
var Range = function(startRow, startColumn, endRow, endColumn) {
|
|
441
|
-
this.start = {
|
|
442
|
-
row: startRow,
|
|
443
|
-
column: startColumn
|
|
444
|
-
};
|
|
445
476
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
ace.define("ace/lib/event_emitter",[], function(require, exports, module){"use strict";
|
|
480
|
+
var EventEmitter = {};
|
|
481
|
+
var stopPropagation = function () { this.propagationStopped = true; };
|
|
482
|
+
var preventDefault = function () { this.defaultPrevented = true; };
|
|
483
|
+
EventEmitter._emit =
|
|
484
|
+
EventEmitter._dispatchEvent = function (eventName, e) {
|
|
485
|
+
this._eventRegistry || (this._eventRegistry = {});
|
|
486
|
+
this._defaultHandlers || (this._defaultHandlers = {});
|
|
487
|
+
var listeners = this._eventRegistry[eventName] || [];
|
|
488
|
+
var defaultHandler = this._defaultHandlers[eventName];
|
|
489
|
+
if (!listeners.length && !defaultHandler)
|
|
490
|
+
return;
|
|
491
|
+
if (typeof e != "object" || !e)
|
|
492
|
+
e = {};
|
|
493
|
+
if (!e.type)
|
|
494
|
+
e.type = eventName;
|
|
495
|
+
if (!e.stopPropagation)
|
|
496
|
+
e.stopPropagation = stopPropagation;
|
|
497
|
+
if (!e.preventDefault)
|
|
498
|
+
e.preventDefault = preventDefault;
|
|
499
|
+
listeners = listeners.slice();
|
|
500
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
501
|
+
listeners[i](e, this);
|
|
502
|
+
if (e.propagationStopped)
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
if (defaultHandler && !e.defaultPrevented)
|
|
506
|
+
return defaultHandler(e, this);
|
|
449
507
|
};
|
|
508
|
+
EventEmitter._signal = function (eventName, e) {
|
|
509
|
+
var listeners = (this._eventRegistry || {})[eventName];
|
|
510
|
+
if (!listeners)
|
|
511
|
+
return;
|
|
512
|
+
listeners = listeners.slice();
|
|
513
|
+
for (var i = 0; i < listeners.length; i++)
|
|
514
|
+
listeners[i](e, this);
|
|
450
515
|
};
|
|
516
|
+
EventEmitter.once = function (eventName, callback) {
|
|
517
|
+
var _self = this;
|
|
518
|
+
this.on(eventName, function newCallback() {
|
|
519
|
+
_self.off(eventName, newCallback);
|
|
520
|
+
callback.apply(null, arguments);
|
|
521
|
+
});
|
|
522
|
+
if (!callback) {
|
|
523
|
+
return new Promise(function (resolve) {
|
|
524
|
+
callback = resolve;
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
EventEmitter.setDefaultHandler = function (eventName, callback) {
|
|
529
|
+
var handlers = this._defaultHandlers;
|
|
530
|
+
if (!handlers)
|
|
531
|
+
handlers = this._defaultHandlers = { _disabled_: {} };
|
|
532
|
+
if (handlers[eventName]) {
|
|
533
|
+
var old = handlers[eventName];
|
|
534
|
+
var disabled = handlers._disabled_[eventName];
|
|
535
|
+
if (!disabled)
|
|
536
|
+
handlers._disabled_[eventName] = disabled = [];
|
|
537
|
+
disabled.push(old);
|
|
538
|
+
var i = disabled.indexOf(callback);
|
|
539
|
+
if (i != -1)
|
|
540
|
+
disabled.splice(i, 1);
|
|
541
|
+
}
|
|
542
|
+
handlers[eventName] = callback;
|
|
543
|
+
};
|
|
544
|
+
EventEmitter.removeDefaultHandler = function (eventName, callback) {
|
|
545
|
+
var handlers = this._defaultHandlers;
|
|
546
|
+
if (!handlers)
|
|
547
|
+
return;
|
|
548
|
+
var disabled = handlers._disabled_[eventName];
|
|
549
|
+
if (handlers[eventName] == callback) {
|
|
550
|
+
if (disabled)
|
|
551
|
+
this.setDefaultHandler(eventName, disabled.pop());
|
|
552
|
+
}
|
|
553
|
+
else if (disabled) {
|
|
554
|
+
var i = disabled.indexOf(callback);
|
|
555
|
+
if (i != -1)
|
|
556
|
+
disabled.splice(i, 1);
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
EventEmitter.on =
|
|
560
|
+
EventEmitter.addEventListener = function (eventName, callback, capturing) {
|
|
561
|
+
this._eventRegistry = this._eventRegistry || {};
|
|
562
|
+
var listeners = this._eventRegistry[eventName];
|
|
563
|
+
if (!listeners)
|
|
564
|
+
listeners = this._eventRegistry[eventName] = [];
|
|
565
|
+
if (listeners.indexOf(callback) == -1)
|
|
566
|
+
listeners[capturing ? "unshift" : "push"](callback);
|
|
567
|
+
return callback;
|
|
568
|
+
};
|
|
569
|
+
EventEmitter.off =
|
|
570
|
+
EventEmitter.removeListener =
|
|
571
|
+
EventEmitter.removeEventListener = function (eventName, callback) {
|
|
572
|
+
this._eventRegistry = this._eventRegistry || {};
|
|
573
|
+
var listeners = this._eventRegistry[eventName];
|
|
574
|
+
if (!listeners)
|
|
575
|
+
return;
|
|
576
|
+
var index = listeners.indexOf(callback);
|
|
577
|
+
if (index !== -1)
|
|
578
|
+
listeners.splice(index, 1);
|
|
579
|
+
};
|
|
580
|
+
EventEmitter.removeAllListeners = function (eventName) {
|
|
581
|
+
if (!eventName)
|
|
582
|
+
this._eventRegistry = this._defaultHandlers = undefined;
|
|
583
|
+
if (this._eventRegistry)
|
|
584
|
+
this._eventRegistry[eventName] = undefined;
|
|
585
|
+
if (this._defaultHandlers)
|
|
586
|
+
this._defaultHandlers[eventName] = undefined;
|
|
587
|
+
};
|
|
588
|
+
exports.EventEmitter = EventEmitter;
|
|
451
589
|
|
|
452
|
-
|
|
453
|
-
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
ace.define("ace/range",[], function(require, exports, module){"use strict";
|
|
593
|
+
var comparePoints = function (p1, p2) {
|
|
594
|
+
return p1.row - p2.row || p1.column - p2.column;
|
|
595
|
+
};
|
|
596
|
+
var Range = /** @class */ (function () {
|
|
597
|
+
function Range(startRow, startColumn, endRow, endColumn) {
|
|
598
|
+
this.start = {
|
|
599
|
+
row: startRow,
|
|
600
|
+
column: startColumn
|
|
601
|
+
};
|
|
602
|
+
this.end = {
|
|
603
|
+
row: endRow,
|
|
604
|
+
column: endColumn
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
Range.prototype.isEqual = function (range) {
|
|
454
608
|
return this.start.row === range.start.row &&
|
|
455
609
|
this.end.row === range.end.row &&
|
|
456
610
|
this.start.column === range.start.column &&
|
|
457
611
|
this.end.column === range.end.column;
|
|
458
612
|
};
|
|
459
|
-
|
|
613
|
+
Range.prototype.toString = function () {
|
|
460
614
|
return ("Range: [" + this.start.row + "/" + this.start.column +
|
|
461
615
|
"] -> [" + this.end.row + "/" + this.end.column + "]");
|
|
462
616
|
};
|
|
463
|
-
|
|
464
|
-
this.contains = function(row, column) {
|
|
617
|
+
Range.prototype.contains = function (row, column) {
|
|
465
618
|
return this.compare(row, column) == 0;
|
|
466
619
|
};
|
|
467
|
-
|
|
468
|
-
var cmp,
|
|
469
|
-
end = range.end,
|
|
470
|
-
start = range.start;
|
|
471
|
-
|
|
620
|
+
Range.prototype.compareRange = function (range) {
|
|
621
|
+
var cmp, end = range.end, start = range.start;
|
|
472
622
|
cmp = this.compare(end.row, end.column);
|
|
473
623
|
if (cmp == 1) {
|
|
474
624
|
cmp = this.compare(start.row, start.column);
|
|
475
625
|
if (cmp == 1) {
|
|
476
626
|
return 2;
|
|
477
|
-
}
|
|
627
|
+
}
|
|
628
|
+
else if (cmp == 0) {
|
|
478
629
|
return 1;
|
|
479
|
-
}
|
|
630
|
+
}
|
|
631
|
+
else {
|
|
480
632
|
return 0;
|
|
481
633
|
}
|
|
482
|
-
}
|
|
634
|
+
}
|
|
635
|
+
else if (cmp == -1) {
|
|
483
636
|
return -2;
|
|
484
|
-
}
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
485
639
|
cmp = this.compare(start.row, start.column);
|
|
486
640
|
if (cmp == -1) {
|
|
487
641
|
return -1;
|
|
488
|
-
}
|
|
642
|
+
}
|
|
643
|
+
else if (cmp == 1) {
|
|
489
644
|
return 42;
|
|
490
|
-
}
|
|
645
|
+
}
|
|
646
|
+
else {
|
|
491
647
|
return 0;
|
|
492
648
|
}
|
|
493
649
|
}
|
|
494
650
|
};
|
|
495
|
-
|
|
651
|
+
Range.prototype.comparePoint = function (p) {
|
|
496
652
|
return this.compare(p.row, p.column);
|
|
497
653
|
};
|
|
498
|
-
|
|
654
|
+
Range.prototype.containsRange = function (range) {
|
|
499
655
|
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
|
500
656
|
};
|
|
501
|
-
|
|
657
|
+
Range.prototype.intersects = function (range) {
|
|
502
658
|
var cmp = this.compareRange(range);
|
|
503
659
|
return (cmp == -1 || cmp == 0 || cmp == 1);
|
|
504
660
|
};
|
|
505
|
-
|
|
661
|
+
Range.prototype.isEnd = function (row, column) {
|
|
506
662
|
return this.end.row == row && this.end.column == column;
|
|
507
663
|
};
|
|
508
|
-
|
|
664
|
+
Range.prototype.isStart = function (row, column) {
|
|
509
665
|
return this.start.row == row && this.start.column == column;
|
|
510
666
|
};
|
|
511
|
-
|
|
667
|
+
Range.prototype.setStart = function (row, column) {
|
|
512
668
|
if (typeof row == "object") {
|
|
513
669
|
this.start.column = row.column;
|
|
514
670
|
this.start.row = row.row;
|
|
515
|
-
}
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
516
673
|
this.start.row = row;
|
|
517
674
|
this.start.column = column;
|
|
518
675
|
}
|
|
519
676
|
};
|
|
520
|
-
|
|
677
|
+
Range.prototype.setEnd = function (row, column) {
|
|
521
678
|
if (typeof row == "object") {
|
|
522
679
|
this.end.column = row.column;
|
|
523
680
|
this.end.row = row.row;
|
|
524
|
-
}
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
525
683
|
this.end.row = row;
|
|
526
684
|
this.end.column = column;
|
|
527
685
|
}
|
|
528
686
|
};
|
|
529
|
-
|
|
687
|
+
Range.prototype.inside = function (row, column) {
|
|
530
688
|
if (this.compare(row, column) == 0) {
|
|
531
689
|
if (this.isEnd(row, column) || this.isStart(row, column)) {
|
|
532
690
|
return false;
|
|
533
|
-
}
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
534
693
|
return true;
|
|
535
694
|
}
|
|
536
695
|
}
|
|
537
696
|
return false;
|
|
538
697
|
};
|
|
539
|
-
|
|
698
|
+
Range.prototype.insideStart = function (row, column) {
|
|
540
699
|
if (this.compare(row, column) == 0) {
|
|
541
700
|
if (this.isEnd(row, column)) {
|
|
542
701
|
return false;
|
|
543
|
-
}
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
544
704
|
return true;
|
|
545
705
|
}
|
|
546
706
|
}
|
|
547
707
|
return false;
|
|
548
708
|
};
|
|
549
|
-
|
|
709
|
+
Range.prototype.insideEnd = function (row, column) {
|
|
550
710
|
if (this.compare(row, column) == 0) {
|
|
551
711
|
if (this.isStart(row, column)) {
|
|
552
712
|
return false;
|
|
553
|
-
}
|
|
713
|
+
}
|
|
714
|
+
else {
|
|
554
715
|
return true;
|
|
555
716
|
}
|
|
556
717
|
}
|
|
557
718
|
return false;
|
|
558
719
|
};
|
|
559
|
-
|
|
720
|
+
Range.prototype.compare = function (row, column) {
|
|
560
721
|
if (!this.isMultiLine()) {
|
|
561
722
|
if (row === this.start.row) {
|
|
562
723
|
return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
|
|
563
724
|
}
|
|
564
725
|
}
|
|
565
|
-
|
|
566
726
|
if (row < this.start.row)
|
|
567
727
|
return -1;
|
|
568
|
-
|
|
569
728
|
if (row > this.end.row)
|
|
570
729
|
return 1;
|
|
571
|
-
|
|
572
730
|
if (this.start.row === row)
|
|
573
731
|
return column >= this.start.column ? 0 : -1;
|
|
574
|
-
|
|
575
732
|
if (this.end.row === row)
|
|
576
733
|
return column <= this.end.column ? 0 : 1;
|
|
577
|
-
|
|
578
734
|
return 0;
|
|
579
735
|
};
|
|
580
|
-
|
|
736
|
+
Range.prototype.compareStart = function (row, column) {
|
|
581
737
|
if (this.start.row == row && this.start.column == column) {
|
|
582
738
|
return -1;
|
|
583
|
-
}
|
|
739
|
+
}
|
|
740
|
+
else {
|
|
584
741
|
return this.compare(row, column);
|
|
585
742
|
}
|
|
586
743
|
};
|
|
587
|
-
|
|
744
|
+
Range.prototype.compareEnd = function (row, column) {
|
|
588
745
|
if (this.end.row == row && this.end.column == column) {
|
|
589
746
|
return 1;
|
|
590
|
-
}
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
591
749
|
return this.compare(row, column);
|
|
592
750
|
}
|
|
593
751
|
};
|
|
594
|
-
|
|
752
|
+
Range.prototype.compareInside = function (row, column) {
|
|
595
753
|
if (this.end.row == row && this.end.column == column) {
|
|
596
754
|
return 1;
|
|
597
|
-
}
|
|
755
|
+
}
|
|
756
|
+
else if (this.start.row == row && this.start.column == column) {
|
|
598
757
|
return -1;
|
|
599
|
-
}
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
600
760
|
return this.compare(row, column);
|
|
601
761
|
}
|
|
602
762
|
};
|
|
603
|
-
|
|
763
|
+
Range.prototype.clipRows = function (firstRow, lastRow) {
|
|
604
764
|
if (this.end.row > lastRow)
|
|
605
|
-
var end = {row: lastRow + 1, column: 0};
|
|
765
|
+
var end = { row: lastRow + 1, column: 0 };
|
|
606
766
|
else if (this.end.row < firstRow)
|
|
607
|
-
var end = {row: firstRow, column: 0};
|
|
608
|
-
|
|
767
|
+
var end = { row: firstRow, column: 0 };
|
|
609
768
|
if (this.start.row > lastRow)
|
|
610
|
-
var start = {row: lastRow + 1, column: 0};
|
|
769
|
+
var start = { row: lastRow + 1, column: 0 };
|
|
611
770
|
else if (this.start.row < firstRow)
|
|
612
|
-
var start = {row: firstRow, column: 0};
|
|
613
|
-
|
|
771
|
+
var start = { row: firstRow, column: 0 };
|
|
614
772
|
return Range.fromPoints(start || this.start, end || this.end);
|
|
615
773
|
};
|
|
616
|
-
|
|
774
|
+
Range.prototype.extend = function (row, column) {
|
|
617
775
|
var cmp = this.compare(row, column);
|
|
618
|
-
|
|
619
776
|
if (cmp == 0)
|
|
620
777
|
return this;
|
|
621
778
|
else if (cmp == -1)
|
|
622
|
-
var start = {row: row, column: column};
|
|
779
|
+
var start = { row: row, column: column };
|
|
623
780
|
else
|
|
624
|
-
var end = {row: row, column: column};
|
|
625
|
-
|
|
781
|
+
var end = { row: row, column: column };
|
|
626
782
|
return Range.fromPoints(start || this.start, end || this.end);
|
|
627
783
|
};
|
|
628
|
-
|
|
629
|
-
this.isEmpty = function() {
|
|
784
|
+
Range.prototype.isEmpty = function () {
|
|
630
785
|
return (this.start.row === this.end.row && this.start.column === this.end.column);
|
|
631
786
|
};
|
|
632
|
-
|
|
787
|
+
Range.prototype.isMultiLine = function () {
|
|
633
788
|
return (this.start.row !== this.end.row);
|
|
634
789
|
};
|
|
635
|
-
|
|
790
|
+
Range.prototype.clone = function () {
|
|
636
791
|
return Range.fromPoints(this.start, this.end);
|
|
637
792
|
};
|
|
638
|
-
|
|
793
|
+
Range.prototype.collapseRows = function () {
|
|
639
794
|
if (this.end.column == 0)
|
|
640
|
-
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
|
|
795
|
+
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
|
|
641
796
|
else
|
|
642
797
|
return new Range(this.start.row, 0, this.end.row, 0);
|
|
643
798
|
};
|
|
644
|
-
|
|
799
|
+
Range.prototype.toScreenRange = function (session) {
|
|
645
800
|
var screenPosStart = session.documentToScreenPosition(this.start);
|
|
646
801
|
var screenPosEnd = session.documentToScreenPosition(this.end);
|
|
647
|
-
|
|
648
|
-
return new Range(
|
|
649
|
-
screenPosStart.row, screenPosStart.column,
|
|
650
|
-
screenPosEnd.row, screenPosEnd.column
|
|
651
|
-
);
|
|
802
|
+
return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
|
|
652
803
|
};
|
|
653
|
-
|
|
804
|
+
Range.prototype.moveBy = function (row, column) {
|
|
654
805
|
this.start.row += row;
|
|
655
806
|
this.start.column += column;
|
|
656
807
|
this.end.row += row;
|
|
657
808
|
this.end.column += column;
|
|
658
809
|
};
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
Range.fromPoints = function(start, end) {
|
|
810
|
+
return Range;
|
|
811
|
+
}());
|
|
812
|
+
Range.fromPoints = function (start, end) {
|
|
662
813
|
return new Range(start.row, start.column, end.row, end.column);
|
|
663
814
|
};
|
|
664
815
|
Range.comparePoints = comparePoints;
|
|
665
|
-
|
|
666
|
-
Range.comparePoints = function(p1, p2) {
|
|
816
|
+
Range.comparePoints = function (p1, p2) {
|
|
667
817
|
return p1.row - p2.row || p1.column - p2.column;
|
|
668
818
|
};
|
|
669
|
-
|
|
670
|
-
|
|
671
819
|
exports.Range = Range;
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
ace.define("ace/apply_delta",[], function(require, exports, module) {
|
|
675
|
-
"use strict";
|
|
676
|
-
|
|
677
|
-
function throwDeltaError(delta, errorText){
|
|
678
|
-
console.log("Invalid Delta:", delta);
|
|
679
|
-
throw "Invalid Delta: " + errorText;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
function positionInDocument(docLines, position) {
|
|
683
|
-
return position.row >= 0 && position.row < docLines.length &&
|
|
684
|
-
position.column >= 0 && position.column <= docLines[position.row].length;
|
|
685
|
-
}
|
|
686
820
|
|
|
687
|
-
function validateDelta(docLines, delta) {
|
|
688
|
-
if (delta.action != "insert" && delta.action != "remove")
|
|
689
|
-
throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
|
|
690
|
-
if (!(delta.lines instanceof Array))
|
|
691
|
-
throwDeltaError(delta, "delta.lines must be an Array");
|
|
692
|
-
if (!delta.start || !delta.end)
|
|
693
|
-
throwDeltaError(delta, "delta.start/end must be an present");
|
|
694
|
-
var start = delta.start;
|
|
695
|
-
if (!positionInDocument(docLines, delta.start))
|
|
696
|
-
throwDeltaError(delta, "delta.start must be contained in document");
|
|
697
|
-
var end = delta.end;
|
|
698
|
-
if (delta.action == "remove" && !positionInDocument(docLines, end))
|
|
699
|
-
throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
|
|
700
|
-
var numRangeRows = end.row - start.row;
|
|
701
|
-
var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
|
|
702
|
-
if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
|
|
703
|
-
throwDeltaError(delta, "delta.range must match delta lines");
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
exports.applyDelta = function(docLines, delta, doNotValidate) {
|
|
707
|
-
|
|
708
|
-
var row = delta.start.row;
|
|
709
|
-
var startColumn = delta.start.column;
|
|
710
|
-
var line = docLines[row] || "";
|
|
711
|
-
switch (delta.action) {
|
|
712
|
-
case "insert":
|
|
713
|
-
var lines = delta.lines;
|
|
714
|
-
if (lines.length === 1) {
|
|
715
|
-
docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
|
|
716
|
-
} else {
|
|
717
|
-
var args = [row, 1].concat(delta.lines);
|
|
718
|
-
docLines.splice.apply(docLines, args);
|
|
719
|
-
docLines[row] = line.substring(0, startColumn) + docLines[row];
|
|
720
|
-
docLines[row + delta.lines.length - 1] += line.substring(startColumn);
|
|
721
|
-
}
|
|
722
|
-
break;
|
|
723
|
-
case "remove":
|
|
724
|
-
var endColumn = delta.end.column;
|
|
725
|
-
var endRow = delta.end.row;
|
|
726
|
-
if (row === endRow) {
|
|
727
|
-
docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
|
|
728
|
-
} else {
|
|
729
|
-
docLines.splice(
|
|
730
|
-
row, endRow - row + 1,
|
|
731
|
-
line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
|
|
732
|
-
);
|
|
733
|
-
}
|
|
734
|
-
break;
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
821
|
});
|
|
738
822
|
|
|
739
|
-
ace.define("ace/
|
|
740
|
-
"use strict";
|
|
741
|
-
|
|
742
|
-
var EventEmitter = {};
|
|
743
|
-
var stopPropagation = function() { this.propagationStopped = true; };
|
|
744
|
-
var preventDefault = function() { this.defaultPrevented = true; };
|
|
745
|
-
|
|
746
|
-
EventEmitter._emit =
|
|
747
|
-
EventEmitter._dispatchEvent = function(eventName, e) {
|
|
748
|
-
this._eventRegistry || (this._eventRegistry = {});
|
|
749
|
-
this._defaultHandlers || (this._defaultHandlers = {});
|
|
750
|
-
|
|
751
|
-
var listeners = this._eventRegistry[eventName] || [];
|
|
752
|
-
var defaultHandler = this._defaultHandlers[eventName];
|
|
753
|
-
if (!listeners.length && !defaultHandler)
|
|
754
|
-
return;
|
|
755
|
-
|
|
756
|
-
if (typeof e != "object" || !e)
|
|
757
|
-
e = {};
|
|
758
|
-
|
|
759
|
-
if (!e.type)
|
|
760
|
-
e.type = eventName;
|
|
761
|
-
if (!e.stopPropagation)
|
|
762
|
-
e.stopPropagation = stopPropagation;
|
|
763
|
-
if (!e.preventDefault)
|
|
764
|
-
e.preventDefault = preventDefault;
|
|
765
|
-
|
|
766
|
-
listeners = listeners.slice();
|
|
767
|
-
for (var i=0; i<listeners.length; i++) {
|
|
768
|
-
listeners[i](e, this);
|
|
769
|
-
if (e.propagationStopped)
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
if (defaultHandler && !e.defaultPrevented)
|
|
774
|
-
return defaultHandler(e, this);
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
EventEmitter._signal = function(eventName, e) {
|
|
779
|
-
var listeners = (this._eventRegistry || {})[eventName];
|
|
780
|
-
if (!listeners)
|
|
781
|
-
return;
|
|
782
|
-
listeners = listeners.slice();
|
|
783
|
-
for (var i=0; i<listeners.length; i++)
|
|
784
|
-
listeners[i](e, this);
|
|
785
|
-
};
|
|
786
|
-
|
|
787
|
-
EventEmitter.once = function(eventName, callback) {
|
|
788
|
-
var _self = this;
|
|
789
|
-
this.on(eventName, function newCallback() {
|
|
790
|
-
_self.off(eventName, newCallback);
|
|
791
|
-
callback.apply(null, arguments);
|
|
792
|
-
});
|
|
793
|
-
if (!callback) {
|
|
794
|
-
return new Promise(function(resolve) {
|
|
795
|
-
callback = resolve;
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
EventEmitter.setDefaultHandler = function(eventName, callback) {
|
|
802
|
-
var handlers = this._defaultHandlers;
|
|
803
|
-
if (!handlers)
|
|
804
|
-
handlers = this._defaultHandlers = {_disabled_: {}};
|
|
805
|
-
|
|
806
|
-
if (handlers[eventName]) {
|
|
807
|
-
var old = handlers[eventName];
|
|
808
|
-
var disabled = handlers._disabled_[eventName];
|
|
809
|
-
if (!disabled)
|
|
810
|
-
handlers._disabled_[eventName] = disabled = [];
|
|
811
|
-
disabled.push(old);
|
|
812
|
-
var i = disabled.indexOf(callback);
|
|
813
|
-
if (i != -1)
|
|
814
|
-
disabled.splice(i, 1);
|
|
815
|
-
}
|
|
816
|
-
handlers[eventName] = callback;
|
|
817
|
-
};
|
|
818
|
-
EventEmitter.removeDefaultHandler = function(eventName, callback) {
|
|
819
|
-
var handlers = this._defaultHandlers;
|
|
820
|
-
if (!handlers)
|
|
821
|
-
return;
|
|
822
|
-
var disabled = handlers._disabled_[eventName];
|
|
823
|
-
|
|
824
|
-
if (handlers[eventName] == callback) {
|
|
825
|
-
if (disabled)
|
|
826
|
-
this.setDefaultHandler(eventName, disabled.pop());
|
|
827
|
-
} else if (disabled) {
|
|
828
|
-
var i = disabled.indexOf(callback);
|
|
829
|
-
if (i != -1)
|
|
830
|
-
disabled.splice(i, 1);
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
EventEmitter.on =
|
|
835
|
-
EventEmitter.addEventListener = function(eventName, callback, capturing) {
|
|
836
|
-
this._eventRegistry = this._eventRegistry || {};
|
|
837
|
-
|
|
838
|
-
var listeners = this._eventRegistry[eventName];
|
|
839
|
-
if (!listeners)
|
|
840
|
-
listeners = this._eventRegistry[eventName] = [];
|
|
841
|
-
|
|
842
|
-
if (listeners.indexOf(callback) == -1)
|
|
843
|
-
listeners[capturing ? "unshift" : "push"](callback);
|
|
844
|
-
return callback;
|
|
845
|
-
};
|
|
846
|
-
|
|
847
|
-
EventEmitter.off =
|
|
848
|
-
EventEmitter.removeListener =
|
|
849
|
-
EventEmitter.removeEventListener = function(eventName, callback) {
|
|
850
|
-
this._eventRegistry = this._eventRegistry || {};
|
|
851
|
-
|
|
852
|
-
var listeners = this._eventRegistry[eventName];
|
|
853
|
-
if (!listeners)
|
|
854
|
-
return;
|
|
855
|
-
|
|
856
|
-
var index = listeners.indexOf(callback);
|
|
857
|
-
if (index !== -1)
|
|
858
|
-
listeners.splice(index, 1);
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
EventEmitter.removeAllListeners = function(eventName) {
|
|
862
|
-
if (!eventName) this._eventRegistry = this._defaultHandlers = undefined;
|
|
863
|
-
if (this._eventRegistry) this._eventRegistry[eventName] = undefined;
|
|
864
|
-
if (this._defaultHandlers) this._defaultHandlers[eventName] = undefined;
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
exports.EventEmitter = EventEmitter;
|
|
868
|
-
|
|
869
|
-
});
|
|
870
|
-
|
|
871
|
-
ace.define("ace/anchor",[], function(require, exports, module) {
|
|
872
|
-
"use strict";
|
|
873
|
-
|
|
823
|
+
ace.define("ace/anchor",[], function(require, exports, module){"use strict";
|
|
874
824
|
var oop = require("./lib/oop");
|
|
875
825
|
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
(function() {
|
|
888
|
-
|
|
889
|
-
oop.implement(this, EventEmitter);
|
|
890
|
-
this.getPosition = function() {
|
|
826
|
+
var Anchor = /** @class */ (function () {
|
|
827
|
+
function Anchor(doc, row, column) {
|
|
828
|
+
this.$onChange = this.onChange.bind(this);
|
|
829
|
+
this.attach(doc);
|
|
830
|
+
if (typeof column == "undefined")
|
|
831
|
+
this.setPosition(row.row, row.column);
|
|
832
|
+
else
|
|
833
|
+
this.setPosition(row, column);
|
|
834
|
+
}
|
|
835
|
+
Anchor.prototype.getPosition = function () {
|
|
891
836
|
return this.$clipPositionToDocument(this.row, this.column);
|
|
892
837
|
};
|
|
893
|
-
|
|
838
|
+
Anchor.prototype.getDocument = function () {
|
|
894
839
|
return this.document;
|
|
895
840
|
};
|
|
896
|
-
|
|
897
|
-
this.onChange = function(delta) {
|
|
841
|
+
Anchor.prototype.onChange = function (delta) {
|
|
898
842
|
if (delta.start.row == delta.end.row && delta.start.row != this.row)
|
|
899
843
|
return;
|
|
900
|
-
|
|
901
844
|
if (delta.start.row > this.row)
|
|
902
845
|
return;
|
|
903
|
-
|
|
904
|
-
var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
|
|
846
|
+
var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
|
|
905
847
|
this.setPosition(point.row, point.column, true);
|
|
906
848
|
};
|
|
907
|
-
|
|
908
|
-
function $pointsInOrder(point1, point2, equalPointsInOrder) {
|
|
909
|
-
var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
|
|
910
|
-
return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
function $getTransformedPoint(delta, point, moveIfEqual) {
|
|
914
|
-
var deltaIsInsert = delta.action == "insert";
|
|
915
|
-
var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
|
|
916
|
-
var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
|
|
917
|
-
var deltaStart = delta.start;
|
|
918
|
-
var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
|
|
919
|
-
if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
|
|
920
|
-
return {
|
|
921
|
-
row: point.row,
|
|
922
|
-
column: point.column
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
|
|
926
|
-
return {
|
|
927
|
-
row: point.row + deltaRowShift,
|
|
928
|
-
column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
return {
|
|
933
|
-
row: deltaStart.row,
|
|
934
|
-
column: deltaStart.column
|
|
935
|
-
};
|
|
936
|
-
}
|
|
937
|
-
this.setPosition = function(row, column, noClip) {
|
|
849
|
+
Anchor.prototype.setPosition = function (row, column, noClip) {
|
|
938
850
|
var pos;
|
|
939
851
|
if (noClip) {
|
|
940
852
|
pos = {
|
|
941
853
|
row: row,
|
|
942
854
|
column: column
|
|
943
855
|
};
|
|
944
|
-
}
|
|
856
|
+
}
|
|
857
|
+
else {
|
|
945
858
|
pos = this.$clipPositionToDocument(row, column);
|
|
946
859
|
}
|
|
947
|
-
|
|
948
860
|
if (this.row == pos.row && this.column == pos.column)
|
|
949
861
|
return;
|
|
950
|
-
|
|
951
862
|
var old = {
|
|
952
863
|
row: this.row,
|
|
953
864
|
column: this.column
|
|
954
865
|
};
|
|
955
|
-
|
|
956
866
|
this.row = pos.row;
|
|
957
867
|
this.column = pos.column;
|
|
958
868
|
this._signal("change", {
|
|
@@ -960,16 +870,15 @@ var Anchor = exports.Anchor = function(doc, row, column) {
|
|
|
960
870
|
value: pos
|
|
961
871
|
});
|
|
962
872
|
};
|
|
963
|
-
|
|
873
|
+
Anchor.prototype.detach = function () {
|
|
964
874
|
this.document.off("change", this.$onChange);
|
|
965
875
|
};
|
|
966
|
-
|
|
876
|
+
Anchor.prototype.attach = function (doc) {
|
|
967
877
|
this.document = doc || this.document;
|
|
968
878
|
this.document.on("change", this.$onChange);
|
|
969
879
|
};
|
|
970
|
-
|
|
880
|
+
Anchor.prototype.$clipPositionToDocument = function (row, column) {
|
|
971
881
|
var pos = {};
|
|
972
|
-
|
|
973
882
|
if (row >= this.document.getLength()) {
|
|
974
883
|
pos.row = Math.max(0, this.document.getLength() - 1);
|
|
975
884
|
pos.column = this.document.getLine(pos.row).length;
|
|
@@ -982,113 +891,123 @@ var Anchor = exports.Anchor = function(doc, row, column) {
|
|
|
982
891
|
pos.row = row;
|
|
983
892
|
pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
|
|
984
893
|
}
|
|
985
|
-
|
|
986
894
|
if (column < 0)
|
|
987
895
|
pos.column = 0;
|
|
988
|
-
|
|
989
896
|
return pos;
|
|
990
897
|
};
|
|
991
|
-
|
|
992
|
-
}
|
|
898
|
+
return Anchor;
|
|
899
|
+
}());
|
|
900
|
+
Anchor.prototype.$insertRight = false;
|
|
901
|
+
oop.implement(Anchor.prototype, EventEmitter);
|
|
902
|
+
function $pointsInOrder(point1, point2, equalPointsInOrder) {
|
|
903
|
+
var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
|
|
904
|
+
return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
|
|
905
|
+
}
|
|
906
|
+
function $getTransformedPoint(delta, point, moveIfEqual) {
|
|
907
|
+
var deltaIsInsert = delta.action == "insert";
|
|
908
|
+
var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
|
|
909
|
+
var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
|
|
910
|
+
var deltaStart = delta.start;
|
|
911
|
+
var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
|
|
912
|
+
if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
|
|
913
|
+
return {
|
|
914
|
+
row: point.row,
|
|
915
|
+
column: point.column
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
|
|
919
|
+
return {
|
|
920
|
+
row: point.row + deltaRowShift,
|
|
921
|
+
column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
return {
|
|
925
|
+
row: deltaStart.row,
|
|
926
|
+
column: deltaStart.column
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
exports.Anchor = Anchor;
|
|
993
930
|
|
|
994
931
|
});
|
|
995
932
|
|
|
996
|
-
ace.define("ace/document",[], function(require, exports, module)
|
|
997
|
-
"use strict";
|
|
998
|
-
|
|
933
|
+
ace.define("ace/document",[], function(require, exports, module){"use strict";
|
|
999
934
|
var oop = require("./lib/oop");
|
|
1000
935
|
var applyDelta = require("./apply_delta").applyDelta;
|
|
1001
936
|
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
|
1002
937
|
var Range = require("./range").Range;
|
|
1003
938
|
var Anchor = require("./anchor").Anchor;
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
this.$lines = [""];
|
|
1007
|
-
if (textOrLines.length === 0) {
|
|
939
|
+
var Document = /** @class */ (function () {
|
|
940
|
+
function Document(textOrLines) {
|
|
1008
941
|
this.$lines = [""];
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
942
|
+
if (textOrLines.length === 0) {
|
|
943
|
+
this.$lines = [""];
|
|
944
|
+
}
|
|
945
|
+
else if (Array.isArray(textOrLines)) {
|
|
946
|
+
this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
this.insert({ row: 0, column: 0 }, textOrLines);
|
|
950
|
+
}
|
|
1013
951
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
(function() {
|
|
1017
|
-
|
|
1018
|
-
oop.implement(this, EventEmitter);
|
|
1019
|
-
this.setValue = function(text) {
|
|
952
|
+
Document.prototype.setValue = function (text) {
|
|
1020
953
|
var len = this.getLength() - 1;
|
|
1021
954
|
this.remove(new Range(0, 0, len, this.getLine(len).length));
|
|
1022
|
-
this.insert({row: 0, column: 0}, text);
|
|
955
|
+
this.insert({ row: 0, column: 0 }, text || "");
|
|
1023
956
|
};
|
|
1024
|
-
|
|
957
|
+
Document.prototype.getValue = function () {
|
|
1025
958
|
return this.getAllLines().join(this.getNewLineCharacter());
|
|
1026
959
|
};
|
|
1027
|
-
|
|
960
|
+
Document.prototype.createAnchor = function (row, column) {
|
|
1028
961
|
return new Anchor(this, row, column);
|
|
1029
962
|
};
|
|
1030
|
-
|
|
1031
|
-
this.$split = function(text) {
|
|
1032
|
-
return text.replace(/\r\n|\r/g, "\n").split("\n");
|
|
1033
|
-
};
|
|
1034
|
-
} else {
|
|
1035
|
-
this.$split = function(text) {
|
|
1036
|
-
return text.split(/\r\n|\r|\n/);
|
|
1037
|
-
};
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
this.$detectNewLine = function(text) {
|
|
963
|
+
Document.prototype.$detectNewLine = function (text) {
|
|
1042
964
|
var match = text.match(/^.*?(\r\n|\r|\n)/m);
|
|
1043
965
|
this.$autoNewLine = match ? match[1] : "\n";
|
|
1044
966
|
this._signal("changeNewLineMode");
|
|
1045
967
|
};
|
|
1046
|
-
|
|
968
|
+
Document.prototype.getNewLineCharacter = function () {
|
|
1047
969
|
switch (this.$newLineMode) {
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
970
|
+
case "windows":
|
|
971
|
+
return "\r\n";
|
|
972
|
+
case "unix":
|
|
973
|
+
return "\n";
|
|
974
|
+
default:
|
|
975
|
+
return this.$autoNewLine || "\n";
|
|
1054
976
|
}
|
|
1055
977
|
};
|
|
1056
|
-
|
|
1057
|
-
this.$autoNewLine = "";
|
|
1058
|
-
this.$newLineMode = "auto";
|
|
1059
|
-
this.setNewLineMode = function(newLineMode) {
|
|
978
|
+
Document.prototype.setNewLineMode = function (newLineMode) {
|
|
1060
979
|
if (this.$newLineMode === newLineMode)
|
|
1061
980
|
return;
|
|
1062
|
-
|
|
1063
981
|
this.$newLineMode = newLineMode;
|
|
1064
982
|
this._signal("changeNewLineMode");
|
|
1065
983
|
};
|
|
1066
|
-
|
|
984
|
+
Document.prototype.getNewLineMode = function () {
|
|
1067
985
|
return this.$newLineMode;
|
|
1068
986
|
};
|
|
1069
|
-
|
|
987
|
+
Document.prototype.isNewLine = function (text) {
|
|
1070
988
|
return (text == "\r\n" || text == "\r" || text == "\n");
|
|
1071
989
|
};
|
|
1072
|
-
|
|
990
|
+
Document.prototype.getLine = function (row) {
|
|
1073
991
|
return this.$lines[row] || "";
|
|
1074
992
|
};
|
|
1075
|
-
|
|
993
|
+
Document.prototype.getLines = function (firstRow, lastRow) {
|
|
1076
994
|
return this.$lines.slice(firstRow, lastRow + 1);
|
|
1077
995
|
};
|
|
1078
|
-
|
|
996
|
+
Document.prototype.getAllLines = function () {
|
|
1079
997
|
return this.getLines(0, this.getLength());
|
|
1080
998
|
};
|
|
1081
|
-
|
|
999
|
+
Document.prototype.getLength = function () {
|
|
1082
1000
|
return this.$lines.length;
|
|
1083
1001
|
};
|
|
1084
|
-
|
|
1002
|
+
Document.prototype.getTextRange = function (range) {
|
|
1085
1003
|
return this.getLinesForRange(range).join(this.getNewLineCharacter());
|
|
1086
1004
|
};
|
|
1087
|
-
|
|
1005
|
+
Document.prototype.getLinesForRange = function (range) {
|
|
1088
1006
|
var lines;
|
|
1089
1007
|
if (range.start.row === range.end.row) {
|
|
1090
1008
|
lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
|
|
1091
|
-
}
|
|
1009
|
+
}
|
|
1010
|
+
else {
|
|
1092
1011
|
lines = this.getLines(range.start.row, range.end.row);
|
|
1093
1012
|
lines[0] = (lines[0] || "").substring(range.start.column);
|
|
1094
1013
|
var l = lines.length - 1;
|
|
@@ -1097,45 +1016,43 @@ var Document = function(textOrLines) {
|
|
|
1097
1016
|
}
|
|
1098
1017
|
return lines;
|
|
1099
1018
|
};
|
|
1100
|
-
|
|
1019
|
+
Document.prototype.insertLines = function (row, lines) {
|
|
1101
1020
|
console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
|
|
1102
1021
|
return this.insertFullLines(row, lines);
|
|
1103
1022
|
};
|
|
1104
|
-
|
|
1023
|
+
Document.prototype.removeLines = function (firstRow, lastRow) {
|
|
1105
1024
|
console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
|
|
1106
1025
|
return this.removeFullLines(firstRow, lastRow);
|
|
1107
1026
|
};
|
|
1108
|
-
|
|
1027
|
+
Document.prototype.insertNewLine = function (position) {
|
|
1109
1028
|
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
|
|
1110
1029
|
return this.insertMergedLines(position, ["", ""]);
|
|
1111
1030
|
};
|
|
1112
|
-
|
|
1031
|
+
Document.prototype.insert = function (position, text) {
|
|
1113
1032
|
if (this.getLength() <= 1)
|
|
1114
1033
|
this.$detectNewLine(text);
|
|
1115
|
-
|
|
1116
1034
|
return this.insertMergedLines(position, this.$split(text));
|
|
1117
1035
|
};
|
|
1118
|
-
|
|
1036
|
+
Document.prototype.insertInLine = function (position, text) {
|
|
1119
1037
|
var start = this.clippedPos(position.row, position.column);
|
|
1120
1038
|
var end = this.pos(position.row, position.column + text.length);
|
|
1121
|
-
|
|
1122
1039
|
this.applyDelta({
|
|
1123
1040
|
start: start,
|
|
1124
1041
|
end: end,
|
|
1125
1042
|
action: "insert",
|
|
1126
1043
|
lines: [text]
|
|
1127
1044
|
}, true);
|
|
1128
|
-
|
|
1129
1045
|
return this.clonePos(end);
|
|
1130
1046
|
};
|
|
1131
|
-
|
|
1132
|
-
this.clippedPos = function(row, column) {
|
|
1047
|
+
Document.prototype.clippedPos = function (row, column) {
|
|
1133
1048
|
var length = this.getLength();
|
|
1134
1049
|
if (row === undefined) {
|
|
1135
1050
|
row = length;
|
|
1136
|
-
}
|
|
1051
|
+
}
|
|
1052
|
+
else if (row < 0) {
|
|
1137
1053
|
row = 0;
|
|
1138
|
-
}
|
|
1054
|
+
}
|
|
1055
|
+
else if (row >= length) {
|
|
1139
1056
|
row = length - 1;
|
|
1140
1057
|
column = undefined;
|
|
1141
1058
|
}
|
|
@@ -1143,93 +1060,87 @@ var Document = function(textOrLines) {
|
|
|
1143
1060
|
if (column == undefined)
|
|
1144
1061
|
column = line.length;
|
|
1145
1062
|
column = Math.min(Math.max(column, 0), line.length);
|
|
1146
|
-
return {row: row, column: column};
|
|
1063
|
+
return { row: row, column: column };
|
|
1147
1064
|
};
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
return {row: pos.row, column: pos.column};
|
|
1065
|
+
Document.prototype.clonePos = function (pos) {
|
|
1066
|
+
return { row: pos.row, column: pos.column };
|
|
1151
1067
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
return {row: row, column: column};
|
|
1068
|
+
Document.prototype.pos = function (row, column) {
|
|
1069
|
+
return { row: row, column: column };
|
|
1155
1070
|
};
|
|
1156
|
-
|
|
1157
|
-
this.$clipPosition = function(position) {
|
|
1071
|
+
Document.prototype.$clipPosition = function (position) {
|
|
1158
1072
|
var length = this.getLength();
|
|
1159
1073
|
if (position.row >= length) {
|
|
1160
1074
|
position.row = Math.max(0, length - 1);
|
|
1161
1075
|
position.column = this.getLine(length - 1).length;
|
|
1162
|
-
}
|
|
1076
|
+
}
|
|
1077
|
+
else {
|
|
1163
1078
|
position.row = Math.max(0, position.row);
|
|
1164
1079
|
position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
|
|
1165
1080
|
}
|
|
1166
1081
|
return position;
|
|
1167
1082
|
};
|
|
1168
|
-
|
|
1083
|
+
Document.prototype.insertFullLines = function (row, lines) {
|
|
1169
1084
|
row = Math.min(Math.max(row, 0), this.getLength());
|
|
1170
1085
|
var column = 0;
|
|
1171
1086
|
if (row < this.getLength()) {
|
|
1172
1087
|
lines = lines.concat([""]);
|
|
1173
1088
|
column = 0;
|
|
1174
|
-
}
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1175
1091
|
lines = [""].concat(lines);
|
|
1176
1092
|
row--;
|
|
1177
1093
|
column = this.$lines[row].length;
|
|
1178
1094
|
}
|
|
1179
|
-
this.insertMergedLines({row: row, column: column}, lines);
|
|
1180
|
-
};
|
|
1181
|
-
|
|
1095
|
+
this.insertMergedLines({ row: row, column: column }, lines);
|
|
1096
|
+
};
|
|
1097
|
+
Document.prototype.insertMergedLines = function (position, lines) {
|
|
1182
1098
|
var start = this.clippedPos(position.row, position.column);
|
|
1183
1099
|
var end = {
|
|
1184
1100
|
row: start.row + lines.length - 1,
|
|
1185
1101
|
column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
|
|
1186
1102
|
};
|
|
1187
|
-
|
|
1188
1103
|
this.applyDelta({
|
|
1189
1104
|
start: start,
|
|
1190
1105
|
end: end,
|
|
1191
1106
|
action: "insert",
|
|
1192
1107
|
lines: lines
|
|
1193
1108
|
});
|
|
1194
|
-
|
|
1195
1109
|
return this.clonePos(end);
|
|
1196
1110
|
};
|
|
1197
|
-
|
|
1111
|
+
Document.prototype.remove = function (range) {
|
|
1198
1112
|
var start = this.clippedPos(range.start.row, range.start.column);
|
|
1199
1113
|
var end = this.clippedPos(range.end.row, range.end.column);
|
|
1200
1114
|
this.applyDelta({
|
|
1201
1115
|
start: start,
|
|
1202
1116
|
end: end,
|
|
1203
1117
|
action: "remove",
|
|
1204
|
-
lines: this.getLinesForRange({start: start, end: end})
|
|
1118
|
+
lines: this.getLinesForRange({ start: start, end: end })
|
|
1205
1119
|
});
|
|
1206
1120
|
return this.clonePos(start);
|
|
1207
1121
|
};
|
|
1208
|
-
|
|
1122
|
+
Document.prototype.removeInLine = function (row, startColumn, endColumn) {
|
|
1209
1123
|
var start = this.clippedPos(row, startColumn);
|
|
1210
1124
|
var end = this.clippedPos(row, endColumn);
|
|
1211
|
-
|
|
1212
1125
|
this.applyDelta({
|
|
1213
1126
|
start: start,
|
|
1214
1127
|
end: end,
|
|
1215
1128
|
action: "remove",
|
|
1216
|
-
lines: this.getLinesForRange({start: start, end: end})
|
|
1129
|
+
lines: this.getLinesForRange({ start: start, end: end })
|
|
1217
1130
|
}, true);
|
|
1218
|
-
|
|
1219
1131
|
return this.clonePos(start);
|
|
1220
1132
|
};
|
|
1221
|
-
|
|
1133
|
+
Document.prototype.removeFullLines = function (firstRow, lastRow) {
|
|
1222
1134
|
firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
|
|
1223
|
-
lastRow
|
|
1135
|
+
lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
|
|
1224
1136
|
var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
|
|
1225
|
-
var deleteLastNewLine
|
|
1226
|
-
var startRow = (
|
|
1227
|
-
var startCol = (
|
|
1228
|
-
var endRow
|
|
1229
|
-
var endCol
|
|
1137
|
+
var deleteLastNewLine = lastRow < this.getLength() - 1;
|
|
1138
|
+
var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow);
|
|
1139
|
+
var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0);
|
|
1140
|
+
var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow);
|
|
1141
|
+
var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length);
|
|
1230
1142
|
var range = new Range(startRow, startCol, endRow, endCol);
|
|
1231
1143
|
var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
|
|
1232
|
-
|
|
1233
1144
|
this.applyDelta({
|
|
1234
1145
|
start: range.start,
|
|
1235
1146
|
end: range.end,
|
|
@@ -1238,7 +1149,7 @@ var Document = function(textOrLines) {
|
|
|
1238
1149
|
});
|
|
1239
1150
|
return deletedLines;
|
|
1240
1151
|
};
|
|
1241
|
-
|
|
1152
|
+
Document.prototype.removeNewLine = function (row) {
|
|
1242
1153
|
if (row < this.getLength() - 1 && row >= 0) {
|
|
1243
1154
|
this.applyDelta({
|
|
1244
1155
|
start: this.pos(row, this.getLine(row).length),
|
|
@@ -1248,14 +1159,13 @@ var Document = function(textOrLines) {
|
|
|
1248
1159
|
});
|
|
1249
1160
|
}
|
|
1250
1161
|
};
|
|
1251
|
-
|
|
1162
|
+
Document.prototype.replace = function (range, text) {
|
|
1252
1163
|
if (!(range instanceof Range))
|
|
1253
1164
|
range = Range.fromPoints(range.start, range.end);
|
|
1254
1165
|
if (text.length === 0 && range.isEmpty())
|
|
1255
1166
|
return range.start;
|
|
1256
1167
|
if (text == this.getTextRange(range))
|
|
1257
1168
|
return range.end;
|
|
1258
|
-
|
|
1259
1169
|
this.remove(range);
|
|
1260
1170
|
var end;
|
|
1261
1171
|
if (text) {
|
|
@@ -1264,26 +1174,24 @@ var Document = function(textOrLines) {
|
|
|
1264
1174
|
else {
|
|
1265
1175
|
end = range.start;
|
|
1266
1176
|
}
|
|
1267
|
-
|
|
1268
1177
|
return end;
|
|
1269
1178
|
};
|
|
1270
|
-
|
|
1271
|
-
for (var i=0; i<deltas.length; i++) {
|
|
1179
|
+
Document.prototype.applyDeltas = function (deltas) {
|
|
1180
|
+
for (var i = 0; i < deltas.length; i++) {
|
|
1272
1181
|
this.applyDelta(deltas[i]);
|
|
1273
1182
|
}
|
|
1274
1183
|
};
|
|
1275
|
-
|
|
1276
|
-
for (var i=deltas.length-1; i>=0; i--) {
|
|
1184
|
+
Document.prototype.revertDeltas = function (deltas) {
|
|
1185
|
+
for (var i = deltas.length - 1; i >= 0; i--) {
|
|
1277
1186
|
this.revertDelta(deltas[i]);
|
|
1278
1187
|
}
|
|
1279
1188
|
};
|
|
1280
|
-
|
|
1189
|
+
Document.prototype.applyDelta = function (delta, doNotValidate) {
|
|
1281
1190
|
var isInsert = delta.action == "insert";
|
|
1282
1191
|
if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
|
|
1283
1192
|
: !Range.comparePoints(delta.start, delta.end)) {
|
|
1284
1193
|
return;
|
|
1285
1194
|
}
|
|
1286
|
-
|
|
1287
1195
|
if (isInsert && delta.lines.length > 20000) {
|
|
1288
1196
|
this.$splitAndapplyLargeDelta(delta, 20000);
|
|
1289
1197
|
}
|
|
@@ -1292,21 +1200,17 @@ var Document = function(textOrLines) {
|
|
|
1292
1200
|
this._signal("change", delta);
|
|
1293
1201
|
}
|
|
1294
1202
|
};
|
|
1295
|
-
|
|
1296
|
-
this.$safeApplyDelta = function(delta) {
|
|
1203
|
+
Document.prototype.$safeApplyDelta = function (delta) {
|
|
1297
1204
|
var docLength = this.$lines.length;
|
|
1298
|
-
if (
|
|
1299
|
-
delta.action == "
|
|
1300
|
-
|| delta.action == "insert" && delta.start.row <= docLength
|
|
1301
|
-
) {
|
|
1205
|
+
if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
|
|
1206
|
+
|| delta.action == "insert" && delta.start.row <= docLength) {
|
|
1302
1207
|
this.applyDelta(delta);
|
|
1303
1208
|
}
|
|
1304
1209
|
};
|
|
1305
|
-
|
|
1306
|
-
this.$splitAndapplyLargeDelta = function(delta, MAX) {
|
|
1210
|
+
Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
|
|
1307
1211
|
var lines = delta.lines;
|
|
1308
1212
|
var l = lines.length - MAX + 1;
|
|
1309
|
-
var row = delta.start.row;
|
|
1213
|
+
var row = delta.start.row;
|
|
1310
1214
|
var column = delta.start.column;
|
|
1311
1215
|
for (var from = 0, to = 0; from < l; from = to) {
|
|
1312
1216
|
to += MAX - 1;
|
|
@@ -1324,7 +1228,7 @@ var Document = function(textOrLines) {
|
|
|
1324
1228
|
delta.start.column = column;
|
|
1325
1229
|
this.applyDelta(delta, true);
|
|
1326
1230
|
};
|
|
1327
|
-
|
|
1231
|
+
Document.prototype.revertDelta = function (delta) {
|
|
1328
1232
|
this.$safeApplyDelta({
|
|
1329
1233
|
start: this.clonePos(delta.start),
|
|
1330
1234
|
end: this.clonePos(delta.end),
|
|
@@ -1332,36 +1236,40 @@ var Document = function(textOrLines) {
|
|
|
1332
1236
|
lines: delta.lines.slice()
|
|
1333
1237
|
});
|
|
1334
1238
|
};
|
|
1335
|
-
|
|
1239
|
+
Document.prototype.indexToPosition = function (index, startRow) {
|
|
1336
1240
|
var lines = this.$lines || this.getAllLines();
|
|
1337
1241
|
var newlineLength = this.getNewLineCharacter().length;
|
|
1338
1242
|
for (var i = startRow || 0, l = lines.length; i < l; i++) {
|
|
1339
1243
|
index -= lines[i].length + newlineLength;
|
|
1340
1244
|
if (index < 0)
|
|
1341
|
-
return {row: i, column: index + lines[i].length + newlineLength};
|
|
1245
|
+
return { row: i, column: index + lines[i].length + newlineLength };
|
|
1342
1246
|
}
|
|
1343
|
-
return {row: l-1, column: index + lines[l-1].length + newlineLength};
|
|
1247
|
+
return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
|
|
1344
1248
|
};
|
|
1345
|
-
|
|
1249
|
+
Document.prototype.positionToIndex = function (pos, startRow) {
|
|
1346
1250
|
var lines = this.$lines || this.getAllLines();
|
|
1347
1251
|
var newlineLength = this.getNewLineCharacter().length;
|
|
1348
1252
|
var index = 0;
|
|
1349
1253
|
var row = Math.min(pos.row, lines.length);
|
|
1350
1254
|
for (var i = startRow || 0; i < row; ++i)
|
|
1351
1255
|
index += lines[i].length + newlineLength;
|
|
1352
|
-
|
|
1353
1256
|
return index + pos.column;
|
|
1354
1257
|
};
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1258
|
+
Document.prototype.$split = function (text) {
|
|
1259
|
+
return text.split(/\r\n|\r|\n/);
|
|
1260
|
+
};
|
|
1261
|
+
return Document;
|
|
1262
|
+
}());
|
|
1263
|
+
Document.prototype.$autoNewLine = "";
|
|
1264
|
+
Document.prototype.$newLineMode = "auto";
|
|
1265
|
+
oop.implement(Document.prototype, EventEmitter);
|
|
1358
1266
|
exports.Document = Document;
|
|
1267
|
+
|
|
1359
1268
|
});
|
|
1360
1269
|
|
|
1361
1270
|
ace.define("ace/worker/mirror",[], function(require, exports, module) {
|
|
1362
1271
|
"use strict";
|
|
1363
1272
|
|
|
1364
|
-
var Range = require("../range").Range;
|
|
1365
1273
|
var Document = require("../document").Document;
|
|
1366
1274
|
var lang = require("../lib/lang");
|
|
1367
1275
|
|
|
@@ -1378,11 +1286,24 @@ var Mirror = exports.Mirror = function(sender) {
|
|
|
1378
1286
|
doc.applyDeltas(data);
|
|
1379
1287
|
} else {
|
|
1380
1288
|
for (var i = 0; i < data.length; i += 2) {
|
|
1289
|
+
var d, err;
|
|
1381
1290
|
if (Array.isArray(data[i+1])) {
|
|
1382
|
-
|
|
1291
|
+
d = {action: "insert", start: data[i], lines: data[i+1]};
|
|
1383
1292
|
} else {
|
|
1384
|
-
|
|
1293
|
+
d = {action: "remove", start: data[i], end: data[i+1]};
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
if ((d.action == "insert" ? d.start : d.end).row >= doc.$lines.length) {
|
|
1297
|
+
err = new Error("Invalid delta");
|
|
1298
|
+
err.data = {
|
|
1299
|
+
path: _self.$path,
|
|
1300
|
+
linesLength: doc.$lines.length,
|
|
1301
|
+
start: d.start,
|
|
1302
|
+
end: d.end
|
|
1303
|
+
};
|
|
1304
|
+
throw err;
|
|
1385
1305
|
}
|
|
1306
|
+
|
|
1386
1307
|
doc.applyDelta(d, true);
|
|
1387
1308
|
}
|
|
1388
1309
|
}
|
|
@@ -6129,6 +6050,7 @@ TreeBuilder.prototype.startTokenization = function(tokenizer) {
|
|
|
6129
6050
|
this.activeFormattingElements = [];
|
|
6130
6051
|
this.start();
|
|
6131
6052
|
if (this.context) {
|
|
6053
|
+
|
|
6132
6054
|
switch(this.context) {
|
|
6133
6055
|
case 'title':
|
|
6134
6056
|
case 'textarea':
|
|
@@ -6153,6 +6075,13 @@ TreeBuilder.prototype.startTokenization = function(tokenizer) {
|
|
|
6153
6075
|
break;
|
|
6154
6076
|
}
|
|
6155
6077
|
this.insertHtmlElement();
|
|
6078
|
+
|
|
6079
|
+
if (this.context === 'head') {
|
|
6080
|
+
this.insertHeadElement();
|
|
6081
|
+
} else {
|
|
6082
|
+
this.insertBodyElement();
|
|
6083
|
+
}
|
|
6084
|
+
|
|
6156
6085
|
this.resetInsertionMode();
|
|
6157
6086
|
} else {
|
|
6158
6087
|
this.setInsertionMode('initial');
|
|
@@ -6417,13 +6346,13 @@ TreeBuilder.prototype.parseError = function(code, args) {
|
|
|
6417
6346
|
this.errorHandler.error(message, this.tokenizer._inputStream.location(), code);
|
|
6418
6347
|
};
|
|
6419
6348
|
TreeBuilder.prototype.resetInsertionMode = function() {
|
|
6420
|
-
var
|
|
6349
|
+
var fragmentAssigned = false;
|
|
6421
6350
|
var node = null;
|
|
6422
6351
|
for (var i = this.openElements.length - 1; i >= 0; i--) {
|
|
6423
6352
|
node = this.openElements.item(i);
|
|
6424
6353
|
if (i === 0) {
|
|
6425
6354
|
assert.ok(this.context);
|
|
6426
|
-
|
|
6355
|
+
fragmentAssigned = true;
|
|
6427
6356
|
node = new StackItem("http://www.w3.org/1999/xhtml", this.context, [], null);
|
|
6428
6357
|
}
|
|
6429
6358
|
|
|
@@ -6442,7 +6371,7 @@ TreeBuilder.prototype.resetInsertionMode = function() {
|
|
|
6442
6371
|
return this.setInsertionMode('inColumnGroup');
|
|
6443
6372
|
if (node.localName === 'table')
|
|
6444
6373
|
return this.setInsertionMode('inTable');
|
|
6445
|
-
if (node.localName === 'head'
|
|
6374
|
+
if (node.localName === 'head')
|
|
6446
6375
|
return this.setInsertionMode('inHead');
|
|
6447
6376
|
if (node.localName === 'body')
|
|
6448
6377
|
return this.setInsertionMode('inBody');
|
|
@@ -6455,7 +6384,7 @@ TreeBuilder.prototype.resetInsertionMode = function() {
|
|
|
6455
6384
|
return this.setInsertionMode('afterHead');
|
|
6456
6385
|
}
|
|
6457
6386
|
|
|
6458
|
-
if (
|
|
6387
|
+
if (fragmentAssigned)
|
|
6459
6388
|
return this.setInsertionMode('inBody');
|
|
6460
6389
|
}
|
|
6461
6390
|
};
|
|
@@ -6918,7 +6847,10 @@ function SAXParser() {
|
|
|
6918
6847
|
this._scriptingEnabled = false;
|
|
6919
6848
|
}
|
|
6920
6849
|
|
|
6921
|
-
SAXParser.prototype.parse = function(source) {
|
|
6850
|
+
SAXParser.prototype.parse = function(source, context) {
|
|
6851
|
+
if (context) {
|
|
6852
|
+
this._treeBuilder.setFragmentContext(context);
|
|
6853
|
+
}
|
|
6922
6854
|
this._tokenizer.tokenize(source);
|
|
6923
6855
|
var document = this._treeBuilder.document;
|
|
6924
6856
|
if (document) {
|
|
@@ -10910,10 +10842,9 @@ oop.inherits(Worker, Mirror);
|
|
|
10910
10842
|
});
|
|
10911
10843
|
}
|
|
10912
10844
|
};
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
parser.parse(value);
|
|
10845
|
+
|
|
10846
|
+
parser.parse(value, this.context);
|
|
10847
|
+
|
|
10917
10848
|
this.sender.emit("error", errors);
|
|
10918
10849
|
};
|
|
10919
10850
|
|