@openui5/sap.ui.codeeditor 1.120.6 → 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,541 +228,464 @@ 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/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
243
|
+
ace.define("ace/apply_delta",[], function(require, exports, module){"use strict";
|
|
244
|
+
function throwDeltaError(delta, errorText) {
|
|
245
|
+
console.log("Invalid Delta:", delta);
|
|
246
|
+
throw "Invalid Delta: " + errorText;
|
|
247
|
+
}
|
|
248
|
+
function positionInDocument(docLines, position) {
|
|
249
|
+
return position.row >= 0 && position.row < docLines.length &&
|
|
250
|
+
position.column >= 0 && position.column <= docLines[position.row].length;
|
|
251
|
+
}
|
|
252
|
+
function validateDelta(docLines, delta) {
|
|
253
|
+
if (delta.action != "insert" && delta.action != "remove")
|
|
254
|
+
throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
|
|
255
|
+
if (!(delta.lines instanceof Array))
|
|
256
|
+
throwDeltaError(delta, "delta.lines must be an Array");
|
|
257
|
+
if (!delta.start || !delta.end)
|
|
258
|
+
throwDeltaError(delta, "delta.start/end must be an present");
|
|
259
|
+
var start = delta.start;
|
|
260
|
+
if (!positionInDocument(docLines, delta.start))
|
|
261
|
+
throwDeltaError(delta, "delta.start must be contained in document");
|
|
262
|
+
var end = delta.end;
|
|
263
|
+
if (delta.action == "remove" && !positionInDocument(docLines, end))
|
|
264
|
+
throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
|
|
265
|
+
var numRangeRows = end.row - start.row;
|
|
266
|
+
var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
|
|
267
|
+
if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
|
|
268
|
+
throwDeltaError(delta, "delta.range must match delta lines");
|
|
269
|
+
}
|
|
270
|
+
exports.applyDelta = function (docLines, delta, doNotValidate) {
|
|
271
|
+
var row = delta.start.row;
|
|
272
|
+
var startColumn = delta.start.column;
|
|
273
|
+
var line = docLines[row] || "";
|
|
274
|
+
switch (delta.action) {
|
|
275
|
+
case "insert":
|
|
276
|
+
var lines = delta.lines;
|
|
277
|
+
if (lines.length === 1) {
|
|
278
|
+
docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
var args = [row, 1].concat(delta.lines);
|
|
282
|
+
docLines.splice.apply(docLines, args);
|
|
283
|
+
docLines[row] = line.substring(0, startColumn) + docLines[row];
|
|
284
|
+
docLines[row + delta.lines.length - 1] += line.substring(startColumn);
|
|
285
|
+
}
|
|
286
|
+
break;
|
|
287
|
+
case "remove":
|
|
288
|
+
var endColumn = delta.end.column;
|
|
289
|
+
var endRow = delta.end.row;
|
|
290
|
+
if (row === endRow) {
|
|
291
|
+
docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn));
|
|
295
|
+
}
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
251
298
|
};
|
|
252
|
-
var Range = function(startRow, startColumn, endRow, endColumn) {
|
|
253
|
-
this.start = {
|
|
254
|
-
row: startRow,
|
|
255
|
-
column: startColumn
|
|
256
|
-
};
|
|
257
299
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
ace.define("ace/lib/event_emitter",[], function(require, exports, module){"use strict";
|
|
303
|
+
var EventEmitter = {};
|
|
304
|
+
var stopPropagation = function () { this.propagationStopped = true; };
|
|
305
|
+
var preventDefault = function () { this.defaultPrevented = true; };
|
|
306
|
+
EventEmitter._emit =
|
|
307
|
+
EventEmitter._dispatchEvent = function (eventName, e) {
|
|
308
|
+
this._eventRegistry || (this._eventRegistry = {});
|
|
309
|
+
this._defaultHandlers || (this._defaultHandlers = {});
|
|
310
|
+
var listeners = this._eventRegistry[eventName] || [];
|
|
311
|
+
var defaultHandler = this._defaultHandlers[eventName];
|
|
312
|
+
if (!listeners.length && !defaultHandler)
|
|
313
|
+
return;
|
|
314
|
+
if (typeof e != "object" || !e)
|
|
315
|
+
e = {};
|
|
316
|
+
if (!e.type)
|
|
317
|
+
e.type = eventName;
|
|
318
|
+
if (!e.stopPropagation)
|
|
319
|
+
e.stopPropagation = stopPropagation;
|
|
320
|
+
if (!e.preventDefault)
|
|
321
|
+
e.preventDefault = preventDefault;
|
|
322
|
+
listeners = listeners.slice();
|
|
323
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
324
|
+
listeners[i](e, this);
|
|
325
|
+
if (e.propagationStopped)
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
if (defaultHandler && !e.defaultPrevented)
|
|
329
|
+
return defaultHandler(e, this);
|
|
261
330
|
};
|
|
331
|
+
EventEmitter._signal = function (eventName, e) {
|
|
332
|
+
var listeners = (this._eventRegistry || {})[eventName];
|
|
333
|
+
if (!listeners)
|
|
334
|
+
return;
|
|
335
|
+
listeners = listeners.slice();
|
|
336
|
+
for (var i = 0; i < listeners.length; i++)
|
|
337
|
+
listeners[i](e, this);
|
|
338
|
+
};
|
|
339
|
+
EventEmitter.once = function (eventName, callback) {
|
|
340
|
+
var _self = this;
|
|
341
|
+
this.on(eventName, function newCallback() {
|
|
342
|
+
_self.off(eventName, newCallback);
|
|
343
|
+
callback.apply(null, arguments);
|
|
344
|
+
});
|
|
345
|
+
if (!callback) {
|
|
346
|
+
return new Promise(function (resolve) {
|
|
347
|
+
callback = resolve;
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
EventEmitter.setDefaultHandler = function (eventName, callback) {
|
|
352
|
+
var handlers = this._defaultHandlers;
|
|
353
|
+
if (!handlers)
|
|
354
|
+
handlers = this._defaultHandlers = { _disabled_: {} };
|
|
355
|
+
if (handlers[eventName]) {
|
|
356
|
+
var old = handlers[eventName];
|
|
357
|
+
var disabled = handlers._disabled_[eventName];
|
|
358
|
+
if (!disabled)
|
|
359
|
+
handlers._disabled_[eventName] = disabled = [];
|
|
360
|
+
disabled.push(old);
|
|
361
|
+
var i = disabled.indexOf(callback);
|
|
362
|
+
if (i != -1)
|
|
363
|
+
disabled.splice(i, 1);
|
|
364
|
+
}
|
|
365
|
+
handlers[eventName] = callback;
|
|
366
|
+
};
|
|
367
|
+
EventEmitter.removeDefaultHandler = function (eventName, callback) {
|
|
368
|
+
var handlers = this._defaultHandlers;
|
|
369
|
+
if (!handlers)
|
|
370
|
+
return;
|
|
371
|
+
var disabled = handlers._disabled_[eventName];
|
|
372
|
+
if (handlers[eventName] == callback) {
|
|
373
|
+
if (disabled)
|
|
374
|
+
this.setDefaultHandler(eventName, disabled.pop());
|
|
375
|
+
}
|
|
376
|
+
else if (disabled) {
|
|
377
|
+
var i = disabled.indexOf(callback);
|
|
378
|
+
if (i != -1)
|
|
379
|
+
disabled.splice(i, 1);
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
EventEmitter.on =
|
|
383
|
+
EventEmitter.addEventListener = function (eventName, callback, capturing) {
|
|
384
|
+
this._eventRegistry = this._eventRegistry || {};
|
|
385
|
+
var listeners = this._eventRegistry[eventName];
|
|
386
|
+
if (!listeners)
|
|
387
|
+
listeners = this._eventRegistry[eventName] = [];
|
|
388
|
+
if (listeners.indexOf(callback) == -1)
|
|
389
|
+
listeners[capturing ? "unshift" : "push"](callback);
|
|
390
|
+
return callback;
|
|
391
|
+
};
|
|
392
|
+
EventEmitter.off =
|
|
393
|
+
EventEmitter.removeListener =
|
|
394
|
+
EventEmitter.removeEventListener = function (eventName, callback) {
|
|
395
|
+
this._eventRegistry = this._eventRegistry || {};
|
|
396
|
+
var listeners = this._eventRegistry[eventName];
|
|
397
|
+
if (!listeners)
|
|
398
|
+
return;
|
|
399
|
+
var index = listeners.indexOf(callback);
|
|
400
|
+
if (index !== -1)
|
|
401
|
+
listeners.splice(index, 1);
|
|
402
|
+
};
|
|
403
|
+
EventEmitter.removeAllListeners = function (eventName) {
|
|
404
|
+
if (!eventName)
|
|
405
|
+
this._eventRegistry = this._defaultHandlers = undefined;
|
|
406
|
+
if (this._eventRegistry)
|
|
407
|
+
this._eventRegistry[eventName] = undefined;
|
|
408
|
+
if (this._defaultHandlers)
|
|
409
|
+
this._defaultHandlers[eventName] = undefined;
|
|
262
410
|
};
|
|
411
|
+
exports.EventEmitter = EventEmitter;
|
|
263
412
|
|
|
264
|
-
|
|
265
|
-
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
ace.define("ace/range",[], function(require, exports, module){"use strict";
|
|
416
|
+
var comparePoints = function (p1, p2) {
|
|
417
|
+
return p1.row - p2.row || p1.column - p2.column;
|
|
418
|
+
};
|
|
419
|
+
var Range = /** @class */ (function () {
|
|
420
|
+
function Range(startRow, startColumn, endRow, endColumn) {
|
|
421
|
+
this.start = {
|
|
422
|
+
row: startRow,
|
|
423
|
+
column: startColumn
|
|
424
|
+
};
|
|
425
|
+
this.end = {
|
|
426
|
+
row: endRow,
|
|
427
|
+
column: endColumn
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
Range.prototype.isEqual = function (range) {
|
|
266
431
|
return this.start.row === range.start.row &&
|
|
267
432
|
this.end.row === range.end.row &&
|
|
268
433
|
this.start.column === range.start.column &&
|
|
269
434
|
this.end.column === range.end.column;
|
|
270
435
|
};
|
|
271
|
-
|
|
436
|
+
Range.prototype.toString = function () {
|
|
272
437
|
return ("Range: [" + this.start.row + "/" + this.start.column +
|
|
273
438
|
"] -> [" + this.end.row + "/" + this.end.column + "]");
|
|
274
439
|
};
|
|
275
|
-
|
|
276
|
-
this.contains = function(row, column) {
|
|
440
|
+
Range.prototype.contains = function (row, column) {
|
|
277
441
|
return this.compare(row, column) == 0;
|
|
278
442
|
};
|
|
279
|
-
|
|
280
|
-
var cmp,
|
|
281
|
-
end = range.end,
|
|
282
|
-
start = range.start;
|
|
283
|
-
|
|
443
|
+
Range.prototype.compareRange = function (range) {
|
|
444
|
+
var cmp, end = range.end, start = range.start;
|
|
284
445
|
cmp = this.compare(end.row, end.column);
|
|
285
446
|
if (cmp == 1) {
|
|
286
447
|
cmp = this.compare(start.row, start.column);
|
|
287
448
|
if (cmp == 1) {
|
|
288
449
|
return 2;
|
|
289
|
-
}
|
|
450
|
+
}
|
|
451
|
+
else if (cmp == 0) {
|
|
290
452
|
return 1;
|
|
291
|
-
}
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
292
455
|
return 0;
|
|
293
456
|
}
|
|
294
|
-
}
|
|
457
|
+
}
|
|
458
|
+
else if (cmp == -1) {
|
|
295
459
|
return -2;
|
|
296
|
-
}
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
297
462
|
cmp = this.compare(start.row, start.column);
|
|
298
463
|
if (cmp == -1) {
|
|
299
464
|
return -1;
|
|
300
|
-
}
|
|
465
|
+
}
|
|
466
|
+
else if (cmp == 1) {
|
|
301
467
|
return 42;
|
|
302
|
-
}
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
303
470
|
return 0;
|
|
304
471
|
}
|
|
305
472
|
}
|
|
306
473
|
};
|
|
307
|
-
|
|
474
|
+
Range.prototype.comparePoint = function (p) {
|
|
308
475
|
return this.compare(p.row, p.column);
|
|
309
476
|
};
|
|
310
|
-
|
|
477
|
+
Range.prototype.containsRange = function (range) {
|
|
311
478
|
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
|
312
479
|
};
|
|
313
|
-
|
|
480
|
+
Range.prototype.intersects = function (range) {
|
|
314
481
|
var cmp = this.compareRange(range);
|
|
315
482
|
return (cmp == -1 || cmp == 0 || cmp == 1);
|
|
316
483
|
};
|
|
317
|
-
|
|
484
|
+
Range.prototype.isEnd = function (row, column) {
|
|
318
485
|
return this.end.row == row && this.end.column == column;
|
|
319
486
|
};
|
|
320
|
-
|
|
487
|
+
Range.prototype.isStart = function (row, column) {
|
|
321
488
|
return this.start.row == row && this.start.column == column;
|
|
322
489
|
};
|
|
323
|
-
|
|
490
|
+
Range.prototype.setStart = function (row, column) {
|
|
324
491
|
if (typeof row == "object") {
|
|
325
492
|
this.start.column = row.column;
|
|
326
493
|
this.start.row = row.row;
|
|
327
|
-
}
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
328
496
|
this.start.row = row;
|
|
329
497
|
this.start.column = column;
|
|
330
498
|
}
|
|
331
499
|
};
|
|
332
|
-
|
|
500
|
+
Range.prototype.setEnd = function (row, column) {
|
|
333
501
|
if (typeof row == "object") {
|
|
334
502
|
this.end.column = row.column;
|
|
335
503
|
this.end.row = row.row;
|
|
336
|
-
}
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
337
506
|
this.end.row = row;
|
|
338
507
|
this.end.column = column;
|
|
339
508
|
}
|
|
340
509
|
};
|
|
341
|
-
|
|
510
|
+
Range.prototype.inside = function (row, column) {
|
|
342
511
|
if (this.compare(row, column) == 0) {
|
|
343
512
|
if (this.isEnd(row, column) || this.isStart(row, column)) {
|
|
344
513
|
return false;
|
|
345
|
-
}
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
346
516
|
return true;
|
|
347
517
|
}
|
|
348
518
|
}
|
|
349
519
|
return false;
|
|
350
520
|
};
|
|
351
|
-
|
|
521
|
+
Range.prototype.insideStart = function (row, column) {
|
|
352
522
|
if (this.compare(row, column) == 0) {
|
|
353
523
|
if (this.isEnd(row, column)) {
|
|
354
524
|
return false;
|
|
355
|
-
}
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
356
527
|
return true;
|
|
357
528
|
}
|
|
358
529
|
}
|
|
359
530
|
return false;
|
|
360
531
|
};
|
|
361
|
-
|
|
532
|
+
Range.prototype.insideEnd = function (row, column) {
|
|
362
533
|
if (this.compare(row, column) == 0) {
|
|
363
534
|
if (this.isStart(row, column)) {
|
|
364
535
|
return false;
|
|
365
|
-
}
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
366
538
|
return true;
|
|
367
539
|
}
|
|
368
540
|
}
|
|
369
541
|
return false;
|
|
370
542
|
};
|
|
371
|
-
|
|
543
|
+
Range.prototype.compare = function (row, column) {
|
|
372
544
|
if (!this.isMultiLine()) {
|
|
373
545
|
if (row === this.start.row) {
|
|
374
546
|
return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
|
|
375
547
|
}
|
|
376
548
|
}
|
|
377
|
-
|
|
378
549
|
if (row < this.start.row)
|
|
379
550
|
return -1;
|
|
380
|
-
|
|
381
551
|
if (row > this.end.row)
|
|
382
552
|
return 1;
|
|
383
|
-
|
|
384
553
|
if (this.start.row === row)
|
|
385
554
|
return column >= this.start.column ? 0 : -1;
|
|
386
|
-
|
|
387
555
|
if (this.end.row === row)
|
|
388
556
|
return column <= this.end.column ? 0 : 1;
|
|
389
|
-
|
|
390
557
|
return 0;
|
|
391
558
|
};
|
|
392
|
-
|
|
559
|
+
Range.prototype.compareStart = function (row, column) {
|
|
393
560
|
if (this.start.row == row && this.start.column == column) {
|
|
394
561
|
return -1;
|
|
395
|
-
}
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
396
564
|
return this.compare(row, column);
|
|
397
565
|
}
|
|
398
566
|
};
|
|
399
|
-
|
|
567
|
+
Range.prototype.compareEnd = function (row, column) {
|
|
400
568
|
if (this.end.row == row && this.end.column == column) {
|
|
401
569
|
return 1;
|
|
402
|
-
}
|
|
570
|
+
}
|
|
571
|
+
else {
|
|
403
572
|
return this.compare(row, column);
|
|
404
573
|
}
|
|
405
574
|
};
|
|
406
|
-
|
|
575
|
+
Range.prototype.compareInside = function (row, column) {
|
|
407
576
|
if (this.end.row == row && this.end.column == column) {
|
|
408
577
|
return 1;
|
|
409
|
-
}
|
|
578
|
+
}
|
|
579
|
+
else if (this.start.row == row && this.start.column == column) {
|
|
410
580
|
return -1;
|
|
411
|
-
}
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
412
583
|
return this.compare(row, column);
|
|
413
584
|
}
|
|
414
585
|
};
|
|
415
|
-
|
|
586
|
+
Range.prototype.clipRows = function (firstRow, lastRow) {
|
|
416
587
|
if (this.end.row > lastRow)
|
|
417
|
-
var end = {row: lastRow + 1, column: 0};
|
|
588
|
+
var end = { row: lastRow + 1, column: 0 };
|
|
418
589
|
else if (this.end.row < firstRow)
|
|
419
|
-
var end = {row: firstRow, column: 0};
|
|
420
|
-
|
|
590
|
+
var end = { row: firstRow, column: 0 };
|
|
421
591
|
if (this.start.row > lastRow)
|
|
422
|
-
var start = {row: lastRow + 1, column: 0};
|
|
592
|
+
var start = { row: lastRow + 1, column: 0 };
|
|
423
593
|
else if (this.start.row < firstRow)
|
|
424
|
-
var start = {row: firstRow, column: 0};
|
|
425
|
-
|
|
594
|
+
var start = { row: firstRow, column: 0 };
|
|
426
595
|
return Range.fromPoints(start || this.start, end || this.end);
|
|
427
596
|
};
|
|
428
|
-
|
|
597
|
+
Range.prototype.extend = function (row, column) {
|
|
429
598
|
var cmp = this.compare(row, column);
|
|
430
|
-
|
|
431
599
|
if (cmp == 0)
|
|
432
600
|
return this;
|
|
433
601
|
else if (cmp == -1)
|
|
434
|
-
var start = {row: row, column: column};
|
|
602
|
+
var start = { row: row, column: column };
|
|
435
603
|
else
|
|
436
|
-
var end = {row: row, column: column};
|
|
437
|
-
|
|
604
|
+
var end = { row: row, column: column };
|
|
438
605
|
return Range.fromPoints(start || this.start, end || this.end);
|
|
439
606
|
};
|
|
440
|
-
|
|
441
|
-
this.isEmpty = function() {
|
|
607
|
+
Range.prototype.isEmpty = function () {
|
|
442
608
|
return (this.start.row === this.end.row && this.start.column === this.end.column);
|
|
443
609
|
};
|
|
444
|
-
|
|
610
|
+
Range.prototype.isMultiLine = function () {
|
|
445
611
|
return (this.start.row !== this.end.row);
|
|
446
612
|
};
|
|
447
|
-
|
|
613
|
+
Range.prototype.clone = function () {
|
|
448
614
|
return Range.fromPoints(this.start, this.end);
|
|
449
615
|
};
|
|
450
|
-
|
|
616
|
+
Range.prototype.collapseRows = function () {
|
|
451
617
|
if (this.end.column == 0)
|
|
452
|
-
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
|
|
618
|
+
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
|
|
453
619
|
else
|
|
454
620
|
return new Range(this.start.row, 0, this.end.row, 0);
|
|
455
621
|
};
|
|
456
|
-
|
|
622
|
+
Range.prototype.toScreenRange = function (session) {
|
|
457
623
|
var screenPosStart = session.documentToScreenPosition(this.start);
|
|
458
624
|
var screenPosEnd = session.documentToScreenPosition(this.end);
|
|
459
|
-
|
|
460
|
-
return new Range(
|
|
461
|
-
screenPosStart.row, screenPosStart.column,
|
|
462
|
-
screenPosEnd.row, screenPosEnd.column
|
|
463
|
-
);
|
|
625
|
+
return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
|
|
464
626
|
};
|
|
465
|
-
|
|
627
|
+
Range.prototype.moveBy = function (row, column) {
|
|
466
628
|
this.start.row += row;
|
|
467
629
|
this.start.column += column;
|
|
468
630
|
this.end.row += row;
|
|
469
631
|
this.end.column += column;
|
|
470
632
|
};
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
Range.fromPoints = function(start, end) {
|
|
633
|
+
return Range;
|
|
634
|
+
}());
|
|
635
|
+
Range.fromPoints = function (start, end) {
|
|
474
636
|
return new Range(start.row, start.column, end.row, end.column);
|
|
475
637
|
};
|
|
476
638
|
Range.comparePoints = comparePoints;
|
|
477
|
-
|
|
478
|
-
Range.comparePoints = function(p1, p2) {
|
|
639
|
+
Range.comparePoints = function (p1, p2) {
|
|
479
640
|
return p1.row - p2.row || p1.column - p2.column;
|
|
480
641
|
};
|
|
481
|
-
|
|
482
|
-
|
|
483
642
|
exports.Range = Range;
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
ace.define("ace/apply_delta",[], function(require, exports, module) {
|
|
487
|
-
"use strict";
|
|
488
|
-
|
|
489
|
-
function throwDeltaError(delta, errorText){
|
|
490
|
-
console.log("Invalid Delta:", delta);
|
|
491
|
-
throw "Invalid Delta: " + errorText;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
function positionInDocument(docLines, position) {
|
|
495
|
-
return position.row >= 0 && position.row < docLines.length &&
|
|
496
|
-
position.column >= 0 && position.column <= docLines[position.row].length;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
function validateDelta(docLines, delta) {
|
|
500
|
-
if (delta.action != "insert" && delta.action != "remove")
|
|
501
|
-
throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
|
|
502
|
-
if (!(delta.lines instanceof Array))
|
|
503
|
-
throwDeltaError(delta, "delta.lines must be an Array");
|
|
504
|
-
if (!delta.start || !delta.end)
|
|
505
|
-
throwDeltaError(delta, "delta.start/end must be an present");
|
|
506
|
-
var start = delta.start;
|
|
507
|
-
if (!positionInDocument(docLines, delta.start))
|
|
508
|
-
throwDeltaError(delta, "delta.start must be contained in document");
|
|
509
|
-
var end = delta.end;
|
|
510
|
-
if (delta.action == "remove" && !positionInDocument(docLines, end))
|
|
511
|
-
throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
|
|
512
|
-
var numRangeRows = end.row - start.row;
|
|
513
|
-
var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
|
|
514
|
-
if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
|
|
515
|
-
throwDeltaError(delta, "delta.range must match delta lines");
|
|
516
|
-
}
|
|
517
643
|
|
|
518
|
-
exports.applyDelta = function(docLines, delta, doNotValidate) {
|
|
519
|
-
|
|
520
|
-
var row = delta.start.row;
|
|
521
|
-
var startColumn = delta.start.column;
|
|
522
|
-
var line = docLines[row] || "";
|
|
523
|
-
switch (delta.action) {
|
|
524
|
-
case "insert":
|
|
525
|
-
var lines = delta.lines;
|
|
526
|
-
if (lines.length === 1) {
|
|
527
|
-
docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
|
|
528
|
-
} else {
|
|
529
|
-
var args = [row, 1].concat(delta.lines);
|
|
530
|
-
docLines.splice.apply(docLines, args);
|
|
531
|
-
docLines[row] = line.substring(0, startColumn) + docLines[row];
|
|
532
|
-
docLines[row + delta.lines.length - 1] += line.substring(startColumn);
|
|
533
|
-
}
|
|
534
|
-
break;
|
|
535
|
-
case "remove":
|
|
536
|
-
var endColumn = delta.end.column;
|
|
537
|
-
var endRow = delta.end.row;
|
|
538
|
-
if (row === endRow) {
|
|
539
|
-
docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
|
|
540
|
-
} else {
|
|
541
|
-
docLines.splice(
|
|
542
|
-
row, endRow - row + 1,
|
|
543
|
-
line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
break;
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
644
|
});
|
|
550
645
|
|
|
551
|
-
ace.define("ace/
|
|
552
|
-
"use strict";
|
|
553
|
-
|
|
554
|
-
var EventEmitter = {};
|
|
555
|
-
var stopPropagation = function() { this.propagationStopped = true; };
|
|
556
|
-
var preventDefault = function() { this.defaultPrevented = true; };
|
|
557
|
-
|
|
558
|
-
EventEmitter._emit =
|
|
559
|
-
EventEmitter._dispatchEvent = function(eventName, e) {
|
|
560
|
-
this._eventRegistry || (this._eventRegistry = {});
|
|
561
|
-
this._defaultHandlers || (this._defaultHandlers = {});
|
|
562
|
-
|
|
563
|
-
var listeners = this._eventRegistry[eventName] || [];
|
|
564
|
-
var defaultHandler = this._defaultHandlers[eventName];
|
|
565
|
-
if (!listeners.length && !defaultHandler)
|
|
566
|
-
return;
|
|
567
|
-
|
|
568
|
-
if (typeof e != "object" || !e)
|
|
569
|
-
e = {};
|
|
570
|
-
|
|
571
|
-
if (!e.type)
|
|
572
|
-
e.type = eventName;
|
|
573
|
-
if (!e.stopPropagation)
|
|
574
|
-
e.stopPropagation = stopPropagation;
|
|
575
|
-
if (!e.preventDefault)
|
|
576
|
-
e.preventDefault = preventDefault;
|
|
577
|
-
|
|
578
|
-
listeners = listeners.slice();
|
|
579
|
-
for (var i=0; i<listeners.length; i++) {
|
|
580
|
-
listeners[i](e, this);
|
|
581
|
-
if (e.propagationStopped)
|
|
582
|
-
break;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
if (defaultHandler && !e.defaultPrevented)
|
|
586
|
-
return defaultHandler(e, this);
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
EventEmitter._signal = function(eventName, e) {
|
|
591
|
-
var listeners = (this._eventRegistry || {})[eventName];
|
|
592
|
-
if (!listeners)
|
|
593
|
-
return;
|
|
594
|
-
listeners = listeners.slice();
|
|
595
|
-
for (var i=0; i<listeners.length; i++)
|
|
596
|
-
listeners[i](e, this);
|
|
597
|
-
};
|
|
598
|
-
|
|
599
|
-
EventEmitter.once = function(eventName, callback) {
|
|
600
|
-
var _self = this;
|
|
601
|
-
this.on(eventName, function newCallback() {
|
|
602
|
-
_self.off(eventName, newCallback);
|
|
603
|
-
callback.apply(null, arguments);
|
|
604
|
-
});
|
|
605
|
-
if (!callback) {
|
|
606
|
-
return new Promise(function(resolve) {
|
|
607
|
-
callback = resolve;
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
EventEmitter.setDefaultHandler = function(eventName, callback) {
|
|
614
|
-
var handlers = this._defaultHandlers;
|
|
615
|
-
if (!handlers)
|
|
616
|
-
handlers = this._defaultHandlers = {_disabled_: {}};
|
|
617
|
-
|
|
618
|
-
if (handlers[eventName]) {
|
|
619
|
-
var old = handlers[eventName];
|
|
620
|
-
var disabled = handlers._disabled_[eventName];
|
|
621
|
-
if (!disabled)
|
|
622
|
-
handlers._disabled_[eventName] = disabled = [];
|
|
623
|
-
disabled.push(old);
|
|
624
|
-
var i = disabled.indexOf(callback);
|
|
625
|
-
if (i != -1)
|
|
626
|
-
disabled.splice(i, 1);
|
|
627
|
-
}
|
|
628
|
-
handlers[eventName] = callback;
|
|
629
|
-
};
|
|
630
|
-
EventEmitter.removeDefaultHandler = function(eventName, callback) {
|
|
631
|
-
var handlers = this._defaultHandlers;
|
|
632
|
-
if (!handlers)
|
|
633
|
-
return;
|
|
634
|
-
var disabled = handlers._disabled_[eventName];
|
|
635
|
-
|
|
636
|
-
if (handlers[eventName] == callback) {
|
|
637
|
-
if (disabled)
|
|
638
|
-
this.setDefaultHandler(eventName, disabled.pop());
|
|
639
|
-
} else if (disabled) {
|
|
640
|
-
var i = disabled.indexOf(callback);
|
|
641
|
-
if (i != -1)
|
|
642
|
-
disabled.splice(i, 1);
|
|
643
|
-
}
|
|
644
|
-
};
|
|
645
|
-
|
|
646
|
-
EventEmitter.on =
|
|
647
|
-
EventEmitter.addEventListener = function(eventName, callback, capturing) {
|
|
648
|
-
this._eventRegistry = this._eventRegistry || {};
|
|
649
|
-
|
|
650
|
-
var listeners = this._eventRegistry[eventName];
|
|
651
|
-
if (!listeners)
|
|
652
|
-
listeners = this._eventRegistry[eventName] = [];
|
|
653
|
-
|
|
654
|
-
if (listeners.indexOf(callback) == -1)
|
|
655
|
-
listeners[capturing ? "unshift" : "push"](callback);
|
|
656
|
-
return callback;
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
EventEmitter.off =
|
|
660
|
-
EventEmitter.removeListener =
|
|
661
|
-
EventEmitter.removeEventListener = function(eventName, callback) {
|
|
662
|
-
this._eventRegistry = this._eventRegistry || {};
|
|
663
|
-
|
|
664
|
-
var listeners = this._eventRegistry[eventName];
|
|
665
|
-
if (!listeners)
|
|
666
|
-
return;
|
|
667
|
-
|
|
668
|
-
var index = listeners.indexOf(callback);
|
|
669
|
-
if (index !== -1)
|
|
670
|
-
listeners.splice(index, 1);
|
|
671
|
-
};
|
|
672
|
-
|
|
673
|
-
EventEmitter.removeAllListeners = function(eventName) {
|
|
674
|
-
if (!eventName) this._eventRegistry = this._defaultHandlers = undefined;
|
|
675
|
-
if (this._eventRegistry) this._eventRegistry[eventName] = undefined;
|
|
676
|
-
if (this._defaultHandlers) this._defaultHandlers[eventName] = undefined;
|
|
677
|
-
};
|
|
678
|
-
|
|
679
|
-
exports.EventEmitter = EventEmitter;
|
|
680
|
-
|
|
681
|
-
});
|
|
682
|
-
|
|
683
|
-
ace.define("ace/anchor",[], function(require, exports, module) {
|
|
684
|
-
"use strict";
|
|
685
|
-
|
|
646
|
+
ace.define("ace/anchor",[], function(require, exports, module){"use strict";
|
|
686
647
|
var oop = require("./lib/oop");
|
|
687
648
|
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
(function() {
|
|
700
|
-
|
|
701
|
-
oop.implement(this, EventEmitter);
|
|
702
|
-
this.getPosition = function() {
|
|
649
|
+
var Anchor = /** @class */ (function () {
|
|
650
|
+
function Anchor(doc, row, column) {
|
|
651
|
+
this.$onChange = this.onChange.bind(this);
|
|
652
|
+
this.attach(doc);
|
|
653
|
+
if (typeof column == "undefined")
|
|
654
|
+
this.setPosition(row.row, row.column);
|
|
655
|
+
else
|
|
656
|
+
this.setPosition(row, column);
|
|
657
|
+
}
|
|
658
|
+
Anchor.prototype.getPosition = function () {
|
|
703
659
|
return this.$clipPositionToDocument(this.row, this.column);
|
|
704
660
|
};
|
|
705
|
-
|
|
661
|
+
Anchor.prototype.getDocument = function () {
|
|
706
662
|
return this.document;
|
|
707
663
|
};
|
|
708
|
-
|
|
709
|
-
this.onChange = function(delta) {
|
|
664
|
+
Anchor.prototype.onChange = function (delta) {
|
|
710
665
|
if (delta.start.row == delta.end.row && delta.start.row != this.row)
|
|
711
666
|
return;
|
|
712
|
-
|
|
713
667
|
if (delta.start.row > this.row)
|
|
714
668
|
return;
|
|
715
|
-
|
|
716
|
-
var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
|
|
669
|
+
var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
|
|
717
670
|
this.setPosition(point.row, point.column, true);
|
|
718
671
|
};
|
|
719
|
-
|
|
720
|
-
function $pointsInOrder(point1, point2, equalPointsInOrder) {
|
|
721
|
-
var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
|
|
722
|
-
return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
function $getTransformedPoint(delta, point, moveIfEqual) {
|
|
726
|
-
var deltaIsInsert = delta.action == "insert";
|
|
727
|
-
var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
|
|
728
|
-
var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
|
|
729
|
-
var deltaStart = delta.start;
|
|
730
|
-
var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
|
|
731
|
-
if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
|
|
732
|
-
return {
|
|
733
|
-
row: point.row,
|
|
734
|
-
column: point.column
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
|
|
738
|
-
return {
|
|
739
|
-
row: point.row + deltaRowShift,
|
|
740
|
-
column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
|
|
741
|
-
};
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
return {
|
|
745
|
-
row: deltaStart.row,
|
|
746
|
-
column: deltaStart.column
|
|
747
|
-
};
|
|
748
|
-
}
|
|
749
|
-
this.setPosition = function(row, column, noClip) {
|
|
672
|
+
Anchor.prototype.setPosition = function (row, column, noClip) {
|
|
750
673
|
var pos;
|
|
751
674
|
if (noClip) {
|
|
752
675
|
pos = {
|
|
753
676
|
row: row,
|
|
754
677
|
column: column
|
|
755
678
|
};
|
|
756
|
-
}
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
757
681
|
pos = this.$clipPositionToDocument(row, column);
|
|
758
682
|
}
|
|
759
|
-
|
|
760
683
|
if (this.row == pos.row && this.column == pos.column)
|
|
761
684
|
return;
|
|
762
|
-
|
|
763
685
|
var old = {
|
|
764
686
|
row: this.row,
|
|
765
687
|
column: this.column
|
|
766
688
|
};
|
|
767
|
-
|
|
768
689
|
this.row = pos.row;
|
|
769
690
|
this.column = pos.column;
|
|
770
691
|
this._signal("change", {
|
|
@@ -772,16 +693,15 @@ var Anchor = exports.Anchor = function(doc, row, column) {
|
|
|
772
693
|
value: pos
|
|
773
694
|
});
|
|
774
695
|
};
|
|
775
|
-
|
|
696
|
+
Anchor.prototype.detach = function () {
|
|
776
697
|
this.document.off("change", this.$onChange);
|
|
777
698
|
};
|
|
778
|
-
|
|
699
|
+
Anchor.prototype.attach = function (doc) {
|
|
779
700
|
this.document = doc || this.document;
|
|
780
701
|
this.document.on("change", this.$onChange);
|
|
781
702
|
};
|
|
782
|
-
|
|
703
|
+
Anchor.prototype.$clipPositionToDocument = function (row, column) {
|
|
783
704
|
var pos = {};
|
|
784
|
-
|
|
785
705
|
if (row >= this.document.getLength()) {
|
|
786
706
|
pos.row = Math.max(0, this.document.getLength() - 1);
|
|
787
707
|
pos.column = this.document.getLine(pos.row).length;
|
|
@@ -794,113 +714,123 @@ var Anchor = exports.Anchor = function(doc, row, column) {
|
|
|
794
714
|
pos.row = row;
|
|
795
715
|
pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
|
|
796
716
|
}
|
|
797
|
-
|
|
798
717
|
if (column < 0)
|
|
799
718
|
pos.column = 0;
|
|
800
|
-
|
|
801
719
|
return pos;
|
|
802
720
|
};
|
|
803
|
-
|
|
804
|
-
}
|
|
721
|
+
return Anchor;
|
|
722
|
+
}());
|
|
723
|
+
Anchor.prototype.$insertRight = false;
|
|
724
|
+
oop.implement(Anchor.prototype, EventEmitter);
|
|
725
|
+
function $pointsInOrder(point1, point2, equalPointsInOrder) {
|
|
726
|
+
var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
|
|
727
|
+
return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
|
|
728
|
+
}
|
|
729
|
+
function $getTransformedPoint(delta, point, moveIfEqual) {
|
|
730
|
+
var deltaIsInsert = delta.action == "insert";
|
|
731
|
+
var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
|
|
732
|
+
var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
|
|
733
|
+
var deltaStart = delta.start;
|
|
734
|
+
var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
|
|
735
|
+
if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
|
|
736
|
+
return {
|
|
737
|
+
row: point.row,
|
|
738
|
+
column: point.column
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
|
|
742
|
+
return {
|
|
743
|
+
row: point.row + deltaRowShift,
|
|
744
|
+
column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
return {
|
|
748
|
+
row: deltaStart.row,
|
|
749
|
+
column: deltaStart.column
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
exports.Anchor = Anchor;
|
|
805
753
|
|
|
806
754
|
});
|
|
807
755
|
|
|
808
|
-
ace.define("ace/document",[], function(require, exports, module)
|
|
809
|
-
"use strict";
|
|
810
|
-
|
|
756
|
+
ace.define("ace/document",[], function(require, exports, module){"use strict";
|
|
811
757
|
var oop = require("./lib/oop");
|
|
812
758
|
var applyDelta = require("./apply_delta").applyDelta;
|
|
813
759
|
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
|
814
760
|
var Range = require("./range").Range;
|
|
815
761
|
var Anchor = require("./anchor").Anchor;
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
this.$lines = [""];
|
|
819
|
-
if (textOrLines.length === 0) {
|
|
762
|
+
var Document = /** @class */ (function () {
|
|
763
|
+
function Document(textOrLines) {
|
|
820
764
|
this.$lines = [""];
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
765
|
+
if (textOrLines.length === 0) {
|
|
766
|
+
this.$lines = [""];
|
|
767
|
+
}
|
|
768
|
+
else if (Array.isArray(textOrLines)) {
|
|
769
|
+
this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
this.insert({ row: 0, column: 0 }, textOrLines);
|
|
773
|
+
}
|
|
825
774
|
}
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
(function() {
|
|
829
|
-
|
|
830
|
-
oop.implement(this, EventEmitter);
|
|
831
|
-
this.setValue = function(text) {
|
|
775
|
+
Document.prototype.setValue = function (text) {
|
|
832
776
|
var len = this.getLength() - 1;
|
|
833
777
|
this.remove(new Range(0, 0, len, this.getLine(len).length));
|
|
834
|
-
this.insert({row: 0, column: 0}, text);
|
|
778
|
+
this.insert({ row: 0, column: 0 }, text || "");
|
|
835
779
|
};
|
|
836
|
-
|
|
780
|
+
Document.prototype.getValue = function () {
|
|
837
781
|
return this.getAllLines().join(this.getNewLineCharacter());
|
|
838
782
|
};
|
|
839
|
-
|
|
783
|
+
Document.prototype.createAnchor = function (row, column) {
|
|
840
784
|
return new Anchor(this, row, column);
|
|
841
785
|
};
|
|
842
|
-
|
|
843
|
-
this.$split = function(text) {
|
|
844
|
-
return text.replace(/\r\n|\r/g, "\n").split("\n");
|
|
845
|
-
};
|
|
846
|
-
} else {
|
|
847
|
-
this.$split = function(text) {
|
|
848
|
-
return text.split(/\r\n|\r|\n/);
|
|
849
|
-
};
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
this.$detectNewLine = function(text) {
|
|
786
|
+
Document.prototype.$detectNewLine = function (text) {
|
|
854
787
|
var match = text.match(/^.*?(\r\n|\r|\n)/m);
|
|
855
788
|
this.$autoNewLine = match ? match[1] : "\n";
|
|
856
789
|
this._signal("changeNewLineMode");
|
|
857
790
|
};
|
|
858
|
-
|
|
791
|
+
Document.prototype.getNewLineCharacter = function () {
|
|
859
792
|
switch (this.$newLineMode) {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
793
|
+
case "windows":
|
|
794
|
+
return "\r\n";
|
|
795
|
+
case "unix":
|
|
796
|
+
return "\n";
|
|
797
|
+
default:
|
|
798
|
+
return this.$autoNewLine || "\n";
|
|
866
799
|
}
|
|
867
800
|
};
|
|
868
|
-
|
|
869
|
-
this.$autoNewLine = "";
|
|
870
|
-
this.$newLineMode = "auto";
|
|
871
|
-
this.setNewLineMode = function(newLineMode) {
|
|
801
|
+
Document.prototype.setNewLineMode = function (newLineMode) {
|
|
872
802
|
if (this.$newLineMode === newLineMode)
|
|
873
803
|
return;
|
|
874
|
-
|
|
875
804
|
this.$newLineMode = newLineMode;
|
|
876
805
|
this._signal("changeNewLineMode");
|
|
877
806
|
};
|
|
878
|
-
|
|
807
|
+
Document.prototype.getNewLineMode = function () {
|
|
879
808
|
return this.$newLineMode;
|
|
880
809
|
};
|
|
881
|
-
|
|
810
|
+
Document.prototype.isNewLine = function (text) {
|
|
882
811
|
return (text == "\r\n" || text == "\r" || text == "\n");
|
|
883
812
|
};
|
|
884
|
-
|
|
813
|
+
Document.prototype.getLine = function (row) {
|
|
885
814
|
return this.$lines[row] || "";
|
|
886
815
|
};
|
|
887
|
-
|
|
816
|
+
Document.prototype.getLines = function (firstRow, lastRow) {
|
|
888
817
|
return this.$lines.slice(firstRow, lastRow + 1);
|
|
889
818
|
};
|
|
890
|
-
|
|
819
|
+
Document.prototype.getAllLines = function () {
|
|
891
820
|
return this.getLines(0, this.getLength());
|
|
892
821
|
};
|
|
893
|
-
|
|
822
|
+
Document.prototype.getLength = function () {
|
|
894
823
|
return this.$lines.length;
|
|
895
824
|
};
|
|
896
|
-
|
|
825
|
+
Document.prototype.getTextRange = function (range) {
|
|
897
826
|
return this.getLinesForRange(range).join(this.getNewLineCharacter());
|
|
898
827
|
};
|
|
899
|
-
|
|
828
|
+
Document.prototype.getLinesForRange = function (range) {
|
|
900
829
|
var lines;
|
|
901
830
|
if (range.start.row === range.end.row) {
|
|
902
831
|
lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
|
|
903
|
-
}
|
|
832
|
+
}
|
|
833
|
+
else {
|
|
904
834
|
lines = this.getLines(range.start.row, range.end.row);
|
|
905
835
|
lines[0] = (lines[0] || "").substring(range.start.column);
|
|
906
836
|
var l = lines.length - 1;
|
|
@@ -909,45 +839,43 @@ var Document = function(textOrLines) {
|
|
|
909
839
|
}
|
|
910
840
|
return lines;
|
|
911
841
|
};
|
|
912
|
-
|
|
842
|
+
Document.prototype.insertLines = function (row, lines) {
|
|
913
843
|
console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
|
|
914
844
|
return this.insertFullLines(row, lines);
|
|
915
845
|
};
|
|
916
|
-
|
|
846
|
+
Document.prototype.removeLines = function (firstRow, lastRow) {
|
|
917
847
|
console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
|
|
918
848
|
return this.removeFullLines(firstRow, lastRow);
|
|
919
849
|
};
|
|
920
|
-
|
|
850
|
+
Document.prototype.insertNewLine = function (position) {
|
|
921
851
|
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
|
|
922
852
|
return this.insertMergedLines(position, ["", ""]);
|
|
923
853
|
};
|
|
924
|
-
|
|
854
|
+
Document.prototype.insert = function (position, text) {
|
|
925
855
|
if (this.getLength() <= 1)
|
|
926
856
|
this.$detectNewLine(text);
|
|
927
|
-
|
|
928
857
|
return this.insertMergedLines(position, this.$split(text));
|
|
929
858
|
};
|
|
930
|
-
|
|
859
|
+
Document.prototype.insertInLine = function (position, text) {
|
|
931
860
|
var start = this.clippedPos(position.row, position.column);
|
|
932
861
|
var end = this.pos(position.row, position.column + text.length);
|
|
933
|
-
|
|
934
862
|
this.applyDelta({
|
|
935
863
|
start: start,
|
|
936
864
|
end: end,
|
|
937
865
|
action: "insert",
|
|
938
866
|
lines: [text]
|
|
939
867
|
}, true);
|
|
940
|
-
|
|
941
868
|
return this.clonePos(end);
|
|
942
869
|
};
|
|
943
|
-
|
|
944
|
-
this.clippedPos = function(row, column) {
|
|
870
|
+
Document.prototype.clippedPos = function (row, column) {
|
|
945
871
|
var length = this.getLength();
|
|
946
872
|
if (row === undefined) {
|
|
947
873
|
row = length;
|
|
948
|
-
}
|
|
874
|
+
}
|
|
875
|
+
else if (row < 0) {
|
|
949
876
|
row = 0;
|
|
950
|
-
}
|
|
877
|
+
}
|
|
878
|
+
else if (row >= length) {
|
|
951
879
|
row = length - 1;
|
|
952
880
|
column = undefined;
|
|
953
881
|
}
|
|
@@ -955,93 +883,87 @@ var Document = function(textOrLines) {
|
|
|
955
883
|
if (column == undefined)
|
|
956
884
|
column = line.length;
|
|
957
885
|
column = Math.min(Math.max(column, 0), line.length);
|
|
958
|
-
return {row: row, column: column};
|
|
886
|
+
return { row: row, column: column };
|
|
959
887
|
};
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
return {row: pos.row, column: pos.column};
|
|
888
|
+
Document.prototype.clonePos = function (pos) {
|
|
889
|
+
return { row: pos.row, column: pos.column };
|
|
963
890
|
};
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
return {row: row, column: column};
|
|
891
|
+
Document.prototype.pos = function (row, column) {
|
|
892
|
+
return { row: row, column: column };
|
|
967
893
|
};
|
|
968
|
-
|
|
969
|
-
this.$clipPosition = function(position) {
|
|
894
|
+
Document.prototype.$clipPosition = function (position) {
|
|
970
895
|
var length = this.getLength();
|
|
971
896
|
if (position.row >= length) {
|
|
972
897
|
position.row = Math.max(0, length - 1);
|
|
973
898
|
position.column = this.getLine(length - 1).length;
|
|
974
|
-
}
|
|
899
|
+
}
|
|
900
|
+
else {
|
|
975
901
|
position.row = Math.max(0, position.row);
|
|
976
902
|
position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
|
|
977
903
|
}
|
|
978
904
|
return position;
|
|
979
905
|
};
|
|
980
|
-
|
|
906
|
+
Document.prototype.insertFullLines = function (row, lines) {
|
|
981
907
|
row = Math.min(Math.max(row, 0), this.getLength());
|
|
982
908
|
var column = 0;
|
|
983
909
|
if (row < this.getLength()) {
|
|
984
910
|
lines = lines.concat([""]);
|
|
985
911
|
column = 0;
|
|
986
|
-
}
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
987
914
|
lines = [""].concat(lines);
|
|
988
915
|
row--;
|
|
989
916
|
column = this.$lines[row].length;
|
|
990
917
|
}
|
|
991
|
-
this.insertMergedLines({row: row, column: column}, lines);
|
|
992
|
-
};
|
|
993
|
-
|
|
918
|
+
this.insertMergedLines({ row: row, column: column }, lines);
|
|
919
|
+
};
|
|
920
|
+
Document.prototype.insertMergedLines = function (position, lines) {
|
|
994
921
|
var start = this.clippedPos(position.row, position.column);
|
|
995
922
|
var end = {
|
|
996
923
|
row: start.row + lines.length - 1,
|
|
997
924
|
column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
|
|
998
925
|
};
|
|
999
|
-
|
|
1000
926
|
this.applyDelta({
|
|
1001
927
|
start: start,
|
|
1002
928
|
end: end,
|
|
1003
929
|
action: "insert",
|
|
1004
930
|
lines: lines
|
|
1005
931
|
});
|
|
1006
|
-
|
|
1007
932
|
return this.clonePos(end);
|
|
1008
933
|
};
|
|
1009
|
-
|
|
934
|
+
Document.prototype.remove = function (range) {
|
|
1010
935
|
var start = this.clippedPos(range.start.row, range.start.column);
|
|
1011
936
|
var end = this.clippedPos(range.end.row, range.end.column);
|
|
1012
937
|
this.applyDelta({
|
|
1013
938
|
start: start,
|
|
1014
939
|
end: end,
|
|
1015
940
|
action: "remove",
|
|
1016
|
-
lines: this.getLinesForRange({start: start, end: end})
|
|
941
|
+
lines: this.getLinesForRange({ start: start, end: end })
|
|
1017
942
|
});
|
|
1018
943
|
return this.clonePos(start);
|
|
1019
944
|
};
|
|
1020
|
-
|
|
945
|
+
Document.prototype.removeInLine = function (row, startColumn, endColumn) {
|
|
1021
946
|
var start = this.clippedPos(row, startColumn);
|
|
1022
947
|
var end = this.clippedPos(row, endColumn);
|
|
1023
|
-
|
|
1024
948
|
this.applyDelta({
|
|
1025
949
|
start: start,
|
|
1026
950
|
end: end,
|
|
1027
951
|
action: "remove",
|
|
1028
|
-
lines: this.getLinesForRange({start: start, end: end})
|
|
952
|
+
lines: this.getLinesForRange({ start: start, end: end })
|
|
1029
953
|
}, true);
|
|
1030
|
-
|
|
1031
954
|
return this.clonePos(start);
|
|
1032
955
|
};
|
|
1033
|
-
|
|
956
|
+
Document.prototype.removeFullLines = function (firstRow, lastRow) {
|
|
1034
957
|
firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
|
|
1035
|
-
lastRow
|
|
958
|
+
lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
|
|
1036
959
|
var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
|
|
1037
|
-
var deleteLastNewLine
|
|
1038
|
-
var startRow = (
|
|
1039
|
-
var startCol = (
|
|
1040
|
-
var endRow
|
|
1041
|
-
var endCol
|
|
960
|
+
var deleteLastNewLine = lastRow < this.getLength() - 1;
|
|
961
|
+
var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow);
|
|
962
|
+
var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0);
|
|
963
|
+
var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow);
|
|
964
|
+
var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length);
|
|
1042
965
|
var range = new Range(startRow, startCol, endRow, endCol);
|
|
1043
966
|
var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
|
|
1044
|
-
|
|
1045
967
|
this.applyDelta({
|
|
1046
968
|
start: range.start,
|
|
1047
969
|
end: range.end,
|
|
@@ -1050,7 +972,7 @@ var Document = function(textOrLines) {
|
|
|
1050
972
|
});
|
|
1051
973
|
return deletedLines;
|
|
1052
974
|
};
|
|
1053
|
-
|
|
975
|
+
Document.prototype.removeNewLine = function (row) {
|
|
1054
976
|
if (row < this.getLength() - 1 && row >= 0) {
|
|
1055
977
|
this.applyDelta({
|
|
1056
978
|
start: this.pos(row, this.getLine(row).length),
|
|
@@ -1060,14 +982,13 @@ var Document = function(textOrLines) {
|
|
|
1060
982
|
});
|
|
1061
983
|
}
|
|
1062
984
|
};
|
|
1063
|
-
|
|
985
|
+
Document.prototype.replace = function (range, text) {
|
|
1064
986
|
if (!(range instanceof Range))
|
|
1065
987
|
range = Range.fromPoints(range.start, range.end);
|
|
1066
988
|
if (text.length === 0 && range.isEmpty())
|
|
1067
989
|
return range.start;
|
|
1068
990
|
if (text == this.getTextRange(range))
|
|
1069
991
|
return range.end;
|
|
1070
|
-
|
|
1071
992
|
this.remove(range);
|
|
1072
993
|
var end;
|
|
1073
994
|
if (text) {
|
|
@@ -1076,26 +997,24 @@ var Document = function(textOrLines) {
|
|
|
1076
997
|
else {
|
|
1077
998
|
end = range.start;
|
|
1078
999
|
}
|
|
1079
|
-
|
|
1080
1000
|
return end;
|
|
1081
1001
|
};
|
|
1082
|
-
|
|
1083
|
-
for (var i=0; i<deltas.length; i++) {
|
|
1002
|
+
Document.prototype.applyDeltas = function (deltas) {
|
|
1003
|
+
for (var i = 0; i < deltas.length; i++) {
|
|
1084
1004
|
this.applyDelta(deltas[i]);
|
|
1085
1005
|
}
|
|
1086
1006
|
};
|
|
1087
|
-
|
|
1088
|
-
for (var i=deltas.length-1; i>=0; i--) {
|
|
1007
|
+
Document.prototype.revertDeltas = function (deltas) {
|
|
1008
|
+
for (var i = deltas.length - 1; i >= 0; i--) {
|
|
1089
1009
|
this.revertDelta(deltas[i]);
|
|
1090
1010
|
}
|
|
1091
1011
|
};
|
|
1092
|
-
|
|
1012
|
+
Document.prototype.applyDelta = function (delta, doNotValidate) {
|
|
1093
1013
|
var isInsert = delta.action == "insert";
|
|
1094
1014
|
if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
|
|
1095
1015
|
: !Range.comparePoints(delta.start, delta.end)) {
|
|
1096
1016
|
return;
|
|
1097
1017
|
}
|
|
1098
|
-
|
|
1099
1018
|
if (isInsert && delta.lines.length > 20000) {
|
|
1100
1019
|
this.$splitAndapplyLargeDelta(delta, 20000);
|
|
1101
1020
|
}
|
|
@@ -1104,21 +1023,17 @@ var Document = function(textOrLines) {
|
|
|
1104
1023
|
this._signal("change", delta);
|
|
1105
1024
|
}
|
|
1106
1025
|
};
|
|
1107
|
-
|
|
1108
|
-
this.$safeApplyDelta = function(delta) {
|
|
1026
|
+
Document.prototype.$safeApplyDelta = function (delta) {
|
|
1109
1027
|
var docLength = this.$lines.length;
|
|
1110
|
-
if (
|
|
1111
|
-
delta.action == "
|
|
1112
|
-
|| delta.action == "insert" && delta.start.row <= docLength
|
|
1113
|
-
) {
|
|
1028
|
+
if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
|
|
1029
|
+
|| delta.action == "insert" && delta.start.row <= docLength) {
|
|
1114
1030
|
this.applyDelta(delta);
|
|
1115
1031
|
}
|
|
1116
1032
|
};
|
|
1117
|
-
|
|
1118
|
-
this.$splitAndapplyLargeDelta = function(delta, MAX) {
|
|
1033
|
+
Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
|
|
1119
1034
|
var lines = delta.lines;
|
|
1120
1035
|
var l = lines.length - MAX + 1;
|
|
1121
|
-
var row = delta.start.row;
|
|
1036
|
+
var row = delta.start.row;
|
|
1122
1037
|
var column = delta.start.column;
|
|
1123
1038
|
for (var from = 0, to = 0; from < l; from = to) {
|
|
1124
1039
|
to += MAX - 1;
|
|
@@ -1136,7 +1051,7 @@ var Document = function(textOrLines) {
|
|
|
1136
1051
|
delta.start.column = column;
|
|
1137
1052
|
this.applyDelta(delta, true);
|
|
1138
1053
|
};
|
|
1139
|
-
|
|
1054
|
+
Document.prototype.revertDelta = function (delta) {
|
|
1140
1055
|
this.$safeApplyDelta({
|
|
1141
1056
|
start: this.clonePos(delta.start),
|
|
1142
1057
|
end: this.clonePos(delta.end),
|
|
@@ -1144,224 +1059,217 @@ var Document = function(textOrLines) {
|
|
|
1144
1059
|
lines: delta.lines.slice()
|
|
1145
1060
|
});
|
|
1146
1061
|
};
|
|
1147
|
-
|
|
1062
|
+
Document.prototype.indexToPosition = function (index, startRow) {
|
|
1148
1063
|
var lines = this.$lines || this.getAllLines();
|
|
1149
1064
|
var newlineLength = this.getNewLineCharacter().length;
|
|
1150
1065
|
for (var i = startRow || 0, l = lines.length; i < l; i++) {
|
|
1151
1066
|
index -= lines[i].length + newlineLength;
|
|
1152
1067
|
if (index < 0)
|
|
1153
|
-
return {row: i, column: index + lines[i].length + newlineLength};
|
|
1068
|
+
return { row: i, column: index + lines[i].length + newlineLength };
|
|
1154
1069
|
}
|
|
1155
|
-
return {row: l-1, column: index + lines[l-1].length + newlineLength};
|
|
1070
|
+
return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
|
|
1156
1071
|
};
|
|
1157
|
-
|
|
1072
|
+
Document.prototype.positionToIndex = function (pos, startRow) {
|
|
1158
1073
|
var lines = this.$lines || this.getAllLines();
|
|
1159
1074
|
var newlineLength = this.getNewLineCharacter().length;
|
|
1160
1075
|
var index = 0;
|
|
1161
1076
|
var row = Math.min(pos.row, lines.length);
|
|
1162
1077
|
for (var i = startRow || 0; i < row; ++i)
|
|
1163
1078
|
index += lines[i].length + newlineLength;
|
|
1164
|
-
|
|
1165
1079
|
return index + pos.column;
|
|
1166
1080
|
};
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1081
|
+
Document.prototype.$split = function (text) {
|
|
1082
|
+
return text.split(/\r\n|\r|\n/);
|
|
1083
|
+
};
|
|
1084
|
+
return Document;
|
|
1085
|
+
}());
|
|
1086
|
+
Document.prototype.$autoNewLine = "";
|
|
1087
|
+
Document.prototype.$newLineMode = "auto";
|
|
1088
|
+
oop.implement(Document.prototype, EventEmitter);
|
|
1170
1089
|
exports.Document = Document;
|
|
1090
|
+
|
|
1171
1091
|
});
|
|
1172
1092
|
|
|
1173
|
-
ace.define("ace/lib/
|
|
1174
|
-
"
|
|
1093
|
+
ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
|
|
1094
|
+
if (typeof obj !== "object" || !obj)
|
|
1095
|
+
return obj;
|
|
1096
|
+
var copy;
|
|
1097
|
+
if (Array.isArray(obj)) {
|
|
1098
|
+
copy = [];
|
|
1099
|
+
for (var key = 0; key < obj.length; key++) {
|
|
1100
|
+
copy[key] = deepCopy(obj[key]);
|
|
1101
|
+
}
|
|
1102
|
+
return copy;
|
|
1103
|
+
}
|
|
1104
|
+
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
|
1105
|
+
return obj;
|
|
1106
|
+
copy = {};
|
|
1107
|
+
for (var key in obj)
|
|
1108
|
+
copy[key] = deepCopy(obj[key]);
|
|
1109
|
+
return copy;
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
});
|
|
1175
1113
|
|
|
1176
|
-
|
|
1114
|
+
ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
|
|
1115
|
+
exports.last = function (a) {
|
|
1177
1116
|
return a[a.length - 1];
|
|
1178
1117
|
};
|
|
1179
|
-
|
|
1180
|
-
exports.stringReverse = function(string) {
|
|
1118
|
+
exports.stringReverse = function (string) {
|
|
1181
1119
|
return string.split("").reverse().join("");
|
|
1182
1120
|
};
|
|
1183
|
-
|
|
1184
1121
|
exports.stringRepeat = function (string, count) {
|
|
1185
1122
|
var result = '';
|
|
1186
1123
|
while (count > 0) {
|
|
1187
1124
|
if (count & 1)
|
|
1188
1125
|
result += string;
|
|
1189
|
-
|
|
1190
1126
|
if (count >>= 1)
|
|
1191
1127
|
string += string;
|
|
1192
1128
|
}
|
|
1193
1129
|
return result;
|
|
1194
1130
|
};
|
|
1195
|
-
|
|
1196
1131
|
var trimBeginRegexp = /^\s\s*/;
|
|
1197
1132
|
var trimEndRegexp = /\s\s*$/;
|
|
1198
|
-
|
|
1199
1133
|
exports.stringTrimLeft = function (string) {
|
|
1200
1134
|
return string.replace(trimBeginRegexp, '');
|
|
1201
1135
|
};
|
|
1202
|
-
|
|
1203
1136
|
exports.stringTrimRight = function (string) {
|
|
1204
1137
|
return string.replace(trimEndRegexp, '');
|
|
1205
1138
|
};
|
|
1206
|
-
|
|
1207
|
-
exports.copyObject = function(obj) {
|
|
1139
|
+
exports.copyObject = function (obj) {
|
|
1208
1140
|
var copy = {};
|
|
1209
1141
|
for (var key in obj) {
|
|
1210
1142
|
copy[key] = obj[key];
|
|
1211
1143
|
}
|
|
1212
1144
|
return copy;
|
|
1213
1145
|
};
|
|
1214
|
-
|
|
1215
|
-
exports.copyArray = function(array){
|
|
1146
|
+
exports.copyArray = function (array) {
|
|
1216
1147
|
var copy = [];
|
|
1217
|
-
for (var i=0, l=array.length; i<l; i++) {
|
|
1148
|
+
for (var i = 0, l = array.length; i < l; i++) {
|
|
1218
1149
|
if (array[i] && typeof array[i] == "object")
|
|
1219
1150
|
copy[i] = this.copyObject(array[i]);
|
|
1220
|
-
else
|
|
1151
|
+
else
|
|
1221
1152
|
copy[i] = array[i];
|
|
1222
1153
|
}
|
|
1223
1154
|
return copy;
|
|
1224
1155
|
};
|
|
1225
|
-
|
|
1226
|
-
exports.
|
|
1227
|
-
if (typeof obj !== "object" || !obj)
|
|
1228
|
-
return obj;
|
|
1229
|
-
var copy;
|
|
1230
|
-
if (Array.isArray(obj)) {
|
|
1231
|
-
copy = [];
|
|
1232
|
-
for (var key = 0; key < obj.length; key++) {
|
|
1233
|
-
copy[key] = deepCopy(obj[key]);
|
|
1234
|
-
}
|
|
1235
|
-
return copy;
|
|
1236
|
-
}
|
|
1237
|
-
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
|
1238
|
-
return obj;
|
|
1239
|
-
|
|
1240
|
-
copy = {};
|
|
1241
|
-
for (var key in obj)
|
|
1242
|
-
copy[key] = deepCopy(obj[key]);
|
|
1243
|
-
return copy;
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
exports.arrayToMap = function(arr) {
|
|
1156
|
+
exports.deepCopy = require("./deep_copy").deepCopy;
|
|
1157
|
+
exports.arrayToMap = function (arr) {
|
|
1247
1158
|
var map = {};
|
|
1248
|
-
for (var i=0; i<arr.length; i++) {
|
|
1159
|
+
for (var i = 0; i < arr.length; i++) {
|
|
1249
1160
|
map[arr[i]] = 1;
|
|
1250
1161
|
}
|
|
1251
1162
|
return map;
|
|
1252
|
-
|
|
1253
1163
|
};
|
|
1254
|
-
|
|
1255
|
-
exports.createMap = function(props) {
|
|
1164
|
+
exports.createMap = function (props) {
|
|
1256
1165
|
var map = Object.create(null);
|
|
1257
1166
|
for (var i in props) {
|
|
1258
1167
|
map[i] = props[i];
|
|
1259
1168
|
}
|
|
1260
1169
|
return map;
|
|
1261
1170
|
};
|
|
1262
|
-
exports.arrayRemove = function(array, value) {
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1171
|
+
exports.arrayRemove = function (array, value) {
|
|
1172
|
+
for (var i = 0; i <= array.length; i++) {
|
|
1173
|
+
if (value === array[i]) {
|
|
1174
|
+
array.splice(i, 1);
|
|
1175
|
+
}
|
|
1266
1176
|
}
|
|
1267
|
-
}
|
|
1268
1177
|
};
|
|
1269
|
-
|
|
1270
|
-
exports.escapeRegExp = function(str) {
|
|
1178
|
+
exports.escapeRegExp = function (str) {
|
|
1271
1179
|
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
|
|
1272
1180
|
};
|
|
1273
|
-
|
|
1274
|
-
exports.escapeHTML = function(str) {
|
|
1181
|
+
exports.escapeHTML = function (str) {
|
|
1275
1182
|
return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<");
|
|
1276
1183
|
};
|
|
1277
|
-
|
|
1278
|
-
exports.getMatchOffsets = function(string, regExp) {
|
|
1184
|
+
exports.getMatchOffsets = function (string, regExp) {
|
|
1279
1185
|
var matches = [];
|
|
1280
|
-
|
|
1281
|
-
string.replace(regExp, function(str) {
|
|
1186
|
+
string.replace(regExp, function (str) {
|
|
1282
1187
|
matches.push({
|
|
1283
|
-
offset: arguments[arguments.length-2],
|
|
1188
|
+
offset: arguments[arguments.length - 2],
|
|
1284
1189
|
length: str.length
|
|
1285
1190
|
});
|
|
1286
1191
|
});
|
|
1287
|
-
|
|
1288
1192
|
return matches;
|
|
1289
1193
|
};
|
|
1290
|
-
exports.deferredCall = function(fcn) {
|
|
1194
|
+
exports.deferredCall = function (fcn) {
|
|
1291
1195
|
var timer = null;
|
|
1292
|
-
var callback = function() {
|
|
1196
|
+
var callback = function () {
|
|
1293
1197
|
timer = null;
|
|
1294
1198
|
fcn();
|
|
1295
1199
|
};
|
|
1296
|
-
|
|
1297
|
-
var deferred = function(timeout) {
|
|
1200
|
+
var deferred = function (timeout) {
|
|
1298
1201
|
deferred.cancel();
|
|
1299
1202
|
timer = setTimeout(callback, timeout || 0);
|
|
1300
1203
|
return deferred;
|
|
1301
1204
|
};
|
|
1302
|
-
|
|
1303
1205
|
deferred.schedule = deferred;
|
|
1304
|
-
|
|
1305
|
-
deferred.call = function() {
|
|
1206
|
+
deferred.call = function () {
|
|
1306
1207
|
this.cancel();
|
|
1307
1208
|
fcn();
|
|
1308
1209
|
return deferred;
|
|
1309
1210
|
};
|
|
1310
|
-
|
|
1311
|
-
deferred.cancel = function() {
|
|
1211
|
+
deferred.cancel = function () {
|
|
1312
1212
|
clearTimeout(timer);
|
|
1313
1213
|
timer = null;
|
|
1314
1214
|
return deferred;
|
|
1315
1215
|
};
|
|
1316
|
-
|
|
1317
|
-
deferred.isPending = function() {
|
|
1216
|
+
deferred.isPending = function () {
|
|
1318
1217
|
return timer;
|
|
1319
1218
|
};
|
|
1320
|
-
|
|
1321
1219
|
return deferred;
|
|
1322
1220
|
};
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
exports.delayedCall = function(fcn, defaultTimeout) {
|
|
1221
|
+
exports.delayedCall = function (fcn, defaultTimeout) {
|
|
1326
1222
|
var timer = null;
|
|
1327
|
-
var callback = function() {
|
|
1223
|
+
var callback = function () {
|
|
1328
1224
|
timer = null;
|
|
1329
1225
|
fcn();
|
|
1330
1226
|
};
|
|
1331
|
-
|
|
1332
|
-
var _self = function(timeout) {
|
|
1227
|
+
var _self = function (timeout) {
|
|
1333
1228
|
if (timer == null)
|
|
1334
1229
|
timer = setTimeout(callback, timeout || defaultTimeout);
|
|
1335
1230
|
};
|
|
1336
|
-
|
|
1337
|
-
_self.delay = function(timeout) {
|
|
1231
|
+
_self.delay = function (timeout) {
|
|
1338
1232
|
timer && clearTimeout(timer);
|
|
1339
1233
|
timer = setTimeout(callback, timeout || defaultTimeout);
|
|
1340
1234
|
};
|
|
1341
1235
|
_self.schedule = _self;
|
|
1342
|
-
|
|
1343
|
-
_self.call = function() {
|
|
1236
|
+
_self.call = function () {
|
|
1344
1237
|
this.cancel();
|
|
1345
1238
|
fcn();
|
|
1346
1239
|
};
|
|
1347
|
-
|
|
1348
|
-
_self.cancel = function() {
|
|
1240
|
+
_self.cancel = function () {
|
|
1349
1241
|
timer && clearTimeout(timer);
|
|
1350
1242
|
timer = null;
|
|
1351
1243
|
};
|
|
1352
|
-
|
|
1353
|
-
_self.isPending = function() {
|
|
1244
|
+
_self.isPending = function () {
|
|
1354
1245
|
return timer;
|
|
1355
1246
|
};
|
|
1356
|
-
|
|
1357
1247
|
return _self;
|
|
1358
1248
|
};
|
|
1249
|
+
exports.supportsLookbehind = function () {
|
|
1250
|
+
try {
|
|
1251
|
+
new RegExp('(?<=.)');
|
|
1252
|
+
}
|
|
1253
|
+
catch (e) {
|
|
1254
|
+
return false;
|
|
1255
|
+
}
|
|
1256
|
+
return true;
|
|
1257
|
+
};
|
|
1258
|
+
exports.supportsUnicodeFlag = function () {
|
|
1259
|
+
try {
|
|
1260
|
+
new RegExp('^.$', 'u');
|
|
1261
|
+
}
|
|
1262
|
+
catch (error) {
|
|
1263
|
+
return false;
|
|
1264
|
+
}
|
|
1265
|
+
return true;
|
|
1266
|
+
};
|
|
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]};
|
|
1385
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;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1386
1307
|
doc.applyDelta(d, true);
|
|
1387
1308
|
}
|
|
1388
1309
|
}
|