@omicronenergy/oscd-ui 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (716) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/custom-elements.json +12341 -8939
  3. package/dist/ace-editor/OscdAceEditor.d.ts +34 -0
  4. package/dist/ace-editor/OscdAceEditor.js +33 -0
  5. package/dist/ace-editor/OscdAceEditor.js.map +1 -0
  6. package/dist/ace-editor/OscdAceEditor.spec.d.ts +1 -0
  7. package/dist/ace-editor/OscdAceEditor.spec.js +16 -0
  8. package/dist/ace-editor/OscdAceEditor.spec.js.map +1 -0
  9. package/dist/ace-editor/OscdAceEditor.stories.d.ts +28 -0
  10. package/dist/ace-editor/OscdAceEditor.stories.js +22 -0
  11. package/dist/ace-editor/OscdAceEditor.stories.js.map +1 -0
  12. package/dist/ace-editor/ace/ace.js +22045 -0
  13. package/dist/ace-editor/ace/ext-beautify.js +343 -0
  14. package/dist/ace-editor/ace/ext-code_lens.js +204 -0
  15. package/dist/ace-editor/ace/ext-command_bar.js +469 -0
  16. package/dist/ace-editor/ace/ext-diff.js +4270 -0
  17. package/dist/ace-editor/ace/ext-elastic_tabstops_lite.js +238 -0
  18. package/dist/ace-editor/ace/ext-emmet.js +1303 -0
  19. package/dist/ace-editor/ace/ext-error_marker.js +9 -0
  20. package/dist/ace-editor/ace/ext-hardwrap.js +127 -0
  21. package/dist/ace-editor/ace/ext-inline_autocomplete.js +3547 -0
  22. package/dist/ace-editor/ace/ext-keybinding_menu.js +185 -0
  23. package/dist/ace-editor/ace/ext-language_tools.js +2724 -0
  24. package/dist/ace-editor/ace/ext-linking.js +66 -0
  25. package/dist/ace-editor/ace/ext-modelist.js +279 -0
  26. package/dist/ace-editor/ace/ext-options.js +862 -0
  27. package/dist/ace-editor/ace/ext-prompt.js +3164 -0
  28. package/dist/ace-editor/ace/ext-rtl.js +146 -0
  29. package/dist/ace-editor/ace/ext-searchbox.js +385 -0
  30. package/dist/ace-editor/ace/ext-settings_menu.js +862 -0
  31. package/dist/ace-editor/ace/ext-simple_tokenizer.js +137 -0
  32. package/dist/ace-editor/ace/ext-spellcheck.js +79 -0
  33. package/dist/ace-editor/ace/ext-split.js +203 -0
  34. package/dist/ace-editor/ace/ext-static_highlight.js +194 -0
  35. package/dist/ace-editor/ace/ext-statusbar.js +63 -0
  36. package/dist/ace-editor/ace/ext-textarea.js +400 -0
  37. package/dist/ace-editor/ace/ext-themelist.js +80 -0
  38. package/dist/ace-editor/ace/ext-whitespace.js +201 -0
  39. package/dist/ace-editor/ace/ext-whitespaces_in_selection.js +325 -0
  40. package/dist/ace-editor/ace/keybinding-emacs.js +1067 -0
  41. package/dist/ace-editor/ace/keybinding-sublime.js +409 -0
  42. package/dist/ace-editor/ace/keybinding-vim.js +7101 -0
  43. package/dist/ace-editor/ace/keybinding-vscode.js +255 -0
  44. package/dist/ace-editor/ace/mode-abap.js +200 -0
  45. package/dist/ace-editor/ace/mode-abc.js +243 -0
  46. package/dist/ace-editor/ace/mode-actionscript.js +234 -0
  47. package/dist/ace-editor/ace/mode-ada.js +108 -0
  48. package/dist/ace-editor/ace/mode-alda.js +279 -0
  49. package/dist/ace-editor/ace/mode-apache_conf.js +318 -0
  50. package/dist/ace-editor/ace/mode-apex.js +402 -0
  51. package/dist/ace-editor/ace/mode-applescript.js +232 -0
  52. package/dist/ace-editor/ace/mode-aql.js +92 -0
  53. package/dist/ace-editor/ace/mode-asciidoc.js +311 -0
  54. package/dist/ace-editor/ace/mode-asl.js +357 -0
  55. package/dist/ace-editor/ace/mode-assembly_arm32.js +185 -0
  56. package/dist/ace-editor/ace/mode-assembly_x86.js +170 -0
  57. package/dist/ace-editor/ace/mode-astro.js +2475 -0
  58. package/dist/ace-editor/ace/mode-autohotkey.js +208 -0
  59. package/dist/ace-editor/ace/mode-basic.js +201 -0
  60. package/dist/ace-editor/ace/mode-batchfile.js +199 -0
  61. package/dist/ace-editor/ace/mode-bibtex.js +318 -0
  62. package/dist/ace-editor/ace/mode-c9search.js +250 -0
  63. package/dist/ace-editor/ace/mode-c_cpp.js +417 -0
  64. package/dist/ace-editor/ace/mode-cedar.js +289 -0
  65. package/dist/ace-editor/ace/mode-cedarschema.js +275 -0
  66. package/dist/ace-editor/ace/mode-cirru.js +192 -0
  67. package/dist/ace-editor/ace/mode-clojure.js +322 -0
  68. package/dist/ace-editor/ace/mode-clue.js +361 -0
  69. package/dist/ace-editor/ace/mode-cobol.js +82 -0
  70. package/dist/ace-editor/ace/mode-coffee.js +335 -0
  71. package/dist/ace-editor/ace/mode-coldfusion.js +2410 -0
  72. package/dist/ace-editor/ace/mode-crystal.js +586 -0
  73. package/dist/ace-editor/ace/mode-csharp.js +413 -0
  74. package/dist/ace-editor/ace/mode-csound_document.js +4073 -0
  75. package/dist/ace-editor/ace/mode-csound_orchestra.js +2923 -0
  76. package/dist/ace-editor/ace/mode-csound_score.js +409 -0
  77. package/dist/ace-editor/ace/mode-csp.js +59 -0
  78. package/dist/ace-editor/ace/mode-css.js +632 -0
  79. package/dist/ace-editor/ace/mode-csv.js +97 -0
  80. package/dist/ace-editor/ace/mode-curly.js +2382 -0
  81. package/dist/ace-editor/ace/mode-cuttlefish.js +56 -0
  82. package/dist/ace-editor/ace/mode-d.js +450 -0
  83. package/dist/ace-editor/ace/mode-dart.js +618 -0
  84. package/dist/ace-editor/ace/mode-diff.js +129 -0
  85. package/dist/ace-editor/ace/mode-django.js +2423 -0
  86. package/dist/ace-editor/ace/mode-dockerfile.js +427 -0
  87. package/dist/ace-editor/ace/mode-dot.js +348 -0
  88. package/dist/ace-editor/ace/mode-drools.js +607 -0
  89. package/dist/ace-editor/ace/mode-edifact.js +130 -0
  90. package/dist/ace-editor/ace/mode-eiffel.js +120 -0
  91. package/dist/ace-editor/ace/mode-ejs.js +3278 -0
  92. package/dist/ace-editor/ace/mode-elixir.js +443 -0
  93. package/dist/ace-editor/ace/mode-elm.js +274 -0
  94. package/dist/ace-editor/ace/mode-erlang.js +836 -0
  95. package/dist/ace-editor/ace/mode-flix.js +163 -0
  96. package/dist/ace-editor/ace/mode-forth.js +253 -0
  97. package/dist/ace-editor/ace/mode-fortran.js +361 -0
  98. package/dist/ace-editor/ace/mode-fsharp.js +277 -0
  99. package/dist/ace-editor/ace/mode-fsl.js +226 -0
  100. package/dist/ace-editor/ace/mode-ftl.js +1256 -0
  101. package/dist/ace-editor/ace/mode-gcode.js +74 -0
  102. package/dist/ace-editor/ace/mode-gherkin.js +154 -0
  103. package/dist/ace-editor/ace/mode-gitignore.js +49 -0
  104. package/dist/ace-editor/ace/mode-glsl.js +475 -0
  105. package/dist/ace-editor/ace/mode-gobstones.js +1460 -0
  106. package/dist/ace-editor/ace/mode-golang.js +341 -0
  107. package/dist/ace-editor/ace/mode-graphqlschema.js +174 -0
  108. package/dist/ace-editor/ace/mode-groovy.js +1402 -0
  109. package/dist/ace-editor/ace/mode-groq.js +288 -0
  110. package/dist/ace-editor/ace/mode-haml.js +1907 -0
  111. package/dist/ace-editor/ace/mode-handlebars.js +2439 -0
  112. package/dist/ace-editor/ace/mode-haskell.js +324 -0
  113. package/dist/ace-editor/ace/mode-haskell_cabal.js +135 -0
  114. package/dist/ace-editor/ace/mode-haxe.js +313 -0
  115. package/dist/ace-editor/ace/mode-hjson.js +318 -0
  116. package/dist/ace-editor/ace/mode-html.js +2340 -0
  117. package/dist/ace-editor/ace/mode-html_elixir.js +2846 -0
  118. package/dist/ace-editor/ace/mode-html_ruby.js +3295 -0
  119. package/dist/ace-editor/ace/mode-ini.js +138 -0
  120. package/dist/ace-editor/ace/mode-io.js +210 -0
  121. package/dist/ace-editor/ace/mode-ion.js +477 -0
  122. package/dist/ace-editor/ace/mode-jack.js +293 -0
  123. package/dist/ace-editor/ace/mode-jade.js +2018 -0
  124. package/dist/ace-editor/ace/mode-java.js +1566 -0
  125. package/dist/ace-editor/ace/mode-javascript.js +1192 -0
  126. package/dist/ace-editor/ace/mode-jexl.js +270 -0
  127. package/dist/ace-editor/ace/mode-json.js +275 -0
  128. package/dist/ace-editor/ace/mode-json5.js +308 -0
  129. package/dist/ace-editor/ace/mode-jsoniq.js +2577 -0
  130. package/dist/ace-editor/ace/mode-jsp.js +1619 -0
  131. package/dist/ace-editor/ace/mode-jssm.js +293 -0
  132. package/dist/ace-editor/ace/mode-jsx.js +1210 -0
  133. package/dist/ace-editor/ace/mode-julia.js +254 -0
  134. package/dist/ace-editor/ace/mode-kotlin.js +445 -0
  135. package/dist/ace-editor/ace/mode-latex.js +252 -0
  136. package/dist/ace-editor/ace/mode-latte.js +2523 -0
  137. package/dist/ace-editor/ace/mode-less.js +742 -0
  138. package/dist/ace-editor/ace/mode-liquid.js +2742 -0
  139. package/dist/ace-editor/ace/mode-lisp.js +104 -0
  140. package/dist/ace-editor/ace/mode-livescript.js +272 -0
  141. package/dist/ace-editor/ace/mode-logiql.js +272 -0
  142. package/dist/ace-editor/ace/mode-logtalk.js +309 -0
  143. package/dist/ace-editor/ace/mode-lsl.js +287 -0
  144. package/dist/ace-editor/ace/mode-lua.js +393 -0
  145. package/dist/ace-editor/ace/mode-luapage.js +2786 -0
  146. package/dist/ace-editor/ace/mode-lucene.js +145 -0
  147. package/dist/ace-editor/ace/mode-makefile.js +374 -0
  148. package/dist/ace-editor/ace/mode-mariadb.js +149 -0
  149. package/dist/ace-editor/ace/mode-markdown.js +2936 -0
  150. package/dist/ace-editor/ace/mode-mask.js +1758 -0
  151. package/dist/ace-editor/ace/mode-matlab.js +239 -0
  152. package/dist/ace-editor/ace/mode-maze.js +256 -0
  153. package/dist/ace-editor/ace/mode-mediawiki.js +580 -0
  154. package/dist/ace-editor/ace/mode-mel.js +213 -0
  155. package/dist/ace-editor/ace/mode-mips.js +231 -0
  156. package/dist/ace-editor/ace/mode-mixal.js +110 -0
  157. package/dist/ace-editor/ace/mode-mushcode.js +642 -0
  158. package/dist/ace-editor/ace/mode-mysql.js +150 -0
  159. package/dist/ace-editor/ace/mode-nasal.js +513 -0
  160. package/dist/ace-editor/ace/mode-nginx.js +262 -0
  161. package/dist/ace-editor/ace/mode-nim.js +325 -0
  162. package/dist/ace-editor/ace/mode-nix.js +555 -0
  163. package/dist/ace-editor/ace/mode-nsis.js +279 -0
  164. package/dist/ace-editor/ace/mode-nunjucks.js +2678 -0
  165. package/dist/ace-editor/ace/mode-objectivec.js +626 -0
  166. package/dist/ace-editor/ace/mode-ocaml.js +378 -0
  167. package/dist/ace-editor/ace/mode-odin.js +449 -0
  168. package/dist/ace-editor/ace/mode-partiql.js +750 -0
  169. package/dist/ace-editor/ace/mode-pascal.js +204 -0
  170. package/dist/ace-editor/ace/mode-perl.js +318 -0
  171. package/dist/ace-editor/ace/mode-pgsql.js +1861 -0
  172. package/dist/ace-editor/ace/mode-php.js +14079 -0
  173. package/dist/ace-editor/ace/mode-php_laravel_blade.js +14267 -0
  174. package/dist/ace-editor/ace/mode-pig.js +278 -0
  175. package/dist/ace-editor/ace/mode-plain_text.js +27 -0
  176. package/dist/ace-editor/ace/mode-plsql.js +268 -0
  177. package/dist/ace-editor/ace/mode-powershell.js +567 -0
  178. package/dist/ace-editor/ace/mode-praat.js +412 -0
  179. package/dist/ace-editor/ace/mode-prisma.js +457 -0
  180. package/dist/ace-editor/ace/mode-prolog.js +305 -0
  181. package/dist/ace-editor/ace/mode-properties.js +69 -0
  182. package/dist/ace-editor/ace/mode-protobuf.js +498 -0
  183. package/dist/ace-editor/ace/mode-prql.js +323 -0
  184. package/dist/ace-editor/ace/mode-puppet.js +316 -0
  185. package/dist/ace-editor/ace/mode-python.js +476 -0
  186. package/dist/ace-editor/ace/mode-qml.js +346 -0
  187. package/dist/ace-editor/ace/mode-r.js +387 -0
  188. package/dist/ace-editor/ace/mode-raku.js +516 -0
  189. package/dist/ace-editor/ace/mode-razor.js +2698 -0
  190. package/dist/ace-editor/ace/mode-rdoc.js +286 -0
  191. package/dist/ace-editor/ace/mode-red.js +388 -0
  192. package/dist/ace-editor/ace/mode-redshift.js +321 -0
  193. package/dist/ace-editor/ace/mode-rhtml.js +2751 -0
  194. package/dist/ace-editor/ace/mode-robot.js +168 -0
  195. package/dist/ace-editor/ace/mode-rst.js +245 -0
  196. package/dist/ace-editor/ace/mode-ruby.js +921 -0
  197. package/dist/ace-editor/ace/mode-rust.js +393 -0
  198. package/dist/ace-editor/ace/mode-sac.js +349 -0
  199. package/dist/ace-editor/ace/mode-sass.js +480 -0
  200. package/dist/ace-editor/ace/mode-scad.js +350 -0
  201. package/dist/ace-editor/ace/mode-scala.js +1396 -0
  202. package/dist/ace-editor/ace/mode-scheme.js +210 -0
  203. package/dist/ace-editor/ace/mode-scrypt.js +317 -0
  204. package/dist/ace-editor/ace/mode-scss.js +768 -0
  205. package/dist/ace-editor/ace/mode-sh.js +387 -0
  206. package/dist/ace-editor/ace/mode-sjs.js +1394 -0
  207. package/dist/ace-editor/ace/mode-slim.js +4771 -0
  208. package/dist/ace-editor/ace/mode-smarty.js +2437 -0
  209. package/dist/ace-editor/ace/mode-smithy.js +456 -0
  210. package/dist/ace-editor/ace/mode-snippets.js +183 -0
  211. package/dist/ace-editor/ace/mode-soy_template.js +2612 -0
  212. package/dist/ace-editor/ace/mode-space.js +151 -0
  213. package/dist/ace-editor/ace/mode-sparql.js +288 -0
  214. package/dist/ace-editor/ace/mode-sql.js +221 -0
  215. package/dist/ace-editor/ace/mode-sqlserver.js +391 -0
  216. package/dist/ace-editor/ace/mode-stylus.js +443 -0
  217. package/dist/ace-editor/ace/mode-svg.js +1488 -0
  218. package/dist/ace-editor/ace/mode-swift.js +342 -0
  219. package/dist/ace-editor/ace/mode-tcl.js +338 -0
  220. package/dist/ace-editor/ace/mode-terraform.js +346 -0
  221. package/dist/ace-editor/ace/mode-tex.js +212 -0
  222. package/dist/ace-editor/ace/mode-text.js +9 -0
  223. package/dist/ace-editor/ace/mode-textile.js +125 -0
  224. package/dist/ace-editor/ace/mode-toml.js +129 -0
  225. package/dist/ace-editor/ace/mode-tsv.js +124 -0
  226. package/dist/ace-editor/ace/mode-tsx.js +1277 -0
  227. package/dist/ace-editor/ace/mode-turtle.js +264 -0
  228. package/dist/ace-editor/ace/mode-twig.js +2503 -0
  229. package/dist/ace-editor/ace/mode-typescript.js +1255 -0
  230. package/dist/ace-editor/ace/mode-vala.js +554 -0
  231. package/dist/ace-editor/ace/mode-vbscript.js +731 -0
  232. package/dist/ace-editor/ace/mode-velocity.js +2581 -0
  233. package/dist/ace-editor/ace/mode-verilog.js +98 -0
  234. package/dist/ace-editor/ace/mode-vhdl.js +94 -0
  235. package/dist/ace-editor/ace/mode-visualforce.js +2455 -0
  236. package/dist/ace-editor/ace/mode-vue.js +3835 -0
  237. package/dist/ace-editor/ace/mode-wollok.js +1330 -0
  238. package/dist/ace-editor/ace/mode-xml.js +477 -0
  239. package/dist/ace-editor/ace/mode-xquery.js +2589 -0
  240. package/dist/ace-editor/ace/mode-yaml.js +395 -0
  241. package/dist/ace-editor/ace/mode-zeek.js +502 -0
  242. package/dist/ace-editor/ace/mode-zig.js +585 -0
  243. package/dist/ace-editor/ace/snippets/abap.js +9 -0
  244. package/dist/ace-editor/ace/snippets/abc.js +16 -0
  245. package/dist/ace-editor/ace/snippets/actionscript.js +16 -0
  246. package/dist/ace-editor/ace/snippets/ada.js +9 -0
  247. package/dist/ace-editor/ace/snippets/alda.js +9 -0
  248. package/dist/ace-editor/ace/snippets/apache_conf.js +9 -0
  249. package/dist/ace-editor/ace/snippets/apex.js +9 -0
  250. package/dist/ace-editor/ace/snippets/applescript.js +9 -0
  251. package/dist/ace-editor/ace/snippets/aql.js +9 -0
  252. package/dist/ace-editor/ace/snippets/asciidoc.js +9 -0
  253. package/dist/ace-editor/ace/snippets/asl.js +9 -0
  254. package/dist/ace-editor/ace/snippets/assembly_arm32.js +9 -0
  255. package/dist/ace-editor/ace/snippets/assembly_x86.js +9 -0
  256. package/dist/ace-editor/ace/snippets/astro.js +9 -0
  257. package/dist/ace-editor/ace/snippets/autohotkey.js +9 -0
  258. package/dist/ace-editor/ace/snippets/basic.js +9 -0
  259. package/dist/ace-editor/ace/snippets/batchfile.js +9 -0
  260. package/dist/ace-editor/ace/snippets/bibtex.js +9 -0
  261. package/dist/ace-editor/ace/snippets/c9search.js +9 -0
  262. package/dist/ace-editor/ace/snippets/c_cpp.js +16 -0
  263. package/dist/ace-editor/ace/snippets/cedar.js +16 -0
  264. package/dist/ace-editor/ace/snippets/cedarschema.js +16 -0
  265. package/dist/ace-editor/ace/snippets/cirru.js +9 -0
  266. package/dist/ace-editor/ace/snippets/clojure.js +16 -0
  267. package/dist/ace-editor/ace/snippets/clue.js +9 -0
  268. package/dist/ace-editor/ace/snippets/cobol.js +9 -0
  269. package/dist/ace-editor/ace/snippets/coffee.js +16 -0
  270. package/dist/ace-editor/ace/snippets/coldfusion.js +9 -0
  271. package/dist/ace-editor/ace/snippets/crystal.js +9 -0
  272. package/dist/ace-editor/ace/snippets/csharp.js +9 -0
  273. package/dist/ace-editor/ace/snippets/csound_document.js +16 -0
  274. package/dist/ace-editor/ace/snippets/csound_orchestra.js +16 -0
  275. package/dist/ace-editor/ace/snippets/csound_score.js +9 -0
  276. package/dist/ace-editor/ace/snippets/csp.js +9 -0
  277. package/dist/ace-editor/ace/snippets/css.js +16 -0
  278. package/dist/ace-editor/ace/snippets/csv.js +9 -0
  279. package/dist/ace-editor/ace/snippets/curly.js +9 -0
  280. package/dist/ace-editor/ace/snippets/cuttlefish.js +9 -0
  281. package/dist/ace-editor/ace/snippets/d.js +9 -0
  282. package/dist/ace-editor/ace/snippets/dart.js +16 -0
  283. package/dist/ace-editor/ace/snippets/diff.js +16 -0
  284. package/dist/ace-editor/ace/snippets/django.js +16 -0
  285. package/dist/ace-editor/ace/snippets/dockerfile.js +9 -0
  286. package/dist/ace-editor/ace/snippets/dot.js +9 -0
  287. package/dist/ace-editor/ace/snippets/drools.js +16 -0
  288. package/dist/ace-editor/ace/snippets/edifact.js +16 -0
  289. package/dist/ace-editor/ace/snippets/eiffel.js +9 -0
  290. package/dist/ace-editor/ace/snippets/ejs.js +9 -0
  291. package/dist/ace-editor/ace/snippets/elixir.js +9 -0
  292. package/dist/ace-editor/ace/snippets/elm.js +9 -0
  293. package/dist/ace-editor/ace/snippets/erlang.js +16 -0
  294. package/dist/ace-editor/ace/snippets/flix.js +9 -0
  295. package/dist/ace-editor/ace/snippets/forth.js +9 -0
  296. package/dist/ace-editor/ace/snippets/fortran.js +9 -0
  297. package/dist/ace-editor/ace/snippets/fsharp.js +9 -0
  298. package/dist/ace-editor/ace/snippets/fsl.js +16 -0
  299. package/dist/ace-editor/ace/snippets/ftl.js +9 -0
  300. package/dist/ace-editor/ace/snippets/gcode.js +9 -0
  301. package/dist/ace-editor/ace/snippets/gherkin.js +9 -0
  302. package/dist/ace-editor/ace/snippets/gitignore.js +9 -0
  303. package/dist/ace-editor/ace/snippets/glsl.js +9 -0
  304. package/dist/ace-editor/ace/snippets/gobstones.js +16 -0
  305. package/dist/ace-editor/ace/snippets/golang.js +9 -0
  306. package/dist/ace-editor/ace/snippets/graphqlschema.js +16 -0
  307. package/dist/ace-editor/ace/snippets/groovy.js +9 -0
  308. package/dist/ace-editor/ace/snippets/groq.js +9 -0
  309. package/dist/ace-editor/ace/snippets/haml.js +16 -0
  310. package/dist/ace-editor/ace/snippets/handlebars.js +9 -0
  311. package/dist/ace-editor/ace/snippets/haskell.js +16 -0
  312. package/dist/ace-editor/ace/snippets/haskell_cabal.js +9 -0
  313. package/dist/ace-editor/ace/snippets/haxe.js +9 -0
  314. package/dist/ace-editor/ace/snippets/hjson.js +9 -0
  315. package/dist/ace-editor/ace/snippets/html.js +16 -0
  316. package/dist/ace-editor/ace/snippets/html_elixir.js +9 -0
  317. package/dist/ace-editor/ace/snippets/html_ruby.js +9 -0
  318. package/dist/ace-editor/ace/snippets/ini.js +9 -0
  319. package/dist/ace-editor/ace/snippets/io.js +74 -0
  320. package/dist/ace-editor/ace/snippets/ion.js +9 -0
  321. package/dist/ace-editor/ace/snippets/jack.js +9 -0
  322. package/dist/ace-editor/ace/snippets/jade.js +9 -0
  323. package/dist/ace-editor/ace/snippets/java.js +16 -0
  324. package/dist/ace-editor/ace/snippets/javascript.js +16 -0
  325. package/dist/ace-editor/ace/snippets/jexl.js +9 -0
  326. package/dist/ace-editor/ace/snippets/json.js +9 -0
  327. package/dist/ace-editor/ace/snippets/json5.js +9 -0
  328. package/dist/ace-editor/ace/snippets/jsoniq.js +78 -0
  329. package/dist/ace-editor/ace/snippets/jsp.js +16 -0
  330. package/dist/ace-editor/ace/snippets/jssm.js +9 -0
  331. package/dist/ace-editor/ace/snippets/jsx.js +9 -0
  332. package/dist/ace-editor/ace/snippets/julia.js +9 -0
  333. package/dist/ace-editor/ace/snippets/kotlin.js +9 -0
  334. package/dist/ace-editor/ace/snippets/latex.js +9 -0
  335. package/dist/ace-editor/ace/snippets/latte.js +9 -0
  336. package/dist/ace-editor/ace/snippets/less.js +9 -0
  337. package/dist/ace-editor/ace/snippets/liquid.js +16 -0
  338. package/dist/ace-editor/ace/snippets/lisp.js +9 -0
  339. package/dist/ace-editor/ace/snippets/livescript.js +9 -0
  340. package/dist/ace-editor/ace/snippets/logiql.js +9 -0
  341. package/dist/ace-editor/ace/snippets/logtalk.js +9 -0
  342. package/dist/ace-editor/ace/snippets/lsl.js +16 -0
  343. package/dist/ace-editor/ace/snippets/lua.js +16 -0
  344. package/dist/ace-editor/ace/snippets/luapage.js +9 -0
  345. package/dist/ace-editor/ace/snippets/lucene.js +9 -0
  346. package/dist/ace-editor/ace/snippets/makefile.js +16 -0
  347. package/dist/ace-editor/ace/snippets/mariadb.js +9 -0
  348. package/dist/ace-editor/ace/snippets/markdown.js +16 -0
  349. package/dist/ace-editor/ace/snippets/mask.js +9 -0
  350. package/dist/ace-editor/ace/snippets/matlab.js +9 -0
  351. package/dist/ace-editor/ace/snippets/maze.js +16 -0
  352. package/dist/ace-editor/ace/snippets/mediawiki.js +9 -0
  353. package/dist/ace-editor/ace/snippets/mel.js +9 -0
  354. package/dist/ace-editor/ace/snippets/mips.js +9 -0
  355. package/dist/ace-editor/ace/snippets/mixal.js +9 -0
  356. package/dist/ace-editor/ace/snippets/mushcode.js +9 -0
  357. package/dist/ace-editor/ace/snippets/mysql.js +9 -0
  358. package/dist/ace-editor/ace/snippets/nasal.js +9 -0
  359. package/dist/ace-editor/ace/snippets/nginx.js +9 -0
  360. package/dist/ace-editor/ace/snippets/nim.js +9 -0
  361. package/dist/ace-editor/ace/snippets/nix.js +9 -0
  362. package/dist/ace-editor/ace/snippets/nsis.js +9 -0
  363. package/dist/ace-editor/ace/snippets/nunjucks.js +9 -0
  364. package/dist/ace-editor/ace/snippets/objectivec.js +9 -0
  365. package/dist/ace-editor/ace/snippets/ocaml.js +9 -0
  366. package/dist/ace-editor/ace/snippets/odin.js +9 -0
  367. package/dist/ace-editor/ace/snippets/partiql.js +9 -0
  368. package/dist/ace-editor/ace/snippets/pascal.js +9 -0
  369. package/dist/ace-editor/ace/snippets/perl.js +16 -0
  370. package/dist/ace-editor/ace/snippets/pgsql.js +9 -0
  371. package/dist/ace-editor/ace/snippets/php.js +16 -0
  372. package/dist/ace-editor/ace/snippets/php_laravel_blade.js +9 -0
  373. package/dist/ace-editor/ace/snippets/pig.js +9 -0
  374. package/dist/ace-editor/ace/snippets/plain_text.js +9 -0
  375. package/dist/ace-editor/ace/snippets/plsql.js +9 -0
  376. package/dist/ace-editor/ace/snippets/powershell.js +9 -0
  377. package/dist/ace-editor/ace/snippets/praat.js +9 -0
  378. package/dist/ace-editor/ace/snippets/prisma.js +9 -0
  379. package/dist/ace-editor/ace/snippets/prolog.js +9 -0
  380. package/dist/ace-editor/ace/snippets/properties.js +9 -0
  381. package/dist/ace-editor/ace/snippets/protobuf.js +9 -0
  382. package/dist/ace-editor/ace/snippets/prql.js +9 -0
  383. package/dist/ace-editor/ace/snippets/puppet.js +9 -0
  384. package/dist/ace-editor/ace/snippets/python.js +16 -0
  385. package/dist/ace-editor/ace/snippets/qml.js +9 -0
  386. package/dist/ace-editor/ace/snippets/r.js +16 -0
  387. package/dist/ace-editor/ace/snippets/raku.js +9 -0
  388. package/dist/ace-editor/ace/snippets/razor.js +16 -0
  389. package/dist/ace-editor/ace/snippets/rdoc.js +9 -0
  390. package/dist/ace-editor/ace/snippets/red.js +9 -0
  391. package/dist/ace-editor/ace/snippets/redshift.js +9 -0
  392. package/dist/ace-editor/ace/snippets/rhtml.js +9 -0
  393. package/dist/ace-editor/ace/snippets/robot.js +16 -0
  394. package/dist/ace-editor/ace/snippets/rst.js +16 -0
  395. package/dist/ace-editor/ace/snippets/ruby.js +16 -0
  396. package/dist/ace-editor/ace/snippets/rust.js +9 -0
  397. package/dist/ace-editor/ace/snippets/sac.js +9 -0
  398. package/dist/ace-editor/ace/snippets/sass.js +9 -0
  399. package/dist/ace-editor/ace/snippets/scad.js +9 -0
  400. package/dist/ace-editor/ace/snippets/scala.js +9 -0
  401. package/dist/ace-editor/ace/snippets/scheme.js +9 -0
  402. package/dist/ace-editor/ace/snippets/scrypt.js +9 -0
  403. package/dist/ace-editor/ace/snippets/scss.js +9 -0
  404. package/dist/ace-editor/ace/snippets/sh.js +16 -0
  405. package/dist/ace-editor/ace/snippets/sjs.js +9 -0
  406. package/dist/ace-editor/ace/snippets/slim.js +9 -0
  407. package/dist/ace-editor/ace/snippets/smarty.js +9 -0
  408. package/dist/ace-editor/ace/snippets/smithy.js +9 -0
  409. package/dist/ace-editor/ace/snippets/snippets.js +16 -0
  410. package/dist/ace-editor/ace/snippets/soy_template.js +9 -0
  411. package/dist/ace-editor/ace/snippets/space.js +9 -0
  412. package/dist/ace-editor/ace/snippets/sparql.js +9 -0
  413. package/dist/ace-editor/ace/snippets/sql.js +16 -0
  414. package/dist/ace-editor/ace/snippets/sqlserver.js +16 -0
  415. package/dist/ace-editor/ace/snippets/stylus.js +9 -0
  416. package/dist/ace-editor/ace/snippets/svg.js +9 -0
  417. package/dist/ace-editor/ace/snippets/swift.js +9 -0
  418. package/dist/ace-editor/ace/snippets/tcl.js +16 -0
  419. package/dist/ace-editor/ace/snippets/terraform.js +9 -0
  420. package/dist/ace-editor/ace/snippets/tex.js +16 -0
  421. package/dist/ace-editor/ace/snippets/text.js +9 -0
  422. package/dist/ace-editor/ace/snippets/textile.js +16 -0
  423. package/dist/ace-editor/ace/snippets/toml.js +9 -0
  424. package/dist/ace-editor/ace/snippets/tsv.js +9 -0
  425. package/dist/ace-editor/ace/snippets/tsx.js +9 -0
  426. package/dist/ace-editor/ace/snippets/turtle.js +9 -0
  427. package/dist/ace-editor/ace/snippets/twig.js +9 -0
  428. package/dist/ace-editor/ace/snippets/typescript.js +9 -0
  429. package/dist/ace-editor/ace/snippets/vala.js +199 -0
  430. package/dist/ace-editor/ace/snippets/vbscript.js +9 -0
  431. package/dist/ace-editor/ace/snippets/velocity.js +17 -0
  432. package/dist/ace-editor/ace/snippets/verilog.js +9 -0
  433. package/dist/ace-editor/ace/snippets/vhdl.js +9 -0
  434. package/dist/ace-editor/ace/snippets/visualforce.js +9 -0
  435. package/dist/ace-editor/ace/snippets/vue.js +9 -0
  436. package/dist/ace-editor/ace/snippets/wollok.js +16 -0
  437. package/dist/ace-editor/ace/snippets/xml.js +9 -0
  438. package/dist/ace-editor/ace/snippets/xquery.js +78 -0
  439. package/dist/ace-editor/ace/snippets/yaml.js +9 -0
  440. package/dist/ace-editor/ace/snippets/zeek.js +9 -0
  441. package/dist/ace-editor/ace/snippets/zig.js +9 -0
  442. package/dist/ace-editor/ace/theme-ambiance.js +18 -0
  443. package/dist/ace-editor/ace/theme-chaos.js +18 -0
  444. package/dist/ace-editor/ace/theme-chrome.js +18 -0
  445. package/dist/ace-editor/ace/theme-cloud9_day.js +19 -0
  446. package/dist/ace-editor/ace/theme-cloud9_night.js +18 -0
  447. package/dist/ace-editor/ace/theme-cloud9_night_low_color.js +18 -0
  448. package/dist/ace-editor/ace/theme-cloud_editor.js +19 -0
  449. package/dist/ace-editor/ace/theme-cloud_editor_dark.js +19 -0
  450. package/dist/ace-editor/ace/theme-clouds.js +18 -0
  451. package/dist/ace-editor/ace/theme-clouds_midnight.js +18 -0
  452. package/dist/ace-editor/ace/theme-cobalt.js +18 -0
  453. package/dist/ace-editor/ace/theme-crimson_editor.js +18 -0
  454. package/dist/ace-editor/ace/theme-dawn.js +18 -0
  455. package/dist/ace-editor/ace/theme-dracula.js +19 -0
  456. package/dist/ace-editor/ace/theme-dreamweaver.js +18 -0
  457. package/dist/ace-editor/ace/theme-eclipse.js +19 -0
  458. package/dist/ace-editor/ace/theme-github.js +18 -0
  459. package/dist/ace-editor/ace/theme-github_dark.js +18 -0
  460. package/dist/ace-editor/ace/theme-github_light_default.js +18 -0
  461. package/dist/ace-editor/ace/theme-gob.js +18 -0
  462. package/dist/ace-editor/ace/theme-gruvbox.js +18 -0
  463. package/dist/ace-editor/ace/theme-gruvbox_dark_hard.js +18 -0
  464. package/dist/ace-editor/ace/theme-gruvbox_light_hard.js +18 -0
  465. package/dist/ace-editor/ace/theme-idle_fingers.js +18 -0
  466. package/dist/ace-editor/ace/theme-iplastic.js +18 -0
  467. package/dist/ace-editor/ace/theme-katzenmilch.js +18 -0
  468. package/dist/ace-editor/ace/theme-kr_theme.js +18 -0
  469. package/dist/ace-editor/ace/theme-kuroir.js +18 -0
  470. package/dist/ace-editor/ace/theme-merbivore.js +18 -0
  471. package/dist/ace-editor/ace/theme-merbivore_soft.js +18 -0
  472. package/dist/ace-editor/ace/theme-mono_industrial.js +18 -0
  473. package/dist/ace-editor/ace/theme-monokai.js +18 -0
  474. package/dist/ace-editor/ace/theme-nord_dark.js +19 -0
  475. package/dist/ace-editor/ace/theme-one_dark.js +18 -0
  476. package/dist/ace-editor/ace/theme-pastel_on_dark.js +18 -0
  477. package/dist/ace-editor/ace/theme-solarized_dark.js +18 -0
  478. package/dist/ace-editor/ace/theme-solarized_light.js +18 -0
  479. package/dist/ace-editor/ace/theme-sqlserver.js +18 -0
  480. package/dist/ace-editor/ace/theme-terminal.js +18 -0
  481. package/dist/ace-editor/ace/theme-textmate.js +16 -0
  482. package/dist/ace-editor/ace/theme-tomorrow.js +18 -0
  483. package/dist/ace-editor/ace/theme-tomorrow_night.js +18 -0
  484. package/dist/ace-editor/ace/theme-tomorrow_night_blue.js +18 -0
  485. package/dist/ace-editor/ace/theme-tomorrow_night_bright.js +18 -0
  486. package/dist/ace-editor/ace/theme-tomorrow_night_eighties.js +18 -0
  487. package/dist/ace-editor/ace/theme-twilight.js +18 -0
  488. package/dist/ace-editor/ace/theme-vibrant_ink.js +18 -0
  489. package/dist/ace-editor/ace/theme-xcode.js +18 -0
  490. package/dist/ace-editor/ace/worker-base.js +1337 -0
  491. package/dist/ace-editor/ace/worker-coffee.js +1386 -0
  492. package/dist/ace-editor/ace/worker-css.js +8918 -0
  493. package/dist/ace-editor/ace/worker-html.js +10848 -0
  494. package/dist/ace-editor/ace/worker-javascript.js +15358 -0
  495. package/dist/ace-editor/ace/worker-json.js +1631 -0
  496. package/dist/ace-editor/ace/worker-lua.js +3524 -0
  497. package/dist/ace-editor/ace/worker-php.js +3793 -0
  498. package/dist/ace-editor/ace/worker-xml.js +3127 -0
  499. package/dist/ace-editor/ace/worker-xquery.js +57584 -0
  500. package/dist/ace-editor/ace/worker-yaml.js +5824 -0
  501. package/dist/ace-editor/internal/AceEditor.d.ts +22 -0
  502. package/dist/ace-editor/internal/AceEditor.js +113 -0
  503. package/dist/ace-editor/internal/AceEditor.js.map +1 -0
  504. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.d.ts +55 -0
  505. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js +205 -0
  506. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js.map +1 -0
  507. package/dist/ace-editor/internal/ace-editor-base/debounce.d.ts +24 -0
  508. package/dist/ace-editor/internal/ace-editor-base/debounce.js +41 -0
  509. package/dist/ace-editor/internal/ace-editor-base/debounce.js.map +1 -0
  510. package/dist/ace-editor/internal/ace-editor-base/property-decorators.d.ts +66 -0
  511. package/dist/ace-editor/internal/ace-editor-base/property-decorators.js +171 -0
  512. package/dist/ace-editor/internal/ace-editor-base/property-decorators.js.map +1 -0
  513. package/dist/ace-editor/internal/ace-theme-oscd.d.ts +1 -0
  514. package/dist/ace-editor/internal/ace-theme-oscd.js +247 -0
  515. package/dist/ace-editor/internal/ace-theme-oscd.js.map +1 -0
  516. package/dist/ace-editor/internal/ace.config.d.ts +54 -0
  517. package/dist/ace-editor/internal/ace.config.js +61 -0
  518. package/dist/ace-editor/internal/ace.config.js.map +1 -0
  519. package/dist/ace-editor/oscd-ace-editor.d.ts +2 -0
  520. package/dist/ace-editor/oscd-ace-editor.js +4 -0
  521. package/dist/ace-editor/oscd-ace-editor.js.map +1 -0
  522. package/dist/action-icon/OscdActionIcon.js +1 -3
  523. package/dist/action-icon/OscdActionIcon.js.map +1 -1
  524. package/dist/action-list/OscdActionList.js +8 -8
  525. package/dist/action-list/OscdActionList.js.map +1 -1
  526. package/dist/action-pane/OscdActionPane.js +1 -3
  527. package/dist/action-pane/OscdActionPane.js.map +1 -1
  528. package/dist/action-tree/OscdActionTree.js +23 -23
  529. package/dist/action-tree/OscdActionTree.js.map +1 -1
  530. package/dist/app-bar/OscdAppBar.d.ts +1 -1
  531. package/dist/app-bar/OscdAppBar.js +1 -1
  532. package/dist/app-bar/OscdAppBar.js.map +1 -1
  533. package/dist/app-bar/oscd-app-bar.d.ts +1 -1
  534. package/dist/app-bar/oscd-app-bar.js +1 -1
  535. package/dist/app-bar/oscd-app-bar.js.map +1 -1
  536. package/dist/button/OscdElevatedButton.d.ts +1 -1
  537. package/dist/button/OscdElevatedButton.js +1 -1
  538. package/dist/button/OscdElevatedButton.js.map +1 -1
  539. package/dist/button/OscdFilledButton.d.ts +1 -1
  540. package/dist/button/OscdFilledButton.js +1 -1
  541. package/dist/button/OscdFilledButton.js.map +1 -1
  542. package/dist/button/OscdFilledTonalButton.d.ts +1 -1
  543. package/dist/button/OscdFilledTonalButton.js +1 -1
  544. package/dist/button/OscdFilledTonalButton.js.map +1 -1
  545. package/dist/button/OscdOutlinedButton.d.ts +1 -1
  546. package/dist/button/OscdOutlinedButton.js +1 -1
  547. package/dist/button/OscdOutlinedButton.js.map +1 -1
  548. package/dist/button/OscdTextButton.d.ts +1 -1
  549. package/dist/button/OscdTextButton.js +1 -1
  550. package/dist/button/OscdTextButton.js.map +1 -1
  551. package/dist/checkbox/OscdCheckbox.d.ts +1 -1
  552. package/dist/checkbox/OscdCheckbox.js +1 -1
  553. package/dist/checkbox/OscdCheckbox.js.map +1 -1
  554. package/dist/chips/OscdAssistChip.d.ts +1 -1
  555. package/dist/chips/OscdAssistChip.js +1 -1
  556. package/dist/chips/OscdAssistChip.js.map +1 -1
  557. package/dist/chips/OscdChipSet.d.ts +1 -1
  558. package/dist/chips/OscdChipSet.js.map +1 -1
  559. package/dist/chips/OscdFilterChip.d.ts +1 -1
  560. package/dist/chips/OscdFilterChip.js +1 -1
  561. package/dist/chips/OscdFilterChip.js.map +1 -1
  562. package/dist/chips/OscdInputChip.d.ts +1 -1
  563. package/dist/chips/OscdInputChip.js +1 -1
  564. package/dist/chips/OscdInputChip.js.map +1 -1
  565. package/dist/chips/OscdSuggestionChip.d.ts +1 -1
  566. package/dist/chips/OscdSuggestionChip.js +1 -1
  567. package/dist/chips/OscdSuggestionChip.js.map +1 -1
  568. package/dist/decorators/localstorage.js.map +1 -1
  569. package/dist/dialog/OscdDialog.d.ts +1 -1
  570. package/dist/dialog/OscdDialog.js +1 -1
  571. package/dist/dialog/OscdDialog.js.map +1 -1
  572. package/dist/dialog/warning/OscdWarnDialog.d.ts +31 -0
  573. package/dist/dialog/warning/OscdWarnDialog.js +74 -0
  574. package/dist/dialog/warning/OscdWarnDialog.js.map +1 -0
  575. package/dist/dialog/warning/oscd-warn-dialog.d.ts +2 -0
  576. package/dist/dialog/warning/oscd-warn-dialog.js +4 -0
  577. package/dist/dialog/warning/oscd-warn-dialog.js.map +1 -0
  578. package/dist/divider/OscdDivider.d.ts +1 -1
  579. package/dist/divider/OscdDivider.js.map +1 -1
  580. package/dist/elevation/OscdElevation.d.ts +1 -1
  581. package/dist/elevation/OscdElevation.js.map +1 -1
  582. package/dist/fab/OscdBrandedFab.d.ts +1 -1
  583. package/dist/fab/OscdBrandedFab.js +1 -1
  584. package/dist/fab/OscdBrandedFab.js.map +1 -1
  585. package/dist/fab/OscdFab.d.ts +1 -1
  586. package/dist/fab/OscdFab.js +1 -1
  587. package/dist/fab/OscdFab.js.map +1 -1
  588. package/dist/field/OscdFilledField.d.ts +1 -1
  589. package/dist/field/OscdFilledField.js.map +1 -1
  590. package/dist/field/OscdOutlinedField.d.ts +1 -1
  591. package/dist/field/OscdOutlinedField.js.map +1 -1
  592. package/dist/filter-button/OscdFilterButton.js.map +1 -1
  593. package/dist/focus/OscdFocusRing.d.ts +1 -1
  594. package/dist/focus/OscdFocusRing.js.map +1 -1
  595. package/dist/icon/OscdIcon.d.ts +1 -1
  596. package/dist/icon/OscdIcon.js +1 -1
  597. package/dist/icon/OscdIcon.js.map +1 -1
  598. package/dist/icon/internal/icon.d.ts +1 -1
  599. package/dist/icon/internal/icon.js +1 -1
  600. package/dist/icon/internal/icon.js.map +1 -1
  601. package/dist/iconbutton/OscdFilledIconButton.d.ts +1 -1
  602. package/dist/iconbutton/OscdFilledIconButton.js +1 -1
  603. package/dist/iconbutton/OscdFilledIconButton.js.map +1 -1
  604. package/dist/iconbutton/OscdFilledTonalIconButton.d.ts +1 -1
  605. package/dist/iconbutton/OscdFilledTonalIconButton.js +1 -1
  606. package/dist/iconbutton/OscdFilledTonalIconButton.js.map +1 -1
  607. package/dist/iconbutton/OscdIconButton.d.ts +1 -1
  608. package/dist/iconbutton/OscdIconButton.js +1 -1
  609. package/dist/iconbutton/OscdIconButton.js.map +1 -1
  610. package/dist/iconbutton/OscdOutlinedIconButton.d.ts +1 -1
  611. package/dist/iconbutton/OscdOutlinedIconButton.js +1 -1
  612. package/dist/iconbutton/OscdOutlinedIconButton.js.map +1 -1
  613. package/dist/labs/badge/OscdBadge.d.ts +1 -1
  614. package/dist/labs/badge/OscdBadge.js.map +1 -1
  615. package/dist/labs/card/OscdElevatedCard.d.ts +1 -1
  616. package/dist/labs/card/OscdElevatedCard.js +1 -1
  617. package/dist/labs/card/OscdElevatedCard.js.map +1 -1
  618. package/dist/labs/card/OscdFilledCard.d.ts +1 -1
  619. package/dist/labs/card/OscdFilledCard.js +1 -1
  620. package/dist/labs/card/OscdFilledCard.js.map +1 -1
  621. package/dist/labs/card/OscdOutlinedCard.d.ts +1 -1
  622. package/dist/labs/card/OscdOutlinedCard.js +1 -1
  623. package/dist/labs/card/OscdOutlinedCard.js.map +1 -1
  624. package/dist/labs/item/OscdItem.d.ts +1 -1
  625. package/dist/labs/item/OscdItem.js.map +1 -1
  626. package/dist/labs/navigationbar/OscdNavigationBar.d.ts +1 -1
  627. package/dist/labs/navigationbar/OscdNavigationBar.js +1 -1
  628. package/dist/labs/navigationbar/OscdNavigationBar.js.map +1 -1
  629. package/dist/labs/navigationtab/OscdNavigationTab.d.ts +1 -1
  630. package/dist/labs/navigationtab/OscdNavigationTab.js +1 -1
  631. package/dist/labs/navigationtab/OscdNavigationTab.js.map +1 -1
  632. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.d.ts +1 -1
  633. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js +1 -1
  634. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js.map +1 -1
  635. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.d.ts +1 -1
  636. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.js.map +1 -1
  637. package/dist/list/OscdList.d.ts +1 -1
  638. package/dist/list/OscdList.js.map +1 -1
  639. package/dist/list/OscdListItem.d.ts +1 -1
  640. package/dist/list/OscdListItem.js +1 -1
  641. package/dist/list/OscdListItem.js.map +1 -1
  642. package/dist/menu/OscdMenu.d.ts +1 -1
  643. package/dist/menu/OscdMenu.js +1 -1
  644. package/dist/menu/OscdMenu.js.map +1 -1
  645. package/dist/menu/OscdMenuItem.d.ts +1 -1
  646. package/dist/menu/OscdMenuItem.js +1 -1
  647. package/dist/menu/OscdMenuItem.js.map +1 -1
  648. package/dist/menu/OscdSubMenu.d.ts +1 -1
  649. package/dist/menu/OscdSubMenu.js.map +1 -1
  650. package/dist/navigation-drawer/OscdNavigationDrawer.d.ts +1 -1
  651. package/dist/navigation-drawer/OscdNavigationDrawer.js +1 -1
  652. package/dist/navigation-drawer/OscdNavigationDrawer.js.map +1 -1
  653. package/dist/navigation-drawer/OscdNavigationDrawerHeader.d.ts +1 -1
  654. package/dist/navigation-drawer/OscdNavigationDrawerHeader.js +1 -1
  655. package/dist/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -1
  656. package/dist/progress/OscdCircularProgress.d.ts +1 -1
  657. package/dist/progress/OscdCircularProgress.js.map +1 -1
  658. package/dist/progress/OscdLinearProgress.d.ts +1 -1
  659. package/dist/progress/OscdLinearProgress.js.map +1 -1
  660. package/dist/radio/OscdRadio.d.ts +1 -1
  661. package/dist/radio/OscdRadio.js +1 -1
  662. package/dist/radio/OscdRadio.js.map +1 -1
  663. package/dist/ripple/OscdRipple.d.ts +1 -1
  664. package/dist/ripple/OscdRipple.js.map +1 -1
  665. package/dist/scl-checkbox/OscdSclCheckbox.js +1 -3
  666. package/dist/scl-checkbox/OscdSclCheckbox.js.map +1 -1
  667. package/dist/scl-icon/OscdSclIcon.d.ts +1 -1
  668. package/dist/scl-icon/OscdSclIcon.js +1 -1
  669. package/dist/scl-icon/OscdSclIcon.js.map +1 -1
  670. package/dist/search-field/internal/OutlinedSearchField.js.map +1 -1
  671. package/dist/select/OscdFilledSelect.d.ts +1 -1
  672. package/dist/select/OscdFilledSelect.js +1 -1
  673. package/dist/select/OscdFilledSelect.js.map +1 -1
  674. package/dist/select/OscdOutlinedSelect.d.ts +1 -1
  675. package/dist/select/OscdOutlinedSelect.js +1 -1
  676. package/dist/select/OscdOutlinedSelect.js.map +1 -1
  677. package/dist/select/OscdSelectOption.d.ts +1 -1
  678. package/dist/select/OscdSelectOption.js +1 -1
  679. package/dist/select/OscdSelectOption.js.map +1 -1
  680. package/dist/selection-list/OscdSelectionList.js.map +1 -1
  681. package/dist/slider/OscdSlider.d.ts +1 -1
  682. package/dist/slider/OscdSlider.js +1 -1
  683. package/dist/slider/OscdSlider.js.map +1 -1
  684. package/dist/switch/OscdSwitch.d.ts +1 -1
  685. package/dist/switch/OscdSwitch.js +1 -1
  686. package/dist/switch/OscdSwitch.js.map +1 -1
  687. package/dist/tabs/OscdPrimaryTab.d.ts +1 -1
  688. package/dist/tabs/OscdPrimaryTab.js +1 -1
  689. package/dist/tabs/OscdPrimaryTab.js.map +1 -1
  690. package/dist/tabs/OscdPrimaryTab.stories.js +1 -3
  691. package/dist/tabs/OscdPrimaryTab.stories.js.map +1 -1
  692. package/dist/tabs/OscdSecondaryTab.d.ts +1 -1
  693. package/dist/tabs/OscdSecondaryTab.js +1 -1
  694. package/dist/tabs/OscdSecondaryTab.js.map +1 -1
  695. package/dist/tabs/OscdSecondaryTab.stories.js +1 -3
  696. package/dist/tabs/OscdSecondaryTab.stories.js.map +1 -1
  697. package/dist/tabs/OscdTabs.d.ts +1 -1
  698. package/dist/tabs/OscdTabs.js +1 -1
  699. package/dist/tabs/OscdTabs.js.map +1 -1
  700. package/dist/textfield/OscdFilledTextField.d.ts +1 -1
  701. package/dist/textfield/OscdFilledTextField.js +1 -1
  702. package/dist/textfield/OscdFilledTextField.js.map +1 -1
  703. package/dist/textfield/OscdOutlinedTextField.d.ts +1 -1
  704. package/dist/textfield/OscdOutlinedTextField.js +1 -1
  705. package/dist/textfield/OscdOutlinedTextField.js.map +1 -1
  706. package/dist/tree/OscdTree.stories.js.map +1 -1
  707. package/dist/tree/internal/Tree.js +2 -2
  708. package/dist/tree/internal/Tree.js.map +1 -1
  709. package/dist/tree-grid/OscdTreeGrid.js +1 -4
  710. package/dist/tree-grid/OscdTreeGrid.js.map +1 -1
  711. package/dist/utils/storybook/getStorybookHelpers.js +2 -2
  712. package/dist/utils/storybook/getStorybookHelpers.js.map +1 -1
  713. package/dist/utils/storybook/getStorybookMeta.d.ts +5 -0
  714. package/dist/utils/storybook/getStorybookMeta.js +2 -1
  715. package/dist/utils/storybook/getStorybookMeta.js.map +1 -1
  716. package/package.json +39 -71
@@ -0,0 +1,3127 @@
1
+ "no use strict";
2
+ !(function(window) {
3
+ if (typeof window.window != "undefined" && window.document)
4
+ return;
5
+ if (window.require && window.define)
6
+ return;
7
+
8
+ if (!window.console) {
9
+ window.console = function() {
10
+ var msgs = Array.prototype.slice.call(arguments, 0);
11
+ postMessage({type: "log", data: msgs});
12
+ };
13
+ window.console.error =
14
+ window.console.warn =
15
+ window.console.log =
16
+ window.console.trace = window.console;
17
+ }
18
+ window.window = window;
19
+ window.ace = window;
20
+
21
+ window.onerror = function(message, file, line, col, err) {
22
+ postMessage({type: "error", data: {
23
+ message: message,
24
+ data: err && err.data,
25
+ file: file,
26
+ line: line,
27
+ col: col,
28
+ stack: err && err.stack
29
+ }});
30
+ };
31
+
32
+ window.normalizeModule = function(parentId, moduleName) {
33
+ // normalize plugin requires
34
+ if (moduleName.indexOf("!") !== -1) {
35
+ var chunks = moduleName.split("!");
36
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
37
+ }
38
+ // normalize relative requires
39
+ if (moduleName.charAt(0) == ".") {
40
+ var base = parentId.split("/").slice(0, -1).join("/");
41
+ moduleName = (base ? base + "/" : "") + moduleName;
42
+
43
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
44
+ var previous = moduleName;
45
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
46
+ }
47
+ }
48
+
49
+ return moduleName;
50
+ };
51
+
52
+ window.require = function require(parentId, id) {
53
+ if (!id) {
54
+ id = parentId;
55
+ parentId = null;
56
+ }
57
+ if (!id.charAt)
58
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
59
+
60
+ id = window.normalizeModule(parentId, id);
61
+
62
+ var module = window.require.modules[id];
63
+ if (module) {
64
+ if (!module.initialized) {
65
+ module.initialized = true;
66
+ module.exports = module.factory().exports;
67
+ }
68
+ return module.exports;
69
+ }
70
+
71
+ if (!window.require.tlns)
72
+ return console.log("unable to load " + id);
73
+
74
+ var path = resolveModuleId(id, window.require.tlns);
75
+ if (path.slice(-3) != ".js") path += ".js";
76
+
77
+ window.require.id = id;
78
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
79
+ importScripts(path);
80
+ return window.require(parentId, id);
81
+ };
82
+ function resolveModuleId(id, paths) {
83
+ var testPath = id, tail = "";
84
+ while (testPath) {
85
+ var alias = paths[testPath];
86
+ if (typeof alias == "string") {
87
+ return alias + tail;
88
+ } else if (alias) {
89
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
90
+ } else if (alias === false) {
91
+ return "";
92
+ }
93
+ var i = testPath.lastIndexOf("/");
94
+ if (i === -1) break;
95
+ tail = testPath.substr(i) + tail;
96
+ testPath = testPath.slice(0, i);
97
+ }
98
+ return id;
99
+ }
100
+ window.require.modules = {};
101
+ window.require.tlns = {};
102
+
103
+ window.define = function(id, deps, factory) {
104
+ if (arguments.length == 2) {
105
+ factory = deps;
106
+ if (typeof id != "string") {
107
+ deps = id;
108
+ id = window.require.id;
109
+ }
110
+ } else if (arguments.length == 1) {
111
+ factory = id;
112
+ deps = [];
113
+ id = window.require.id;
114
+ }
115
+
116
+ if (typeof factory != "function") {
117
+ window.require.modules[id] = {
118
+ exports: factory,
119
+ initialized: true
120
+ };
121
+ return;
122
+ }
123
+
124
+ if (!deps.length)
125
+ // If there is no dependencies, we inject "require", "exports" and
126
+ // "module" as dependencies, to provide CommonJS compatibility.
127
+ deps = ["require", "exports", "module"];
128
+
129
+ var req = function(childId) {
130
+ return window.require(id, childId);
131
+ };
132
+
133
+ window.require.modules[id] = {
134
+ exports: {},
135
+ factory: function() {
136
+ var module = this;
137
+ var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) {
138
+ switch (dep) {
139
+ // Because "require", "exports" and "module" aren't actual
140
+ // dependencies, we must handle them seperately.
141
+ case "require": return req;
142
+ case "exports": return module.exports;
143
+ case "module": return module;
144
+ // But for all other dependencies, we can just go ahead and
145
+ // require them.
146
+ default: return req(dep);
147
+ }
148
+ }));
149
+ if (returnExports)
150
+ module.exports = returnExports;
151
+ return module;
152
+ }
153
+ };
154
+ };
155
+ window.define.amd = {};
156
+ window.require.tlns = {};
157
+ window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
158
+ for (var i in topLevelNamespaces)
159
+ this.require.tlns[i] = topLevelNamespaces[i];
160
+ };
161
+
162
+ window.initSender = function initSender() {
163
+
164
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
165
+ var oop = window.require("ace/lib/oop");
166
+
167
+ var Sender = function() {};
168
+
169
+ (function() {
170
+
171
+ oop.implement(this, EventEmitter);
172
+
173
+ this.callback = function(data, callbackId) {
174
+ postMessage({
175
+ type: "call",
176
+ id: callbackId,
177
+ data: data
178
+ });
179
+ };
180
+
181
+ this.emit = function(name, data) {
182
+ postMessage({
183
+ type: "event",
184
+ name: name,
185
+ data: data
186
+ });
187
+ };
188
+
189
+ }).call(Sender.prototype);
190
+
191
+ return new Sender();
192
+ };
193
+
194
+ var main = window.main = null;
195
+ var sender = window.sender = null;
196
+
197
+ window.onmessage = function(e) {
198
+ var msg = e.data;
199
+ if (msg.event && sender) {
200
+ sender._signal(msg.event, msg.data);
201
+ }
202
+ else if (msg.command) {
203
+ if (main[msg.command])
204
+ main[msg.command].apply(main, msg.args);
205
+ else if (window[msg.command])
206
+ window[msg.command].apply(window, msg.args);
207
+ else
208
+ throw new Error("Unknown command:" + msg.command);
209
+ }
210
+ else if (msg.init) {
211
+ window.initBaseUrls(msg.tlns);
212
+ sender = window.sender = window.initSender();
213
+ var clazz = this.require(msg.module)[msg.classname];
214
+ main = window.main = new clazz(sender);
215
+ }
216
+ };
217
+ })(this);
218
+
219
+ ace.define("ace/lib/oop",[], function(require, exports, module){"use strict";
220
+ exports.inherits = function (ctor, superCtor) {
221
+ ctor.super_ = superCtor;
222
+ ctor.prototype = Object.create(superCtor.prototype, {
223
+ constructor: {
224
+ value: ctor,
225
+ enumerable: false,
226
+ writable: true,
227
+ configurable: true
228
+ }
229
+ });
230
+ };
231
+ exports.mixin = function (obj, mixin) {
232
+ for (var key in mixin) {
233
+ obj[key] = mixin[key];
234
+ }
235
+ return obj;
236
+ };
237
+ exports.implement = function (proto, mixin) {
238
+ exports.mixin(proto, mixin);
239
+ };
240
+
241
+ });
242
+
243
+ ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
244
+ if (typeof obj !== "object" || !obj)
245
+ return obj;
246
+ var copy;
247
+ if (Array.isArray(obj)) {
248
+ copy = [];
249
+ for (var key = 0; key < obj.length; key++) {
250
+ copy[key] = deepCopy(obj[key]);
251
+ }
252
+ return copy;
253
+ }
254
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
255
+ return obj;
256
+ copy = {};
257
+ for (var key in obj)
258
+ copy[key] = deepCopy(obj[key]);
259
+ return copy;
260
+ };
261
+
262
+ });
263
+
264
+ ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
265
+ exports.last = function (a) {
266
+ return a[a.length - 1];
267
+ };
268
+ exports.stringReverse = function (string) {
269
+ return string.split("").reverse().join("");
270
+ };
271
+ exports.stringRepeat = function (string, count) {
272
+ var result = '';
273
+ while (count > 0) {
274
+ if (count & 1)
275
+ result += string;
276
+ if (count >>= 1)
277
+ string += string;
278
+ }
279
+ return result;
280
+ };
281
+ var trimBeginRegexp = /^\s\s*/;
282
+ var trimEndRegexp = /\s\s*$/;
283
+ exports.stringTrimLeft = function (string) {
284
+ return string.replace(trimBeginRegexp, '');
285
+ };
286
+ exports.stringTrimRight = function (string) {
287
+ return string.replace(trimEndRegexp, '');
288
+ };
289
+ exports.copyObject = function (obj) {
290
+ var copy = {};
291
+ for (var key in obj) {
292
+ copy[key] = obj[key];
293
+ }
294
+ return copy;
295
+ };
296
+ exports.copyArray = function (array) {
297
+ var copy = [];
298
+ for (var i = 0, l = array.length; i < l; i++) {
299
+ if (array[i] && typeof array[i] == "object")
300
+ copy[i] = this.copyObject(array[i]);
301
+ else
302
+ copy[i] = array[i];
303
+ }
304
+ return copy;
305
+ };
306
+ exports.deepCopy = require("./deep_copy").deepCopy;
307
+ exports.arrayToMap = function (arr) {
308
+ var map = {};
309
+ for (var i = 0; i < arr.length; i++) {
310
+ map[arr[i]] = 1;
311
+ }
312
+ return map;
313
+ };
314
+ exports.createMap = function (props) {
315
+ var map = Object.create(null);
316
+ for (var i in props) {
317
+ map[i] = props[i];
318
+ }
319
+ return map;
320
+ };
321
+ exports.arrayRemove = function (array, value) {
322
+ for (var i = 0; i <= array.length; i++) {
323
+ if (value === array[i]) {
324
+ array.splice(i, 1);
325
+ }
326
+ }
327
+ };
328
+ exports.escapeRegExp = function (str) {
329
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
330
+ };
331
+ exports.escapeHTML = function (str) {
332
+ return ("" + str).replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
333
+ };
334
+ exports.getMatchOffsets = function (string, regExp) {
335
+ var matches = [];
336
+ string.replace(regExp, function (str) {
337
+ matches.push({
338
+ offset: arguments[arguments.length - 2],
339
+ length: str.length
340
+ });
341
+ });
342
+ return matches;
343
+ };
344
+ exports.deferredCall = function (fcn) {
345
+ var timer = null;
346
+ var callback = function () {
347
+ timer = null;
348
+ fcn();
349
+ };
350
+ var deferred = function (timeout) {
351
+ deferred.cancel();
352
+ timer = setTimeout(callback, timeout || 0);
353
+ return deferred;
354
+ };
355
+ deferred.schedule = deferred;
356
+ deferred.call = function () {
357
+ this.cancel();
358
+ fcn();
359
+ return deferred;
360
+ };
361
+ deferred.cancel = function () {
362
+ clearTimeout(timer);
363
+ timer = null;
364
+ return deferred;
365
+ };
366
+ deferred.isPending = function () {
367
+ return timer;
368
+ };
369
+ return deferred;
370
+ };
371
+ exports.delayedCall = function (fcn, defaultTimeout) {
372
+ var timer = null;
373
+ var callback = function () {
374
+ timer = null;
375
+ fcn();
376
+ };
377
+ var _self = function (timeout) {
378
+ if (timer == null)
379
+ timer = setTimeout(callback, timeout || defaultTimeout);
380
+ };
381
+ _self.delay = function (timeout) {
382
+ timer && clearTimeout(timer);
383
+ timer = setTimeout(callback, timeout || defaultTimeout);
384
+ };
385
+ _self.schedule = _self;
386
+ _self.call = function () {
387
+ this.cancel();
388
+ fcn();
389
+ };
390
+ _self.cancel = function () {
391
+ timer && clearTimeout(timer);
392
+ timer = null;
393
+ };
394
+ _self.isPending = function () {
395
+ return timer;
396
+ };
397
+ return _self;
398
+ };
399
+ exports.sleep = function (ms) {
400
+ return new Promise(function (resolve) {
401
+ setTimeout(resolve, ms);
402
+ });
403
+ };
404
+ exports.supportsLookbehind = function () {
405
+ try {
406
+ new RegExp('(?<=.)');
407
+ }
408
+ catch (e) {
409
+ return false;
410
+ }
411
+ return true;
412
+ };
413
+ exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) {
414
+ return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1;
415
+ };
416
+
417
+ });
418
+
419
+ ace.define("ace/apply_delta",[], function(require, exports, module){"use strict";
420
+ function throwDeltaError(delta, errorText) {
421
+ console.log("Invalid Delta:", delta);
422
+ throw "Invalid Delta: " + errorText;
423
+ }
424
+ function positionInDocument(docLines, position) {
425
+ return position.row >= 0 && position.row < docLines.length &&
426
+ position.column >= 0 && position.column <= docLines[position.row].length;
427
+ }
428
+ function validateDelta(docLines, delta) {
429
+ if (delta.action != "insert" && delta.action != "remove")
430
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
431
+ if (!(delta.lines instanceof Array))
432
+ throwDeltaError(delta, "delta.lines must be an Array");
433
+ if (!delta.start || !delta.end)
434
+ throwDeltaError(delta, "delta.start/end must be an present");
435
+ var start = delta.start;
436
+ if (!positionInDocument(docLines, delta.start))
437
+ throwDeltaError(delta, "delta.start must be contained in document");
438
+ var end = delta.end;
439
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
440
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
441
+ var numRangeRows = end.row - start.row;
442
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
443
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
444
+ throwDeltaError(delta, "delta.range must match delta lines");
445
+ }
446
+ exports.applyDelta = function (docLines, delta, doNotValidate) {
447
+ var row = delta.start.row;
448
+ var startColumn = delta.start.column;
449
+ var line = docLines[row] || "";
450
+ switch (delta.action) {
451
+ case "insert":
452
+ var lines = delta.lines;
453
+ if (lines.length === 1) {
454
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
455
+ }
456
+ else {
457
+ var args = [row, 1].concat(delta.lines);
458
+ docLines.splice.apply(docLines, args);
459
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
460
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
461
+ }
462
+ break;
463
+ case "remove":
464
+ var endColumn = delta.end.column;
465
+ var endRow = delta.end.row;
466
+ if (row === endRow) {
467
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
468
+ }
469
+ else {
470
+ docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn));
471
+ }
472
+ break;
473
+ }
474
+ };
475
+
476
+ });
477
+
478
+ ace.define("ace/lib/event_emitter",[], function(require, exports, module){"use strict";
479
+ var EventEmitter = {};
480
+ var stopPropagation = function () { this.propagationStopped = true; };
481
+ var preventDefault = function () { this.defaultPrevented = true; };
482
+ EventEmitter._emit =
483
+ EventEmitter._dispatchEvent = function (eventName, e) {
484
+ this._eventRegistry || (this._eventRegistry = {});
485
+ this._defaultHandlers || (this._defaultHandlers = {});
486
+ var listeners = this._eventRegistry[eventName] || [];
487
+ var defaultHandler = this._defaultHandlers[eventName];
488
+ if (!listeners.length && !defaultHandler)
489
+ return;
490
+ if (typeof e != "object" || !e)
491
+ e = {};
492
+ if (!e.type)
493
+ e.type = eventName;
494
+ if (!e.stopPropagation)
495
+ e.stopPropagation = stopPropagation;
496
+ if (!e.preventDefault)
497
+ e.preventDefault = preventDefault;
498
+ listeners = listeners.slice();
499
+ for (var i = 0; i < listeners.length; i++) {
500
+ listeners[i](e, this);
501
+ if (e.propagationStopped)
502
+ break;
503
+ }
504
+ if (defaultHandler && !e.defaultPrevented)
505
+ return defaultHandler(e, this);
506
+ };
507
+ EventEmitter._signal = function (eventName, e) {
508
+ var listeners = (this._eventRegistry || {})[eventName];
509
+ if (!listeners)
510
+ return;
511
+ listeners = listeners.slice();
512
+ for (var i = 0; i < listeners.length; i++)
513
+ listeners[i](e, this);
514
+ };
515
+ EventEmitter.once = function (eventName, callback) {
516
+ var _self = this;
517
+ this.on(eventName, function newCallback() {
518
+ _self.off(eventName, newCallback);
519
+ callback.apply(null, arguments);
520
+ });
521
+ if (!callback) {
522
+ return new Promise(function (resolve) {
523
+ callback = resolve;
524
+ });
525
+ }
526
+ };
527
+ EventEmitter.setDefaultHandler = function (eventName, callback) {
528
+ var handlers = this._defaultHandlers;
529
+ if (!handlers)
530
+ handlers = this._defaultHandlers = { _disabled_: {} };
531
+ if (handlers[eventName]) {
532
+ var old = handlers[eventName];
533
+ var disabled = handlers._disabled_[eventName];
534
+ if (!disabled)
535
+ handlers._disabled_[eventName] = disabled = [];
536
+ disabled.push(old);
537
+ var i = disabled.indexOf(callback);
538
+ if (i != -1)
539
+ disabled.splice(i, 1);
540
+ }
541
+ handlers[eventName] = callback;
542
+ };
543
+ EventEmitter.removeDefaultHandler = function (eventName, callback) {
544
+ var handlers = this._defaultHandlers;
545
+ if (!handlers)
546
+ return;
547
+ var disabled = handlers._disabled_[eventName];
548
+ if (handlers[eventName] == callback) {
549
+ if (disabled)
550
+ this.setDefaultHandler(eventName, disabled.pop());
551
+ }
552
+ else if (disabled) {
553
+ var i = disabled.indexOf(callback);
554
+ if (i != -1)
555
+ disabled.splice(i, 1);
556
+ }
557
+ };
558
+ EventEmitter.on =
559
+ EventEmitter.addEventListener = function (eventName, callback, capturing) {
560
+ this._eventRegistry = this._eventRegistry || {};
561
+ var listeners = this._eventRegistry[eventName];
562
+ if (!listeners)
563
+ listeners = this._eventRegistry[eventName] = [];
564
+ if (listeners.indexOf(callback) == -1)
565
+ listeners[capturing ? "unshift" : "push"](callback);
566
+ return callback;
567
+ };
568
+ EventEmitter.off =
569
+ EventEmitter.removeListener =
570
+ EventEmitter.removeEventListener = function (eventName, callback) {
571
+ this._eventRegistry = this._eventRegistry || {};
572
+ var listeners = this._eventRegistry[eventName];
573
+ if (!listeners)
574
+ return;
575
+ var index = listeners.indexOf(callback);
576
+ if (index !== -1)
577
+ listeners.splice(index, 1);
578
+ };
579
+ EventEmitter.removeAllListeners = function (eventName) {
580
+ if (!eventName)
581
+ this._eventRegistry = this._defaultHandlers = undefined;
582
+ if (this._eventRegistry)
583
+ this._eventRegistry[eventName] = undefined;
584
+ if (this._defaultHandlers)
585
+ this._defaultHandlers[eventName] = undefined;
586
+ };
587
+ exports.EventEmitter = EventEmitter;
588
+
589
+ });
590
+
591
+ ace.define("ace/range",[], function(require, exports, module){"use strict";
592
+ var Range = /** @class */ (function () {
593
+ function Range(startRow, startColumn, endRow, endColumn) {
594
+ this.start = {
595
+ row: startRow,
596
+ column: startColumn
597
+ };
598
+ this.end = {
599
+ row: endRow,
600
+ column: endColumn
601
+ };
602
+ }
603
+ Range.prototype.isEqual = function (range) {
604
+ return this.start.row === range.start.row &&
605
+ this.end.row === range.end.row &&
606
+ this.start.column === range.start.column &&
607
+ this.end.column === range.end.column;
608
+ };
609
+ Range.prototype.toString = function () {
610
+ return ("Range: [" + this.start.row + "/" + this.start.column +
611
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
612
+ };
613
+ Range.prototype.contains = function (row, column) {
614
+ return this.compare(row, column) == 0;
615
+ };
616
+ Range.prototype.compareRange = function (range) {
617
+ var cmp, end = range.end, start = range.start;
618
+ cmp = this.compare(end.row, end.column);
619
+ if (cmp == 1) {
620
+ cmp = this.compare(start.row, start.column);
621
+ if (cmp == 1) {
622
+ return 2;
623
+ }
624
+ else if (cmp == 0) {
625
+ return 1;
626
+ }
627
+ else {
628
+ return 0;
629
+ }
630
+ }
631
+ else if (cmp == -1) {
632
+ return -2;
633
+ }
634
+ else {
635
+ cmp = this.compare(start.row, start.column);
636
+ if (cmp == -1) {
637
+ return -1;
638
+ }
639
+ else if (cmp == 1) {
640
+ return 42;
641
+ }
642
+ else {
643
+ return 0;
644
+ }
645
+ }
646
+ };
647
+ Range.prototype.comparePoint = function (p) {
648
+ return this.compare(p.row, p.column);
649
+ };
650
+ Range.prototype.containsRange = function (range) {
651
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
652
+ };
653
+ Range.prototype.intersects = function (range) {
654
+ var cmp = this.compareRange(range);
655
+ return (cmp == -1 || cmp == 0 || cmp == 1);
656
+ };
657
+ Range.prototype.isEnd = function (row, column) {
658
+ return this.end.row == row && this.end.column == column;
659
+ };
660
+ Range.prototype.isStart = function (row, column) {
661
+ return this.start.row == row && this.start.column == column;
662
+ };
663
+ Range.prototype.setStart = function (row, column) {
664
+ if (typeof row == "object") {
665
+ this.start.column = row.column;
666
+ this.start.row = row.row;
667
+ }
668
+ else {
669
+ this.start.row = row;
670
+ this.start.column = column;
671
+ }
672
+ };
673
+ Range.prototype.setEnd = function (row, column) {
674
+ if (typeof row == "object") {
675
+ this.end.column = row.column;
676
+ this.end.row = row.row;
677
+ }
678
+ else {
679
+ this.end.row = row;
680
+ this.end.column = column;
681
+ }
682
+ };
683
+ Range.prototype.inside = function (row, column) {
684
+ if (this.compare(row, column) == 0) {
685
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
686
+ return false;
687
+ }
688
+ else {
689
+ return true;
690
+ }
691
+ }
692
+ return false;
693
+ };
694
+ Range.prototype.insideStart = function (row, column) {
695
+ if (this.compare(row, column) == 0) {
696
+ if (this.isEnd(row, column)) {
697
+ return false;
698
+ }
699
+ else {
700
+ return true;
701
+ }
702
+ }
703
+ return false;
704
+ };
705
+ Range.prototype.insideEnd = function (row, column) {
706
+ if (this.compare(row, column) == 0) {
707
+ if (this.isStart(row, column)) {
708
+ return false;
709
+ }
710
+ else {
711
+ return true;
712
+ }
713
+ }
714
+ return false;
715
+ };
716
+ Range.prototype.compare = function (row, column) {
717
+ if (!this.isMultiLine()) {
718
+ if (row === this.start.row) {
719
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
720
+ }
721
+ }
722
+ if (row < this.start.row)
723
+ return -1;
724
+ if (row > this.end.row)
725
+ return 1;
726
+ if (this.start.row === row)
727
+ return column >= this.start.column ? 0 : -1;
728
+ if (this.end.row === row)
729
+ return column <= this.end.column ? 0 : 1;
730
+ return 0;
731
+ };
732
+ Range.prototype.compareStart = function (row, column) {
733
+ if (this.start.row == row && this.start.column == column) {
734
+ return -1;
735
+ }
736
+ else {
737
+ return this.compare(row, column);
738
+ }
739
+ };
740
+ Range.prototype.compareEnd = function (row, column) {
741
+ if (this.end.row == row && this.end.column == column) {
742
+ return 1;
743
+ }
744
+ else {
745
+ return this.compare(row, column);
746
+ }
747
+ };
748
+ Range.prototype.compareInside = function (row, column) {
749
+ if (this.end.row == row && this.end.column == column) {
750
+ return 1;
751
+ }
752
+ else if (this.start.row == row && this.start.column == column) {
753
+ return -1;
754
+ }
755
+ else {
756
+ return this.compare(row, column);
757
+ }
758
+ };
759
+ Range.prototype.clipRows = function (firstRow, lastRow) {
760
+ if (this.end.row > lastRow)
761
+ var end = { row: lastRow + 1, column: 0 };
762
+ else if (this.end.row < firstRow)
763
+ var end = { row: firstRow, column: 0 };
764
+ if (this.start.row > lastRow)
765
+ var start = { row: lastRow + 1, column: 0 };
766
+ else if (this.start.row < firstRow)
767
+ var start = { row: firstRow, column: 0 };
768
+ return Range.fromPoints(start || this.start, end || this.end);
769
+ };
770
+ Range.prototype.extend = function (row, column) {
771
+ var cmp = this.compare(row, column);
772
+ if (cmp == 0)
773
+ return this;
774
+ else if (cmp == -1)
775
+ var start = { row: row, column: column };
776
+ else
777
+ var end = { row: row, column: column };
778
+ return Range.fromPoints(start || this.start, end || this.end);
779
+ };
780
+ Range.prototype.isEmpty = function () {
781
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
782
+ };
783
+ Range.prototype.isMultiLine = function () {
784
+ return (this.start.row !== this.end.row);
785
+ };
786
+ Range.prototype.clone = function () {
787
+ return Range.fromPoints(this.start, this.end);
788
+ };
789
+ Range.prototype.collapseRows = function () {
790
+ if (this.end.column == 0)
791
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
792
+ else
793
+ return new Range(this.start.row, 0, this.end.row, 0);
794
+ };
795
+ Range.prototype.toScreenRange = function (session) {
796
+ var screenPosStart = session.documentToScreenPosition(this.start);
797
+ var screenPosEnd = session.documentToScreenPosition(this.end);
798
+ return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
799
+ };
800
+ Range.prototype.moveBy = function (row, column) {
801
+ this.start.row += row;
802
+ this.start.column += column;
803
+ this.end.row += row;
804
+ this.end.column += column;
805
+ };
806
+ return Range;
807
+ }());
808
+ Range.fromPoints = function (start, end) {
809
+ return new Range(start.row, start.column, end.row, end.column);
810
+ };
811
+ Range.comparePoints = function (p1, p2) {
812
+ return p1.row - p2.row || p1.column - p2.column;
813
+ };
814
+ exports.Range = Range;
815
+
816
+ });
817
+
818
+ ace.define("ace/anchor",[], function(require, exports, module){"use strict";
819
+ var oop = require("./lib/oop");
820
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
821
+ var Anchor = /** @class */ (function () {
822
+ function Anchor(doc, row, column) {
823
+ this.$onChange = this.onChange.bind(this);
824
+ this.attach(doc);
825
+ if (typeof row != "number")
826
+ this.setPosition(row.row, row.column);
827
+ else
828
+ this.setPosition(row, column);
829
+ }
830
+ Anchor.prototype.getPosition = function () {
831
+ return this.$clipPositionToDocument(this.row, this.column);
832
+ };
833
+ Anchor.prototype.getDocument = function () {
834
+ return this.document;
835
+ };
836
+ Anchor.prototype.onChange = function (delta) {
837
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
838
+ return;
839
+ if (delta.start.row > this.row)
840
+ return;
841
+ var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
842
+ this.setPosition(point.row, point.column, true);
843
+ };
844
+ Anchor.prototype.setPosition = function (row, column, noClip) {
845
+ var pos;
846
+ if (noClip) {
847
+ pos = {
848
+ row: row,
849
+ column: column
850
+ };
851
+ }
852
+ else {
853
+ pos = this.$clipPositionToDocument(row, column);
854
+ }
855
+ if (this.row == pos.row && this.column == pos.column)
856
+ return;
857
+ var old = {
858
+ row: this.row,
859
+ column: this.column
860
+ };
861
+ this.row = pos.row;
862
+ this.column = pos.column;
863
+ this._signal("change", {
864
+ old: old,
865
+ value: pos
866
+ });
867
+ };
868
+ Anchor.prototype.detach = function () {
869
+ this.document.off("change", this.$onChange);
870
+ };
871
+ Anchor.prototype.attach = function (doc) {
872
+ this.document = doc || this.document;
873
+ this.document.on("change", this.$onChange);
874
+ };
875
+ Anchor.prototype.$clipPositionToDocument = function (row, column) {
876
+ var pos = {};
877
+ if (row >= this.document.getLength()) {
878
+ pos.row = Math.max(0, this.document.getLength() - 1);
879
+ pos.column = this.document.getLine(pos.row).length;
880
+ }
881
+ else if (row < 0) {
882
+ pos.row = 0;
883
+ pos.column = 0;
884
+ }
885
+ else {
886
+ pos.row = row;
887
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
888
+ }
889
+ if (column < 0)
890
+ pos.column = 0;
891
+ return pos;
892
+ };
893
+ return Anchor;
894
+ }());
895
+ Anchor.prototype.$insertRight = false;
896
+ oop.implement(Anchor.prototype, EventEmitter);
897
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
898
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
899
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
900
+ }
901
+ function $getTransformedPoint(delta, point, moveIfEqual) {
902
+ var deltaIsInsert = delta.action == "insert";
903
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
904
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
905
+ var deltaStart = delta.start;
906
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
907
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
908
+ return {
909
+ row: point.row,
910
+ column: point.column
911
+ };
912
+ }
913
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
914
+ return {
915
+ row: point.row + deltaRowShift,
916
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
917
+ };
918
+ }
919
+ return {
920
+ row: deltaStart.row,
921
+ column: deltaStart.column
922
+ };
923
+ }
924
+ exports.Anchor = Anchor;
925
+
926
+ });
927
+
928
+ ace.define("ace/document",[], function(require, exports, module){"use strict";
929
+ var oop = require("./lib/oop");
930
+ var applyDelta = require("./apply_delta").applyDelta;
931
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
932
+ var Range = require("./range").Range;
933
+ var Anchor = require("./anchor").Anchor;
934
+ var Document = /** @class */ (function () {
935
+ function Document(textOrLines) {
936
+ this.$lines = [""];
937
+ if (textOrLines.length === 0) {
938
+ this.$lines = [""];
939
+ }
940
+ else if (Array.isArray(textOrLines)) {
941
+ this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
942
+ }
943
+ else {
944
+ this.insert({ row: 0, column: 0 }, textOrLines);
945
+ }
946
+ }
947
+ Document.prototype.setValue = function (text) {
948
+ var len = this.getLength() - 1;
949
+ this.remove(new Range(0, 0, len, this.getLine(len).length));
950
+ this.insert({ row: 0, column: 0 }, text || "");
951
+ };
952
+ Document.prototype.getValue = function () {
953
+ return this.getAllLines().join(this.getNewLineCharacter());
954
+ };
955
+ Document.prototype.createAnchor = function (row, column) {
956
+ return new Anchor(this, row, column);
957
+ };
958
+ Document.prototype.$detectNewLine = function (text) {
959
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
960
+ this.$autoNewLine = match ? match[1] : "\n";
961
+ this._signal("changeNewLineMode");
962
+ };
963
+ Document.prototype.getNewLineCharacter = function () {
964
+ switch (this.$newLineMode) {
965
+ case "windows":
966
+ return "\r\n";
967
+ case "unix":
968
+ return "\n";
969
+ default:
970
+ return this.$autoNewLine || "\n";
971
+ }
972
+ };
973
+ Document.prototype.setNewLineMode = function (newLineMode) {
974
+ if (this.$newLineMode === newLineMode)
975
+ return;
976
+ this.$newLineMode = newLineMode;
977
+ this._signal("changeNewLineMode");
978
+ };
979
+ Document.prototype.getNewLineMode = function () {
980
+ return this.$newLineMode;
981
+ };
982
+ Document.prototype.isNewLine = function (text) {
983
+ return (text == "\r\n" || text == "\r" || text == "\n");
984
+ };
985
+ Document.prototype.getLine = function (row) {
986
+ return this.$lines[row] || "";
987
+ };
988
+ Document.prototype.getLines = function (firstRow, lastRow) {
989
+ return this.$lines.slice(firstRow, lastRow + 1);
990
+ };
991
+ Document.prototype.getAllLines = function () {
992
+ return this.getLines(0, this.getLength());
993
+ };
994
+ Document.prototype.getLength = function () {
995
+ return this.$lines.length;
996
+ };
997
+ Document.prototype.getTextRange = function (range) {
998
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
999
+ };
1000
+ Document.prototype.getLinesForRange = function (range) {
1001
+ var lines;
1002
+ if (range.start.row === range.end.row) {
1003
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
1004
+ }
1005
+ else {
1006
+ lines = this.getLines(range.start.row, range.end.row);
1007
+ lines[0] = (lines[0] || "").substring(range.start.column);
1008
+ var l = lines.length - 1;
1009
+ if (range.end.row - range.start.row == l)
1010
+ lines[l] = lines[l].substring(0, range.end.column);
1011
+ }
1012
+ return lines;
1013
+ };
1014
+ Document.prototype.insertLines = function (row, lines) {
1015
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
1016
+ return this.insertFullLines(row, lines);
1017
+ };
1018
+ Document.prototype.removeLines = function (firstRow, lastRow) {
1019
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
1020
+ return this.removeFullLines(firstRow, lastRow);
1021
+ };
1022
+ Document.prototype.insertNewLine = function (position) {
1023
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
1024
+ return this.insertMergedLines(position, ["", ""]);
1025
+ };
1026
+ Document.prototype.insert = function (position, text) {
1027
+ if (this.getLength() <= 1)
1028
+ this.$detectNewLine(text);
1029
+ return this.insertMergedLines(position, this.$split(text));
1030
+ };
1031
+ Document.prototype.insertInLine = function (position, text) {
1032
+ var start = this.clippedPos(position.row, position.column);
1033
+ var end = this.pos(position.row, position.column + text.length);
1034
+ this.applyDelta({
1035
+ start: start,
1036
+ end: end,
1037
+ action: "insert",
1038
+ lines: [text]
1039
+ }, true);
1040
+ return this.clonePos(end);
1041
+ };
1042
+ Document.prototype.clippedPos = function (row, column) {
1043
+ var length = this.getLength();
1044
+ if (row === undefined) {
1045
+ row = length;
1046
+ }
1047
+ else if (row < 0) {
1048
+ row = 0;
1049
+ }
1050
+ else if (row >= length) {
1051
+ row = length - 1;
1052
+ column = undefined;
1053
+ }
1054
+ var line = this.getLine(row);
1055
+ if (column == undefined)
1056
+ column = line.length;
1057
+ column = Math.min(Math.max(column, 0), line.length);
1058
+ return { row: row, column: column };
1059
+ };
1060
+ Document.prototype.clonePos = function (pos) {
1061
+ return { row: pos.row, column: pos.column };
1062
+ };
1063
+ Document.prototype.pos = function (row, column) {
1064
+ return { row: row, column: column };
1065
+ };
1066
+ Document.prototype.$clipPosition = function (position) {
1067
+ var length = this.getLength();
1068
+ if (position.row >= length) {
1069
+ position.row = Math.max(0, length - 1);
1070
+ position.column = this.getLine(length - 1).length;
1071
+ }
1072
+ else {
1073
+ position.row = Math.max(0, position.row);
1074
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
1075
+ }
1076
+ return position;
1077
+ };
1078
+ Document.prototype.insertFullLines = function (row, lines) {
1079
+ row = Math.min(Math.max(row, 0), this.getLength());
1080
+ var column = 0;
1081
+ if (row < this.getLength()) {
1082
+ lines = lines.concat([""]);
1083
+ column = 0;
1084
+ }
1085
+ else {
1086
+ lines = [""].concat(lines);
1087
+ row--;
1088
+ column = this.$lines[row].length;
1089
+ }
1090
+ this.insertMergedLines({ row: row, column: column }, lines);
1091
+ };
1092
+ Document.prototype.insertMergedLines = function (position, lines) {
1093
+ var start = this.clippedPos(position.row, position.column);
1094
+ var end = {
1095
+ row: start.row + lines.length - 1,
1096
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
1097
+ };
1098
+ this.applyDelta({
1099
+ start: start,
1100
+ end: end,
1101
+ action: "insert",
1102
+ lines: lines
1103
+ });
1104
+ return this.clonePos(end);
1105
+ };
1106
+ Document.prototype.remove = function (range) {
1107
+ var start = this.clippedPos(range.start.row, range.start.column);
1108
+ var end = this.clippedPos(range.end.row, range.end.column);
1109
+ this.applyDelta({
1110
+ start: start,
1111
+ end: end,
1112
+ action: "remove",
1113
+ lines: this.getLinesForRange({ start: start, end: end })
1114
+ });
1115
+ return this.clonePos(start);
1116
+ };
1117
+ Document.prototype.removeInLine = function (row, startColumn, endColumn) {
1118
+ var start = this.clippedPos(row, startColumn);
1119
+ var end = this.clippedPos(row, endColumn);
1120
+ this.applyDelta({
1121
+ start: start,
1122
+ end: end,
1123
+ action: "remove",
1124
+ lines: this.getLinesForRange({ start: start, end: end })
1125
+ }, true);
1126
+ return this.clonePos(start);
1127
+ };
1128
+ Document.prototype.removeFullLines = function (firstRow, lastRow) {
1129
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
1130
+ lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
1131
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
1132
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
1133
+ var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow);
1134
+ var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0);
1135
+ var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow);
1136
+ var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length);
1137
+ var range = new Range(startRow, startCol, endRow, endCol);
1138
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
1139
+ this.applyDelta({
1140
+ start: range.start,
1141
+ end: range.end,
1142
+ action: "remove",
1143
+ lines: this.getLinesForRange(range)
1144
+ });
1145
+ return deletedLines;
1146
+ };
1147
+ Document.prototype.removeNewLine = function (row) {
1148
+ if (row < this.getLength() - 1 && row >= 0) {
1149
+ this.applyDelta({
1150
+ start: this.pos(row, this.getLine(row).length),
1151
+ end: this.pos(row + 1, 0),
1152
+ action: "remove",
1153
+ lines: ["", ""]
1154
+ });
1155
+ }
1156
+ };
1157
+ Document.prototype.replace = function (range, text) {
1158
+ if (!(range instanceof Range))
1159
+ range = Range.fromPoints(range.start, range.end);
1160
+ if (text.length === 0 && range.isEmpty())
1161
+ return range.start;
1162
+ if (text == this.getTextRange(range))
1163
+ return range.end;
1164
+ this.remove(range);
1165
+ var end;
1166
+ if (text) {
1167
+ end = this.insert(range.start, text);
1168
+ }
1169
+ else {
1170
+ end = range.start;
1171
+ }
1172
+ return end;
1173
+ };
1174
+ Document.prototype.applyDeltas = function (deltas) {
1175
+ for (var i = 0; i < deltas.length; i++) {
1176
+ this.applyDelta(deltas[i]);
1177
+ }
1178
+ };
1179
+ Document.prototype.revertDeltas = function (deltas) {
1180
+ for (var i = deltas.length - 1; i >= 0; i--) {
1181
+ this.revertDelta(deltas[i]);
1182
+ }
1183
+ };
1184
+ Document.prototype.applyDelta = function (delta, doNotValidate) {
1185
+ var isInsert = delta.action == "insert";
1186
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
1187
+ : !Range.comparePoints(delta.start, delta.end)) {
1188
+ return;
1189
+ }
1190
+ if (isInsert && delta.lines.length > 20000) {
1191
+ this.$splitAndapplyLargeDelta(delta, 20000);
1192
+ }
1193
+ else {
1194
+ applyDelta(this.$lines, delta, doNotValidate);
1195
+ this._signal("change", delta);
1196
+ }
1197
+ };
1198
+ Document.prototype.$safeApplyDelta = function (delta) {
1199
+ var docLength = this.$lines.length;
1200
+ if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
1201
+ || delta.action == "insert" && delta.start.row <= docLength) {
1202
+ this.applyDelta(delta);
1203
+ }
1204
+ };
1205
+ Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
1206
+ var lines = delta.lines;
1207
+ var l = lines.length - MAX + 1;
1208
+ var row = delta.start.row;
1209
+ var column = delta.start.column;
1210
+ for (var from = 0, to = 0; from < l; from = to) {
1211
+ to += MAX - 1;
1212
+ var chunk = lines.slice(from, to);
1213
+ chunk.push("");
1214
+ this.applyDelta({
1215
+ start: this.pos(row + from, column),
1216
+ end: this.pos(row + to, column = 0),
1217
+ action: delta.action,
1218
+ lines: chunk
1219
+ }, true);
1220
+ }
1221
+ delta.lines = lines.slice(from);
1222
+ delta.start.row = row + from;
1223
+ delta.start.column = column;
1224
+ this.applyDelta(delta, true);
1225
+ };
1226
+ Document.prototype.revertDelta = function (delta) {
1227
+ this.$safeApplyDelta({
1228
+ start: this.clonePos(delta.start),
1229
+ end: this.clonePos(delta.end),
1230
+ action: (delta.action == "insert" ? "remove" : "insert"),
1231
+ lines: delta.lines.slice()
1232
+ });
1233
+ };
1234
+ Document.prototype.indexToPosition = function (index, startRow) {
1235
+ var lines = this.$lines || this.getAllLines();
1236
+ var newlineLength = this.getNewLineCharacter().length;
1237
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
1238
+ index -= lines[i].length + newlineLength;
1239
+ if (index < 0)
1240
+ return { row: i, column: index + lines[i].length + newlineLength };
1241
+ }
1242
+ return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
1243
+ };
1244
+ Document.prototype.positionToIndex = function (pos, startRow) {
1245
+ var lines = this.$lines || this.getAllLines();
1246
+ var newlineLength = this.getNewLineCharacter().length;
1247
+ var index = 0;
1248
+ var row = Math.min(pos.row, lines.length);
1249
+ for (var i = startRow || 0; i < row; ++i)
1250
+ index += lines[i].length + newlineLength;
1251
+ return index + pos.column;
1252
+ };
1253
+ Document.prototype.$split = function (text) {
1254
+ return text.split(/\r\n|\r|\n/);
1255
+ };
1256
+ return Document;
1257
+ }());
1258
+ Document.prototype.$autoNewLine = "";
1259
+ Document.prototype.$newLineMode = "auto";
1260
+ oop.implement(Document.prototype, EventEmitter);
1261
+ exports.Document = Document;
1262
+
1263
+ });
1264
+
1265
+ ace.define("ace/worker/mirror",[], function(require, exports, module) {
1266
+ "use strict";
1267
+
1268
+ var Document = require("../document").Document;
1269
+ var lang = require("../lib/lang");
1270
+
1271
+ var Mirror = exports.Mirror = function(sender) {
1272
+ this.sender = sender;
1273
+ var doc = this.doc = new Document("");
1274
+
1275
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
1276
+
1277
+ var _self = this;
1278
+ sender.on("change", function(e) {
1279
+ var data = e.data;
1280
+ if (data[0].start) {
1281
+ doc.applyDeltas(data);
1282
+ } else {
1283
+ for (var i = 0; i < data.length; i += 2) {
1284
+ var d, err;
1285
+ if (Array.isArray(data[i+1])) {
1286
+ d = {action: "insert", start: data[i], lines: data[i+1]};
1287
+ } else {
1288
+ d = {action: "remove", start: data[i], end: data[i+1]};
1289
+ }
1290
+
1291
+ if ((d.action == "insert" ? d.start : d.end).row >= doc.$lines.length) {
1292
+ err = new Error("Invalid delta");
1293
+ err.data = {
1294
+ path: _self.$path,
1295
+ linesLength: doc.$lines.length,
1296
+ start: d.start,
1297
+ end: d.end
1298
+ };
1299
+ throw err;
1300
+ }
1301
+
1302
+ doc.applyDelta(d, true);
1303
+ }
1304
+ }
1305
+ if (_self.$timeout)
1306
+ return deferredUpdate.schedule(_self.$timeout);
1307
+ _self.onUpdate();
1308
+ });
1309
+ };
1310
+
1311
+ (function() {
1312
+
1313
+ this.$timeout = 500;
1314
+
1315
+ this.setTimeout = function(timeout) {
1316
+ this.$timeout = timeout;
1317
+ };
1318
+
1319
+ this.setValue = function(value) {
1320
+ this.doc.setValue(value);
1321
+ this.deferredUpdate.schedule(this.$timeout);
1322
+ };
1323
+
1324
+ this.getValue = function(callbackId) {
1325
+ this.sender.callback(this.doc.getValue(), callbackId);
1326
+ };
1327
+
1328
+ this.onUpdate = function() {
1329
+ };
1330
+
1331
+ this.isPending = function() {
1332
+ return this.deferredUpdate.isPending();
1333
+ };
1334
+
1335
+ }).call(Mirror.prototype);
1336
+
1337
+ });
1338
+
1339
+ ace.define("ace/mode/xml/sax",[], function(require, exports, module) {
1340
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
1341
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]");
1342
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
1343
+ var S_TAG = 0;//tag name offerring
1344
+ var S_ATTR = 1;//attr name offerring
1345
+ var S_ATTR_S=2;//attr name end and space offer
1346
+ var S_EQ = 3;//=space?
1347
+ var S_V = 4;//attr value(no quot value only)
1348
+ var S_E = 5;//attr value end and no space(quot end)
1349
+ var S_S = 6;//(attr value end || tag end ) && (space offer)
1350
+ var S_C = 7;//closed el<el />
1351
+
1352
+ function XMLReader(){
1353
+
1354
+ }
1355
+
1356
+ XMLReader.prototype = {
1357
+ parse:function(source,defaultNSMap,entityMap){
1358
+ var domBuilder = this.domBuilder;
1359
+ domBuilder.startDocument();
1360
+ _copy(defaultNSMap ,defaultNSMap = {})
1361
+ parse(source,defaultNSMap,entityMap,
1362
+ domBuilder,this.errorHandler);
1363
+ domBuilder.endDocument();
1364
+ }
1365
+ }
1366
+ function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
1367
+ function fixedFromCharCode(code) {
1368
+ if (code > 0xffff) {
1369
+ code -= 0x10000;
1370
+ var surrogate1 = 0xd800 + (code >> 10)
1371
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
1372
+
1373
+ return String.fromCharCode(surrogate1, surrogate2);
1374
+ } else {
1375
+ return String.fromCharCode(code);
1376
+ }
1377
+ }
1378
+ function entityReplacer(a){
1379
+ var k = a.slice(1,-1);
1380
+ if(k in entityMap){
1381
+ return entityMap[k];
1382
+ }else if(k.charAt(0) === '#'){
1383
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
1384
+ }else{
1385
+ errorHandler.error('entity not found:'+a);
1386
+ return a;
1387
+ }
1388
+ }
1389
+ function appendText(end){//has some bugs
1390
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
1391
+ locator&&position(start);
1392
+ domBuilder.characters(xt,0,end-start);
1393
+ start = end
1394
+ }
1395
+ function position(start,m){
1396
+ while(start>=endPos && (m = linePattern.exec(source))){
1397
+ startPos = m.index;
1398
+ endPos = startPos + m[0].length;
1399
+ locator.lineNumber++;
1400
+ }
1401
+ locator.columnNumber = start-startPos+1;
1402
+ }
1403
+ var startPos = 0;
1404
+ var endPos = 0;
1405
+ var linePattern = /.+(?:\r\n?|\n)|.*$/g
1406
+ var locator = domBuilder.locator;
1407
+
1408
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
1409
+ var closeMap = {};
1410
+ var start = 0;
1411
+ while(true){
1412
+ var i = source.indexOf('<',start);
1413
+ if(i<0){
1414
+ if(!source.substr(start).match(/^\s*$/)){
1415
+ var doc = domBuilder.document;
1416
+ var text = doc.createTextNode(source.substr(start));
1417
+ doc.appendChild(text);
1418
+ domBuilder.currentElement = text;
1419
+ }
1420
+ return;
1421
+ }
1422
+ if(i>start){
1423
+ appendText(i);
1424
+ }
1425
+ switch(source.charAt(i+1)){
1426
+ case '/':
1427
+ var end = source.indexOf('>',i+3);
1428
+ var tagName = source.substring(i+2,end);
1429
+ var config;
1430
+ if (parseStack.length > 1) {
1431
+ config = parseStack.pop();
1432
+ } else {
1433
+ errorHandler.fatalError("end tag name not found for: "+tagName);
1434
+ break;
1435
+ }
1436
+ var localNSMap = config.localNSMap;
1437
+
1438
+ if(config.tagName != tagName){
1439
+ errorHandler.fatalError("end tag name: " + tagName + " does not match the current start tagName: "+config.tagName );
1440
+ }
1441
+ domBuilder.endElement(config.uri,config.localName,tagName);
1442
+ if(localNSMap){
1443
+ for(var prefix in localNSMap){
1444
+ domBuilder.endPrefixMapping(prefix) ;
1445
+ }
1446
+ }
1447
+ end++;
1448
+ break;
1449
+ case '?':// <?...?>
1450
+ locator&&position(i);
1451
+ end = parseInstruction(source,i,domBuilder);
1452
+ break;
1453
+ case '!':// <!doctype,<![CDATA,<!--
1454
+ locator&&position(i);
1455
+ end = parseDCC(source,i,domBuilder,errorHandler);
1456
+ break;
1457
+ default:
1458
+ try{
1459
+ locator&&position(i);
1460
+
1461
+ var el = new ElementAttributes();
1462
+ var end = parseElementStartPart(source,i,el,entityReplacer,errorHandler);
1463
+ var len = el.length;
1464
+ if(len && locator){
1465
+ var backup = copyLocator(locator,{});
1466
+ for(var i = 0;i<len;i++){
1467
+ var a = el[i];
1468
+ position(a.offset);
1469
+ a.offset = copyLocator(locator,{});
1470
+ }
1471
+ copyLocator(backup,locator);
1472
+ }
1473
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
1474
+ el.closed = true;
1475
+ if(!entityMap.nbsp){
1476
+ errorHandler.warning('unclosed xml attribute');
1477
+ }
1478
+ }
1479
+ appendElement(el,domBuilder,parseStack,errorHandler);
1480
+
1481
+
1482
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
1483
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
1484
+ }else{
1485
+ end++;
1486
+ }
1487
+ }catch(e){
1488
+ errorHandler.error('element parse error: '+e);
1489
+ end = -1;
1490
+ }
1491
+
1492
+ }
1493
+ if(end<0){
1494
+ appendText(i+1);
1495
+ }else{
1496
+ start = end;
1497
+ }
1498
+ }
1499
+ }
1500
+ function copyLocator(f,t){
1501
+ t.lineNumber = f.lineNumber;
1502
+ t.columnNumber = f.columnNumber;
1503
+ return t;
1504
+
1505
+ }
1506
+ function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
1507
+ var attrName;
1508
+ var value;
1509
+ var p = ++start;
1510
+ var s = S_TAG;//status
1511
+ while(true){
1512
+ var c = source.charAt(p);
1513
+ switch(c){
1514
+ case '=':
1515
+ if(s === S_ATTR){//attrName
1516
+ attrName = source.slice(start,p);
1517
+ s = S_EQ;
1518
+ }else if(s === S_ATTR_S){
1519
+ s = S_EQ;
1520
+ }else{
1521
+ throw new Error('attribute equal must after attrName');
1522
+ }
1523
+ break;
1524
+ case '\'':
1525
+ case '"':
1526
+ if(s === S_EQ){//equal
1527
+ start = p+1;
1528
+ p = source.indexOf(c,start)
1529
+ if(p>0){
1530
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
1531
+ el.add(attrName,value,start-1);
1532
+ s = S_E;
1533
+ }else{
1534
+ throw new Error('attribute value no end \''+c+'\' match');
1535
+ }
1536
+ }else if(s == S_V){
1537
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
1538
+ el.add(attrName,value,start);
1539
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
1540
+ start = p+1;
1541
+ s = S_E
1542
+ }else{
1543
+ throw new Error('attribute value must after "="');
1544
+ }
1545
+ break;
1546
+ case '/':
1547
+ switch(s){
1548
+ case S_TAG:
1549
+ el.setTagName(source.slice(start,p));
1550
+ case S_E:
1551
+ case S_S:
1552
+ case S_C:
1553
+ s = S_C;
1554
+ el.closed = true;
1555
+ case S_V:
1556
+ case S_ATTR:
1557
+ case S_ATTR_S:
1558
+ break;
1559
+ default:
1560
+ throw new Error("attribute invalid close char('/')")
1561
+ }
1562
+ break;
1563
+ case ''://end document
1564
+ errorHandler.error('unexpected end of input');
1565
+ case '>':
1566
+ switch(s){
1567
+ case S_TAG:
1568
+ el.setTagName(source.slice(start,p));
1569
+ case S_E:
1570
+ case S_S:
1571
+ case S_C:
1572
+ break;//normal
1573
+ case S_V://Compatible state
1574
+ case S_ATTR:
1575
+ value = source.slice(start,p);
1576
+ if(value.slice(-1) === '/'){
1577
+ el.closed = true;
1578
+ value = value.slice(0,-1)
1579
+ }
1580
+ case S_ATTR_S:
1581
+ if(s === S_ATTR_S){
1582
+ value = attrName;
1583
+ }
1584
+ if(s == S_V){
1585
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
1586
+ el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)
1587
+ }else{
1588
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
1589
+ el.add(value,value,start)
1590
+ }
1591
+ break;
1592
+ case S_EQ:
1593
+ throw new Error('attribute value missed!!');
1594
+ }
1595
+ return p;
1596
+ case '\u0080':
1597
+ c = ' ';
1598
+ default:
1599
+ if(c<= ' '){//space
1600
+ switch(s){
1601
+ case S_TAG:
1602
+ el.setTagName(source.slice(start,p));//tagName
1603
+ s = S_S;
1604
+ break;
1605
+ case S_ATTR:
1606
+ attrName = source.slice(start,p)
1607
+ s = S_ATTR_S;
1608
+ break;
1609
+ case S_V:
1610
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
1611
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
1612
+ el.add(attrName,value,start)
1613
+ case S_E:
1614
+ s = S_S;
1615
+ break;
1616
+ }
1617
+ }else{//not space
1618
+ switch(s){
1619
+ case S_ATTR_S:
1620
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!')
1621
+ el.add(attrName,attrName,start);
1622
+ start = p;
1623
+ s = S_ATTR;
1624
+ break;
1625
+ case S_E:
1626
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
1627
+ case S_S:
1628
+ s = S_ATTR;
1629
+ start = p;
1630
+ break;
1631
+ case S_EQ:
1632
+ s = S_V;
1633
+ start = p;
1634
+ break;
1635
+ case S_C:
1636
+ throw new Error("elements closed character '/' and '>' must be connected to");
1637
+ }
1638
+ }
1639
+ }
1640
+ p++;
1641
+ }
1642
+ }
1643
+ function appendElement(el,domBuilder,parseStack,errorHandler){
1644
+ var tagName = el.tagName;
1645
+ var localNSMap = null;
1646
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
1647
+ var i = el.length;
1648
+ while(i--){
1649
+ var a = el[i];
1650
+ var qName = a.qName;
1651
+ var value = a.value;
1652
+ var nsp = qName.indexOf(':');
1653
+ if(nsp>0){
1654
+ var prefix = a.prefix = qName.slice(0,nsp);
1655
+ var localName = qName.slice(nsp+1);
1656
+ var nsPrefix = prefix === 'xmlns' && localName
1657
+ }else{
1658
+ localName = qName;
1659
+ prefix = null
1660
+ nsPrefix = qName === 'xmlns' && ''
1661
+ }
1662
+ a.localName = localName ;
1663
+ if(nsPrefix !== false){//hack!!
1664
+ if(localNSMap == null){
1665
+ localNSMap = {}
1666
+ _copy(currentNSMap,currentNSMap={})
1667
+ }
1668
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
1669
+ a.uri = 'http://www.w3.org/2000/xmlns/'
1670
+ domBuilder.startPrefixMapping(nsPrefix, value)
1671
+ }
1672
+ }
1673
+ var i = el.length;
1674
+ while(i--){
1675
+ a = el[i];
1676
+ var prefix = a.prefix;
1677
+ if(prefix){//no prefix attribute has no namespace
1678
+ if(prefix === 'xml'){
1679
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
1680
+ }if(prefix !== 'xmlns'){
1681
+ a.uri = currentNSMap[prefix]
1682
+ }
1683
+ }
1684
+ }
1685
+ var nsp = tagName.indexOf(':');
1686
+ if(nsp>0){
1687
+ prefix = el.prefix = tagName.slice(0,nsp);
1688
+ localName = el.localName = tagName.slice(nsp+1);
1689
+ }else{
1690
+ prefix = null;//important!!
1691
+ localName = el.localName = tagName;
1692
+ }
1693
+ var ns = el.uri = currentNSMap[prefix || ''];
1694
+ if (prefix && !ns) {
1695
+ errorHandler.error('unexpected namespace ' + prefix);
1696
+ }
1697
+ domBuilder.startElement(ns,localName,tagName,el);
1698
+ if(el.closed){
1699
+ domBuilder.endElement(ns,localName,tagName);
1700
+ if(localNSMap){
1701
+ for(prefix in localNSMap){
1702
+ domBuilder.endPrefixMapping(prefix)
1703
+ }
1704
+ }
1705
+ }else{
1706
+ el.currentNSMap = currentNSMap;
1707
+ el.localNSMap = localNSMap;
1708
+ parseStack.push(el);
1709
+ }
1710
+ }
1711
+ function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
1712
+ if(/^(?:script|textarea)$/i.test(tagName)){
1713
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
1714
+ var text = source.substring(elStartEnd+1,elEndStart);
1715
+ if(/[&<]/.test(text)){
1716
+ if(/^script$/i.test(tagName)){
1717
+ domBuilder.characters(text,0,text.length);
1718
+ return elEndStart;
1719
+ }//}else{//text area
1720
+ text = text.replace(/&#?\w+;/g,entityReplacer);
1721
+ domBuilder.characters(text,0,text.length);
1722
+ return elEndStart;
1723
+
1724
+ }
1725
+ }
1726
+ return elStartEnd+1;
1727
+ }
1728
+ function fixSelfClosed(source,elStartEnd,tagName,closeMap){
1729
+ var pos = closeMap[tagName];
1730
+ if(pos == null){
1731
+ pos = closeMap[tagName] = source.lastIndexOf('</'+tagName+'>')
1732
+ }
1733
+ return pos<elStartEnd;
1734
+ }
1735
+ function _copy(source,target){
1736
+ for(var n in source){target[n] = source[n]}
1737
+ }
1738
+ function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
1739
+ var next= source.charAt(start+2)
1740
+ switch(next){
1741
+ case '-':
1742
+ if(source.charAt(start + 3) === '-'){
1743
+ var end = source.indexOf('-->',start+4);
1744
+ if(end>start){
1745
+ domBuilder.comment(source,start+4,end-start-4);
1746
+ return end+3;
1747
+ }else{
1748
+ errorHandler.error("Unclosed comment");
1749
+ return -1;
1750
+ }
1751
+ }else{
1752
+ return -1;
1753
+ }
1754
+ default:
1755
+ if(source.substr(start+3,6) == 'CDATA['){
1756
+ var end = source.indexOf(']]>',start+9);
1757
+ if (end > start) {
1758
+ domBuilder.startCDATA();
1759
+ domBuilder.characters(source,start+9,end-start-9);
1760
+ domBuilder.endCDATA()
1761
+ return end+3;
1762
+ } else {
1763
+ errorHandler.error("Unclosed CDATA");
1764
+ return -1;
1765
+ }
1766
+ }
1767
+ var matchs = split(source,start);
1768
+ var len = matchs.length;
1769
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
1770
+ var name = matchs[1][0];
1771
+ var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]
1772
+ var sysid = len>4 && matchs[4][0];
1773
+ var lastMatch = matchs[len-1]
1774
+ domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'),
1775
+ sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2'));
1776
+ domBuilder.endDTD();
1777
+
1778
+ return lastMatch.index+lastMatch[0].length
1779
+ }
1780
+ }
1781
+ return -1;
1782
+ }
1783
+
1784
+
1785
+
1786
+ function parseInstruction(source,start,domBuilder){
1787
+ var end = source.indexOf('?>',start);
1788
+ if(end){
1789
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
1790
+ if(match){
1791
+ var len = match[0].length;
1792
+ domBuilder.processingInstruction(match[1], match[2]) ;
1793
+ return end+2;
1794
+ }else{//error
1795
+ return -1;
1796
+ }
1797
+ }
1798
+ return -1;
1799
+ }
1800
+ function ElementAttributes(source){
1801
+
1802
+ }
1803
+ ElementAttributes.prototype = {
1804
+ setTagName:function(tagName){
1805
+ if(!tagNamePattern.test(tagName)){
1806
+ throw new Error('invalid tagName:'+tagName)
1807
+ }
1808
+ this.tagName = tagName
1809
+ },
1810
+ add:function(qName,value,offset){
1811
+ if(!tagNamePattern.test(qName)){
1812
+ throw new Error('invalid attribute:'+qName)
1813
+ }
1814
+ this[this.length++] = {qName:qName,value:value,offset:offset}
1815
+ },
1816
+ length:0,
1817
+ getLocalName:function(i){return this[i].localName},
1818
+ getOffset:function(i){return this[i].offset},
1819
+ getQName:function(i){return this[i].qName},
1820
+ getURI:function(i){return this[i].uri},
1821
+ getValue:function(i){return this[i].value}
1822
+ }
1823
+
1824
+
1825
+
1826
+
1827
+ function _set_proto_(thiz,parent){
1828
+ thiz.__proto__ = parent;
1829
+ return thiz;
1830
+ }
1831
+ if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
1832
+ _set_proto_ = function(thiz,parent){
1833
+ function p(){};
1834
+ p.prototype = parent;
1835
+ p = new p();
1836
+ for(parent in thiz){
1837
+ p[parent] = thiz[parent];
1838
+ }
1839
+ return p;
1840
+ }
1841
+ }
1842
+
1843
+ function split(source,start){
1844
+ var match;
1845
+ var buf = [];
1846
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
1847
+ reg.lastIndex = start;
1848
+ reg.exec(source);//skip <
1849
+ while(match = reg.exec(source)){
1850
+ buf.push(match);
1851
+ if(match[1])return buf;
1852
+ }
1853
+ }
1854
+
1855
+ return XMLReader;
1856
+ });
1857
+
1858
+ ace.define("ace/mode/xml/dom",[], function(require, exports, module) {
1859
+
1860
+ function copy(src,dest){
1861
+ for(var p in src){
1862
+ dest[p] = src[p];
1863
+ }
1864
+ }
1865
+ function _extends(Class,Super){
1866
+ var t = function(){};
1867
+ var pt = Class.prototype;
1868
+ if(Object.create){
1869
+ var ppt = Object.create(Super.prototype);
1870
+ pt.__proto__ = ppt;
1871
+ }
1872
+ if(!(pt instanceof Super)){
1873
+ t.prototype = Super.prototype;
1874
+ t = new t();
1875
+ copy(pt,t);
1876
+ Class.prototype = pt = t;
1877
+ }
1878
+ if(pt.constructor != Class){
1879
+ if(typeof Class != 'function'){
1880
+ console.error("unknown Class:"+Class);
1881
+ }
1882
+ pt.constructor = Class;
1883
+ }
1884
+ }
1885
+ var htmlns = 'http://www.w3.org/1999/xhtml' ;
1886
+ var NodeType = {};
1887
+ var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
1888
+ var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
1889
+ var TEXT_NODE = NodeType.TEXT_NODE = 3;
1890
+ var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
1891
+ var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
1892
+ var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
1893
+ var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
1894
+ var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
1895
+ var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
1896
+ var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
1897
+ var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
1898
+ var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
1899
+ var ExceptionCode = {};
1900
+ var ExceptionMessage = {};
1901
+ var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
1902
+ var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
1903
+ var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
1904
+ var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
1905
+ var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
1906
+ var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
1907
+ var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
1908
+ var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
1909
+ var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
1910
+ var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
1911
+ var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
1912
+ var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
1913
+ var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
1914
+ var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
1915
+ var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
1916
+
1917
+
1918
+ function DOMException(code, message) {
1919
+ if(message instanceof Error){
1920
+ var error = message;
1921
+ }else{
1922
+ error = this;
1923
+ Error.call(this, ExceptionMessage[code]);
1924
+ this.message = ExceptionMessage[code];
1925
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
1926
+ }
1927
+ error.code = code;
1928
+ if(message) this.message = this.message + ": " + message;
1929
+ return error;
1930
+ };
1931
+ DOMException.prototype = Error.prototype;
1932
+ copy(ExceptionCode,DOMException)
1933
+ function NodeList() {
1934
+ };
1935
+ NodeList.prototype = {
1936
+ length:0,
1937
+ item: function(index) {
1938
+ return this[index] || null;
1939
+ }
1940
+ };
1941
+ function LiveNodeList(node,refresh){
1942
+ this._node = node;
1943
+ this._refresh = refresh;
1944
+ _updateLiveList(this);
1945
+ }
1946
+ function _updateLiveList(list){
1947
+ var inc = list._node._inc || list._node.ownerDocument._inc;
1948
+ if(list._inc != inc){
1949
+ var ls = list._refresh(list._node);
1950
+ __set__(list,'length',ls.length);
1951
+ copy(ls,list);
1952
+ list._inc = inc;
1953
+ }
1954
+ }
1955
+ LiveNodeList.prototype.item = function(i){
1956
+ _updateLiveList(this);
1957
+ return this[i];
1958
+ }
1959
+
1960
+ _extends(LiveNodeList,NodeList);
1961
+ function NamedNodeMap() {
1962
+ };
1963
+
1964
+ function _findNodeIndex(list,node){
1965
+ var i = list.length;
1966
+ while(i--){
1967
+ if(list[i] === node){return i}
1968
+ }
1969
+ }
1970
+
1971
+ function _addNamedNode(el,list,newAttr,oldAttr){
1972
+ if(oldAttr){
1973
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
1974
+ }else{
1975
+ list[list.length++] = newAttr;
1976
+ }
1977
+ if(el){
1978
+ newAttr.ownerElement = el;
1979
+ var doc = el.ownerDocument;
1980
+ if(doc){
1981
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
1982
+ _onAddAttribute(doc,el,newAttr);
1983
+ }
1984
+ }
1985
+ }
1986
+ function _removeNamedNode(el,list,attr){
1987
+ var i = _findNodeIndex(list,attr);
1988
+ if(i>=0){
1989
+ var lastIndex = list.length-1;
1990
+ while(i<lastIndex){
1991
+ list[i] = list[++i];
1992
+ }
1993
+ list.length = lastIndex;
1994
+ if(el){
1995
+ var doc = el.ownerDocument;
1996
+ if(doc){
1997
+ _onRemoveAttribute(doc,el,attr);
1998
+ attr.ownerElement = null;
1999
+ }
2000
+ }
2001
+ }else{
2002
+ throw new DOMException(NOT_FOUND_ERR,new Error());
2003
+ }
2004
+ }
2005
+ NamedNodeMap.prototype = {
2006
+ length:0,
2007
+ item:NodeList.prototype.item,
2008
+ getNamedItem: function(key) {
2009
+ var i = this.length;
2010
+ while(i--){
2011
+ var attr = this[i];
2012
+ if(attr.nodeName == key){
2013
+ return attr;
2014
+ }
2015
+ }
2016
+ },
2017
+ setNamedItem: function(attr) {
2018
+ var el = attr.ownerElement;
2019
+ if(el && el!=this._ownerElement){
2020
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
2021
+ }
2022
+ var oldAttr = this.getNamedItem(attr.nodeName);
2023
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
2024
+ return oldAttr;
2025
+ },
2026
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
2027
+ var el = attr.ownerElement, oldAttr;
2028
+ if(el && el!=this._ownerElement){
2029
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
2030
+ }
2031
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
2032
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
2033
+ return oldAttr;
2034
+ },
2035
+ removeNamedItem: function(key) {
2036
+ var attr = this.getNamedItem(key);
2037
+ _removeNamedNode(this._ownerElement,this,attr);
2038
+ return attr;
2039
+
2040
+
2041
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
2042
+ removeNamedItemNS:function(namespaceURI,localName){
2043
+ var attr = this.getNamedItemNS(namespaceURI,localName);
2044
+ _removeNamedNode(this._ownerElement,this,attr);
2045
+ return attr;
2046
+ },
2047
+ getNamedItemNS: function(namespaceURI, localName) {
2048
+ var i = this.length;
2049
+ while(i--){
2050
+ var node = this[i];
2051
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
2052
+ return node;
2053
+ }
2054
+ }
2055
+ return null;
2056
+ }
2057
+ };
2058
+ function DOMImplementation(/* Object */ features) {
2059
+ this._features = {};
2060
+ if (features) {
2061
+ for (var feature in features) {
2062
+ this._features = features[feature];
2063
+ }
2064
+ }
2065
+ };
2066
+
2067
+ DOMImplementation.prototype = {
2068
+ hasFeature: function(/* string */ feature, /* string */ version) {
2069
+ var versions = this._features[feature.toLowerCase()];
2070
+ if (versions && (!version || version in versions)) {
2071
+ return true;
2072
+ } else {
2073
+ return false;
2074
+ }
2075
+ },
2076
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
2077
+ var doc = new Document();
2078
+ doc.implementation = this;
2079
+ doc.childNodes = new NodeList();
2080
+ doc.doctype = doctype;
2081
+ if(doctype){
2082
+ doc.appendChild(doctype);
2083
+ }
2084
+ if(qualifiedName){
2085
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
2086
+ doc.appendChild(root);
2087
+ }
2088
+ return doc;
2089
+ },
2090
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
2091
+ var node = new DocumentType();
2092
+ node.name = qualifiedName;
2093
+ node.nodeName = qualifiedName;
2094
+ node.publicId = publicId;
2095
+ node.systemId = systemId;
2096
+ return node;
2097
+ }
2098
+ };
2099
+
2100
+ function Node() {
2101
+ };
2102
+
2103
+ Node.prototype = {
2104
+ firstChild : null,
2105
+ lastChild : null,
2106
+ previousSibling : null,
2107
+ nextSibling : null,
2108
+ attributes : null,
2109
+ parentNode : null,
2110
+ childNodes : null,
2111
+ ownerDocument : null,
2112
+ nodeValue : null,
2113
+ namespaceURI : null,
2114
+ prefix : null,
2115
+ localName : null,
2116
+ insertBefore:function(newChild, refChild){//raises
2117
+ return _insertBefore(this,newChild,refChild);
2118
+ },
2119
+ replaceChild:function(newChild, oldChild){//raises
2120
+ this.insertBefore(newChild,oldChild);
2121
+ if(oldChild){
2122
+ this.removeChild(oldChild);
2123
+ }
2124
+ },
2125
+ removeChild:function(oldChild){
2126
+ return _removeChild(this,oldChild);
2127
+ },
2128
+ appendChild:function(newChild){
2129
+ return this.insertBefore(newChild,null);
2130
+ },
2131
+ hasChildNodes:function(){
2132
+ return this.firstChild != null;
2133
+ },
2134
+ cloneNode:function(deep){
2135
+ return cloneNode(this.ownerDocument||this,this,deep);
2136
+ },
2137
+ normalize:function(){
2138
+ var child = this.firstChild;
2139
+ while(child){
2140
+ var next = child.nextSibling;
2141
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
2142
+ this.removeChild(next);
2143
+ child.appendData(next.data);
2144
+ }else{
2145
+ child.normalize();
2146
+ child = next;
2147
+ }
2148
+ }
2149
+ },
2150
+ isSupported:function(feature, version){
2151
+ return this.ownerDocument.implementation.hasFeature(feature,version);
2152
+ },
2153
+ hasAttributes:function(){
2154
+ return this.attributes.length>0;
2155
+ },
2156
+ lookupPrefix:function(namespaceURI){
2157
+ var el = this;
2158
+ while(el){
2159
+ var map = el._nsMap;
2160
+ if(map){
2161
+ for(var n in map){
2162
+ if(map[n] == namespaceURI){
2163
+ return n;
2164
+ }
2165
+ }
2166
+ }
2167
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
2168
+ }
2169
+ return null;
2170
+ },
2171
+ lookupNamespaceURI:function(prefix){
2172
+ var el = this;
2173
+ while(el){
2174
+ var map = el._nsMap;
2175
+ if(map){
2176
+ if(prefix in map){
2177
+ return map[prefix] ;
2178
+ }
2179
+ }
2180
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
2181
+ }
2182
+ return null;
2183
+ },
2184
+ isDefaultNamespace:function(namespaceURI){
2185
+ var prefix = this.lookupPrefix(namespaceURI);
2186
+ return prefix == null;
2187
+ }
2188
+ };
2189
+
2190
+
2191
+ function _xmlEncoder(c){
2192
+ return c == '<' && '&lt;' ||
2193
+ c == '>' && '&gt;' ||
2194
+ c == '&' && '&amp;' ||
2195
+ c == '"' && '&quot;' ||
2196
+ '&#'+c.charCodeAt()+';';
2197
+ }
2198
+
2199
+
2200
+ copy(NodeType,Node);
2201
+ copy(NodeType,Node.prototype);
2202
+ function _visitNode(node,callback){
2203
+ if(callback(node)){
2204
+ return true;
2205
+ }
2206
+ if(node = node.firstChild){
2207
+ do{
2208
+ if(_visitNode(node,callback)){return true}
2209
+ }while(node=node.nextSibling)
2210
+ }
2211
+ }
2212
+
2213
+
2214
+
2215
+ function Document(){
2216
+ }
2217
+ function _onAddAttribute(doc,el,newAttr){
2218
+ doc && doc._inc++;
2219
+ var ns = newAttr.namespaceURI ;
2220
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
2221
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
2222
+ }
2223
+ }
2224
+ function _onRemoveAttribute(doc,el,newAttr,remove){
2225
+ doc && doc._inc++;
2226
+ var ns = newAttr.namespaceURI ;
2227
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
2228
+ delete el._nsMap[newAttr.prefix?newAttr.localName:''];
2229
+ }
2230
+ }
2231
+ function _onUpdateChild(doc,el,newChild){
2232
+ if(doc && doc._inc){
2233
+ doc._inc++;
2234
+ var cs = el.childNodes;
2235
+ if(newChild){
2236
+ cs[cs.length++] = newChild;
2237
+ }else{
2238
+ var child = el.firstChild;
2239
+ var i = 0;
2240
+ while(child){
2241
+ cs[i++] = child;
2242
+ child =child.nextSibling;
2243
+ }
2244
+ cs.length = i;
2245
+ }
2246
+ }
2247
+ }
2248
+ function _removeChild(parentNode,child){
2249
+ var previous = child.previousSibling;
2250
+ var next = child.nextSibling;
2251
+ if(previous){
2252
+ previous.nextSibling = next;
2253
+ }else{
2254
+ parentNode.firstChild = next
2255
+ }
2256
+ if(next){
2257
+ next.previousSibling = previous;
2258
+ }else{
2259
+ parentNode.lastChild = previous;
2260
+ }
2261
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
2262
+ return child;
2263
+ }
2264
+ function _insertBefore(parentNode,newChild,nextChild){
2265
+ var cp = newChild.parentNode;
2266
+ if(cp){
2267
+ cp.removeChild(newChild);//remove and update
2268
+ }
2269
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
2270
+ var newFirst = newChild.firstChild;
2271
+ if (newFirst == null) {
2272
+ return newChild;
2273
+ }
2274
+ var newLast = newChild.lastChild;
2275
+ }else{
2276
+ newFirst = newLast = newChild;
2277
+ }
2278
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
2279
+
2280
+ newFirst.previousSibling = pre;
2281
+ newLast.nextSibling = nextChild;
2282
+
2283
+
2284
+ if(pre){
2285
+ pre.nextSibling = newFirst;
2286
+ }else{
2287
+ parentNode.firstChild = newFirst;
2288
+ }
2289
+ if(nextChild == null){
2290
+ parentNode.lastChild = newLast;
2291
+ }else{
2292
+ nextChild.previousSibling = newLast;
2293
+ }
2294
+ do{
2295
+ newFirst.parentNode = parentNode;
2296
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
2297
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
2298
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
2299
+ newChild.firstChild = newChild.lastChild = null;
2300
+ }
2301
+ return newChild;
2302
+ }
2303
+ function _appendSingleChild(parentNode,newChild){
2304
+ var cp = newChild.parentNode;
2305
+ if(cp){
2306
+ var pre = parentNode.lastChild;
2307
+ cp.removeChild(newChild);//remove and update
2308
+ var pre = parentNode.lastChild;
2309
+ }
2310
+ var pre = parentNode.lastChild;
2311
+ newChild.parentNode = parentNode;
2312
+ newChild.previousSibling = pre;
2313
+ newChild.nextSibling = null;
2314
+ if(pre){
2315
+ pre.nextSibling = newChild;
2316
+ }else{
2317
+ parentNode.firstChild = newChild;
2318
+ }
2319
+ parentNode.lastChild = newChild;
2320
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
2321
+ return newChild;
2322
+ }
2323
+ Document.prototype = {
2324
+ nodeName : '#document',
2325
+ nodeType : DOCUMENT_NODE,
2326
+ doctype : null,
2327
+ documentElement : null,
2328
+ _inc : 1,
2329
+
2330
+ insertBefore : function(newChild, refChild){//raises
2331
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
2332
+ var child = newChild.firstChild;
2333
+ while(child){
2334
+ var next = child.nextSibling;
2335
+ this.insertBefore(child,refChild);
2336
+ child = next;
2337
+ }
2338
+ return newChild;
2339
+ }
2340
+ if(this.documentElement == null && newChild.nodeType == 1){
2341
+ this.documentElement = newChild;
2342
+ }
2343
+
2344
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
2345
+ },
2346
+ removeChild : function(oldChild){
2347
+ if(this.documentElement == oldChild){
2348
+ this.documentElement = null;
2349
+ }
2350
+ return _removeChild(this,oldChild);
2351
+ },
2352
+ importNode : function(importedNode,deep){
2353
+ return importNode(this,importedNode,deep);
2354
+ },
2355
+ getElementById : function(id){
2356
+ var rtv = null;
2357
+ _visitNode(this.documentElement,function(node){
2358
+ if(node.nodeType == 1){
2359
+ if(node.getAttribute('id') == id){
2360
+ rtv = node;
2361
+ return true;
2362
+ }
2363
+ }
2364
+ });
2365
+ return rtv;
2366
+ },
2367
+ createElement : function(tagName){
2368
+ var node = new Element();
2369
+ node.ownerDocument = this;
2370
+ node.nodeName = tagName;
2371
+ node.tagName = tagName;
2372
+ node.childNodes = new NodeList();
2373
+ var attrs = node.attributes = new NamedNodeMap();
2374
+ attrs._ownerElement = node;
2375
+ return node;
2376
+ },
2377
+ createDocumentFragment : function(){
2378
+ var node = new DocumentFragment();
2379
+ node.ownerDocument = this;
2380
+ node.childNodes = new NodeList();
2381
+ return node;
2382
+ },
2383
+ createTextNode : function(data){
2384
+ var node = new Text();
2385
+ node.ownerDocument = this;
2386
+ node.appendData(data);
2387
+ return node;
2388
+ },
2389
+ createComment : function(data){
2390
+ var node = new Comment();
2391
+ node.ownerDocument = this;
2392
+ node.appendData(data);
2393
+ return node;
2394
+ },
2395
+ createCDATASection : function(data){
2396
+ var node = new CDATASection();
2397
+ node.ownerDocument = this;
2398
+ node.appendData(data);
2399
+ return node;
2400
+ },
2401
+ createProcessingInstruction : function(target,data){
2402
+ var node = new ProcessingInstruction();
2403
+ node.ownerDocument = this;
2404
+ node.tagName = node.target = target;
2405
+ node.nodeValue= node.data = data;
2406
+ return node;
2407
+ },
2408
+ createAttribute : function(name){
2409
+ var node = new Attr();
2410
+ node.ownerDocument = this;
2411
+ node.name = name;
2412
+ node.nodeName = name;
2413
+ node.localName = name;
2414
+ node.specified = true;
2415
+ return node;
2416
+ },
2417
+ createEntityReference : function(name){
2418
+ var node = new EntityReference();
2419
+ node.ownerDocument = this;
2420
+ node.nodeName = name;
2421
+ return node;
2422
+ },
2423
+ createElementNS : function(namespaceURI,qualifiedName){
2424
+ var node = new Element();
2425
+ var pl = qualifiedName.split(':');
2426
+ var attrs = node.attributes = new NamedNodeMap();
2427
+ node.childNodes = new NodeList();
2428
+ node.ownerDocument = this;
2429
+ node.nodeName = qualifiedName;
2430
+ node.tagName = qualifiedName;
2431
+ node.namespaceURI = namespaceURI;
2432
+ if(pl.length == 2){
2433
+ node.prefix = pl[0];
2434
+ node.localName = pl[1];
2435
+ }else{
2436
+ node.localName = qualifiedName;
2437
+ }
2438
+ attrs._ownerElement = node;
2439
+ return node;
2440
+ },
2441
+ createAttributeNS : function(namespaceURI,qualifiedName){
2442
+ var node = new Attr();
2443
+ var pl = qualifiedName.split(':');
2444
+ node.ownerDocument = this;
2445
+ node.nodeName = qualifiedName;
2446
+ node.name = qualifiedName;
2447
+ node.namespaceURI = namespaceURI;
2448
+ node.specified = true;
2449
+ if(pl.length == 2){
2450
+ node.prefix = pl[0];
2451
+ node.localName = pl[1];
2452
+ }else{
2453
+ node.localName = qualifiedName;
2454
+ }
2455
+ return node;
2456
+ }
2457
+ };
2458
+ _extends(Document,Node);
2459
+
2460
+
2461
+ function Element() {
2462
+ this._nsMap = {};
2463
+ };
2464
+ Element.prototype = {
2465
+ nodeType : ELEMENT_NODE,
2466
+ hasAttribute : function(name){
2467
+ return this.getAttributeNode(name)!=null;
2468
+ },
2469
+ getAttribute : function(name){
2470
+ var attr = this.getAttributeNode(name);
2471
+ return attr && attr.value || '';
2472
+ },
2473
+ getAttributeNode : function(name){
2474
+ return this.attributes.getNamedItem(name);
2475
+ },
2476
+ setAttribute : function(name, value){
2477
+ var attr = this.ownerDocument.createAttribute(name);
2478
+ attr.value = attr.nodeValue = "" + value;
2479
+ this.setAttributeNode(attr);
2480
+ },
2481
+ removeAttribute : function(name){
2482
+ var attr = this.getAttributeNode(name);
2483
+ attr && this.removeAttributeNode(attr);
2484
+ },
2485
+ appendChild:function(newChild){
2486
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
2487
+ return this.insertBefore(newChild,null);
2488
+ }else{
2489
+ return _appendSingleChild(this,newChild);
2490
+ }
2491
+ },
2492
+ setAttributeNode : function(newAttr){
2493
+ return this.attributes.setNamedItem(newAttr);
2494
+ },
2495
+ setAttributeNodeNS : function(newAttr){
2496
+ return this.attributes.setNamedItemNS(newAttr);
2497
+ },
2498
+ removeAttributeNode : function(oldAttr){
2499
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
2500
+ },
2501
+ removeAttributeNS : function(namespaceURI, localName){
2502
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
2503
+ old && this.removeAttributeNode(old);
2504
+ },
2505
+
2506
+ hasAttributeNS : function(namespaceURI, localName){
2507
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
2508
+ },
2509
+ getAttributeNS : function(namespaceURI, localName){
2510
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
2511
+ return attr && attr.value || '';
2512
+ },
2513
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
2514
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
2515
+ attr.value = attr.nodeValue = "" + value;
2516
+ this.setAttributeNode(attr);
2517
+ },
2518
+ getAttributeNodeNS : function(namespaceURI, localName){
2519
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
2520
+ },
2521
+
2522
+ getElementsByTagName : function(tagName){
2523
+ return new LiveNodeList(this,function(base){
2524
+ var ls = [];
2525
+ _visitNode(base,function(node){
2526
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
2527
+ ls.push(node);
2528
+ }
2529
+ });
2530
+ return ls;
2531
+ });
2532
+ },
2533
+ getElementsByTagNameNS : function(namespaceURI, localName){
2534
+ return new LiveNodeList(this,function(base){
2535
+ var ls = [];
2536
+ _visitNode(base,function(node){
2537
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
2538
+ ls.push(node);
2539
+ }
2540
+ });
2541
+ return ls;
2542
+ });
2543
+ }
2544
+ };
2545
+ Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
2546
+ Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
2547
+
2548
+
2549
+ _extends(Element,Node);
2550
+ function Attr() {
2551
+ };
2552
+ Attr.prototype.nodeType = ATTRIBUTE_NODE;
2553
+ _extends(Attr,Node);
2554
+
2555
+
2556
+ function CharacterData() {
2557
+ };
2558
+ CharacterData.prototype = {
2559
+ data : '',
2560
+ substringData : function(offset, count) {
2561
+ return this.data.substring(offset, offset+count);
2562
+ },
2563
+ appendData: function(text) {
2564
+ text = this.data+text;
2565
+ this.nodeValue = this.data = text;
2566
+ this.length = text.length;
2567
+ },
2568
+ insertData: function(offset,text) {
2569
+ this.replaceData(offset,0,text);
2570
+ },
2571
+ appendChild:function(newChild){
2572
+ throw new Error(ExceptionMessage[3]);
2573
+ return Node.prototype.appendChild.apply(this,arguments);
2574
+ },
2575
+ deleteData: function(offset, count) {
2576
+ this.replaceData(offset,count,"");
2577
+ },
2578
+ replaceData: function(offset, count, text) {
2579
+ var start = this.data.substring(0,offset);
2580
+ var end = this.data.substring(offset+count);
2581
+ text = start + text + end;
2582
+ this.nodeValue = this.data = text;
2583
+ this.length = text.length;
2584
+ }
2585
+ }
2586
+ _extends(CharacterData,Node);
2587
+ function Text() {
2588
+ };
2589
+ Text.prototype = {
2590
+ nodeName : "#text",
2591
+ nodeType : TEXT_NODE,
2592
+ splitText : function(offset) {
2593
+ var text = this.data;
2594
+ var newText = text.substring(offset);
2595
+ text = text.substring(0, offset);
2596
+ this.data = this.nodeValue = text;
2597
+ this.length = text.length;
2598
+ var newNode = this.ownerDocument.createTextNode(newText);
2599
+ if(this.parentNode){
2600
+ this.parentNode.insertBefore(newNode, this.nextSibling);
2601
+ }
2602
+ return newNode;
2603
+ }
2604
+ }
2605
+ _extends(Text,CharacterData);
2606
+ function Comment() {
2607
+ };
2608
+ Comment.prototype = {
2609
+ nodeName : "#comment",
2610
+ nodeType : COMMENT_NODE
2611
+ }
2612
+ _extends(Comment,CharacterData);
2613
+
2614
+ function CDATASection() {
2615
+ };
2616
+ CDATASection.prototype = {
2617
+ nodeName : "#cdata-section",
2618
+ nodeType : CDATA_SECTION_NODE
2619
+ }
2620
+ _extends(CDATASection,CharacterData);
2621
+
2622
+
2623
+ function DocumentType() {
2624
+ }
2625
+ DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
2626
+ _extends(DocumentType,Node);
2627
+
2628
+ function Notation() {
2629
+ }
2630
+ Notation.prototype.nodeType = NOTATION_NODE;
2631
+ _extends(Notation,Node);
2632
+
2633
+ function Entity() {
2634
+ }
2635
+ Entity.prototype.nodeType = ENTITY_NODE;
2636
+ _extends(Entity,Node);
2637
+
2638
+ function EntityReference() {
2639
+ }
2640
+ EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
2641
+ _extends(EntityReference,Node);
2642
+
2643
+ function DocumentFragment() {
2644
+ }
2645
+ DocumentFragment.prototype.nodeName = "#document-fragment";
2646
+ DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
2647
+ _extends(DocumentFragment,Node);
2648
+
2649
+
2650
+ function ProcessingInstruction() {
2651
+ }
2652
+ ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
2653
+ _extends(ProcessingInstruction,Node);
2654
+ function XMLSerializer(){}
2655
+ XMLSerializer.prototype.serializeToString = function(node){
2656
+ var buf = [];
2657
+ serializeToString(node,buf);
2658
+ return buf.join('');
2659
+ }
2660
+ Node.prototype.toString =function(){
2661
+ return XMLSerializer.prototype.serializeToString(this);
2662
+ }
2663
+ function serializeToString(node,buf){
2664
+ switch(node.nodeType){
2665
+ case ELEMENT_NODE:
2666
+ var attrs = node.attributes;
2667
+ var len = attrs.length;
2668
+ var child = node.firstChild;
2669
+ var nodeName = node.tagName;
2670
+ var isHTML = htmlns === node.namespaceURI;
2671
+ buf.push('<',nodeName);
2672
+ for(var i=0;i<len;i++){
2673
+ serializeToString(attrs.item(i),buf);
2674
+ }
2675
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input|button)$/i.test(nodeName)){
2676
+ buf.push('>');
2677
+ if(isHTML && /^script$/i.test(nodeName)){
2678
+ if(child){
2679
+ buf.push(child.data);
2680
+ }
2681
+ }else{
2682
+ while(child){
2683
+ serializeToString(child,buf);
2684
+ child = child.nextSibling;
2685
+ }
2686
+ }
2687
+ buf.push('</',nodeName,'>');
2688
+ }else{
2689
+ buf.push('/>');
2690
+ }
2691
+ return;
2692
+ case DOCUMENT_NODE:
2693
+ case DOCUMENT_FRAGMENT_NODE:
2694
+ var child = node.firstChild;
2695
+ while(child){
2696
+ serializeToString(child,buf);
2697
+ child = child.nextSibling;
2698
+ }
2699
+ return;
2700
+ case ATTRIBUTE_NODE:
2701
+ return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
2702
+ case TEXT_NODE:
2703
+ return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
2704
+ case CDATA_SECTION_NODE:
2705
+ return buf.push( '<![CDATA[',node.data,']]>');
2706
+ case COMMENT_NODE:
2707
+ return buf.push( "<!--",node.data,"-->");
2708
+ case DOCUMENT_TYPE_NODE:
2709
+ var pubid = node.publicId;
2710
+ var sysid = node.systemId;
2711
+ buf.push('<!DOCTYPE ',node.name);
2712
+ if(pubid){
2713
+ buf.push(' PUBLIC "',pubid);
2714
+ if (sysid && sysid!='.') {
2715
+ buf.push( '" "',sysid);
2716
+ }
2717
+ buf.push('">');
2718
+ }else if(sysid && sysid!='.'){
2719
+ buf.push(' SYSTEM "',sysid,'">');
2720
+ }else{
2721
+ var sub = node.internalSubset;
2722
+ if(sub){
2723
+ buf.push(" [",sub,"]");
2724
+ }
2725
+ buf.push(">");
2726
+ }
2727
+ return;
2728
+ case PROCESSING_INSTRUCTION_NODE:
2729
+ return buf.push( "<?",node.target," ",node.data,"?>");
2730
+ case ENTITY_REFERENCE_NODE:
2731
+ return buf.push( '&',node.nodeName,';');
2732
+ default:
2733
+ buf.push('??',node.nodeName);
2734
+ }
2735
+ }
2736
+ function importNode(doc,node,deep){
2737
+ var node2;
2738
+ switch (node.nodeType) {
2739
+ case ELEMENT_NODE:
2740
+ node2 = node.cloneNode(false);
2741
+ node2.ownerDocument = doc;
2742
+ case DOCUMENT_FRAGMENT_NODE:
2743
+ break;
2744
+ case ATTRIBUTE_NODE:
2745
+ deep = true;
2746
+ break;
2747
+ }
2748
+ if(!node2){
2749
+ node2 = node.cloneNode(false);//false
2750
+ }
2751
+ node2.ownerDocument = doc;
2752
+ node2.parentNode = null;
2753
+ if(deep){
2754
+ var child = node.firstChild;
2755
+ while(child){
2756
+ node2.appendChild(importNode(doc,child,deep));
2757
+ child = child.nextSibling;
2758
+ }
2759
+ }
2760
+ return node2;
2761
+ }
2762
+ function cloneNode(doc,node,deep){
2763
+ var node2 = new node.constructor();
2764
+ for(var n in node){
2765
+ var v = node[n];
2766
+ if(typeof v != 'object' ){
2767
+ if(v != node2[n]){
2768
+ node2[n] = v;
2769
+ }
2770
+ }
2771
+ }
2772
+ if(node.childNodes){
2773
+ node2.childNodes = new NodeList();
2774
+ }
2775
+ node2.ownerDocument = doc;
2776
+ switch (node2.nodeType) {
2777
+ case ELEMENT_NODE:
2778
+ var attrs = node.attributes;
2779
+ var attrs2 = node2.attributes = new NamedNodeMap();
2780
+ var len = attrs.length;
2781
+ attrs2._ownerElement = node2;
2782
+ for(var i=0;i<len;i++){
2783
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
2784
+ }
2785
+ break;
2786
+ case ATTRIBUTE_NODE:
2787
+ deep = true;
2788
+ }
2789
+ if(deep){
2790
+ var child = node.firstChild;
2791
+ while(child){
2792
+ node2.appendChild(cloneNode(doc,child,deep));
2793
+ child = child.nextSibling;
2794
+ }
2795
+ }
2796
+ return node2;
2797
+ }
2798
+
2799
+ function __set__(object,key,value){
2800
+ object[key] = value;
2801
+ }
2802
+ function getTextContent(node){
2803
+ switch(node.nodeType){
2804
+ case 1:
2805
+ case 11:
2806
+ var buf = [];
2807
+ node = node.firstChild;
2808
+ while(node){
2809
+ if(node.nodeType!==7 && node.nodeType !==8){
2810
+ buf.push(getTextContent(node));
2811
+ }
2812
+ node = node.nextSibling;
2813
+ }
2814
+ return buf.join('');
2815
+ default:
2816
+ return node.nodeValue;
2817
+ }
2818
+ }
2819
+ try{
2820
+ if(Object.defineProperty){
2821
+ Object.defineProperty(LiveNodeList.prototype,'length',{
2822
+ get:function(){
2823
+ _updateLiveList(this);
2824
+ return this.$$length;
2825
+ }
2826
+ });
2827
+ Object.defineProperty(Node.prototype,'textContent',{
2828
+ get:function(){
2829
+ return getTextContent(this);
2830
+ },
2831
+ set:function(data){
2832
+ switch(this.nodeType){
2833
+ case 1:
2834
+ case 11:
2835
+ while(this.firstChild){
2836
+ this.removeChild(this.firstChild);
2837
+ }
2838
+ if(data || String(data)){
2839
+ this.appendChild(this.ownerDocument.createTextNode(data));
2840
+ }
2841
+ break;
2842
+ default:
2843
+ this.data = data;
2844
+ this.value = value;
2845
+ this.nodeValue = data;
2846
+ }
2847
+ }
2848
+ });
2849
+
2850
+ __set__ = function(object,key,value){
2851
+ object['$$'+key] = value;
2852
+ };
2853
+ }
2854
+ }catch(e){//ie8
2855
+ }
2856
+
2857
+ return DOMImplementation;
2858
+ });
2859
+
2860
+ ace.define("ace/mode/xml/dom-parser",[], function(require, exports, module) {
2861
+ 'use strict';
2862
+
2863
+ var XMLReader = require('./sax'),
2864
+ DOMImplementation = require('./dom');
2865
+
2866
+ function DOMParser(options){
2867
+ this.options = options ||{locator:{}};
2868
+
2869
+ }
2870
+ DOMParser.prototype.parseFromString = function(source,mimeType){
2871
+ var options = this.options;
2872
+ var sax = new XMLReader();
2873
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
2874
+ var errorHandler = options.errorHandler;
2875
+ var locator = options.locator;
2876
+ var defaultNSMap = options.xmlns||{};
2877
+ var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
2878
+ if(locator){
2879
+ domBuilder.setDocumentLocator(locator)
2880
+ }
2881
+
2882
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
2883
+ sax.domBuilder = options.domBuilder || domBuilder;
2884
+ if(/\/x?html?$/.test(mimeType)){
2885
+ entityMap.nbsp = '\xa0';
2886
+ entityMap.copy = '\xa9';
2887
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
2888
+ }
2889
+ if(source){
2890
+ sax.parse(source,defaultNSMap,entityMap);
2891
+ }else{
2892
+ sax.errorHandler.error("invalid document source");
2893
+ }
2894
+ return domBuilder.document;
2895
+ }
2896
+ function buildErrorHandler(errorImpl,domBuilder,locator){
2897
+ if(!errorImpl){
2898
+ if(domBuilder instanceof DOMHandler){
2899
+ return domBuilder;
2900
+ }
2901
+ errorImpl = domBuilder ;
2902
+ }
2903
+ var errorHandler = {}
2904
+ var isCallback = errorImpl instanceof Function;
2905
+ locator = locator||{}
2906
+ function build(key){
2907
+ var fn = errorImpl[key];
2908
+ if(!fn){
2909
+ if(isCallback){
2910
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
2911
+ }else{
2912
+ var i=arguments.length;
2913
+ while(--i){
2914
+ if(fn = errorImpl[arguments[i]]){
2915
+ break;
2916
+ }
2917
+ }
2918
+ }
2919
+ }
2920
+ errorHandler[key] = fn && function(msg){
2921
+ fn(msg+_locator(locator), msg, locator);
2922
+ }||function(){};
2923
+ }
2924
+ build('warning','warn');
2925
+ build('error','warn','warning');
2926
+ build('fatalError','warn','warning','error');
2927
+ return errorHandler;
2928
+ }
2929
+ function DOMHandler() {
2930
+ this.cdata = false;
2931
+ }
2932
+ function position(locator,node){
2933
+ node.lineNumber = locator.lineNumber;
2934
+ node.columnNumber = locator.columnNumber;
2935
+ }
2936
+ DOMHandler.prototype = {
2937
+ startDocument : function() {
2938
+ this.document = new DOMImplementation().createDocument(null, null, null);
2939
+ if (this.locator) {
2940
+ this.document.documentURI = this.locator.systemId;
2941
+ }
2942
+ },
2943
+ startElement:function(namespaceURI, localName, qName, attrs) {
2944
+ var doc = this.document;
2945
+ var el = doc.createElementNS(namespaceURI, qName||localName);
2946
+ var len = attrs.length;
2947
+ appendElement(this, el);
2948
+ this.currentElement = el;
2949
+
2950
+ this.locator && position(this.locator,el)
2951
+ for (var i = 0 ; i < len; i++) {
2952
+ var namespaceURI = attrs.getURI(i);
2953
+ var value = attrs.getValue(i);
2954
+ var qName = attrs.getQName(i);
2955
+ var attr = doc.createAttributeNS(namespaceURI, qName);
2956
+ if( attr.getOffset){
2957
+ position(attr.getOffset(1),attr)
2958
+ }
2959
+ attr.value = attr.nodeValue = value;
2960
+ el.setAttributeNode(attr)
2961
+ }
2962
+ },
2963
+ endElement:function(namespaceURI, localName, qName) {
2964
+ var current = this.currentElement
2965
+ var tagName = current.tagName;
2966
+ this.currentElement = current.parentNode;
2967
+ },
2968
+ startPrefixMapping:function(prefix, uri) {
2969
+ },
2970
+ endPrefixMapping:function(prefix) {
2971
+ },
2972
+ processingInstruction:function(target, data) {
2973
+ var ins = this.document.createProcessingInstruction(target, data);
2974
+ this.locator && position(this.locator,ins)
2975
+ appendElement(this, ins);
2976
+ },
2977
+ ignorableWhitespace:function(ch, start, length) {
2978
+ },
2979
+ characters:function(chars, start, length) {
2980
+ chars = _toString.apply(this,arguments)
2981
+ if(this.currentElement && chars){
2982
+ if (this.cdata) {
2983
+ var charNode = this.document.createCDATASection(chars);
2984
+ this.currentElement.appendChild(charNode);
2985
+ } else {
2986
+ var charNode = this.document.createTextNode(chars);
2987
+ this.currentElement.appendChild(charNode);
2988
+ }
2989
+ this.locator && position(this.locator,charNode)
2990
+ }
2991
+ },
2992
+ skippedEntity:function(name) {
2993
+ },
2994
+ endDocument:function() {
2995
+ this.document.normalize();
2996
+ },
2997
+ setDocumentLocator:function (locator) {
2998
+ if(this.locator = locator){// && !('lineNumber' in locator)){
2999
+ locator.lineNumber = 0;
3000
+ }
3001
+ },
3002
+ comment:function(chars, start, length) {
3003
+ chars = _toString.apply(this,arguments)
3004
+ var comm = this.document.createComment(chars);
3005
+ this.locator && position(this.locator,comm)
3006
+ appendElement(this, comm);
3007
+ },
3008
+
3009
+ startCDATA:function() {
3010
+ this.cdata = true;
3011
+ },
3012
+ endCDATA:function() {
3013
+ this.cdata = false;
3014
+ },
3015
+
3016
+ startDTD:function(name, publicId, systemId) {
3017
+ var impl = this.document.implementation;
3018
+ if (impl && impl.createDocumentType) {
3019
+ var dt = impl.createDocumentType(name, publicId, systemId);
3020
+ this.locator && position(this.locator,dt)
3021
+ appendElement(this, dt);
3022
+ }
3023
+ },
3024
+ warning:function(error) {
3025
+ console.warn(error,_locator(this.locator));
3026
+ },
3027
+ error:function(error) {
3028
+ console.error(error,_locator(this.locator));
3029
+ },
3030
+ fatalError:function(error) {
3031
+ console.error(error,_locator(this.locator));
3032
+ throw error;
3033
+ }
3034
+ }
3035
+ function _locator(l){
3036
+ if(l){
3037
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
3038
+ }
3039
+ }
3040
+ function _toString(chars,start,length){
3041
+ if(typeof chars == 'string'){
3042
+ return chars.substr(start,length)
3043
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
3044
+ if(chars.length >= start+length || start){
3045
+ return new java.lang.String(chars,start,length)+'';
3046
+ }
3047
+ return chars;
3048
+ }
3049
+ }
3050
+ "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
3051
+ DOMHandler.prototype[key] = function(){return null}
3052
+ })
3053
+ function appendElement (hander,node) {
3054
+ if (!hander.currentElement) {
3055
+ hander.document.appendChild(node);
3056
+ } else {
3057
+ hander.currentElement.appendChild(node);
3058
+ }
3059
+ }//appendChild and setAttributeNS are preformance key
3060
+
3061
+ return {
3062
+ DOMParser: DOMParser
3063
+ };
3064
+ });
3065
+
3066
+ ace.define("ace/mode/xml_worker",[], function(require, exports, module) {
3067
+ "use strict";
3068
+
3069
+ var oop = require("../lib/oop");
3070
+ var lang = require("../lib/lang");
3071
+ var Mirror = require("../worker/mirror").Mirror;
3072
+ var DOMParser = require("./xml/dom-parser").DOMParser;
3073
+
3074
+ var Worker = exports.Worker = function(sender) {
3075
+ Mirror.call(this, sender);
3076
+ this.setTimeout(400);
3077
+ this.context = null;
3078
+ };
3079
+
3080
+ oop.inherits(Worker, Mirror);
3081
+
3082
+ (function() {
3083
+
3084
+ this.setOptions = function(options) {
3085
+ this.context = options.context;
3086
+ };
3087
+
3088
+ this.onUpdate = function() {
3089
+ var value = this.doc.getValue();
3090
+ if (!value)
3091
+ return;
3092
+ var parser = new DOMParser();
3093
+ var errors = [];
3094
+ parser.options.errorHandler = {
3095
+ fatalError: function(fullMsg, errorMsg, locator) {
3096
+ errors.push({
3097
+ row: locator.lineNumber,
3098
+ column: locator.columnNumber,
3099
+ text: errorMsg,
3100
+ type: "error"
3101
+ });
3102
+ },
3103
+ error: function(fullMsg, errorMsg, locator) {
3104
+ errors.push({
3105
+ row: locator.lineNumber,
3106
+ column: locator.columnNumber,
3107
+ text: errorMsg,
3108
+ type: "error"
3109
+ });
3110
+ },
3111
+ warning: function(fullMsg, errorMsg, locator) {
3112
+ errors.push({
3113
+ row: locator.lineNumber,
3114
+ column: locator.columnNumber,
3115
+ text: errorMsg,
3116
+ type: "warning"
3117
+ });
3118
+ }
3119
+ };
3120
+
3121
+ parser.parseFromString(value);
3122
+ this.sender.emit("error", errors);
3123
+ };
3124
+
3125
+ }).call(Worker.prototype);
3126
+
3127
+ });