ace-rails-ap-3.0.3/0000755000076400007640000000000012554155240013012 5ustar pravipraviace-rails-ap-3.0.3/LICENSE0000644000076400007640000000206712554155240014024 0ustar pravipraviThe MIT License (MIT) Copyright (c) 2014 Cody Krieger Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ace-rails-ap-3.0.3/.gitmodules0000644000076400007640000000011612554155240015165 0ustar pravipravi[submodule "ext/ace"] path = ext/ace url = git://github.com/ajaxorg/ace.git ace-rails-ap-3.0.3/update.sh0000755000076400007640000000020712554155240014632 0ustar pravipravi#!/bin/bash cd ext/ace && git pull && cd - mkdir -p vendor/assets/javascripts/ace cp ext/ace/build/src/* vendor/assets/javascripts/ace ace-rails-ap-3.0.3/vendor/0000755000076400007640000000000012554155240014307 5ustar pravipraviace-rails-ap-3.0.3/vendor/assets/0000755000076400007640000000000012554155240015611 5ustar pravipraviace-rails-ap-3.0.3/vendor/assets/javascripts/0000755000076400007640000000000012554155240020142 5ustar pravipraviace-rails-ap-3.0.3/vendor/assets/javascripts/ace/0000755000076400007640000000000012554155240020672 5ustar pravipraviace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-erlang.js0000644000076400007640000013242412554155240023430 0ustar pravipravidefine("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ErlangHighlightRules = function() { this.$rules = { start: [ { include: '#module-directive' }, { include: '#import-export-directive' }, { include: '#behaviour-directive' }, { include: '#record-directive' }, { include: '#define-directive' }, { include: '#macro-directive' }, { include: '#directive' }, { include: '#function' }, { include: '#everything-else' } ], '#atom': [ { token: 'punctuation.definition.symbol.begin.erlang', regex: '\'', push: [ { token: 'punctuation.definition.symbol.end.erlang', regex: '\'', next: 'pop' }, { token: [ 'punctuation.definition.escape.erlang', 'constant.other.symbol.escape.erlang', 'punctuation.definition.escape.erlang', 'constant.other.symbol.escape.erlang', 'constant.other.symbol.escape.erlang' ], regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, { token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' }, { defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] }, { token: 'constant.other.symbol.unquoted.erlang', regex: '[a-z][a-zA-Z\\d@_]*' } ], '#behaviour-directive': [ { token: [ 'meta.directive.behaviour.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.behaviour.erlang', 'keyword.control.directive.behaviour.erlang', 'meta.directive.behaviour.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.behaviour.erlang', 'entity.name.type.class.behaviour.definition.erlang', 'meta.directive.behaviour.erlang', 'punctuation.definition.parameters.end.erlang', 'meta.directive.behaviour.erlang', 'punctuation.section.directive.end.erlang' ], regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ], '#binary': [ { token: 'punctuation.definition.binary.begin.erlang', regex: '<<', push: [ { token: 'punctuation.definition.binary.end.erlang', regex: '>>', next: 'pop' }, { token: [ 'punctuation.separator.binary.erlang', 'punctuation.separator.value-size.erlang' ], regex: '(,)|(:)' }, { include: '#internal-type-specifiers' }, { include: '#everything-else' }, { defaultToken: 'meta.structure.binary.erlang' } ] } ], '#character': [ { token: [ 'punctuation.definition.character.erlang', 'punctuation.definition.escape.erlang', 'constant.character.escape.erlang', 'punctuation.definition.escape.erlang', 'constant.character.escape.erlang', 'constant.character.escape.erlang' ], regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, { token: 'invalid.illegal.character.erlang', regex: '\\$\\\\\\^?.?' }, { token: [ 'punctuation.definition.character.erlang', 'constant.character.erlang' ], regex: '(\\$)(\\S)' }, { token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ], '#comment': [ { token: 'punctuation.definition.comment.erlang', regex: '%.*$', push_: [ { token: 'comment.line.percentage.erlang', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.percentage.erlang' } ] } ], '#define-directive': [ { token: [ 'meta.directive.define.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.define.erlang', 'keyword.control.directive.define.erlang', 'meta.directive.define.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.define.erlang', 'entity.name.function.macro.definition.erlang', 'meta.directive.define.erlang', 'punctuation.separator.parameters.erlang' ], regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)', push: [ { token: [ 'punctuation.definition.parameters.end.erlang', 'meta.directive.define.erlang', 'punctuation.section.directive.end.erlang' ], regex: '(\\))(\\s*)(\\.)', next: 'pop' }, { include: '#everything-else' }, { defaultToken: 'meta.directive.define.erlang' } ] }, { token: 'meta.directive.define.erlang', regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()', push: [ { token: [ 'punctuation.definition.parameters.end.erlang', 'meta.directive.define.erlang', 'punctuation.section.directive.end.erlang' ], regex: '(\\))(\\s*)(\\.)', next: 'pop' }, { token: [ 'text', 'punctuation.section.directive.begin.erlang', 'text', 'keyword.control.directive.define.erlang', 'text', 'punctuation.definition.parameters.begin.erlang', 'text', 'entity.name.function.macro.definition.erlang', 'text', 'punctuation.definition.parameters.begin.erlang' ], regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()', push: [ { token: [ 'punctuation.definition.parameters.end.erlang', 'text', 'punctuation.separator.parameters.erlang' ], regex: '(\\))(\\s*)(,)', next: 'pop' }, { token: 'punctuation.separator.parameters.erlang', regex: ',' }, { include: '#everything-else' } ] }, { token: 'punctuation.separator.define.erlang', regex: '\\|\\||\\||:|;|,|\\.|->' }, { include: '#everything-else' }, { defaultToken: 'meta.directive.define.erlang' } ] } ], '#directive': [ { token: [ 'meta.directive.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.erlang', 'keyword.control.directive.erlang', 'meta.directive.erlang', 'punctuation.definition.parameters.begin.erlang' ], regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)', push: [ { token: [ 'punctuation.definition.parameters.end.erlang', 'meta.directive.erlang', 'punctuation.section.directive.end.erlang' ], regex: '(\\)?)(\\s*)(\\.)', next: 'pop' }, { include: '#everything-else' }, { defaultToken: 'meta.directive.erlang' } ] }, { token: [ 'meta.directive.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.erlang', 'keyword.control.directive.erlang', 'meta.directive.erlang', 'punctuation.section.directive.end.erlang' ], regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ], '#everything-else': [ { include: '#comment' }, { include: '#record-usage' }, { include: '#macro-usage' }, { include: '#expression' }, { include: '#keyword' }, { include: '#textual-operator' }, { include: '#function-call' }, { include: '#tuple' }, { include: '#list' }, { include: '#binary' }, { include: '#parenthesized-expression' }, { include: '#character' }, { include: '#number' }, { include: '#atom' }, { include: '#string' }, { include: '#symbolic-operator' }, { include: '#variable' } ], '#expression': [ { token: 'keyword.control.if.erlang', regex: '\\bif\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { include: '#internal-expression-punctuation' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.if.erlang' } ] }, { token: 'keyword.control.case.erlang', regex: '\\bcase\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { include: '#internal-expression-punctuation' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.case.erlang' } ] }, { token: 'keyword.control.receive.erlang', regex: '\\breceive\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { include: '#internal-expression-punctuation' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.receive.erlang' } ] }, { token: [ 'keyword.control.fun.erlang', 'text', 'entity.name.type.class.module.erlang', 'text', 'punctuation.separator.module-function.erlang', 'text', 'entity.name.function.erlang', 'text', 'punctuation.separator.function-arity.erlang' ], regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' }, { token: 'keyword.control.fun.erlang', regex: '\\bfun\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { token: 'text', regex: '(?=\\()', push: [ { token: 'punctuation.separator.clauses.erlang', regex: ';|(?=\\bend\\b)', next: 'pop' }, { include: '#internal-function-parts' } ] }, { include: '#everything-else' }, { defaultToken: 'meta.expression.fun.erlang' } ] }, { token: 'keyword.control.try.erlang', regex: '\\btry\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { include: '#internal-expression-punctuation' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.try.erlang' } ] }, { token: 'keyword.control.begin.erlang', regex: '\\bbegin\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { include: '#internal-expression-punctuation' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.begin.erlang' } ] }, { token: 'keyword.control.query.erlang', regex: '\\bquery\\b', push: [ { token: 'keyword.control.end.erlang', regex: '\\bend\\b', next: 'pop' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.query.erlang' } ] } ], '#function': [ { token: [ 'meta.function.erlang', 'entity.name.function.definition.erlang', 'meta.function.erlang' ], regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()', push: [ { token: 'punctuation.terminator.function.erlang', regex: '\\.', next: 'pop' }, { token: [ 'text', 'entity.name.function.erlang', 'text' ], regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' }, { token: 'text', regex: '(?=\\()', push: [ { token: 'punctuation.separator.clauses.erlang', regex: ';|(?=\\.)', next: 'pop' }, { include: '#parenthesized-expression' }, { include: '#internal-function-parts' } ] }, { include: '#everything-else' }, { defaultToken: 'meta.function.erlang' } ] } ], '#function-call': [ { token: 'meta.function-call.erlang', regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())', push: [ { token: 'punctuation.definition.parameters.end.erlang', regex: '\\)', next: 'pop' }, { token: [ 'entity.name.type.class.module.erlang', 'text', 'punctuation.separator.module-function.erlang', 'text', 'entity.name.function.guard.erlang', 'text', 'punctuation.definition.parameters.begin.erlang' ], regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()', push: [ { token: 'text', regex: '(?=\\))', next: 'pop' }, { token: 'punctuation.separator.parameters.erlang', regex: ',' }, { include: '#everything-else' } ] }, { token: [ 'entity.name.type.class.module.erlang', 'text', 'punctuation.separator.module-function.erlang', 'text', 'entity.name.function.erlang', 'text', 'punctuation.definition.parameters.begin.erlang' ], regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()', push: [ { token: 'text', regex: '(?=\\))', next: 'pop' }, { token: 'punctuation.separator.parameters.erlang', regex: ',' }, { include: '#everything-else' } ] }, { defaultToken: 'meta.function-call.erlang' } ] } ], '#import-export-directive': [ { token: [ 'meta.directive.import.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.import.erlang', 'keyword.control.directive.import.erlang', 'meta.directive.import.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.import.erlang', 'entity.name.type.class.module.erlang', 'meta.directive.import.erlang', 'punctuation.separator.parameters.erlang' ], regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', push: [ { token: [ 'punctuation.definition.parameters.end.erlang', 'meta.directive.import.erlang', 'punctuation.section.directive.end.erlang' ], regex: '(\\))(\\s*)(\\.)', next: 'pop' }, { include: '#internal-function-list' }, { defaultToken: 'meta.directive.import.erlang' } ] }, { token: [ 'meta.directive.export.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.export.erlang', 'keyword.control.directive.export.erlang', 'meta.directive.export.erlang', 'punctuation.definition.parameters.begin.erlang' ], regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()', push: [ { token: [ 'punctuation.definition.parameters.end.erlang', 'meta.directive.export.erlang', 'punctuation.section.directive.end.erlang' ], regex: '(\\))(\\s*)(\\.)', next: 'pop' }, { include: '#internal-function-list' }, { defaultToken: 'meta.directive.export.erlang' } ] } ], '#internal-expression-punctuation': [ { token: [ 'punctuation.separator.clause-head-body.erlang', 'punctuation.separator.clauses.erlang', 'punctuation.separator.expressions.erlang' ], regex: '(->)|(;)|(,)' } ], '#internal-function-list': [ { token: 'punctuation.definition.list.begin.erlang', regex: '\\[', push: [ { token: 'punctuation.definition.list.end.erlang', regex: '\\]', next: 'pop' }, { token: [ 'entity.name.function.erlang', 'text', 'punctuation.separator.function-arity.erlang' ], regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)', push: [ { token: 'punctuation.separator.list.erlang', regex: ',|(?=\\])', next: 'pop' }, { include: '#everything-else' } ] }, { include: '#everything-else' }, { defaultToken: 'meta.structure.list.function.erlang' } ] } ], '#internal-function-parts': [ { token: 'text', regex: '(?=\\()', push: [ { token: 'punctuation.separator.clause-head-body.erlang', regex: '->', next: 'pop' }, { token: 'punctuation.definition.parameters.begin.erlang', regex: '\\(', push: [ { token: 'punctuation.definition.parameters.end.erlang', regex: '\\)', next: 'pop' }, { token: 'punctuation.separator.parameters.erlang', regex: ',' }, { include: '#everything-else' } ] }, { token: 'punctuation.separator.guards.erlang', regex: ',|;' }, { include: '#everything-else' } ] }, { token: 'punctuation.separator.expressions.erlang', regex: ',' }, { include: '#everything-else' } ], '#internal-record-body': [ { token: 'punctuation.definition.class.record.begin.erlang', regex: '\\{', push: [ { token: 'meta.structure.record.erlang', regex: '(?=\\})', next: 'pop' }, { token: [ 'variable.other.field.erlang', 'variable.language.omitted.field.erlang', 'text', 'keyword.operator.assignment.erlang' ], regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)', push: [ { token: 'punctuation.separator.class.record.erlang', regex: ',|(?=\\})', next: 'pop' }, { include: '#everything-else' } ] }, { token: [ 'variable.other.field.erlang', 'text', 'punctuation.separator.class.record.erlang' ], regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' }, { include: '#everything-else' }, { defaultToken: 'meta.structure.record.erlang' } ] } ], '#internal-type-specifiers': [ { token: 'punctuation.separator.value-type.erlang', regex: '/', push: [ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' }, { token: [ 'storage.type.erlang', 'storage.modifier.signedness.erlang', 'storage.modifier.endianness.erlang', 'storage.modifier.unit.erlang', 'punctuation.separator.type-specifiers.erlang' ], regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ], '#keyword': [ { token: 'keyword.control.erlang', regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ], '#list': [ { token: 'punctuation.definition.list.begin.erlang', regex: '\\[', push: [ { token: 'punctuation.definition.list.end.erlang', regex: '\\]', next: 'pop' }, { token: 'punctuation.separator.list.erlang', regex: '\\||\\|\\||,' }, { include: '#everything-else' }, { defaultToken: 'meta.structure.list.erlang' } ] } ], '#macro-directive': [ { token: [ 'meta.directive.ifdef.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.ifdef.erlang', 'keyword.control.directive.ifdef.erlang', 'meta.directive.ifdef.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.ifdef.erlang', 'entity.name.function.macro.erlang', 'meta.directive.ifdef.erlang', 'punctuation.definition.parameters.end.erlang', 'meta.directive.ifdef.erlang', 'punctuation.section.directive.end.erlang' ], regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, { token: [ 'meta.directive.ifndef.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.ifndef.erlang', 'keyword.control.directive.ifndef.erlang', 'meta.directive.ifndef.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.ifndef.erlang', 'entity.name.function.macro.erlang', 'meta.directive.ifndef.erlang', 'punctuation.definition.parameters.end.erlang', 'meta.directive.ifndef.erlang', 'punctuation.section.directive.end.erlang' ], regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, { token: [ 'meta.directive.undef.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.undef.erlang', 'keyword.control.directive.undef.erlang', 'meta.directive.undef.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.undef.erlang', 'entity.name.function.macro.erlang', 'meta.directive.undef.erlang', 'punctuation.definition.parameters.end.erlang', 'meta.directive.undef.erlang', 'punctuation.section.directive.end.erlang' ], regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ], '#macro-usage': [ { token: [ 'keyword.operator.macro.erlang', 'meta.macro-usage.erlang', 'entity.name.function.macro.erlang' ], regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ], '#module-directive': [ { token: [ 'meta.directive.module.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.module.erlang', 'keyword.control.directive.module.erlang', 'meta.directive.module.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.module.erlang', 'entity.name.type.class.module.definition.erlang', 'meta.directive.module.erlang', 'punctuation.definition.parameters.end.erlang', 'meta.directive.module.erlang', 'punctuation.section.directive.end.erlang' ], regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ], '#number': [ { token: 'text', regex: '(?=\\d)', push: [ { token: 'text', regex: '(?!\\d)', next: 'pop' }, { token: [ 'constant.numeric.float.erlang', 'punctuation.separator.integer-float.erlang', 'constant.numeric.float.erlang', 'punctuation.separator.float-exponent.erlang' ], regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' }, { token: [ 'constant.numeric.integer.binary.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.binary.erlang' ], regex: '(2)(#)([0-1]+)' }, { token: [ 'constant.numeric.integer.base-3.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-3.erlang' ], regex: '(3)(#)([0-2]+)' }, { token: [ 'constant.numeric.integer.base-4.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-4.erlang' ], regex: '(4)(#)([0-3]+)' }, { token: [ 'constant.numeric.integer.base-5.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-5.erlang' ], regex: '(5)(#)([0-4]+)' }, { token: [ 'constant.numeric.integer.base-6.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-6.erlang' ], regex: '(6)(#)([0-5]+)' }, { token: [ 'constant.numeric.integer.base-7.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-7.erlang' ], regex: '(7)(#)([0-6]+)' }, { token: [ 'constant.numeric.integer.octal.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.octal.erlang' ], regex: '(8)(#)([0-7]+)' }, { token: [ 'constant.numeric.integer.base-9.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-9.erlang' ], regex: '(9)(#)([0-8]+)' }, { token: [ 'constant.numeric.integer.decimal.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.decimal.erlang' ], regex: '(10)(#)(\\d+)' }, { token: [ 'constant.numeric.integer.base-11.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-11.erlang' ], regex: '(11)(#)([\\daA]+)' }, { token: [ 'constant.numeric.integer.base-12.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-12.erlang' ], regex: '(12)(#)([\\da-bA-B]+)' }, { token: [ 'constant.numeric.integer.base-13.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-13.erlang' ], regex: '(13)(#)([\\da-cA-C]+)' }, { token: [ 'constant.numeric.integer.base-14.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-14.erlang' ], regex: '(14)(#)([\\da-dA-D]+)' }, { token: [ 'constant.numeric.integer.base-15.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-15.erlang' ], regex: '(15)(#)([\\da-eA-E]+)' }, { token: [ 'constant.numeric.integer.hexadecimal.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.hexadecimal.erlang' ], regex: '(16)(#)([\\da-fA-F]+)' }, { token: [ 'constant.numeric.integer.base-17.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-17.erlang' ], regex: '(17)(#)([\\da-gA-G]+)' }, { token: [ 'constant.numeric.integer.base-18.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-18.erlang' ], regex: '(18)(#)([\\da-hA-H]+)' }, { token: [ 'constant.numeric.integer.base-19.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-19.erlang' ], regex: '(19)(#)([\\da-iA-I]+)' }, { token: [ 'constant.numeric.integer.base-20.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-20.erlang' ], regex: '(20)(#)([\\da-jA-J]+)' }, { token: [ 'constant.numeric.integer.base-21.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-21.erlang' ], regex: '(21)(#)([\\da-kA-K]+)' }, { token: [ 'constant.numeric.integer.base-22.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-22.erlang' ], regex: '(22)(#)([\\da-lA-L]+)' }, { token: [ 'constant.numeric.integer.base-23.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-23.erlang' ], regex: '(23)(#)([\\da-mA-M]+)' }, { token: [ 'constant.numeric.integer.base-24.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-24.erlang' ], regex: '(24)(#)([\\da-nA-N]+)' }, { token: [ 'constant.numeric.integer.base-25.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-25.erlang' ], regex: '(25)(#)([\\da-oA-O]+)' }, { token: [ 'constant.numeric.integer.base-26.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-26.erlang' ], regex: '(26)(#)([\\da-pA-P]+)' }, { token: [ 'constant.numeric.integer.base-27.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-27.erlang' ], regex: '(27)(#)([\\da-qA-Q]+)' }, { token: [ 'constant.numeric.integer.base-28.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-28.erlang' ], regex: '(28)(#)([\\da-rA-R]+)' }, { token: [ 'constant.numeric.integer.base-29.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-29.erlang' ], regex: '(29)(#)([\\da-sA-S]+)' }, { token: [ 'constant.numeric.integer.base-30.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-30.erlang' ], regex: '(30)(#)([\\da-tA-T]+)' }, { token: [ 'constant.numeric.integer.base-31.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-31.erlang' ], regex: '(31)(#)([\\da-uA-U]+)' }, { token: [ 'constant.numeric.integer.base-32.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-32.erlang' ], regex: '(32)(#)([\\da-vA-V]+)' }, { token: [ 'constant.numeric.integer.base-33.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-33.erlang' ], regex: '(33)(#)([\\da-wA-W]+)' }, { token: [ 'constant.numeric.integer.base-34.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-34.erlang' ], regex: '(34)(#)([\\da-xA-X]+)' }, { token: [ 'constant.numeric.integer.base-35.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-35.erlang' ], regex: '(35)(#)([\\da-yA-Y]+)' }, { token: [ 'constant.numeric.integer.base-36.erlang', 'punctuation.separator.base-integer.erlang', 'constant.numeric.integer.base-36.erlang' ], regex: '(36)(#)([\\da-zA-Z]+)' }, { token: 'invalid.illegal.integer.erlang', regex: '\\d+#[\\da-zA-Z]+' }, { token: 'constant.numeric.integer.decimal.erlang', regex: '\\d+' } ] } ], '#parenthesized-expression': [ { token: 'punctuation.section.expression.begin.erlang', regex: '\\(', push: [ { token: 'punctuation.section.expression.end.erlang', regex: '\\)', next: 'pop' }, { include: '#everything-else' }, { defaultToken: 'meta.expression.parenthesized' } ] } ], '#record-directive': [ { token: [ 'meta.directive.record.erlang', 'punctuation.section.directive.begin.erlang', 'meta.directive.record.erlang', 'keyword.control.directive.import.erlang', 'meta.directive.record.erlang', 'punctuation.definition.parameters.begin.erlang', 'meta.directive.record.erlang', 'entity.name.type.class.record.definition.erlang', 'meta.directive.record.erlang', 'punctuation.separator.parameters.erlang' ], regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', push: [ { token: [ 'punctuation.definition.class.record.end.erlang', 'meta.directive.record.erlang', 'punctuation.definition.parameters.end.erlang', 'meta.directive.record.erlang', 'punctuation.section.directive.end.erlang' ], regex: '(\\})(\\s*)(\\))(\\s*)(\\.)', next: 'pop' }, { include: '#internal-record-body' }, { defaultToken: 'meta.directive.record.erlang' } ] } ], '#record-usage': [ { token: [ 'keyword.operator.record.erlang', 'meta.record-usage.erlang', 'entity.name.type.class.record.erlang', 'meta.record-usage.erlang', 'punctuation.separator.record-field.erlang', 'meta.record-usage.erlang', 'variable.other.field.erlang' ], regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' }, { token: [ 'keyword.operator.record.erlang', 'meta.record-usage.erlang', 'entity.name.type.class.record.erlang' ], regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')', push: [ { token: 'punctuation.definition.class.record.end.erlang', regex: '\\}', next: 'pop' }, { include: '#internal-record-body' }, { defaultToken: 'meta.record-usage.erlang' } ] } ], '#string': [ { token: 'punctuation.definition.string.begin.erlang', regex: '"', push: [ { token: 'punctuation.definition.string.end.erlang', regex: '"', next: 'pop' }, { token: [ 'punctuation.definition.escape.erlang', 'constant.character.escape.erlang', 'punctuation.definition.escape.erlang', 'constant.character.escape.erlang', 'constant.character.escape.erlang' ], regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, { token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' }, { token: [ 'punctuation.definition.placeholder.erlang', 'punctuation.separator.placeholder-parts.erlang', 'constant.other.placeholder.erlang', 'punctuation.separator.placeholder-parts.erlang', 'punctuation.separator.placeholder-parts.erlang', 'constant.other.placeholder.erlang', 'punctuation.separator.placeholder-parts.erlang', 'punctuation.separator.placeholder-parts.erlang', 'punctuation.separator.placeholder-parts.erlang', 'constant.other.placeholder.erlang', 'constant.other.placeholder.erlang' ], regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' }, { token: [ 'punctuation.definition.placeholder.erlang', 'punctuation.separator.placeholder-parts.erlang', 'constant.other.placeholder.erlang', 'constant.other.placeholder.erlang' ], regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' }, { token: 'invalid.illegal.string.erlang', regex: '~.?' }, { defaultToken: 'string.quoted.double.erlang' } ] } ], '#symbolic-operator': [ { token: 'keyword.operator.symbolic.erlang', regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ], '#textual-operator': [ { token: 'keyword.operator.textual.erlang', regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ], '#tuple': [ { token: 'punctuation.definition.tuple.begin.erlang', regex: '\\{', push: [ { token: 'punctuation.definition.tuple.end.erlang', regex: '\\}', next: 'pop' }, { token: 'punctuation.separator.tuple.erlang', regex: ',' }, { include: '#everything-else' }, { defaultToken: 'meta.structure.tuple.erlang' } ] } ], '#variable': [ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ], regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] } this.normalizeRules(); }; ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp', fileTypes: [ 'erl', 'hrl' ], keyEquivalent: '^~E', name: 'Erlang', scopeName: 'source.erlang' } oop.inherits(ErlangHighlightRules, TextHighlightRules); exports.ErlangHighlightRules = ErlangHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = ErlangHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "%"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/erlang"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-scheme.js0000644000076400007640000000630112554155240023416 0ustar pravipravidefine("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var SchemeHighlightRules = function() { var keywordControl = "case|do|let|loop|if|else|when"; var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?"; var constantLanguage = "#t|#f"; var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load"; var keywordMapper = this.createKeywordMapper({ "keyword.control": keywordControl, "keyword.operator": keywordOperator, "constant.language": constantLanguage, "support.function": supportFunctions }, "identifier", true); this.$rules = { "start": [ { token : "comment", regex : ";.*$" }, { "token": ["storage.type.function-type.scheme", "text", "entity.name.function.scheme"], "regex": "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" }, { "token": "punctuation.definition.constant.character.scheme", "regex": "#:\\S+" }, { "token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"], "regex": "(\\*)(\\S*)(\\*)" }, { "token" : "constant.numeric", // hex "regex" : "#[xXoObB][0-9a-fA-F]+" }, { "token" : "constant.numeric", // float "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?" }, { "token" : keywordMapper, "regex" : "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*" }, { "token" : "string", "regex" : '"(?=.)', "next" : "qqstring" } ], "qqstring": [ { "token": "constant.character.escape.scheme", "regex": "\\\\." }, { "token" : "string", "regex" : '[^"\\\\]+', "merge" : true }, { "token" : "string", "regex" : "\\\\$", "next" : "qqstring", "merge" : true }, { "token" : "string", "regex" : '"|$', "next" : "start", "merge" : true } ] } }; oop.inherits(SchemeHighlightRules, TextHighlightRules); exports.SchemeHighlightRules = SchemeHighlightRules; }); define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules; var Mode = function() { this.HighlightRules = SchemeHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ";"; this.$id = "ace/mode/scheme"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-protobuf.js0000644000076400007640000010744312554155240024023 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" var c_cppHighlightRules = function() { var keywordControls = ( "break|case|continue|default|do|else|for|goto|if|_Pragma|" + "return|switch|while|catch|operator|try|throw|using" ); var storageType = ( "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + "class|wchar_t|template|char16_t|char32_t" ); var storageModifiers = ( "const|extern|register|restrict|static|volatile|inline|private|" + "protected|public|friend|explicit|virtual|export|mutable|typename|" + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local" ); var keywordOperators = ( "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); var builtinConstants = ( "NULL|true|false|TRUE|FALSE|nullptr" ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword.control" : keywordControls, "storage.type" : storageType, "storage.modifier" : storageModifiers, "keyword.operator" : keywordOperators, "variable.language": "this", "constant.language": builtinConstants }, "identifier"); var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; this.$rules = { "start" : [ { token : "comment", regex : "//", next : "singleLineComment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start regex : '["].*\\\\$', next : "qqstring" }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start regex : "['].*\\\\$", next : "qstring" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "keyword", // pre-compiler directives regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b", next : "directive" }, { token : "keyword", // special case pre-compiler directive regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" }, { token : "support.function.C99.c", regex : cFunctions }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "singleLineComment" : [ { token : "comment", regex : /\\$/, next : "singleLineComment" }, { token : "comment", regex : /$/, next : "start" }, { defaultToken: "comment" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { defaultToken : "string" } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { defaultToken : "string" } ], "directive" : [ { token : "constant.other.multiline", regex : /\\/ }, { token : "constant.other.multiline", regex : /.*\\/ }, { token : "constant.other", regex : "\\s*<.+?>", next : "start" }, { token : "constant.other", // single line regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next : "start" }, { token : "constant.other", // single line regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next : "start" }, { token : "constant.other", regex : /[^\\\/]+/, next : "start" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = c_cppHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/c_cpp"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ProtobufHighlightRules = function() { var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" + "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" + "string|bytes"; var keywordDeclaration = "message|required|optional|repeated|package|" + "import|option|enum"; var keywordMapper = this.createKeywordMapper({ "keyword.declaration.protobuf": keywordDeclaration, "support.type": builtinTypes }, "identifier"); this.$rules = { "start": [{ token: "comment", regex: /\/\/.*$/ }, { token: "comment", regex: /\/\*/, next: "comment" }, { token: "constant", regex: "<[^>]+>" }, { regex: "=", token: "keyword.operator.assignment.protobuf" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : '[\'](?:(?:\\\\.)|(?:[^\'\\\\]))*?[\']' }, { token: "constant.numeric", // hex regex: "0[xX][0-9a-fA-F]+\\b" }, { token: "constant.numeric", // float regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token: keywordMapper, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }], "comment": [{ token: "comment", // closing comment regex: ".*?\\*\\/", next: "start" }, { token: "comment", // comment spanning whole line regex: ".+" }] }; this.normalizeRules(); }; oop.inherits(ProtobufHighlightRules, TextHighlightRules); exports.ProtobufHighlightRules = ProtobufHighlightRules; }); define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { CMode.call(this); this.foldingRules = new CStyleFoldMode(); this.HighlightRules = ProtobufHighlightRules; }; oop.inherits(Mode, CMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/protobuf"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-vbscript.js0000644000076400007640000001703612554155240024015 0ustar pravipravidefine("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var VBScriptHighlightRules = function() { this.$rules = { "start": [ { token: [ "meta.ending-space" ], regex: "$" }, { token: [ null ], regex: "^(?=\\t)", next: "state_3" }, { token: [null], regex: "^(?= )", next: "state_4" }, { token: [ "text", "storage.type.function.asp", "text", "entity.name.function.asp", "text", "punctuation.definition.parameters.asp", "variable.parameter.function.asp", "punctuation.definition.parameters.asp" ], regex: "^(\\s*)(Function|Sub)(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))" }, { token: "punctuation.definition.comment.asp", regex: "'|REM", next: "comment" }, { token: [ "keyword.control.asp" ], regex: "\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b" }, { token: "keyword.operator.asp", regex: "\\b(?:Mod|And|Not|Or|Xor|as)\\b" }, { token: "storage.type.asp", regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo" }, { token: "storage.modifier.asp", regex: "\\b(?:Private|Public|Default)\\b" }, { token: "constant.language.asp", regex: "\\b(?:Empty|False|Nothing|Null|True)\\b" }, { token: "punctuation.definition.string.begin.asp", regex: '"', next: "string" }, { token: [ "punctuation.definition.variable.asp" ], regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*" }, { token: "support.class.asp", regex: "\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b" }, { token: "support.class.collection.asp", regex: "\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b" }, { token: "support.constant.asp", regex: "\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b" }, { token: "support.function.asp", regex: "\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b" }, { token: "support.function.event.asp", regex: "\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b" }, { token: "support.function.vb.asp", regex: "\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b" }, { token: [ "constant.numeric.asp" ], regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b" }, { token: "support.type.vb.asp", regex: "\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b" }, { token: [ "entity.name.function.asp" ], regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))" }, { token: [ "keyword.operator.asp" ], regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&" } ], "state_3": [ { token: [ "meta.odd-tab.tabs", "meta.even-tab.tabs" ], regex: "(\\t)(\\t)?" }, { token: "meta.leading-space", regex: "(?=[^\\t])", next: "start" }, { token: "meta.leading-space", regex: ".", next: "state_3" } ], "state_4": [ { token: ["meta.odd-tab.spaces", "meta.even-tab.spaces"], regex: "( )( )?" }, { token: "meta.leading-space", regex: "(?=[^ ])", next: "start" }, { defaultToken: "meta.leading-space" } ], "comment": [ { token: "comment.line.apostrophe.asp", regex: "$|(?=(?:%>))", next: "start" }, { defaultToken: "comment.line.apostrophe.asp" } ], "string": [ { token: "constant.character.escape.apostrophe.asp", regex: '""' }, { token: "string.quoted.double.asp", regex: '"', next: "start" }, { defaultToken: "string.quoted.double.asp" } ] } }; oop.inherits(VBScriptHighlightRules, TextHighlightRules); exports.VBScriptHighlightRules = VBScriptHighlightRules; }); define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules; var Mode = function() { this.HighlightRules = VBScriptHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ["'", "REM"]; this.$id = "ace/mode/vbscript"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-c_cpp.js0000644000076400007640000010110012554155240023227 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" var c_cppHighlightRules = function() { var keywordControls = ( "break|case|continue|default|do|else|for|goto|if|_Pragma|" + "return|switch|while|catch|operator|try|throw|using" ); var storageType = ( "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + "class|wchar_t|template|char16_t|char32_t" ); var storageModifiers = ( "const|extern|register|restrict|static|volatile|inline|private|" + "protected|public|friend|explicit|virtual|export|mutable|typename|" + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local" ); var keywordOperators = ( "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); var builtinConstants = ( "NULL|true|false|TRUE|FALSE|nullptr" ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword.control" : keywordControls, "storage.type" : storageType, "storage.modifier" : storageModifiers, "keyword.operator" : keywordOperators, "variable.language": "this", "constant.language": builtinConstants }, "identifier"); var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; this.$rules = { "start" : [ { token : "comment", regex : "//", next : "singleLineComment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start regex : '["].*\\\\$', next : "qqstring" }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start regex : "['].*\\\\$", next : "qstring" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "keyword", // pre-compiler directives regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b", next : "directive" }, { token : "keyword", // special case pre-compiler directive regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" }, { token : "support.function.C99.c", regex : cFunctions }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "singleLineComment" : [ { token : "comment", regex : /\\$/, next : "singleLineComment" }, { token : "comment", regex : /$/, next : "start" }, { defaultToken: "comment" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { defaultToken : "string" } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { defaultToken : "string" } ], "directive" : [ { token : "constant.other.multiline", regex : /\\/ }, { token : "constant.other.multiline", regex : /.*\\/ }, { token : "constant.other", regex : "\\s*<.+?>", next : "start" }, { token : "constant.other", // single line regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next : "start" }, { token : "constant.other", // single line regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next : "start" }, { token : "constant.other", regex : /[^\\\/]+/, next : "start" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = c_cppHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/c_cpp"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-xquery.js0000644000076400007640001253571012554155240024112 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i 1) { result = get(child, path.slice(1)); } else if(child.name === path[0]) { result.push(child); } }); return result; }; var markers = []; this.apply = function(fn) { try { fn(); } catch(e) { if(e instanceof StaticError) { addStaticError(e); } else if(e instanceof StaticWarning) { addWarning(e.getCode(), e.getMessage(), e.getPos()); } else { throw e; } } }; var addStaticError = function(e){ markers.push({ pos: e.getPos(), type: 'error', level: 'error', message: '[' + e.getCode() + '] ' + e.getMessage() }); }; var addWarning = function(code, message, pos) { markers.push({ pos: pos, type: 'warning', level: 'warning', message: '[' + code + '] ' + message }); }; this.getMarkers = function(){ return markers; }; var translator = this; rootStcx.pos = ast.pos; var sctx = rootStcx; var pushSctx = function(pos){ sctx = new StaticContext(sctx, pos); sctx.parent.children.push(sctx); }; var popSctx = function(pos){ if (pos !== undefined) { sctx.pos.el = pos.el; sctx.pos.ec = pos.ec; } Object.keys(sctx.varRefs).forEach(function(key){ if(!sctx.variables[key]) { sctx.parent.varRefs[key] = true; } }); Object.keys(sctx.variables).forEach(function(key){ if(!sctx.varRefs[key] && sctx.variables[key].type !== 'GroupingVariable' && sctx.variables[key].type !== 'CatchVar') { addWarning('W03', 'Unused variable "$' + sctx.variables[key].qname.name + '"', sctx.variables[key].pos); } }); sctx = sctx.parent; }; this.visitOnly = function(node, names) { node.children.forEach(function(child){ if (names.indexOf(child.name) !== -1){ translator.visit(child); } }); }; this.getFirstChild = function(node, name) { var result; node.children.forEach(function(child){ if(child.name === name && result === undefined){ result = child; } }); return result; }; this.ModuleDecl = function(node){ this.visitChildren(node, Handlers.ModuleDecl(translator, rootStcx, node)); return true; }; this.Prolog = function(node){ this.visitOnly(node, ['DefaultNamespaceDecl', 'Setter', 'NamespaceDecl', 'Import']); ast.index.forEach(function(node){ if(node.name === 'VarDecl') { node.children.forEach(function(child){ if(child.name === 'VarName') { translator.apply(function(){ var value = TreeOps.flatten(child); var qname = rootStcx.resolveQName(value, child.pos); rootStcx.addVariable(qname, node.name, child.pos); }); } }); } else if(node.name === 'FunctionDecl') { var qname, pos, params = []; node.children.forEach(function(child){ if(child.name === 'EQName') { qname = child; pos = child.pos; } else if(child.name === 'ParamList'){ child.children.forEach(function(c){ if(c.name === 'Param') { params.push(TreeOps.flatten(c)); } }); } }); translator.apply(function(){ qname = TreeOps.flatten(qname); qname = rootStcx.resolveQName(qname, pos); rootStcx.addFunction(qname, pos, params); }); } }); this.visitOnly(node, ['ContextItemDecl', 'AnnotatedDecl', 'OptionDecl']); return true; }; this.ModuleImport = function (node) { this.visitChildren(node, Handlers.ModuleImport(translator, rootStcx, node)); return true; }; this.SchemaImport = function (node) { this.visitChildren(node, Handlers.SchemaImport(translator, rootStcx, node)); return true; }; this.DefaultNamespaceDecl = function(node){ this.visitChildren(node, Handlers.DefaultNamespaceDecl(translator, rootStcx, node)); return true; }; this.NamespaceDecl = function (node) { this.visitChildren(node, Handlers.NamespaceDecl(translator, rootStcx, node)); return true; }; var annotations = {}; this.AnnotatedDecl = function(node) { annotations = {}; this.visitChildren(node, Handlers.NamespaceDecl(translator, rootStcx, node)); return true; }; this.CompatibilityAnnotation = function(){ annotations['http://www.w3.org/2012/xquery#updating'] = []; return true; }; this.Annotation = function(node){ this.visitChildren(node, { EQName: function(eqname){ var value = TreeOps.flatten(eqname); translator.apply(function(){ var qname = sctx.resolveQName(value, eqname.pos); annotations[qname.uri + '#' + qname.name] = []; }); } }); return true; }; this.VarDecl = function(node){ try { var varname = translator.getFirstChild(node, 'VarName'); var value = TreeOps.flatten(varname); var qname = sctx.resolveQName(value, varname.pos); var variable = rootStcx.getVariable(qname); if(variable) { variable.annotations = annotations; } } catch(e) { } this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']); return true; }; this.FunctionDecl = function(node) { var isUpdating = annotations['http://www.w3.org/2012/xquery#updating'] !== undefined; var typeDecl = get(node, ['ReturnType'])[0]; var name = get(node, ['EQName'])[0]; if(!typeDecl && !isUpdating){ addWarning('W05', 'Untyped return value', name.pos); } var isExternal = false; node.children.forEach(function(child){ if(child.name === 'TOKEN' && child.value === 'external') { isExternal = true; return false; } }); if(!isExternal) { pushSctx(node.pos); this.visitChildren(node); popSctx(); } return true; }; this.VarRef = function(node) { this.visitChildren(node, Handlers.VarRefHandler(translator, sctx, node)); return true; }; this.Param = function(node){ var typeDecl = get(node, ['TypeDeclaration'])[0]; if(!typeDecl){ addWarning('W05', 'Untyped function parameter', node.pos); } this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.InlineFunctionExpr = function(node) { pushSctx(node.pos); this.visitChildren(node); popSctx(); return true; }; var statementCount = []; var handleStatements = function(node) { pushSctx(node.pos); statementCount.push(0); translator.visitChildren(node); for (var i = 1; i <= statementCount[statementCount.length - 1]; i++) { popSctx(node.pos); } statementCount.pop(); popSctx(); }; this.StatementsAndOptionalExpr = function (node) { handleStatements(node); return true; }; this.StatementsAndExpr = function (node) { handleStatements(node); return true; }; this.BlockStatement = function (node) { handleStatements(node); return true; }; this.VarDeclStatement = function(node){ pushSctx(node.pos); statementCount[statementCount.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); }; var clauses = []; this.FLWORExpr = this.FLWORStatement = function (node) { pushSctx(node.pos); clauses.push(0); this.visitChildren(node); for(var i=1; i <= clauses[clauses.length - 1]; i++) { popSctx(node.pos); } clauses.pop(); popSctx(); return true; }; this.ForBinding = function (node) { this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']); pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.LetBinding = function(node){ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']); pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.GroupingSpec = function(node){ var isVarDecl = false; node.children.forEach(function(child){ if(child.value === ':=') { isVarDecl = true; return false; } }); if(isVarDecl) { var groupingVariable = node.children[0]; this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']); pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(groupingVariable, Handlers.VarHandler(translator, sctx, groupingVariable)); return true; } else { } }; this.TumblingWindowClause = function (node) { this.visitOnly(node, ['ExprSingle']); pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); this.visitOnly(node, ['WindowStartCondition', 'WindowEndCondition']); return true; }; this.WindowVars = function (node) { pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.SlidingWindowClause = function (node) { this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']); pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); this.visitOnly(node, ['WindowStartCondition', 'WindowEndCondition']); return true; }; this.PositionalVar = function (node) { this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.PositionalVar = function (node) { this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.CurrentItem = function (node) { this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.PreviousItem = function (node) { this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.NextItem = function (node) { this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.CountClause = function (node) { pushSctx(node.pos); clauses[clauses.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.CaseClause = function(node) { pushSctx(node.pos); this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); this.visitOnly(node, ['ExprSingle']); popSctx(); return true; }; this.TransformExpr = function (node) { pushSctx(node.pos); this.visitChildren(node); popSctx(); return true; }; this.TransformSpec = function(node) { this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']); this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; var quantifiedDecls = []; this.QuantifiedExpr = function (node) { pushSctx(node.pos); quantifiedDecls.push(0); this.visitChildren(node); for(var i=1; i <= quantifiedDecls[quantifiedDecls.length - 1]; i++) { popSctx(node.pos); } quantifiedDecls.pop(); popSctx(); return true; }; this.QuantifiedVarDecl = function(node) { this.visitOnly(node, ['ExprSingle']); pushSctx(node.pos); quantifiedDecls[quantifiedDecls.length - 1]++; this.visitChildren(node, Handlers.VarHandler(translator, sctx, node)); return true; }; this.FunctionCall = function(node){ this.visitOnly(node, ['ArgumentList']); var name = translator.getFirstChild(node, 'EQName'); var eqname = TreeOps.flatten(name); var arity = get(node, ['ArgumentList', 'Argument']).length; translator.apply(function(){ var qname = sctx.resolveQName(eqname, node.pos); try { if(qname.uri !== '') { sctx.root.namespaces[qname.uri].used = true; } } catch(e){ } sctx.addFunctionCall(qname, arity, name.pos); }); return true; }; this.TryClause = function(node){ pushSctx(node.pos); this.visitChildren(node); popSctx(); return true; }; this.CatchClause = function(node){ pushSctx(node.pos); var prefix = 'err'; var uri = 'http://www.w3.org/2005/xqt-errors'; var emptyPos = { sl: 0, sc: 0, el: 0, ec: 0 }; sctx.addVariable({ prefix: prefix, uri: uri, name: 'code' }, 'CatchVar', emptyPos); sctx.addVariable({ prefix: prefix, uri: uri, name: 'description' }, 'CatchVar', emptyPos); sctx.addVariable({ prefix: prefix, uri: uri, name: 'value' }, 'CatchVar', emptyPos); sctx.addVariable({ prefix: prefix, uri: uri, name: 'module' }, 'CatchVar', emptyPos); sctx.addVariable({ prefix: prefix, uri: uri, name: 'line-number' }, 'CatchVar', emptyPos); sctx.addVariable({ prefix: prefix, uri: uri, name: 'column-number' }, 'CatchVar', emptyPos); sctx.addVariable({ prefix: prefix, uri: uri, name: 'additional' }, 'CatchVar', emptyPos); this.visitChildren(node); popSctx(); return true; }; this.Pragma = function(node){ var qname = TreeOps.flatten(get(node, ['EQName'])[0]); qname = rootStcx.resolveQName(qname, node); var value = TreeOps.flatten(get(node, ['PragmaContents'])[0]); if (qname.name === 'xqlint' && qname.uri === 'http://xqlint.io') { pushSctx(node.pos); var commands = value.match(/[a-zA-Z]+\(([^)]+)\)/g); commands.forEach(function (command) { var name = command.substring(0, command.indexOf('(')); var args = command.substring(0, command.length - 1).substring(command.indexOf('(') + 1).split(',').map(function (val) { return val.trim(); }); if (name === 'varrefs') { args.forEach(function (arg) { var qname = sctx.resolveQName(arg.substring(1), node.pos); if (qname.uri !== '') { sctx.root.namespaces[qname.uri].used = true; } sctx.addVarRef(qname, node.pos); }); } }); this.visitChildren(node); popSctx(); return true; } }; this.visit = function (node) { var name = node.name; var skip = false; if (typeof this[name] === 'function') { skip = this[name](node) === true; } if (!skip) { this.visitChildren(node); } }; this.visitChildren = function (node, handler) { for (var i = 0; i < node.children.length; i++) { var child = node.children[i]; if (handler !== undefined && typeof handler[child.name] === 'function') { handler[child.name](child); } else { this.visit(child); } } }; this.visit(ast); Object.keys(rootStcx.variables).forEach(function(key){ if(!rootStcx.varRefs[key] && (rootStcx.variables[key].annotations['http://www.w3.org/2005/xpath-functions#private'] || rootStcx.moduleNamespace === '') && rootStcx.variables[key].pos) { addWarning('W03', 'Unused variable "' + rootStcx.variables[key].qname.name + '"', rootStcx.variables[key].pos); } }); Object.keys(rootStcx.namespaces).forEach(function(uri){ var namespace = rootStcx.namespaces[uri]; if(namespace.used === undefined && !namespace.override && namespace.type === 'module') { addWarning('W04', 'Unused module "' + uri + '"', namespace.pos); } }); }; }, {"../tree_ops":11,"./errors":1,"./handlers":2,"./static_context":4}], 6:[function(require,module,exports){ 'use strict'; var TreeOps = require('../tree_ops').TreeOps; var ID_REGEX = /[a-zA-Z_0-9\$]/; function retrievePrecedingIdentifier(text, pos, regex) { regex = regex || ID_REGEX; var buf = []; for (var i = pos-1; i >= 0; i--) { if (regex.test(text[i])) { buf.push(text[i]); } else { break; } } return buf.reverse().join(''); } function prefixBinarySearch(items, prefix) { var startIndex = 0; var stopIndex = items.length - 1; var middle = Math.floor((stopIndex + startIndex) / 2); while (stopIndex > startIndex && middle >= 0 && items[middle].indexOf(prefix) !== 0) { if (prefix < items[middle]) { stopIndex = middle - 1; } else if (prefix > items[middle]) { startIndex = middle + 1; } middle = Math.floor((stopIndex + startIndex) / 2); } while (middle > 0 && items[middle-1].indexOf(prefix) === 0) { middle--; } return middle >= 0 ? middle : 0; // ensure we're not returning a negative index } var uriRegex = /[a-zA-Z_0-9\/\.:\-#]/; var char = '-._A-Za-z0-9:\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02ff\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203f\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD'; var nameChar = '[' + char + ']'; var varChar = '[' + char + '\\$]'; var nameCharRegExp = new RegExp(nameChar); var varCharRegExp = new RegExp(varChar); var varDeclLabels = { 'LetBinding': 'Let binding', 'Param': 'Function parameter', 'QuantifiedExpr': 'Quantified expression binding', 'VarDeclStatement': 'Local variable', 'ForBinding': 'For binding', 'TumblingWindowClause': 'Tumbling window binding', 'WindowVars': 'Window variable', 'SlidingWindowClause': 'Sliding window binding', 'PositionalVar': 'Positional variable', 'CurrentItem': 'Current item', 'PreviousItem': 'Previous item', 'NextItem': 'Next item', 'CountClause': 'Count binding', 'GroupingVariable': 'Grouping variable', 'VarDecl': 'Module variable' }; var findCompletions = function(prefix, allIdentifiers) { allIdentifiers.sort(); var startIdx = prefixBinarySearch(allIdentifiers, prefix); var matches = []; for (var i = startIdx; i < allIdentifiers.length && allIdentifiers[i].indexOf(prefix) === 0; i++) { matches.push(allIdentifiers[i]); } return matches; }; var completePrefix = function(identifier, pos, sctx){ var idx = identifier.indexOf(':'); if(idx === -1) { var prefixes = []; var namespaces = sctx.getNamespaces(); Object.keys(namespaces).forEach(function(key){ if(namespaces[key].type === 'module' || key === 'http://www.w3.org/2005/xquery-local-functions') { prefixes.push(namespaces[key].prefix); } }); var matches = findCompletions(identifier, prefixes); var match = function(name) { return { name: name + ':', value: name + ':', meta: 'prefix' }; }; return matches.map(match); } else { return []; } }; var completeFunction = function(identifier, pos, sctx){ var names = []; var snippets = {}; var functions = sctx.getFunctions(); var uri = ''; var prefix = ''; var name = identifier; var idx = identifier.indexOf(':'); var defaultNamespace = false; if(idx !== -1){ prefix = identifier.substring(0, idx); name = identifier.substring(idx + 1); var ns = sctx.getNamespaceByPrefix(prefix); if(ns){ uri = sctx.getNamespaceByPrefix(prefix).uri; } } else { defaultNamespace = true; uri = sctx.root.defaultFunctionNamespace; } Object.keys(functions).forEach(function(key){ var fn = functions[key]; var ns = key.substring(0, key.indexOf('#')); var name = key.substring(key.indexOf('#') + 1); name = name.substring(0, name.indexOf('#')); if(ns !== uri) { return; } if(!defaultNamespace){ name = sctx.getNamespaces()[ns].prefix + ':' + name; } name += '('; var snippet = name; snippet += fn.params.map(function(param, index){ return '${' + (index + 1) + ':\\' + param.split(' ')[0] + '}'; }).join(', '); name += fn.params.join(', '); name += ')'; snippet += ')'; names.push(name); snippets[name] = snippet; }); var matches = findCompletions(identifier, names); var match = function(name) { return { name: name, value: name, meta: 'function', priority: 4, identifierRegex: nameCharRegExp, snippet: snippets[name] }; }; return matches.map(match); }; var completeVariable = function(identifier, pos, sctx){ var uri = ''; var prefix = ''; var idx = identifier.indexOf(':'); if(idx !== -1){ prefix = identifier.substring(0, idx); uri = sctx.getNamespaceByPrefix(prefix).uri; } var decls = sctx.getVariables(); var names = []; var types = {}; Object.keys(decls).forEach(function(key){ var i = key.indexOf('#'); var ns = key.substring(0, i); var name = key.substring(i+1); if(ns !== ''){ names.push(sctx.getPrefixByNamespace(ns) + ':' + name); types[sctx.getPrefixByNamespace(ns) + ':' + name] = decls[key].type; } else { names.push(name); types[name] = decls[key].type; } }); var matches = findCompletions(identifier, names); var match = function(name) { return { name: '$' + name, value: '$' + name, meta: varDeclLabels[types[name]], priority: 4, identifierRegex: varCharRegExp }; }; return matches.map(match); }; var completeExpr = function(line, pos, sctx){ var identifier = retrievePrecedingIdentifier(line, pos.col, nameCharRegExp); var before = line.substring(0, pos.col - (identifier.length === 0 ? 0 : identifier.length)); var isVar = before[before.length - 1] === '$'; if(isVar) { return completeVariable(identifier, pos, sctx); } else if(identifier !== '') { return completeFunction(identifier, pos, sctx).concat(completePrefix(identifier, pos, sctx)); } else { return completeVariable(identifier, pos, sctx).concat(completeFunction(identifier, pos, sctx)).concat(completePrefix(identifier, pos, sctx)); } }; var completeModuleUri = function(line, pos, sctx){ var identifier = retrievePrecedingIdentifier(line, pos.col, uriRegex); var matches = findCompletions(identifier, sctx.getAvailableModuleNamespaces()); var match = function(uri) { return { name: uri, value: uri, meta: 'module', priority: 4, identifierRegex: uriRegex }; }; return matches.map(match); }; exports.complete = function(source, ast, rootSctx, pos){ var line = source.split('\n')[pos.line]; var node = TreeOps.findNode(ast, pos); var sctx = TreeOps.findNode(rootSctx, pos); sctx = sctx ? sctx : rootSctx; if(node && node.name === 'URILiteral' && node.getParent && node.getParent.name === 'ModuleImport'){ return completeModuleUri(line, pos, sctx); } else { return completeExpr(line, pos, sctx); } }; }, {"../tree_ops":11}], 7:[function(require,module,exports){ exports.StyleChecker = function (ast, source) { 'use strict'; var tab = ' '; var markers = []; this.getMarkers = function(){ return markers; }; this.WS = function(node) { var lines = node.value.split('\n'); lines.forEach(function(line, index){ var isFirst = index === 0; var isLast = index === (lines.length - 1); if(/\r$/.test(line)) { markers.push({ pos: { sl: node.pos.sl + index, el: node.pos.sl + index, sc: line.length - 1, ec: line.length }, type: 'warning', level: 'warning', message: '[SW01] Detected CRLF' }); } var match = line.match(/\t+/); if(match !== null){ markers.push({ pos: { sl: node.pos.sl + index, el: node.pos.sl + index, sc: match.index, ec: match.index + match[0].length }, type: 'warning', level: 'warning', message: '[SW02] Tabs detected' }); } if((!isFirst) && isLast){ match = line.match(/^\ +/); if(match !== null) { var mod = match[0].length % tab.length; if(mod !== 0) { markers.push({ pos: { sl: node.pos.sl + index, el: node.pos.sl + index, sc: match.index, ec: match.index + match[0].length }, type: 'warning', level: 'warning', message: '[SW03] Unexcepted indentation of ' + match[0].length }); } } } }); return true; }; this.visit = function (node, index) { var name = node.name; var skip = false; if (typeof this[name] === 'function') { skip = this[name](node, index) === true; } if (!skip) { this.visitChildren(node); } }; this.visitChildren = function (node, handler) { for (var i = 0; i < node.children.length; i++) { var child = node.children[i]; if (handler !== undefined && typeof handler[child.name] === 'function') { handler[child.name](child); } else { this.visit(child); } } }; source.split('\n').forEach(function(line, index){ var match = line.match(/\ +$/); if(match){ markers.push({ pos: { sl: index, el: index, sc: match.index, ec: match.index + match[0].length }, type: 'warning', level: 'warning', message: '[SW04] Trailing whitespace' }); } }); this.visit(ast); }; }, {}], 8:[function(require,module,exports){ exports.JSONParseTreeHandler = function (code) { 'use strict'; var toBeIndex = ['VarDecl', 'FunctionDecl']; var list = [ 'OrExpr', 'AndExpr', 'ComparisonExpr', 'StringConcatExpr', 'RangeExpr', 'UnionExpr', 'IntersectExceptExpr', 'InstanceofExpr', 'TreatExpr', 'CastableExpr', 'CastExpr', 'UnaryExpr', 'ValueExpr', 'FTContainsExpr', 'SimpleMapExpr', 'PathExpr', 'RelativePathExpr', 'PostfixExpr', 'StepExpr' ]; var ast = null; var ptr = null; var remains = code; var cursor = 0; var lineCursor = 0; var line = 0; function createNode(name) { return { name: name, children: [], getParent: null, pos: { sl: 0, sc: 0, el: 0, ec: 0 } }; } function pushNode(name) { //begin var node = createNode(name); if (ast === null) { ast = node; ast.index = []; ptr = node; } else { node.getParent = ptr; ptr.children.push(node); ptr = ptr.children[ptr.children.length - 1]; } } function popNode() { if (ptr.children.length > 0) { var s = ptr.children[0]; var e = null; for (var i = ptr.children.length - 1; i >= 0; i--) { e = ptr.children[i]; if (e.pos.el !== 0 || e.pos.ec !== 0) { break; } } ptr.pos.sl = s.pos.sl; ptr.pos.sc = s.pos.sc; ptr.pos.el = e.pos.el; ptr.pos.ec = e.pos.ec; } if (ptr.name === 'FunctionName') { ptr.name = 'EQName'; } if (ptr.name === 'EQName' && ptr.value === undefined) { ptr.value = ptr.children[0].value; ptr.children.pop(); } if(toBeIndex.indexOf(ptr.name) !== -1) { ast.index.push(ptr); } if (ptr.getParent !== null) { ptr = ptr.getParent; } else { } if (ptr.children.length > 0) { var lastChild = ptr.children[ptr.children.length - 1]; if (lastChild.children.length === 1 && list.indexOf(lastChild.name) !== -1) { ptr.children[ptr.children.length - 1] = lastChild.children[0]; } } } this.closeParseTree = function () { while (ptr.getParent !== null) { popNode(); } popNode(); }; this.peek = function () { return ptr; }; this.getParseTree = function () { return ast; }; this.reset = function () {}; //input this.startNonterminal = function (name, begin) { pushNode(name, begin); }; this.endNonterminal = function () {//name, end popNode(); }; this.terminal = function (name, begin, end) { name = (name.substring(0, 1) === '\'' && name.substring(name.length - 1) === '\'') ? 'TOKEN' : name; pushNode(name, begin); setValue(ptr, begin, end); popNode(); }; this.whitespace = function (begin, end) { var name = 'WS'; pushNode(name, begin); setValue(ptr, begin, end); popNode(); }; function setValue(node, begin, end) { var e = end - cursor; ptr.value = remains.substring(0, e); remains = remains.substring(e); cursor = end; var sl = line; var sc = lineCursor; var el = sl + ptr.value.split('\n').length - 1; var lastIdx = ptr.value.lastIndexOf('\n'); var ec = lastIdx === -1 ? sc + ptr.value.length : ptr.value.substring(lastIdx + 1).length; line = el; lineCursor = ec; ptr.pos.sl = sl; ptr.pos.sc = sc; ptr.pos.el = el; ptr.pos.ec = ec; } }; }, {}], 9:[function(require,module,exports){ var JSONiqParser = exports.JSONiqParser = function JSONiqParser(string, parsingEventHandler) { init(string, parsingEventHandler); var self = this; this.ParseException = function(b, e, s, o, x) { var begin = b, end = e, state = s, offending = o, expected = x; this.getBegin = function() {return begin;}; this.getEnd = function() {return end;}; this.getState = function() {return state;}; this.getExpected = function() {return expected;}; this.getOffending = function() {return offending;}; this.getMessage = function() { return offending < 0 ? "lexical analysis failed" : "syntax error"; }; }; function init(string, parsingEventHandler) { eventHandler = parsingEventHandler; input = string; size = string.length; reset(0, 0, 0); } this.getInput = function() { return input; }; function reset(l, b, e) { b0 = b; e0 = b; l1 = l; b1 = b; e1 = e; l2 = 0; end = e; ex = -1; memo = {}; eventHandler.reset(input); } this.getOffendingToken = function(e) { var o = e.getOffending(); return o >= 0 ? JSONiqParser.TOKEN[o] : null; }; this.getExpectedTokenSet = function(e) { var expected; if (e.getExpected() < 0) { expected = JSONiqParser.getTokenSet(- e.getState()); } else { expected = [JSONiqParser.TOKEN[e.getExpected()]]; } return expected; }; this.getErrorMessage = function(e) { var tokenSet = this.getExpectedTokenSet(e); var found = this.getOffendingToken(e); var prefix = input.substring(0, e.getBegin()); var lines = prefix.split("\n"); var line = lines.length; var column = lines[line - 1].length + 1; var size = e.getEnd() - e.getBegin(); return e.getMessage() + (found == null ? "" : ", found " + found) + "\nwhile expecting " + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + "\n" + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + "at line " + line + ", column " + column + ":\n..." + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + "..."; }; this.parse_XQuery = function() { eventHandler.startNonterminal("XQuery", e0); lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Module(); shift(25); // EOF eventHandler.endNonterminal("XQuery", e0); }; function parse_Module() { eventHandler.startNonterminal("Module", e0); switch (l1) { case 170: // 'jsoniq' lookahead2W(168); // S^WS | '#' | '(' | '(:' | 'encoding' | 'version' break; default: lk = l1; } if (lk == 64682 // 'jsoniq' 'encoding' || lk == 137898) // 'jsoniq' 'version' { parse_VersionDecl(); } lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | switch (l1) { case 185: // 'module' lookahead2W(146); // S^WS | '#' | '(' | '(:' | 'namespace' break; default: lk = l1; } switch (lk) { case 95929: // 'module' 'namespace' whitespace(); parse_LibraryModule(); break; default: whitespace(); parse_MainModule(); } eventHandler.endNonterminal("Module", e0); } function parse_VersionDecl() { eventHandler.startNonterminal("VersionDecl", e0); shift(170); // 'jsoniq' lookahead1W(120); // S^WS | '(:' | 'encoding' | 'version' switch (l1) { case 126: // 'encoding' shift(126); // 'encoding' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral break; default: shift(269); // 'version' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral lookahead1W(113); // S^WS | '(:' | ';' | 'encoding' if (l1 == 126) // 'encoding' { shift(126); // 'encoding' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral } } lookahead1W(29); // S^WS | '(:' | ';' whitespace(); parse_Separator(); eventHandler.endNonterminal("VersionDecl", e0); } function parse_LibraryModule() { eventHandler.startNonterminal("LibraryModule", e0); parse_ModuleDecl(); lookahead1W(142); // S^WS | EOF | '(:' | 'declare' | 'import' whitespace(); parse_Prolog(); eventHandler.endNonterminal("LibraryModule", e0); } function parse_ModuleDecl() { eventHandler.startNonterminal("ModuleDecl", e0); shift(185); // 'module' lookahead1W(64); // S^WS | '(:' | 'namespace' shift(187); // 'namespace' lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_NCName(); lookahead1W(30); // S^WS | '(:' | '=' shift(61); // '=' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral lookahead1W(29); // S^WS | '(:' | ';' whitespace(); parse_Separator(); eventHandler.endNonterminal("ModuleDecl", e0); } function parse_Prolog() { eventHandler.startNonterminal("Prolog", e0); for (;;) { lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | switch (l1) { case 109: // 'declare' lookahead2W(207); // S^WS | '#' | '%' | '(' | '(:' | 'base-uri' | 'boundary-space' | 'collection' | break; case 155: // 'import' lookahead2W(169); // S^WS | '#' | '(' | '(:' | 'module' | 'schema' break; default: lk = l1; } if (lk != 43117 // 'declare' 'base-uri' && lk != 44141 // 'declare' 'boundary-space' && lk != 50797 // 'declare' 'construction' && lk != 53869 // 'declare' 'copy-namespaces' && lk != 54893 // 'declare' 'decimal-format' && lk != 56429 // 'declare' 'default' && lk != 73325 // 'declare' 'ft-option' && lk != 94875 // 'import' 'module' && lk != 95853 // 'declare' 'namespace' && lk != 106093 // 'declare' 'ordering' && lk != 115821 // 'declare' 'revalidation' && lk != 117403) // 'import' 'schema' { break; } switch (l1) { case 109: // 'declare' lookahead2W(201); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' | break; default: lk = l1; } if (lk == 56429) // 'declare' 'default' { lk = memoized(0, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_DefaultNamespaceDecl(); lk = -1; } catch (p1A) { lk = -2; } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(0, e0, lk); } } switch (lk) { case -1: whitespace(); parse_DefaultNamespaceDecl(); break; case 95853: // 'declare' 'namespace' whitespace(); parse_NamespaceDecl(); break; case 155: // 'import' whitespace(); parse_Import(); break; case 73325: // 'declare' 'ft-option' whitespace(); parse_FTOptionDecl(); break; default: whitespace(); parse_Setter(); } lookahead1W(29); // S^WS | '(:' | ';' whitespace(); parse_Separator(); } for (;;) { lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | switch (l1) { case 109: // 'declare' lookahead2W(202); // S^WS | '#' | '%' | '(' | '(:' | 'collection' | 'context' | 'function' | 'index' | break; default: lk = l1; } if (lk != 17005 // 'declare' '%' && lk != 49261 // 'declare' 'collection' && lk != 52333 // 'declare' 'context' && lk != 75373 // 'declare' 'function' && lk != 80493 // 'declare' 'index' && lk != 83565 // 'declare' 'integrity' && lk != 104045 // 'declare' 'option' && lk != 134765 // 'declare' 'updating' && lk != 137325) // 'declare' 'variable' { break; } switch (l1) { case 109: // 'declare' lookahead2W(197); // S^WS | '%' | '(:' | 'collection' | 'context' | 'function' | 'index' | break; default: lk = l1; } switch (lk) { case 52333: // 'declare' 'context' whitespace(); parse_ContextItemDecl(); break; case 104045: // 'declare' 'option' whitespace(); parse_OptionDecl(); break; default: whitespace(); parse_AnnotatedDecl(); } lookahead1W(29); // S^WS | '(:' | ';' whitespace(); parse_Separator(); } eventHandler.endNonterminal("Prolog", e0); } function parse_Separator() { eventHandler.startNonterminal("Separator", e0); shift(54); // ';' eventHandler.endNonterminal("Separator", e0); } function parse_Setter() { eventHandler.startNonterminal("Setter", e0); switch (l1) { case 109: // 'declare' lookahead2W(194); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' | break; default: lk = l1; } if (lk == 56429) // 'declare' 'default' { lk = memoized(1, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_DefaultCollationDecl(); lk = -2; } catch (p2A) { try { b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} try_EmptyOrderDecl(); lk = -6; } catch (p6A) { lk = -9; } } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(1, e0, lk); } } switch (lk) { case 44141: // 'declare' 'boundary-space' parse_BoundarySpaceDecl(); break; case -2: parse_DefaultCollationDecl(); break; case 43117: // 'declare' 'base-uri' parse_BaseURIDecl(); break; case 50797: // 'declare' 'construction' parse_ConstructionDecl(); break; case 106093: // 'declare' 'ordering' parse_OrderingModeDecl(); break; case -6: parse_EmptyOrderDecl(); break; case 115821: // 'declare' 'revalidation' parse_RevalidationDecl(); break; case 53869: // 'declare' 'copy-namespaces' parse_CopyNamespacesDecl(); break; default: parse_DecimalFormatDecl(); } eventHandler.endNonterminal("Setter", e0); } function parse_BoundarySpaceDecl() { eventHandler.startNonterminal("BoundarySpaceDecl", e0); shift(109); // 'declare' lookahead1W(36); // S^WS | '(:' | 'boundary-space' shift(86); // 'boundary-space' lookahead1W(137); // S^WS | '(:' | 'preserve' | 'strip' switch (l1) { case 218: // 'preserve' shift(218); // 'preserve' break; default: shift(246); // 'strip' } eventHandler.endNonterminal("BoundarySpaceDecl", e0); } function parse_DefaultCollationDecl() { eventHandler.startNonterminal("DefaultCollationDecl", e0); shift(109); // 'declare' lookahead1W(49); // S^WS | '(:' | 'default' shift(110); // 'default' lookahead1W(41); // S^WS | '(:' | 'collation' shift(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral eventHandler.endNonterminal("DefaultCollationDecl", e0); } function try_DefaultCollationDecl() { shiftT(109); // 'declare' lookahead1W(49); // S^WS | '(:' | 'default' shiftT(110); // 'default' lookahead1W(41); // S^WS | '(:' | 'collation' shiftT(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral } function parse_BaseURIDecl() { eventHandler.startNonterminal("BaseURIDecl", e0); shift(109); // 'declare' lookahead1W(35); // S^WS | '(:' | 'base-uri' shift(84); // 'base-uri' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral eventHandler.endNonterminal("BaseURIDecl", e0); } function parse_ConstructionDecl() { eventHandler.startNonterminal("ConstructionDecl", e0); shift(109); // 'declare' lookahead1W(44); // S^WS | '(:' | 'construction' shift(99); // 'construction' lookahead1W(137); // S^WS | '(:' | 'preserve' | 'strip' switch (l1) { case 246: // 'strip' shift(246); // 'strip' break; default: shift(218); // 'preserve' } eventHandler.endNonterminal("ConstructionDecl", e0); } function parse_OrderingModeDecl() { eventHandler.startNonterminal("OrderingModeDecl", e0); shift(109); // 'declare' lookahead1W(71); // S^WS | '(:' | 'ordering' shift(207); // 'ordering' lookahead1W(135); // S^WS | '(:' | 'ordered' | 'unordered' switch (l1) { case 206: // 'ordered' shift(206); // 'ordered' break; default: shift(262); // 'unordered' } eventHandler.endNonterminal("OrderingModeDecl", e0); } function parse_EmptyOrderDecl() { eventHandler.startNonterminal("EmptyOrderDecl", e0); shift(109); // 'declare' lookahead1W(49); // S^WS | '(:' | 'default' shift(110); // 'default' lookahead1W(70); // S^WS | '(:' | 'order' shift(205); // 'order' lookahead1W(52); // S^WS | '(:' | 'empty' shift(124); // 'empty' lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least' switch (l1) { case 149: // 'greatest' shift(149); // 'greatest' break; default: shift(176); // 'least' } eventHandler.endNonterminal("EmptyOrderDecl", e0); } function try_EmptyOrderDecl() { shiftT(109); // 'declare' lookahead1W(49); // S^WS | '(:' | 'default' shiftT(110); // 'default' lookahead1W(70); // S^WS | '(:' | 'order' shiftT(205); // 'order' lookahead1W(52); // S^WS | '(:' | 'empty' shiftT(124); // 'empty' lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least' switch (l1) { case 149: // 'greatest' shiftT(149); // 'greatest' break; default: shiftT(176); // 'least' } } function parse_CopyNamespacesDecl() { eventHandler.startNonterminal("CopyNamespacesDecl", e0); shift(109); // 'declare' lookahead1W(47); // S^WS | '(:' | 'copy-namespaces' shift(105); // 'copy-namespaces' lookahead1W(132); // S^WS | '(:' | 'no-preserve' | 'preserve' whitespace(); parse_PreserveMode(); lookahead1W(25); // S^WS | '(:' | ',' shift(42); // ',' lookahead1W(127); // S^WS | '(:' | 'inherit' | 'no-inherit' whitespace(); parse_InheritMode(); eventHandler.endNonterminal("CopyNamespacesDecl", e0); } function parse_PreserveMode() { eventHandler.startNonterminal("PreserveMode", e0); switch (l1) { case 218: // 'preserve' shift(218); // 'preserve' break; default: shift(193); // 'no-preserve' } eventHandler.endNonterminal("PreserveMode", e0); } function parse_InheritMode() { eventHandler.startNonterminal("InheritMode", e0); switch (l1) { case 159: // 'inherit' shift(159); // 'inherit' break; default: shift(192); // 'no-inherit' } eventHandler.endNonterminal("InheritMode", e0); } function parse_DecimalFormatDecl() { eventHandler.startNonterminal("DecimalFormatDecl", e0); shift(109); // 'declare' lookahead1W(118); // S^WS | '(:' | 'decimal-format' | 'default' switch (l1) { case 107: // 'decimal-format' shift(107); // 'decimal-format' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); break; default: shift(110); // 'default' lookahead1W(48); // S^WS | '(:' | 'decimal-format' shift(107); // 'decimal-format' } for (;;) { lookahead1W(204); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' | if (l1 == 54) // ';' { break; } whitespace(); parse_DFPropertyName(); lookahead1W(30); // S^WS | '(:' | '=' shift(61); // '=' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral } eventHandler.endNonterminal("DecimalFormatDecl", e0); } function parse_DFPropertyName() { eventHandler.startNonterminal("DFPropertyName", e0); switch (l1) { case 108: // 'decimal-separator' shift(108); // 'decimal-separator' break; case 151: // 'grouping-separator' shift(151); // 'grouping-separator' break; case 158: // 'infinity' shift(158); // 'infinity' break; case 182: // 'minus-sign' shift(182); // 'minus-sign' break; case 68: // 'NaN' shift(68); // 'NaN' break; case 213: // 'percent' shift(213); // 'percent' break; case 212: // 'per-mille' shift(212); // 'per-mille' break; case 280: // 'zero-digit' shift(280); // 'zero-digit' break; case 117: // 'digit' shift(117); // 'digit' break; default: shift(211); // 'pattern-separator' } eventHandler.endNonterminal("DFPropertyName", e0); } function parse_Import() { eventHandler.startNonterminal("Import", e0); switch (l1) { case 155: // 'import' lookahead2W(130); // S^WS | '(:' | 'module' | 'schema' break; default: lk = l1; } switch (lk) { case 117403: // 'import' 'schema' parse_SchemaImport(); break; default: parse_ModuleImport(); } eventHandler.endNonterminal("Import", e0); } function parse_SchemaImport() { eventHandler.startNonterminal("SchemaImport", e0); shift(155); // 'import' lookahead1W(76); // S^WS | '(:' | 'schema' shift(229); // 'schema' lookahead1W(141); // URILiteral | S^WS | '(:' | 'default' | 'namespace' if (l1 != 7) // URILiteral { whitespace(); parse_SchemaPrefix(); } lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral lookahead1W(112); // S^WS | '(:' | ';' | 'at' if (l1 == 82) // 'at' { shift(82); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral for (;;) { lookahead1W(107); // S^WS | '(:' | ',' | ';' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral } } eventHandler.endNonterminal("SchemaImport", e0); } function parse_SchemaPrefix() { eventHandler.startNonterminal("SchemaPrefix", e0); switch (l1) { case 187: // 'namespace' shift(187); // 'namespace' lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_NCName(); lookahead1W(30); // S^WS | '(:' | '=' shift(61); // '=' break; default: shift(110); // 'default' lookahead1W(50); // S^WS | '(:' | 'element' shift(122); // 'element' lookahead1W(64); // S^WS | '(:' | 'namespace' shift(187); // 'namespace' } eventHandler.endNonterminal("SchemaPrefix", e0); } function parse_ModuleImport() { eventHandler.startNonterminal("ModuleImport", e0); shift(155); // 'import' lookahead1W(63); // S^WS | '(:' | 'module' shift(185); // 'module' lookahead1W(93); // URILiteral | S^WS | '(:' | 'namespace' if (l1 == 187) // 'namespace' { shift(187); // 'namespace' lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_NCName(); lookahead1W(30); // S^WS | '(:' | '=' shift(61); // '=' } lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral lookahead1W(112); // S^WS | '(:' | ';' | 'at' if (l1 == 82) // 'at' { shift(82); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral for (;;) { lookahead1W(107); // S^WS | '(:' | ',' | ';' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral } } eventHandler.endNonterminal("ModuleImport", e0); } function parse_NamespaceDecl() { eventHandler.startNonterminal("NamespaceDecl", e0); shift(109); // 'declare' lookahead1W(64); // S^WS | '(:' | 'namespace' shift(187); // 'namespace' lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_NCName(); lookahead1W(30); // S^WS | '(:' | '=' shift(61); // '=' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral eventHandler.endNonterminal("NamespaceDecl", e0); } function parse_DefaultNamespaceDecl() { eventHandler.startNonterminal("DefaultNamespaceDecl", e0); shift(109); // 'declare' lookahead1W(49); // S^WS | '(:' | 'default' shift(110); // 'default' lookahead1W(119); // S^WS | '(:' | 'element' | 'function' switch (l1) { case 122: // 'element' shift(122); // 'element' break; default: shift(147); // 'function' } lookahead1W(64); // S^WS | '(:' | 'namespace' shift(187); // 'namespace' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral eventHandler.endNonterminal("DefaultNamespaceDecl", e0); } function try_DefaultNamespaceDecl() { shiftT(109); // 'declare' lookahead1W(49); // S^WS | '(:' | 'default' shiftT(110); // 'default' lookahead1W(119); // S^WS | '(:' | 'element' | 'function' switch (l1) { case 122: // 'element' shiftT(122); // 'element' break; default: shiftT(147); // 'function' } lookahead1W(64); // S^WS | '(:' | 'namespace' shiftT(187); // 'namespace' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral } function parse_FTOptionDecl() { eventHandler.startNonterminal("FTOptionDecl", e0); shift(109); // 'declare' lookahead1W(55); // S^WS | '(:' | 'ft-option' shift(143); // 'ft-option' lookahead1W(84); // S^WS | '(:' | 'using' whitespace(); parse_FTMatchOptions(); eventHandler.endNonterminal("FTOptionDecl", e0); } function parse_AnnotatedDecl() { eventHandler.startNonterminal("AnnotatedDecl", e0); shift(109); // 'declare' for (;;) { lookahead1W(192); // S^WS | '%' | '(:' | 'collection' | 'function' | 'index' | 'integrity' | if (l1 != 33 // '%' && l1 != 263) // 'updating' { break; } switch (l1) { case 263: // 'updating' whitespace(); parse_CompatibilityAnnotation(); break; default: whitespace(); parse_Annotation(); } } switch (l1) { case 268: // 'variable' whitespace(); parse_VarDecl(); break; case 147: // 'function' whitespace(); parse_FunctionDecl(); break; case 96: // 'collection' whitespace(); parse_CollectionDecl(); break; case 157: // 'index' whitespace(); parse_IndexDecl(); break; default: whitespace(); parse_ICDecl(); } eventHandler.endNonterminal("AnnotatedDecl", e0); } function parse_CompatibilityAnnotation() { eventHandler.startNonterminal("CompatibilityAnnotation", e0); shift(263); // 'updating' eventHandler.endNonterminal("CompatibilityAnnotation", e0); } function parse_Annotation() { eventHandler.startNonterminal("Annotation", e0); shift(33); // '%' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(193); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' | if (l1 == 35) // '(' { shift(35); // '(' lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' | whitespace(); parse_Literal(); for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' | whitespace(); parse_Literal(); } shift(38); // ')' } eventHandler.endNonterminal("Annotation", e0); } function try_Annotation() { shiftT(33); // '%' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_EQName(); lookahead1W(193); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' | if (l1 == 35) // '(' { shiftT(35); // '(' lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' | try_Literal(); for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' | try_Literal(); } shiftT(38); // ')' } } function parse_VarDecl() { eventHandler.startNonterminal("VarDecl", e0); shift(268); // 'variable' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(157); // S^WS | '(:' | ':=' | 'as' | 'external' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } lookahead1W(110); // S^WS | '(:' | ':=' | 'external' switch (l1) { case 53: // ':=' shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_VarValue(); break; default: shift(134); // 'external' lookahead1W(108); // S^WS | '(:' | ':=' | ';' if (l1 == 53) // ':=' { shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_VarDefaultValue(); } } eventHandler.endNonterminal("VarDecl", e0); } function parse_VarValue() { eventHandler.startNonterminal("VarValue", e0); parse_ExprSingle(); eventHandler.endNonterminal("VarValue", e0); } function parse_VarDefaultValue() { eventHandler.startNonterminal("VarDefaultValue", e0); parse_ExprSingle(); eventHandler.endNonterminal("VarDefaultValue", e0); } function parse_ContextItemDecl() { eventHandler.startNonterminal("ContextItemDecl", e0); shift(109); // 'declare' lookahead1W(46); // S^WS | '(:' | 'context' shift(102); // 'context' lookahead1W(58); // S^WS | '(:' | 'item' shift(167); // 'item' lookahead1W(157); // S^WS | '(:' | ':=' | 'as' | 'external' if (l1 == 80) // 'as' { shift(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_ItemType(); } lookahead1W(110); // S^WS | '(:' | ':=' | 'external' switch (l1) { case 53: // ':=' shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_VarValue(); break; default: shift(134); // 'external' lookahead1W(108); // S^WS | '(:' | ':=' | ';' if (l1 == 53) // ':=' { shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_VarDefaultValue(); } } eventHandler.endNonterminal("ContextItemDecl", e0); } function parse_ParamList() { eventHandler.startNonterminal("ParamList", e0); parse_Param(); for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_Param(); } eventHandler.endNonterminal("ParamList", e0); } function try_ParamList() { try_Param(); for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' try_Param(); } } function parse_Param() { eventHandler.startNonterminal("Param", e0); shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(153); // S^WS | '(:' | ')' | ',' | 'as' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } eventHandler.endNonterminal("Param", e0); } function try_Param() { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_EQName(); lookahead1W(153); // S^WS | '(:' | ')' | ',' | 'as' if (l1 == 80) // 'as' { try_TypeDeclaration(); } } function parse_FunctionBody() { eventHandler.startNonterminal("FunctionBody", e0); parse_EnclosedExpr(); eventHandler.endNonterminal("FunctionBody", e0); } function try_FunctionBody() { try_EnclosedExpr(); } function parse_EnclosedExpr() { eventHandler.startNonterminal("EnclosedExpr", e0); shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(287); // '}' eventHandler.endNonterminal("EnclosedExpr", e0); } function try_EnclosedExpr() { shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(287); // '}' } function parse_OptionDecl() { eventHandler.startNonterminal("OptionDecl", e0); shift(109); // 'declare' lookahead1W(69); // S^WS | '(:' | 'option' shift(203); // 'option' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral eventHandler.endNonterminal("OptionDecl", e0); } function parse_Expr() { eventHandler.startNonterminal("Expr", e0); parse_ExprSingle(); for (;;) { if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); } eventHandler.endNonterminal("Expr", e0); } function try_Expr() { try_ExprSingle(); for (;;) { if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } } function parse_FLWORExpr() { eventHandler.startNonterminal("FLWORExpr", e0); parse_InitialClause(); for (;;) { lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' | if (l1 == 224) // 'return' { break; } whitespace(); parse_IntermediateClause(); } whitespace(); parse_ReturnClause(); eventHandler.endNonterminal("FLWORExpr", e0); } function try_FLWORExpr() { try_InitialClause(); for (;;) { lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' | if (l1 == 224) // 'return' { break; } try_IntermediateClause(); } try_ReturnClause(); } function parse_InitialClause() { eventHandler.startNonterminal("InitialClause", e0); switch (l1) { case 139: // 'for' lookahead2W(151); // S^WS | '$' | '(:' | 'sliding' | 'tumbling' break; default: lk = l1; } switch (lk) { case 16011: // 'for' '$' parse_ForClause(); break; case 177: // 'let' parse_LetClause(); break; default: parse_WindowClause(); } eventHandler.endNonterminal("InitialClause", e0); } function try_InitialClause() { switch (l1) { case 139: // 'for' lookahead2W(151); // S^WS | '$' | '(:' | 'sliding' | 'tumbling' break; default: lk = l1; } switch (lk) { case 16011: // 'for' '$' try_ForClause(); break; case 177: // 'let' try_LetClause(); break; default: try_WindowClause(); } } function parse_IntermediateClause() { eventHandler.startNonterminal("IntermediateClause", e0); switch (l1) { case 139: // 'for' case 177: // 'let' parse_InitialClause(); break; case 272: // 'where' parse_WhereClause(); break; case 150: // 'group' parse_GroupByClause(); break; case 106: // 'count' parse_CountClause(); break; default: parse_OrderByClause(); } eventHandler.endNonterminal("IntermediateClause", e0); } function try_IntermediateClause() { switch (l1) { case 139: // 'for' case 177: // 'let' try_InitialClause(); break; case 272: // 'where' try_WhereClause(); break; case 150: // 'group' try_GroupByClause(); break; case 106: // 'count' try_CountClause(); break; default: try_OrderByClause(); } } function parse_ForClause() { eventHandler.startNonterminal("ForClause", e0); shift(139); // 'for' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_ForBinding(); for (;;) { if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_ForBinding(); } eventHandler.endNonterminal("ForClause", e0); } function try_ForClause() { shiftT(139); // 'for' lookahead1W(21); // S^WS | '$' | '(:' try_ForBinding(); for (;;) { if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' try_ForBinding(); } } function parse_ForBinding() { eventHandler.startNonterminal("ForBinding", e0); shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(182); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } lookahead1W(173); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score' if (l1 == 73) // 'allowing' { whitespace(); parse_AllowingEmpty(); } lookahead1W(160); // S^WS | '(:' | 'at' | 'in' | 'score' if (l1 == 82) // 'at' { whitespace(); parse_PositionalVar(); } lookahead1W(126); // S^WS | '(:' | 'in' | 'score' if (l1 == 232) // 'score' { whitespace(); parse_FTScoreVar(); } lookahead1W(56); // S^WS | '(:' | 'in' shift(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ForBinding", e0); } function try_ForBinding() { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(182); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score' if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(173); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score' if (l1 == 73) // 'allowing' { try_AllowingEmpty(); } lookahead1W(160); // S^WS | '(:' | 'at' | 'in' | 'score' if (l1 == 82) // 'at' { try_PositionalVar(); } lookahead1W(126); // S^WS | '(:' | 'in' | 'score' if (l1 == 232) // 'score' { try_FTScoreVar(); } lookahead1W(56); // S^WS | '(:' | 'in' shiftT(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_AllowingEmpty() { eventHandler.startNonterminal("AllowingEmpty", e0); shift(73); // 'allowing' lookahead1W(52); // S^WS | '(:' | 'empty' shift(124); // 'empty' eventHandler.endNonterminal("AllowingEmpty", e0); } function try_AllowingEmpty() { shiftT(73); // 'allowing' lookahead1W(52); // S^WS | '(:' | 'empty' shiftT(124); // 'empty' } function parse_PositionalVar() { eventHandler.startNonterminal("PositionalVar", e0); shift(82); // 'at' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); eventHandler.endNonterminal("PositionalVar", e0); } function try_PositionalVar() { shiftT(82); // 'at' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); } function parse_FTScoreVar() { eventHandler.startNonterminal("FTScoreVar", e0); shift(232); // 'score' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); eventHandler.endNonterminal("FTScoreVar", e0); } function try_FTScoreVar() { shiftT(232); // 'score' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); } function parse_LetClause() { eventHandler.startNonterminal("LetClause", e0); shift(177); // 'let' lookahead1W(100); // S^WS | '$' | '(:' | 'score' whitespace(); parse_LetBinding(); for (;;) { if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(100); // S^WS | '$' | '(:' | 'score' whitespace(); parse_LetBinding(); } eventHandler.endNonterminal("LetClause", e0); } function try_LetClause() { shiftT(177); // 'let' lookahead1W(100); // S^WS | '$' | '(:' | 'score' try_LetBinding(); for (;;) { if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(100); // S^WS | '$' | '(:' | 'score' try_LetBinding(); } } function parse_LetBinding() { eventHandler.startNonterminal("LetBinding", e0); switch (l1) { case 31: // '$' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(109); // S^WS | '(:' | ':=' | 'as' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } break; default: parse_FTScoreVar(); } lookahead1W(28); // S^WS | '(:' | ':=' shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("LetBinding", e0); } function try_LetBinding() { switch (l1) { case 31: // '$' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(109); // S^WS | '(:' | ':=' | 'as' if (l1 == 80) // 'as' { try_TypeDeclaration(); } break; default: try_FTScoreVar(); } lookahead1W(28); // S^WS | '(:' | ':=' shiftT(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_WindowClause() { eventHandler.startNonterminal("WindowClause", e0); shift(139); // 'for' lookahead1W(139); // S^WS | '(:' | 'sliding' | 'tumbling' switch (l1) { case 257: // 'tumbling' whitespace(); parse_TumblingWindowClause(); break; default: whitespace(); parse_SlidingWindowClause(); } eventHandler.endNonterminal("WindowClause", e0); } function try_WindowClause() { shiftT(139); // 'for' lookahead1W(139); // S^WS | '(:' | 'sliding' | 'tumbling' switch (l1) { case 257: // 'tumbling' try_TumblingWindowClause(); break; default: try_SlidingWindowClause(); } } function parse_TumblingWindowClause() { eventHandler.startNonterminal("TumblingWindowClause", e0); shift(257); // 'tumbling' lookahead1W(88); // S^WS | '(:' | 'window' shift(275); // 'window' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(114); // S^WS | '(:' | 'as' | 'in' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } lookahead1W(56); // S^WS | '(:' | 'in' shift(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); whitespace(); parse_WindowStartCondition(); if (l1 == 127 // 'end' || l1 == 202) // 'only' { whitespace(); parse_WindowEndCondition(); } eventHandler.endNonterminal("TumblingWindowClause", e0); } function try_TumblingWindowClause() { shiftT(257); // 'tumbling' lookahead1W(88); // S^WS | '(:' | 'window' shiftT(275); // 'window' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(114); // S^WS | '(:' | 'as' | 'in' if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(56); // S^WS | '(:' | 'in' shiftT(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); try_WindowStartCondition(); if (l1 == 127 // 'end' || l1 == 202) // 'only' { try_WindowEndCondition(); } } function parse_SlidingWindowClause() { eventHandler.startNonterminal("SlidingWindowClause", e0); shift(239); // 'sliding' lookahead1W(88); // S^WS | '(:' | 'window' shift(275); // 'window' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(114); // S^WS | '(:' | 'as' | 'in' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } lookahead1W(56); // S^WS | '(:' | 'in' shift(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); whitespace(); parse_WindowStartCondition(); whitespace(); parse_WindowEndCondition(); eventHandler.endNonterminal("SlidingWindowClause", e0); } function try_SlidingWindowClause() { shiftT(239); // 'sliding' lookahead1W(88); // S^WS | '(:' | 'window' shiftT(275); // 'window' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(114); // S^WS | '(:' | 'as' | 'in' if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(56); // S^WS | '(:' | 'in' shiftT(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); try_WindowStartCondition(); try_WindowEndCondition(); } function parse_WindowStartCondition() { eventHandler.startNonterminal("WindowStartCondition", e0); shift(242); // 'start' lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when' whitespace(); parse_WindowVars(); lookahead1W(86); // S^WS | '(:' | 'when' shift(271); // 'when' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("WindowStartCondition", e0); } function try_WindowStartCondition() { shiftT(242); // 'start' lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when' try_WindowVars(); lookahead1W(86); // S^WS | '(:' | 'when' shiftT(271); // 'when' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_WindowEndCondition() { eventHandler.startNonterminal("WindowEndCondition", e0); if (l1 == 202) // 'only' { shift(202); // 'only' } lookahead1W(53); // S^WS | '(:' | 'end' shift(127); // 'end' lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when' whitespace(); parse_WindowVars(); lookahead1W(86); // S^WS | '(:' | 'when' shift(271); // 'when' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("WindowEndCondition", e0); } function try_WindowEndCondition() { if (l1 == 202) // 'only' { shiftT(202); // 'only' } lookahead1W(53); // S^WS | '(:' | 'end' shiftT(127); // 'end' lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when' try_WindowVars(); lookahead1W(86); // S^WS | '(:' | 'when' shiftT(271); // 'when' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_WindowVars() { eventHandler.startNonterminal("WindowVars", e0); if (l1 == 31) // '$' { shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_CurrentItem(); } lookahead1W(174); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when' if (l1 == 82) // 'at' { whitespace(); parse_PositionalVar(); } lookahead1W(163); // S^WS | '(:' | 'next' | 'previous' | 'when' if (l1 == 219) // 'previous' { shift(219); // 'previous' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_PreviousItem(); } lookahead1W(131); // S^WS | '(:' | 'next' | 'when' if (l1 == 190) // 'next' { shift(190); // 'next' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_NextItem(); } eventHandler.endNonterminal("WindowVars", e0); } function try_WindowVars() { if (l1 == 31) // '$' { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_CurrentItem(); } lookahead1W(174); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when' if (l1 == 82) // 'at' { try_PositionalVar(); } lookahead1W(163); // S^WS | '(:' | 'next' | 'previous' | 'when' if (l1 == 219) // 'previous' { shiftT(219); // 'previous' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_PreviousItem(); } lookahead1W(131); // S^WS | '(:' | 'next' | 'when' if (l1 == 190) // 'next' { shiftT(190); // 'next' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_NextItem(); } } function parse_CurrentItem() { eventHandler.startNonterminal("CurrentItem", e0); parse_EQName(); eventHandler.endNonterminal("CurrentItem", e0); } function try_CurrentItem() { try_EQName(); } function parse_PreviousItem() { eventHandler.startNonterminal("PreviousItem", e0); parse_EQName(); eventHandler.endNonterminal("PreviousItem", e0); } function try_PreviousItem() { try_EQName(); } function parse_NextItem() { eventHandler.startNonterminal("NextItem", e0); parse_EQName(); eventHandler.endNonterminal("NextItem", e0); } function try_NextItem() { try_EQName(); } function parse_CountClause() { eventHandler.startNonterminal("CountClause", e0); shift(106); // 'count' lookahead1W(21); // S^WS | '$' | '(:' shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); eventHandler.endNonterminal("CountClause", e0); } function try_CountClause() { shiftT(106); // 'count' lookahead1W(21); // S^WS | '$' | '(:' shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); } function parse_WhereClause() { eventHandler.startNonterminal("WhereClause", e0); shift(272); // 'where' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("WhereClause", e0); } function try_WhereClause() { shiftT(272); // 'where' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_GroupByClause() { eventHandler.startNonterminal("GroupByClause", e0); shift(150); // 'group' lookahead1W(37); // S^WS | '(:' | 'by' shift(88); // 'by' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_GroupingSpecList(); eventHandler.endNonterminal("GroupByClause", e0); } function try_GroupByClause() { shiftT(150); // 'group' lookahead1W(37); // S^WS | '(:' | 'by' shiftT(88); // 'by' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_GroupingSpecList(); } function parse_GroupingSpecList() { eventHandler.startNonterminal("GroupingSpecList", e0); parse_GroupingSpec(); for (;;) { lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_GroupingSpec(); } eventHandler.endNonterminal("GroupingSpecList", e0); } function try_GroupingSpecList() { try_GroupingSpec(); for (;;) { lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_GroupingSpec(); } } function parse_GroupingSpec() { eventHandler.startNonterminal("GroupingSpec", e0); switch (l1) { case 31: // '$' lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | break; default: lk = l1; } if (lk == 3103 // '$' EQName^Token || lk == 36383 // '$' 'after' || lk == 37407 // '$' 'allowing' || lk == 37919 // '$' 'ancestor' || lk == 38431 // '$' 'ancestor-or-self' || lk == 38943 // '$' 'and' || lk == 39967 // '$' 'append' || lk == 40479 // '$' 'array' || lk == 40991 // '$' 'as' || lk == 41503 // '$' 'ascending' || lk == 42015 // '$' 'at' || lk == 42527 // '$' 'attribute' || lk == 43039 // '$' 'base-uri' || lk == 43551 // '$' 'before' || lk == 44063 // '$' 'boundary-space' || lk == 44575 // '$' 'break' || lk == 45599 // '$' 'case' || lk == 46111 // '$' 'cast' || lk == 46623 // '$' 'castable' || lk == 47135 // '$' 'catch' || lk == 48159 // '$' 'child' || lk == 48671 // '$' 'collation' || lk == 49695 // '$' 'comment' || lk == 50207 // '$' 'constraint' || lk == 50719 // '$' 'construction' || lk == 52255 // '$' 'context' || lk == 52767 // '$' 'continue' || lk == 53279 // '$' 'copy' || lk == 53791 // '$' 'copy-namespaces' || lk == 54303 // '$' 'count' || lk == 54815 // '$' 'decimal-format' || lk == 55839 // '$' 'declare' || lk == 56351 // '$' 'default' || lk == 56863 // '$' 'delete' || lk == 57375 // '$' 'descendant' || lk == 57887 // '$' 'descendant-or-self' || lk == 58399 // '$' 'descending' || lk == 60959 // '$' 'div' || lk == 61471 // '$' 'document' || lk == 61983 // '$' 'document-node' || lk == 62495 // '$' 'element' || lk == 63007 // '$' 'else' || lk == 63519 // '$' 'empty' || lk == 64031 // '$' 'empty-sequence' || lk == 64543 // '$' 'encoding' || lk == 65055 // '$' 'end' || lk == 66079 // '$' 'eq' || lk == 66591 // '$' 'every' || lk == 67615 // '$' 'except' || lk == 68127 // '$' 'exit' || lk == 68639 // '$' 'external' || lk == 69151 // '$' 'false' || lk == 69663 // '$' 'first' || lk == 70175 // '$' 'following' || lk == 70687 // '$' 'following-sibling' || lk == 71199 // '$' 'for' || lk == 72735 // '$' 'from' || lk == 73247 // '$' 'ft-option' || lk == 75295 // '$' 'function' || lk == 75807 // '$' 'ge' || lk == 76831 // '$' 'group' || lk == 77855 // '$' 'gt' || lk == 78367 // '$' 'idiv' || lk == 78879 // '$' 'if' || lk == 79391 // '$' 'import' || lk == 79903 // '$' 'in' || lk == 80415 // '$' 'index' || lk == 82463 // '$' 'insert' || lk == 82975 // '$' 'instance' || lk == 83487 // '$' 'integrity' || lk == 83999 // '$' 'intersect' || lk == 84511 // '$' 'into' || lk == 85023 // '$' 'is' || lk == 85535 // '$' 'item' || lk == 86047 // '$' 'json' || lk == 86559 // '$' 'json-item' || lk == 87071 // '$' 'jsoniq' || lk == 88607 // '$' 'last' || lk == 89119 // '$' 'lax' || lk == 89631 // '$' 'le' || lk == 90655 // '$' 'let' || lk == 91679 // '$' 'loop' || lk == 92703 // '$' 'lt' || lk == 93727 // '$' 'mod' || lk == 94239 // '$' 'modify' || lk == 94751 // '$' 'module' || lk == 95775 // '$' 'namespace' || lk == 96287 // '$' 'namespace-node' || lk == 96799 // '$' 'ne' || lk == 99359 // '$' 'node' || lk == 99871 // '$' 'nodes' || lk == 100895 // '$' 'null' || lk == 101407 // '$' 'object' || lk == 103455 // '$' 'only' || lk == 103967 // '$' 'option' || lk == 104479 // '$' 'or' || lk == 104991 // '$' 'order' || lk == 105503 // '$' 'ordered' || lk == 106015 // '$' 'ordering' || lk == 107551 // '$' 'parent' || lk == 110623 // '$' 'preceding' || lk == 111135 // '$' 'preceding-sibling' || lk == 112671 // '$' 'processing-instruction' || lk == 113695 // '$' 'rename' || lk == 114207 // '$' 'replace' || lk == 114719 // '$' 'return' || lk == 115231 // '$' 'returning' || lk == 115743 // '$' 'revalidation' || lk == 116767 // '$' 'satisfies' || lk == 117279 // '$' 'schema' || lk == 117791 // '$' 'schema-attribute' || lk == 118303 // '$' 'schema-element' || lk == 118815 // '$' 'score' || lk == 119327 // '$' 'select' || lk == 119839 // '$' 'self' || lk == 122399 // '$' 'sliding' || lk == 122911 // '$' 'some' || lk == 123423 // '$' 'stable' || lk == 123935 // '$' 'start' || lk == 125471 // '$' 'strict' || lk == 126495 // '$' 'structured-item' || lk == 127007 // '$' 'switch' || lk == 127519 // '$' 'text' || lk == 129567 // '$' 'to' || lk == 130079 // '$' 'treat' || lk == 130591 // '$' 'true' || lk == 131103 // '$' 'try' || lk == 131615 // '$' 'tumbling' || lk == 132127 // '$' 'type' || lk == 132639 // '$' 'typeswitch' || lk == 133151 // '$' 'union' || lk == 134175 // '$' 'unordered' || lk == 134687 // '$' 'updating' || lk == 136223 // '$' 'validate' || lk == 136735 // '$' 'value' || lk == 137247 // '$' 'variable' || lk == 137759 // '$' 'version' || lk == 139295 // '$' 'where' || lk == 139807 // '$' 'while' || lk == 141343) // '$' 'with' { lk = memoized(2, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_GroupingVariable(); lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' | if (l1 == 53 // ':=' || l1 == 80) // 'as' { if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(28); // S^WS | '(:' | ':=' shiftT(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } if (l1 == 95) // 'collation' { shiftT(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral } lk = -1; } catch (p1A) { lk = -2; } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(2, e0, lk); } } switch (lk) { case -1: parse_GroupingVariable(); lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' | if (l1 == 53 // ':=' || l1 == 80) // 'as' { if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } lookahead1W(28); // S^WS | '(:' | ':=' shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); } if (l1 == 95) // 'collation' { shift(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral } break; default: parse_ExprSingle(); } eventHandler.endNonterminal("GroupingSpec", e0); } function try_GroupingSpec() { switch (l1) { case 31: // '$' lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | break; default: lk = l1; } if (lk == 3103 // '$' EQName^Token || lk == 36383 // '$' 'after' || lk == 37407 // '$' 'allowing' || lk == 37919 // '$' 'ancestor' || lk == 38431 // '$' 'ancestor-or-self' || lk == 38943 // '$' 'and' || lk == 39967 // '$' 'append' || lk == 40479 // '$' 'array' || lk == 40991 // '$' 'as' || lk == 41503 // '$' 'ascending' || lk == 42015 // '$' 'at' || lk == 42527 // '$' 'attribute' || lk == 43039 // '$' 'base-uri' || lk == 43551 // '$' 'before' || lk == 44063 // '$' 'boundary-space' || lk == 44575 // '$' 'break' || lk == 45599 // '$' 'case' || lk == 46111 // '$' 'cast' || lk == 46623 // '$' 'castable' || lk == 47135 // '$' 'catch' || lk == 48159 // '$' 'child' || lk == 48671 // '$' 'collation' || lk == 49695 // '$' 'comment' || lk == 50207 // '$' 'constraint' || lk == 50719 // '$' 'construction' || lk == 52255 // '$' 'context' || lk == 52767 // '$' 'continue' || lk == 53279 // '$' 'copy' || lk == 53791 // '$' 'copy-namespaces' || lk == 54303 // '$' 'count' || lk == 54815 // '$' 'decimal-format' || lk == 55839 // '$' 'declare' || lk == 56351 // '$' 'default' || lk == 56863 // '$' 'delete' || lk == 57375 // '$' 'descendant' || lk == 57887 // '$' 'descendant-or-self' || lk == 58399 // '$' 'descending' || lk == 60959 // '$' 'div' || lk == 61471 // '$' 'document' || lk == 61983 // '$' 'document-node' || lk == 62495 // '$' 'element' || lk == 63007 // '$' 'else' || lk == 63519 // '$' 'empty' || lk == 64031 // '$' 'empty-sequence' || lk == 64543 // '$' 'encoding' || lk == 65055 // '$' 'end' || lk == 66079 // '$' 'eq' || lk == 66591 // '$' 'every' || lk == 67615 // '$' 'except' || lk == 68127 // '$' 'exit' || lk == 68639 // '$' 'external' || lk == 69151 // '$' 'false' || lk == 69663 // '$' 'first' || lk == 70175 // '$' 'following' || lk == 70687 // '$' 'following-sibling' || lk == 71199 // '$' 'for' || lk == 72735 // '$' 'from' || lk == 73247 // '$' 'ft-option' || lk == 75295 // '$' 'function' || lk == 75807 // '$' 'ge' || lk == 76831 // '$' 'group' || lk == 77855 // '$' 'gt' || lk == 78367 // '$' 'idiv' || lk == 78879 // '$' 'if' || lk == 79391 // '$' 'import' || lk == 79903 // '$' 'in' || lk == 80415 // '$' 'index' || lk == 82463 // '$' 'insert' || lk == 82975 // '$' 'instance' || lk == 83487 // '$' 'integrity' || lk == 83999 // '$' 'intersect' || lk == 84511 // '$' 'into' || lk == 85023 // '$' 'is' || lk == 85535 // '$' 'item' || lk == 86047 // '$' 'json' || lk == 86559 // '$' 'json-item' || lk == 87071 // '$' 'jsoniq' || lk == 88607 // '$' 'last' || lk == 89119 // '$' 'lax' || lk == 89631 // '$' 'le' || lk == 90655 // '$' 'let' || lk == 91679 // '$' 'loop' || lk == 92703 // '$' 'lt' || lk == 93727 // '$' 'mod' || lk == 94239 // '$' 'modify' || lk == 94751 // '$' 'module' || lk == 95775 // '$' 'namespace' || lk == 96287 // '$' 'namespace-node' || lk == 96799 // '$' 'ne' || lk == 99359 // '$' 'node' || lk == 99871 // '$' 'nodes' || lk == 100895 // '$' 'null' || lk == 101407 // '$' 'object' || lk == 103455 // '$' 'only' || lk == 103967 // '$' 'option' || lk == 104479 // '$' 'or' || lk == 104991 // '$' 'order' || lk == 105503 // '$' 'ordered' || lk == 106015 // '$' 'ordering' || lk == 107551 // '$' 'parent' || lk == 110623 // '$' 'preceding' || lk == 111135 // '$' 'preceding-sibling' || lk == 112671 // '$' 'processing-instruction' || lk == 113695 // '$' 'rename' || lk == 114207 // '$' 'replace' || lk == 114719 // '$' 'return' || lk == 115231 // '$' 'returning' || lk == 115743 // '$' 'revalidation' || lk == 116767 // '$' 'satisfies' || lk == 117279 // '$' 'schema' || lk == 117791 // '$' 'schema-attribute' || lk == 118303 // '$' 'schema-element' || lk == 118815 // '$' 'score' || lk == 119327 // '$' 'select' || lk == 119839 // '$' 'self' || lk == 122399 // '$' 'sliding' || lk == 122911 // '$' 'some' || lk == 123423 // '$' 'stable' || lk == 123935 // '$' 'start' || lk == 125471 // '$' 'strict' || lk == 126495 // '$' 'structured-item' || lk == 127007 // '$' 'switch' || lk == 127519 // '$' 'text' || lk == 129567 // '$' 'to' || lk == 130079 // '$' 'treat' || lk == 130591 // '$' 'true' || lk == 131103 // '$' 'try' || lk == 131615 // '$' 'tumbling' || lk == 132127 // '$' 'type' || lk == 132639 // '$' 'typeswitch' || lk == 133151 // '$' 'union' || lk == 134175 // '$' 'unordered' || lk == 134687 // '$' 'updating' || lk == 136223 // '$' 'validate' || lk == 136735 // '$' 'value' || lk == 137247 // '$' 'variable' || lk == 137759 // '$' 'version' || lk == 139295 // '$' 'where' || lk == 139807 // '$' 'while' || lk == 141343) // '$' 'with' { lk = memoized(2, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_GroupingVariable(); lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' | if (l1 == 53 // ':=' || l1 == 80) // 'as' { if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(28); // S^WS | '(:' | ':=' shiftT(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } if (l1 == 95) // 'collation' { shiftT(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral } memoize(2, e0A, -1); lk = -3; } catch (p1A) { lk = -2; b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(2, e0A, -2); } } } switch (lk) { case -1: try_GroupingVariable(); lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' | if (l1 == 53 // ':=' || l1 == 80) // 'as' { if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(28); // S^WS | '(:' | ':=' shiftT(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } if (l1 == 95) // 'collation' { shiftT(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral } break; case -3: break; default: try_ExprSingle(); } } function parse_GroupingVariable() { eventHandler.startNonterminal("GroupingVariable", e0); shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); eventHandler.endNonterminal("GroupingVariable", e0); } function try_GroupingVariable() { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); } function parse_OrderByClause() { eventHandler.startNonterminal("OrderByClause", e0); switch (l1) { case 205: // 'order' shift(205); // 'order' lookahead1W(37); // S^WS | '(:' | 'by' shift(88); // 'by' break; default: shift(241); // 'stable' lookahead1W(70); // S^WS | '(:' | 'order' shift(205); // 'order' lookahead1W(37); // S^WS | '(:' | 'by' shift(88); // 'by' } lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_OrderSpecList(); eventHandler.endNonterminal("OrderByClause", e0); } function try_OrderByClause() { switch (l1) { case 205: // 'order' shiftT(205); // 'order' lookahead1W(37); // S^WS | '(:' | 'by' shiftT(88); // 'by' break; default: shiftT(241); // 'stable' lookahead1W(70); // S^WS | '(:' | 'order' shiftT(205); // 'order' lookahead1W(37); // S^WS | '(:' | 'by' shiftT(88); // 'by' } lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_OrderSpecList(); } function parse_OrderSpecList() { eventHandler.startNonterminal("OrderSpecList", e0); parse_OrderSpec(); for (;;) { lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_OrderSpec(); } eventHandler.endNonterminal("OrderSpecList", e0); } function try_OrderSpecList() { try_OrderSpec(); for (;;) { lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_OrderSpec(); } } function parse_OrderSpec() { eventHandler.startNonterminal("OrderSpec", e0); parse_ExprSingle(); whitespace(); parse_OrderModifier(); eventHandler.endNonterminal("OrderSpec", e0); } function try_OrderSpec() { try_ExprSingle(); try_OrderModifier(); } function parse_OrderModifier() { eventHandler.startNonterminal("OrderModifier", e0); if (l1 == 81 // 'ascending' || l1 == 114) // 'descending' { switch (l1) { case 81: // 'ascending' shift(81); // 'ascending' break; default: shift(114); // 'descending' } } lookahead1W(203); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' | if (l1 == 124) // 'empty' { shift(124); // 'empty' lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least' switch (l1) { case 149: // 'greatest' shift(149); // 'greatest' break; default: shift(176); // 'least' } } lookahead1W(199); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' | if (l1 == 95) // 'collation' { shift(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral } eventHandler.endNonterminal("OrderModifier", e0); } function try_OrderModifier() { if (l1 == 81 // 'ascending' || l1 == 114) // 'descending' { switch (l1) { case 81: // 'ascending' shiftT(81); // 'ascending' break; default: shiftT(114); // 'descending' } } lookahead1W(203); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' | if (l1 == 124) // 'empty' { shiftT(124); // 'empty' lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least' switch (l1) { case 149: // 'greatest' shiftT(149); // 'greatest' break; default: shiftT(176); // 'least' } } lookahead1W(199); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' | if (l1 == 95) // 'collation' { shiftT(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral } } function parse_ReturnClause() { eventHandler.startNonterminal("ReturnClause", e0); shift(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ReturnClause", e0); } function try_ReturnClause() { shiftT(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_QuantifiedExpr() { eventHandler.startNonterminal("QuantifiedExpr", e0); switch (l1) { case 240: // 'some' shift(240); // 'some' break; default: shift(130); // 'every' } lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_QuantifiedVarDecl(); for (;;) { if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_QuantifiedVarDecl(); } shift(228); // 'satisfies' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("QuantifiedExpr", e0); } function try_QuantifiedExpr() { switch (l1) { case 240: // 'some' shiftT(240); // 'some' break; default: shiftT(130); // 'every' } lookahead1W(21); // S^WS | '$' | '(:' try_QuantifiedVarDecl(); for (;;) { if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' try_QuantifiedVarDecl(); } shiftT(228); // 'satisfies' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_QuantifiedVarDecl() { eventHandler.startNonterminal("QuantifiedVarDecl", e0); shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(114); // S^WS | '(:' | 'as' | 'in' if (l1 == 80) // 'as' { whitespace(); parse_TypeDeclaration(); } lookahead1W(56); // S^WS | '(:' | 'in' shift(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("QuantifiedVarDecl", e0); } function try_QuantifiedVarDecl() { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(114); // S^WS | '(:' | 'as' | 'in' if (l1 == 80) // 'as' { try_TypeDeclaration(); } lookahead1W(56); // S^WS | '(:' | 'in' shiftT(156); // 'in' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_SwitchExpr() { eventHandler.startNonterminal("SwitchExpr", e0); shift(248); // 'switch' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(38); // ')' for (;;) { lookahead1W(38); // S^WS | '(:' | 'case' whitespace(); parse_SwitchCaseClause(); if (l1 != 89) // 'case' { break; } } shift(110); // 'default' lookahead1W(73); // S^WS | '(:' | 'return' shift(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("SwitchExpr", e0); } function try_SwitchExpr() { shiftT(248); // 'switch' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(38); // ')' for (;;) { lookahead1W(38); // S^WS | '(:' | 'case' try_SwitchCaseClause(); if (l1 != 89) // 'case' { break; } } shiftT(110); // 'default' lookahead1W(73); // S^WS | '(:' | 'return' shiftT(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_SwitchCaseClause() { eventHandler.startNonterminal("SwitchCaseClause", e0); for (;;) { shift(89); // 'case' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_SwitchCaseOperand(); if (l1 != 89) // 'case' { break; } } shift(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("SwitchCaseClause", e0); } function try_SwitchCaseClause() { for (;;) { shiftT(89); // 'case' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_SwitchCaseOperand(); if (l1 != 89) // 'case' { break; } } shiftT(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_SwitchCaseOperand() { eventHandler.startNonterminal("SwitchCaseOperand", e0); parse_ExprSingle(); eventHandler.endNonterminal("SwitchCaseOperand", e0); } function try_SwitchCaseOperand() { try_ExprSingle(); } function parse_TypeswitchExpr() { eventHandler.startNonterminal("TypeswitchExpr", e0); shift(259); // 'typeswitch' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(38); // ')' for (;;) { lookahead1W(38); // S^WS | '(:' | 'case' whitespace(); parse_CaseClause(); if (l1 != 89) // 'case' { break; } } shift(110); // 'default' lookahead1W(99); // S^WS | '$' | '(:' | 'return' if (l1 == 31) // '$' { shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); } lookahead1W(73); // S^WS | '(:' | 'return' shift(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("TypeswitchExpr", e0); } function try_TypeswitchExpr() { shiftT(259); // 'typeswitch' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(38); // ')' for (;;) { lookahead1W(38); // S^WS | '(:' | 'case' try_CaseClause(); if (l1 != 89) // 'case' { break; } } shiftT(110); // 'default' lookahead1W(99); // S^WS | '$' | '(:' | 'return' if (l1 == 31) // '$' { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); } lookahead1W(73); // S^WS | '(:' | 'return' shiftT(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_CaseClause() { eventHandler.startNonterminal("CaseClause", e0); shift(89); // 'case' lookahead1W(258); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' | if (l1 == 31) // '$' { shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(33); // S^WS | '(:' | 'as' shift(80); // 'as' } lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceTypeUnion(); shift(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("CaseClause", e0); } function try_CaseClause() { shiftT(89); // 'case' lookahead1W(258); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' | if (l1 == 31) // '$' { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(33); // S^WS | '(:' | 'as' shiftT(80); // 'as' } lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceTypeUnion(); shiftT(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_SequenceTypeUnion() { eventHandler.startNonterminal("SequenceTypeUnion", e0); parse_SequenceType(); for (;;) { lookahead1W(138); // S^WS | '(:' | 'return' | '|' if (l1 != 284) // '|' { break; } shift(284); // '|' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } eventHandler.endNonterminal("SequenceTypeUnion", e0); } function try_SequenceTypeUnion() { try_SequenceType(); for (;;) { lookahead1W(138); // S^WS | '(:' | 'return' | '|' if (l1 != 284) // '|' { break; } shiftT(284); // '|' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } } function parse_IfExpr() { eventHandler.startNonterminal("IfExpr", e0); shift(154); // 'if' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(38); // ')' lookahead1W(80); // S^WS | '(:' | 'then' shift(250); // 'then' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); shift(123); // 'else' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("IfExpr", e0); } function try_IfExpr() { shiftT(154); // 'if' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(38); // ')' lookahead1W(80); // S^WS | '(:' | 'then' shiftT(250); // 'then' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); shiftT(123); // 'else' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_TryCatchExpr() { eventHandler.startNonterminal("TryCatchExpr", e0); parse_TryClause(); for (;;) { lookahead1W(39); // S^WS | '(:' | 'catch' whitespace(); parse_CatchClause(); lookahead1W(208); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' | if (l1 != 92) // 'catch' { break; } } eventHandler.endNonterminal("TryCatchExpr", e0); } function try_TryCatchExpr() { try_TryClause(); for (;;) { lookahead1W(39); // S^WS | '(:' | 'catch' try_CatchClause(); lookahead1W(208); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' | if (l1 != 92) // 'catch' { break; } } } function parse_TryClause() { eventHandler.startNonterminal("TryClause", e0); shift(256); // 'try' lookahead1W(90); // S^WS | '(:' | '{' shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_TryTargetExpr(); shift(287); // '}' eventHandler.endNonterminal("TryClause", e0); } function try_TryClause() { shiftT(256); // 'try' lookahead1W(90); // S^WS | '(:' | '{' shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_TryTargetExpr(); shiftT(287); // '}' } function parse_TryTargetExpr() { eventHandler.startNonterminal("TryTargetExpr", e0); parse_Expr(); eventHandler.endNonterminal("TryTargetExpr", e0); } function try_TryTargetExpr() { try_Expr(); } function parse_CatchClause() { eventHandler.startNonterminal("CatchClause", e0); shift(92); // 'catch' lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_CatchErrorList(); shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(287); // '}' eventHandler.endNonterminal("CatchClause", e0); } function try_CatchClause() { shiftT(92); // 'catch' lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_CatchErrorList(); shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(287); // '}' } function parse_CatchErrorList() { eventHandler.startNonterminal("CatchErrorList", e0); parse_NameTest(); for (;;) { lookahead1W(140); // S^WS | '(:' | '{' | '|' if (l1 != 284) // '|' { break; } shift(284); // '|' lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_NameTest(); } eventHandler.endNonterminal("CatchErrorList", e0); } function try_CatchErrorList() { try_NameTest(); for (;;) { lookahead1W(140); // S^WS | '(:' | '{' | '|' if (l1 != 284) // '|' { break; } shiftT(284); // '|' lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_NameTest(); } } function parse_OrExpr() { eventHandler.startNonterminal("OrExpr", e0); parse_AndExpr(); for (;;) { if (l1 != 204) // 'or' { break; } shift(204); // 'or' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AndExpr(); } eventHandler.endNonterminal("OrExpr", e0); } function try_OrExpr() { try_AndExpr(); for (;;) { if (l1 != 204) // 'or' { break; } shiftT(204); // 'or' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AndExpr(); } } function parse_AndExpr() { eventHandler.startNonterminal("AndExpr", e0); parse_NotExpr(); for (;;) { if (l1 != 76) // 'and' { break; } shift(76); // 'and' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_NotExpr(); } eventHandler.endNonterminal("AndExpr", e0); } function try_AndExpr() { try_NotExpr(); for (;;) { if (l1 != 76) // 'and' { break; } shiftT(76); // 'and' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_NotExpr(); } } function parse_NotExpr() { eventHandler.startNonterminal("NotExpr", e0); if (l1 == 196) // 'not' { shift(196); // 'not' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ComparisonExpr(); eventHandler.endNonterminal("NotExpr", e0); } function try_NotExpr() { if (l1 == 196) // 'not' { shiftT(196); // 'not' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ComparisonExpr(); } function parse_ComparisonExpr() { eventHandler.startNonterminal("ComparisonExpr", e0); parse_FTContainsExpr(); if (l1 == 27 // '!=' || l1 == 55 // '<' || l1 == 58 // '<<' || l1 == 59 // '<=' || l1 == 61 // '=' || l1 == 62 // '>' || l1 == 63 // '>=' || l1 == 64 // '>>' || l1 == 129 // 'eq' || l1 == 148 // 'ge' || l1 == 152 // 'gt' || l1 == 166 // 'is' || l1 == 175 // 'le' || l1 == 181 // 'lt' || l1 == 189) // 'ne' { switch (l1) { case 129: // 'eq' case 148: // 'ge' case 152: // 'gt' case 175: // 'le' case 181: // 'lt' case 189: // 'ne' whitespace(); parse_ValueComp(); break; case 58: // '<<' case 64: // '>>' case 166: // 'is' whitespace(); parse_NodeComp(); break; default: whitespace(); parse_GeneralComp(); } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_FTContainsExpr(); } eventHandler.endNonterminal("ComparisonExpr", e0); } function try_ComparisonExpr() { try_FTContainsExpr(); if (l1 == 27 // '!=' || l1 == 55 // '<' || l1 == 58 // '<<' || l1 == 59 // '<=' || l1 == 61 // '=' || l1 == 62 // '>' || l1 == 63 // '>=' || l1 == 64 // '>>' || l1 == 129 // 'eq' || l1 == 148 // 'ge' || l1 == 152 // 'gt' || l1 == 166 // 'is' || l1 == 175 // 'le' || l1 == 181 // 'lt' || l1 == 189) // 'ne' { switch (l1) { case 129: // 'eq' case 148: // 'ge' case 152: // 'gt' case 175: // 'le' case 181: // 'lt' case 189: // 'ne' try_ValueComp(); break; case 58: // '<<' case 64: // '>>' case 166: // 'is' try_NodeComp(); break; default: try_GeneralComp(); } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_FTContainsExpr(); } } function parse_FTContainsExpr() { eventHandler.startNonterminal("FTContainsExpr", e0); parse_StringConcatExpr(); if (l1 == 100) // 'contains' { shift(100); // 'contains' lookahead1W(79); // S^WS | '(:' | 'text' shift(249); // 'text' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTSelection(); if (l1 == 277) // 'without' { whitespace(); parse_FTIgnoreOption(); } } eventHandler.endNonterminal("FTContainsExpr", e0); } function try_FTContainsExpr() { try_StringConcatExpr(); if (l1 == 100) // 'contains' { shiftT(100); // 'contains' lookahead1W(79); // S^WS | '(:' | 'text' shiftT(249); // 'text' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTSelection(); if (l1 == 277) // 'without' { try_FTIgnoreOption(); } } } function parse_StringConcatExpr() { eventHandler.startNonterminal("StringConcatExpr", e0); parse_RangeExpr(); for (;;) { if (l1 != 285) // '||' { break; } shift(285); // '||' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_RangeExpr(); } eventHandler.endNonterminal("StringConcatExpr", e0); } function try_StringConcatExpr() { try_RangeExpr(); for (;;) { if (l1 != 285) // '||' { break; } shiftT(285); // '||' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_RangeExpr(); } } function parse_RangeExpr() { eventHandler.startNonterminal("RangeExpr", e0); parse_AdditiveExpr(); if (l1 == 253) // 'to' { shift(253); // 'to' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); } eventHandler.endNonterminal("RangeExpr", e0); } function try_RangeExpr() { try_AdditiveExpr(); if (l1 == 253) // 'to' { shiftT(253); // 'to' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); } } function parse_AdditiveExpr() { eventHandler.startNonterminal("AdditiveExpr", e0); parse_MultiplicativeExpr(); for (;;) { if (l1 != 41 // '+' && l1 != 43) // '-' { break; } switch (l1) { case 41: // '+' shift(41); // '+' break; default: shift(43); // '-' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_MultiplicativeExpr(); } eventHandler.endNonterminal("AdditiveExpr", e0); } function try_AdditiveExpr() { try_MultiplicativeExpr(); for (;;) { if (l1 != 41 // '+' && l1 != 43) // '-' { break; } switch (l1) { case 41: // '+' shiftT(41); // '+' break; default: shiftT(43); // '-' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_MultiplicativeExpr(); } } function parse_MultiplicativeExpr() { eventHandler.startNonterminal("MultiplicativeExpr", e0); parse_UnionExpr(); for (;;) { if (l1 != 39 // '*' && l1 != 119 // 'div' && l1 != 153 // 'idiv' && l1 != 183) // 'mod' { break; } switch (l1) { case 39: // '*' shift(39); // '*' break; case 119: // 'div' shift(119); // 'div' break; case 153: // 'idiv' shift(153); // 'idiv' break; default: shift(183); // 'mod' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_UnionExpr(); } eventHandler.endNonterminal("MultiplicativeExpr", e0); } function try_MultiplicativeExpr() { try_UnionExpr(); for (;;) { if (l1 != 39 // '*' && l1 != 119 // 'div' && l1 != 153 // 'idiv' && l1 != 183) // 'mod' { break; } switch (l1) { case 39: // '*' shiftT(39); // '*' break; case 119: // 'div' shiftT(119); // 'div' break; case 153: // 'idiv' shiftT(153); // 'idiv' break; default: shiftT(183); // 'mod' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_UnionExpr(); } } function parse_UnionExpr() { eventHandler.startNonterminal("UnionExpr", e0); parse_IntersectExceptExpr(); for (;;) { if (l1 != 260 // 'union' && l1 != 284) // '|' { break; } switch (l1) { case 260: // 'union' shift(260); // 'union' break; default: shift(284); // '|' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_IntersectExceptExpr(); } eventHandler.endNonterminal("UnionExpr", e0); } function try_UnionExpr() { try_IntersectExceptExpr(); for (;;) { if (l1 != 260 // 'union' && l1 != 284) // '|' { break; } switch (l1) { case 260: // 'union' shiftT(260); // 'union' break; default: shiftT(284); // '|' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_IntersectExceptExpr(); } } function parse_IntersectExceptExpr() { eventHandler.startNonterminal("IntersectExceptExpr", e0); parse_InstanceofExpr(); for (;;) { lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 != 132 // 'except' && l1 != 164) // 'intersect' { break; } switch (l1) { case 164: // 'intersect' shift(164); // 'intersect' break; default: shift(132); // 'except' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_InstanceofExpr(); } eventHandler.endNonterminal("IntersectExceptExpr", e0); } function try_IntersectExceptExpr() { try_InstanceofExpr(); for (;;) { lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 != 132 // 'except' && l1 != 164) // 'intersect' { break; } switch (l1) { case 164: // 'intersect' shiftT(164); // 'intersect' break; default: shiftT(132); // 'except' } lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_InstanceofExpr(); } } function parse_InstanceofExpr() { eventHandler.startNonterminal("InstanceofExpr", e0); parse_TreatExpr(); lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 162) // 'instance' { shift(162); // 'instance' lookahead1W(67); // S^WS | '(:' | 'of' shift(200); // 'of' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } eventHandler.endNonterminal("InstanceofExpr", e0); } function try_InstanceofExpr() { try_TreatExpr(); lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 162) // 'instance' { shiftT(162); // 'instance' lookahead1W(67); // S^WS | '(:' | 'of' shiftT(200); // 'of' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } } function parse_TreatExpr() { eventHandler.startNonterminal("TreatExpr", e0); parse_CastableExpr(); lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 254) // 'treat' { shift(254); // 'treat' lookahead1W(33); // S^WS | '(:' | 'as' shift(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } eventHandler.endNonterminal("TreatExpr", e0); } function try_TreatExpr() { try_CastableExpr(); lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 254) // 'treat' { shiftT(254); // 'treat' lookahead1W(33); // S^WS | '(:' | 'as' shiftT(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } } function parse_CastableExpr() { eventHandler.startNonterminal("CastableExpr", e0); parse_CastExpr(); lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 91) // 'castable' { shift(91); // 'castable' lookahead1W(33); // S^WS | '(:' | 'as' shift(80); // 'as' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SingleType(); } eventHandler.endNonterminal("CastableExpr", e0); } function try_CastableExpr() { try_CastExpr(); lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 91) // 'castable' { shiftT(91); // 'castable' lookahead1W(33); // S^WS | '(:' | 'as' shiftT(80); // 'as' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_SingleType(); } } function parse_CastExpr() { eventHandler.startNonterminal("CastExpr", e0); parse_UnaryExpr(); lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 90) // 'cast' { shift(90); // 'cast' lookahead1W(33); // S^WS | '(:' | 'as' shift(80); // 'as' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SingleType(); } eventHandler.endNonterminal("CastExpr", e0); } function try_CastExpr() { try_UnaryExpr(); lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 90) // 'cast' { shiftT(90); // 'cast' lookahead1W(33); // S^WS | '(:' | 'as' shiftT(80); // 'as' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_SingleType(); } } function parse_UnaryExpr() { eventHandler.startNonterminal("UnaryExpr", e0); for (;;) { lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | if (l1 != 41 // '+' && l1 != 43) // '-' { break; } switch (l1) { case 43: // '-' shift(43); // '-' break; default: shift(41); // '+' } } whitespace(); parse_ValueExpr(); eventHandler.endNonterminal("UnaryExpr", e0); } function try_UnaryExpr() { for (;;) { lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | if (l1 != 41 // '+' && l1 != 43) // '-' { break; } switch (l1) { case 43: // '-' shiftT(43); // '-' break; default: shiftT(41); // '+' } } try_ValueExpr(); } function parse_ValueExpr() { eventHandler.startNonterminal("ValueExpr", e0); switch (l1) { case 266: // 'validate' lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{' break; default: lk = l1; } switch (lk) { case 89354: // 'validate' 'lax' case 125706: // 'validate' 'strict' case 132362: // 'validate' 'type' case 144138: // 'validate' '{' parse_ValidateExpr(); break; case 36: // '(#' parse_ExtensionExpr(); break; default: parse_SimpleMapExpr(); } eventHandler.endNonterminal("ValueExpr", e0); } function try_ValueExpr() { switch (l1) { case 266: // 'validate' lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{' break; default: lk = l1; } switch (lk) { case 89354: // 'validate' 'lax' case 125706: // 'validate' 'strict' case 132362: // 'validate' 'type' case 144138: // 'validate' '{' try_ValidateExpr(); break; case 36: // '(#' try_ExtensionExpr(); break; default: try_SimpleMapExpr(); } } function parse_SimpleMapExpr() { eventHandler.startNonterminal("SimpleMapExpr", e0); parse_PathExpr(); for (;;) { if (l1 != 26) // '!' { break; } shift(26); // '!' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_PathExpr(); } eventHandler.endNonterminal("SimpleMapExpr", e0); } function try_SimpleMapExpr() { try_PathExpr(); for (;;) { if (l1 != 26) // '!' { break; } shiftT(26); // '!' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_PathExpr(); } } function parse_GeneralComp() { eventHandler.startNonterminal("GeneralComp", e0); switch (l1) { case 61: // '=' shift(61); // '=' break; case 27: // '!=' shift(27); // '!=' break; case 55: // '<' shift(55); // '<' break; case 59: // '<=' shift(59); // '<=' break; case 62: // '>' shift(62); // '>' break; default: shift(63); // '>=' } eventHandler.endNonterminal("GeneralComp", e0); } function try_GeneralComp() { switch (l1) { case 61: // '=' shiftT(61); // '=' break; case 27: // '!=' shiftT(27); // '!=' break; case 55: // '<' shiftT(55); // '<' break; case 59: // '<=' shiftT(59); // '<=' break; case 62: // '>' shiftT(62); // '>' break; default: shiftT(63); // '>=' } } function parse_ValueComp() { eventHandler.startNonterminal("ValueComp", e0); switch (l1) { case 129: // 'eq' shift(129); // 'eq' break; case 189: // 'ne' shift(189); // 'ne' break; case 181: // 'lt' shift(181); // 'lt' break; case 175: // 'le' shift(175); // 'le' break; case 152: // 'gt' shift(152); // 'gt' break; default: shift(148); // 'ge' } eventHandler.endNonterminal("ValueComp", e0); } function try_ValueComp() { switch (l1) { case 129: // 'eq' shiftT(129); // 'eq' break; case 189: // 'ne' shiftT(189); // 'ne' break; case 181: // 'lt' shiftT(181); // 'lt' break; case 175: // 'le' shiftT(175); // 'le' break; case 152: // 'gt' shiftT(152); // 'gt' break; default: shiftT(148); // 'ge' } } function parse_NodeComp() { eventHandler.startNonterminal("NodeComp", e0); switch (l1) { case 166: // 'is' shift(166); // 'is' break; case 58: // '<<' shift(58); // '<<' break; default: shift(64); // '>>' } eventHandler.endNonterminal("NodeComp", e0); } function try_NodeComp() { switch (l1) { case 166: // 'is' shiftT(166); // 'is' break; case 58: // '<<' shiftT(58); // '<<' break; default: shiftT(64); // '>>' } } function parse_ValidateExpr() { eventHandler.startNonterminal("ValidateExpr", e0); shift(266); // 'validate' lookahead1W(175); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{' if (l1 != 281) // '{' { switch (l1) { case 258: // 'type' shift(258); // 'type' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_TypeName(); break; default: whitespace(); parse_ValidationMode(); } } lookahead1W(90); // S^WS | '(:' | '{' shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(287); // '}' eventHandler.endNonterminal("ValidateExpr", e0); } function try_ValidateExpr() { shiftT(266); // 'validate' lookahead1W(175); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{' if (l1 != 281) // '{' { switch (l1) { case 258: // 'type' shiftT(258); // 'type' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_TypeName(); break; default: try_ValidationMode(); } } lookahead1W(90); // S^WS | '(:' | '{' shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(287); // '}' } function parse_ValidationMode() { eventHandler.startNonterminal("ValidationMode", e0); switch (l1) { case 174: // 'lax' shift(174); // 'lax' break; default: shift(245); // 'strict' } eventHandler.endNonterminal("ValidationMode", e0); } function try_ValidationMode() { switch (l1) { case 174: // 'lax' shiftT(174); // 'lax' break; default: shiftT(245); // 'strict' } } function parse_ExtensionExpr() { eventHandler.startNonterminal("ExtensionExpr", e0); for (;;) { whitespace(); parse_Pragma(); lookahead1W(104); // S^WS | '(#' | '(:' | '{' if (l1 != 36) // '(#' { break; } } shift(281); // '{' lookahead1W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | if (l1 != 287) // '}' { whitespace(); parse_Expr(); } shift(287); // '}' eventHandler.endNonterminal("ExtensionExpr", e0); } function try_ExtensionExpr() { for (;;) { try_Pragma(); lookahead1W(104); // S^WS | '(#' | '(:' | '{' if (l1 != 36) // '(#' { break; } } shiftT(281); // '{' lookahead1W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | if (l1 != 287) // '}' { try_Expr(); } shiftT(287); // '}' } function parse_Pragma() { eventHandler.startNonterminal("Pragma", e0); shift(36); // '(#' lookahead1(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | if (l1 == 21) // S { shift(21); // S } parse_EQName(); lookahead1(10); // S | '#)' if (l1 == 21) // S { shift(21); // S lookahead1(0); // PragmaContents shift(1); // PragmaContents } lookahead1(5); // '#)' shift(30); // '#)' eventHandler.endNonterminal("Pragma", e0); } function try_Pragma() { shiftT(36); // '(#' lookahead1(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | if (l1 == 21) // S { shiftT(21); // S } try_EQName(); lookahead1(10); // S | '#)' if (l1 == 21) // S { shiftT(21); // S lookahead1(0); // PragmaContents shiftT(1); // PragmaContents } lookahead1(5); // '#)' shiftT(30); // '#)' } function parse_PathExpr() { eventHandler.startNonterminal("PathExpr", e0); switch (l1) { case 47: // '/' shift(47); // '/' lookahead1W(289); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | switch (l1) { case 25: // EOF case 26: // '!' case 27: // '!=' case 38: // ')' case 39: // '*' case 41: // '+' case 42: // ',' case 43: // '-' case 50: // ':' case 54: // ';' case 58: // '<<' case 59: // '<=' case 61: // '=' case 62: // '>' case 63: // '>=' case 64: // '>>' case 70: // ']' case 88: // 'by' case 100: // 'contains' case 209: // 'paragraphs' case 237: // 'sentences' case 252: // 'times' case 279: // 'words' case 284: // '|' case 285: // '||' case 286: // '|}' case 287: // '}' break; default: whitespace(); parse_RelativePathExpr(); } break; case 48: // '//' shift(48); // '//' lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_RelativePathExpr(); break; default: parse_RelativePathExpr(); } eventHandler.endNonterminal("PathExpr", e0); } function try_PathExpr() { switch (l1) { case 47: // '/' shiftT(47); // '/' lookahead1W(289); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | switch (l1) { case 25: // EOF case 26: // '!' case 27: // '!=' case 38: // ')' case 39: // '*' case 41: // '+' case 42: // ',' case 43: // '-' case 50: // ':' case 54: // ';' case 58: // '<<' case 59: // '<=' case 61: // '=' case 62: // '>' case 63: // '>=' case 64: // '>>' case 70: // ']' case 88: // 'by' case 100: // 'contains' case 209: // 'paragraphs' case 237: // 'sentences' case 252: // 'times' case 279: // 'words' case 284: // '|' case 285: // '||' case 286: // '|}' case 287: // '}' break; default: try_RelativePathExpr(); } break; case 48: // '//' shiftT(48); // '//' lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_RelativePathExpr(); break; default: try_RelativePathExpr(); } } function parse_RelativePathExpr() { eventHandler.startNonterminal("RelativePathExpr", e0); parse_PostfixExpr(); for (;;) { switch (l1) { case 26: // '!' lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | break; default: lk = l1; } if (lk != 25 // EOF && lk != 27 // '!=' && lk != 38 // ')' && lk != 39 // '*' && lk != 41 // '+' && lk != 42 // ',' && lk != 43 // '-' && lk != 47 // '/' && lk != 48 // '//' && lk != 50 // ':' && lk != 54 // ';' && lk != 55 // '<' && lk != 58 // '<<' && lk != 59 // '<=' && lk != 61 // '=' && lk != 62 // '>' && lk != 63 // '>=' && lk != 64 // '>>' && lk != 70 // ']' && lk != 71 // 'after' && lk != 76 // 'and' && lk != 80 // 'as' && lk != 81 // 'ascending' && lk != 82 // 'at' && lk != 85 // 'before' && lk != 88 // 'by' && lk != 89 // 'case' && lk != 90 // 'cast' && lk != 91 // 'castable' && lk != 95 // 'collation' && lk != 100 // 'contains' && lk != 106 // 'count' && lk != 110 // 'default' && lk != 114 // 'descending' && lk != 119 // 'div' && lk != 123 // 'else' && lk != 124 // 'empty' && lk != 127 // 'end' && lk != 129 // 'eq' && lk != 132 // 'except' && lk != 139 // 'for' && lk != 148 // 'ge' && lk != 150 // 'group' && lk != 152 // 'gt' && lk != 153 // 'idiv' && lk != 162 // 'instance' && lk != 164 // 'intersect' && lk != 165 // 'into' && lk != 166 // 'is' && lk != 175 // 'le' && lk != 177 // 'let' && lk != 181 // 'lt' && lk != 183 // 'mod' && lk != 184 // 'modify' && lk != 189 // 'ne' && lk != 202 // 'only' && lk != 204 // 'or' && lk != 205 // 'order' && lk != 209 // 'paragraphs' && lk != 224 // 'return' && lk != 228 // 'satisfies' && lk != 237 // 'sentences' && lk != 241 // 'stable' && lk != 242 // 'start' && lk != 252 // 'times' && lk != 253 // 'to' && lk != 254 // 'treat' && lk != 260 // 'union' && lk != 272 // 'where' && lk != 276 // 'with' && lk != 279 // 'words' && lk != 284 // '|' && lk != 285 // '||' && lk != 286 // '|}' && lk != 287 // '}' && lk != 2586 // '!' Wildcard && lk != 23578 // '!' '..' && lk != 24090 // '!' '/' && lk != 24602 // '!' '//' && lk != 34330) // '!' '@' { lk = memoized(3, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { switch (l1) { case 47: // '/' shiftT(47); // '/' break; case 48: // '//' shiftT(48); // '//' break; default: shiftT(26); // '!' } lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_StepExpr(); lk = -1; } catch (p1A) { lk = -2; } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(3, e0, lk); } } if (lk != -1 && lk != 47 // '/' && lk != 48 // '//' && lk != 2586 // '!' Wildcard && lk != 23578 // '!' '..' && lk != 34330) // '!' '@' { break; } switch (l1) { case 47: // '/' shift(47); // '/' break; case 48: // '//' shift(48); // '//' break; default: shift(26); // '!' } lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_StepExpr(); } eventHandler.endNonterminal("RelativePathExpr", e0); } function try_RelativePathExpr() { try_PostfixExpr(); for (;;) { switch (l1) { case 26: // '!' lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | break; default: lk = l1; } if (lk != 25 // EOF && lk != 27 // '!=' && lk != 38 // ')' && lk != 39 // '*' && lk != 41 // '+' && lk != 42 // ',' && lk != 43 // '-' && lk != 47 // '/' && lk != 48 // '//' && lk != 50 // ':' && lk != 54 // ';' && lk != 55 // '<' && lk != 58 // '<<' && lk != 59 // '<=' && lk != 61 // '=' && lk != 62 // '>' && lk != 63 // '>=' && lk != 64 // '>>' && lk != 70 // ']' && lk != 71 // 'after' && lk != 76 // 'and' && lk != 80 // 'as' && lk != 81 // 'ascending' && lk != 82 // 'at' && lk != 85 // 'before' && lk != 88 // 'by' && lk != 89 // 'case' && lk != 90 // 'cast' && lk != 91 // 'castable' && lk != 95 // 'collation' && lk != 100 // 'contains' && lk != 106 // 'count' && lk != 110 // 'default' && lk != 114 // 'descending' && lk != 119 // 'div' && lk != 123 // 'else' && lk != 124 // 'empty' && lk != 127 // 'end' && lk != 129 // 'eq' && lk != 132 // 'except' && lk != 139 // 'for' && lk != 148 // 'ge' && lk != 150 // 'group' && lk != 152 // 'gt' && lk != 153 // 'idiv' && lk != 162 // 'instance' && lk != 164 // 'intersect' && lk != 165 // 'into' && lk != 166 // 'is' && lk != 175 // 'le' && lk != 177 // 'let' && lk != 181 // 'lt' && lk != 183 // 'mod' && lk != 184 // 'modify' && lk != 189 // 'ne' && lk != 202 // 'only' && lk != 204 // 'or' && lk != 205 // 'order' && lk != 209 // 'paragraphs' && lk != 224 // 'return' && lk != 228 // 'satisfies' && lk != 237 // 'sentences' && lk != 241 // 'stable' && lk != 242 // 'start' && lk != 252 // 'times' && lk != 253 // 'to' && lk != 254 // 'treat' && lk != 260 // 'union' && lk != 272 // 'where' && lk != 276 // 'with' && lk != 279 // 'words' && lk != 284 // '|' && lk != 285 // '||' && lk != 286 // '|}' && lk != 287 // '}' && lk != 2586 // '!' Wildcard && lk != 23578 // '!' '..' && lk != 24090 // '!' '/' && lk != 24602 // '!' '//' && lk != 34330) // '!' '@' { lk = memoized(3, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { switch (l1) { case 47: // '/' shiftT(47); // '/' break; case 48: // '//' shiftT(48); // '//' break; default: shiftT(26); // '!' } lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_StepExpr(); memoize(3, e0A, -1); continue; } catch (p1A) { b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(3, e0A, -2); break; } } } if (lk != -1 && lk != 47 // '/' && lk != 48 // '//' && lk != 2586 // '!' Wildcard && lk != 23578 // '!' '..' && lk != 34330) // '!' '@' { break; } switch (l1) { case 47: // '/' shiftT(47); // '/' break; case 48: // '//' shiftT(48); // '//' break; default: shiftT(26); // '!' } lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_StepExpr(); } } function parse_StepExpr() { eventHandler.startNonterminal("StepExpr", e0); switch (l1) { case 83: // 'attribute' lookahead2W(288); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | break; case 122: // 'element' lookahead2W(287); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | break; case 187: // 'namespace' case 220: // 'processing-instruction' lookahead2W(285); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | break; case 135: // 'false' case 197: // 'null' case 255: // 'true' lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' | break; case 97: // 'comment' case 120: // 'document' case 206: // 'ordered' case 249: // 'text' case 262: // 'unordered' lookahead2W(239); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | break; case 79: // 'array' case 125: // 'empty-sequence' case 154: // 'if' case 167: // 'item' case 169: // 'json-item' case 247: // 'structured-item' case 248: // 'switch' case 259: // 'typeswitch' lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | break; case 74: // 'ancestor' case 75: // 'ancestor-or-self' case 94: // 'child' case 112: // 'descendant' case 113: // 'descendant-or-self' case 137: // 'following' case 138: // 'following-sibling' case 210: // 'parent' case 216: // 'preceding' case 217: // 'preceding-sibling' case 234: // 'self' lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | break; case 6: // EQName^Token case 71: // 'after' case 73: // 'allowing' case 76: // 'and' case 78: // 'append' case 80: // 'as' case 81: // 'ascending' case 82: // 'at' case 84: // 'base-uri' case 85: // 'before' case 86: // 'boundary-space' case 87: // 'break' case 89: // 'case' case 90: // 'cast' case 91: // 'castable' case 92: // 'catch' case 95: // 'collation' case 98: // 'constraint' case 99: // 'construction' case 102: // 'context' case 103: // 'continue' case 104: // 'copy' case 105: // 'copy-namespaces' case 106: // 'count' case 107: // 'decimal-format' case 109: // 'declare' case 110: // 'default' case 111: // 'delete' case 114: // 'descending' case 119: // 'div' case 121: // 'document-node' case 123: // 'else' case 124: // 'empty' case 126: // 'encoding' case 127: // 'end' case 129: // 'eq' case 130: // 'every' case 132: // 'except' case 133: // 'exit' case 134: // 'external' case 136: // 'first' case 139: // 'for' case 142: // 'from' case 143: // 'ft-option' case 147: // 'function' case 148: // 'ge' case 150: // 'group' case 152: // 'gt' case 153: // 'idiv' case 155: // 'import' case 156: // 'in' case 157: // 'index' case 161: // 'insert' case 162: // 'instance' case 163: // 'integrity' case 164: // 'intersect' case 165: // 'into' case 166: // 'is' case 168: // 'json' case 170: // 'jsoniq' case 173: // 'last' case 174: // 'lax' case 175: // 'le' case 177: // 'let' case 179: // 'loop' case 181: // 'lt' case 183: // 'mod' case 184: // 'modify' case 185: // 'module' case 188: // 'namespace-node' case 189: // 'ne' case 194: // 'node' case 195: // 'nodes' case 198: // 'object' case 202: // 'only' case 203: // 'option' case 204: // 'or' case 205: // 'order' case 207: // 'ordering' case 222: // 'rename' case 223: // 'replace' case 224: // 'return' case 225: // 'returning' case 226: // 'revalidation' case 228: // 'satisfies' case 229: // 'schema' case 230: // 'schema-attribute' case 231: // 'schema-element' case 232: // 'score' case 233: // 'select' case 239: // 'sliding' case 240: // 'some' case 241: // 'stable' case 242: // 'start' case 245: // 'strict' case 253: // 'to' case 254: // 'treat' case 256: // 'try' case 257: // 'tumbling' case 258: // 'type' case 260: // 'union' case 263: // 'updating' case 266: // 'validate' case 267: // 'value' case 268: // 'variable' case 269: // 'version' case 272: // 'where' case 273: // 'while' case 276: // 'with' lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | break; default: lk = l1; } if (lk == 12935 // 'false' EOF || lk == 12997 // 'null' EOF || lk == 13055 // 'true' EOF || lk == 13447 // 'false' '!' || lk == 13509 // 'null' '!' || lk == 13567 // 'true' '!' || lk == 13959 // 'false' '!=' || lk == 14021 // 'null' '!=' || lk == 14079 // 'true' '!=' || lk == 19591 // 'false' ')' || lk == 19653 // 'null' ')' || lk == 19711 // 'true' ')' || lk == 20103 // 'false' '*' || lk == 20165 // 'null' '*' || lk == 20223 // 'true' '*' || lk == 21127 // 'false' '+' || lk == 21189 // 'null' '+' || lk == 21247 // 'true' '+' || lk == 21639 // 'false' ',' || lk == 21701 // 'null' ',' || lk == 21759 // 'true' ',' || lk == 22151 // 'false' '-' || lk == 22213 // 'null' '-' || lk == 22271 // 'true' '-' || lk == 24199 // 'false' '/' || lk == 24261 // 'null' '/' || lk == 24319 // 'true' '/' || lk == 24711 // 'false' '//' || lk == 24773 // 'null' '//' || lk == 24831 // 'true' '//' || lk == 25735 // 'false' ':' || lk == 25797 // 'null' ':' || lk == 25855 // 'true' ':' || lk == 27783 // 'false' ';' || lk == 27845 // 'null' ';' || lk == 27903 // 'true' ';' || lk == 28295 // 'false' '<' || lk == 28357 // 'null' '<' || lk == 28415 // 'true' '<' || lk == 29831 // 'false' '<<' || lk == 29893 // 'null' '<<' || lk == 29951 // 'true' '<<' || lk == 30343 // 'false' '<=' || lk == 30405 // 'null' '<=' || lk == 30463 // 'true' '<=' || lk == 31367 // 'false' '=' || lk == 31429 // 'null' '=' || lk == 31487 // 'true' '=' || lk == 31879 // 'false' '>' || lk == 31941 // 'null' '>' || lk == 31999 // 'true' '>' || lk == 32391 // 'false' '>=' || lk == 32453 // 'null' '>=' || lk == 32511 // 'true' '>=' || lk == 32903 // 'false' '>>' || lk == 32965 // 'null' '>>' || lk == 33023 // 'true' '>>' || lk == 35463 // 'false' '[' || lk == 35525 // 'null' '[' || lk == 35583 // 'true' '[' || lk == 35975 // 'false' ']' || lk == 36037 // 'null' ']' || lk == 36095 // 'true' ']' || lk == 36435 // 'attribute' 'after' || lk == 36474 // 'element' 'after' || lk == 36487 // 'false' 'after' || lk == 36539 // 'namespace' 'after' || lk == 36549 // 'null' 'after' || lk == 36572 // 'processing-instruction' 'after' || lk == 36607 // 'true' 'after' || lk == 38995 // 'attribute' 'and' || lk == 39034 // 'element' 'and' || lk == 39047 // 'false' 'and' || lk == 39099 // 'namespace' 'and' || lk == 39109 // 'null' 'and' || lk == 39132 // 'processing-instruction' 'and' || lk == 39167 // 'true' 'and' || lk == 41043 // 'attribute' 'as' || lk == 41082 // 'element' 'as' || lk == 41095 // 'false' 'as' || lk == 41147 // 'namespace' 'as' || lk == 41157 // 'null' 'as' || lk == 41180 // 'processing-instruction' 'as' || lk == 41215 // 'true' 'as' || lk == 41555 // 'attribute' 'ascending' || lk == 41594 // 'element' 'ascending' || lk == 41607 // 'false' 'ascending' || lk == 41659 // 'namespace' 'ascending' || lk == 41669 // 'null' 'ascending' || lk == 41692 // 'processing-instruction' 'ascending' || lk == 41727 // 'true' 'ascending' || lk == 42067 // 'attribute' 'at' || lk == 42106 // 'element' 'at' || lk == 42119 // 'false' 'at' || lk == 42171 // 'namespace' 'at' || lk == 42181 // 'null' 'at' || lk == 42204 // 'processing-instruction' 'at' || lk == 42239 // 'true' 'at' || lk == 43603 // 'attribute' 'before' || lk == 43642 // 'element' 'before' || lk == 43655 // 'false' 'before' || lk == 43707 // 'namespace' 'before' || lk == 43717 // 'null' 'before' || lk == 43740 // 'processing-instruction' 'before' || lk == 43775 // 'true' 'before' || lk == 45191 // 'false' 'by' || lk == 45253 // 'null' 'by' || lk == 45311 // 'true' 'by' || lk == 45651 // 'attribute' 'case' || lk == 45690 // 'element' 'case' || lk == 45703 // 'false' 'case' || lk == 45755 // 'namespace' 'case' || lk == 45765 // 'null' 'case' || lk == 45788 // 'processing-instruction' 'case' || lk == 45823 // 'true' 'case' || lk == 46163 // 'attribute' 'cast' || lk == 46202 // 'element' 'cast' || lk == 46215 // 'false' 'cast' || lk == 46267 // 'namespace' 'cast' || lk == 46277 // 'null' 'cast' || lk == 46300 // 'processing-instruction' 'cast' || lk == 46335 // 'true' 'cast' || lk == 46675 // 'attribute' 'castable' || lk == 46714 // 'element' 'castable' || lk == 46727 // 'false' 'castable' || lk == 46779 // 'namespace' 'castable' || lk == 46789 // 'null' 'castable' || lk == 46812 // 'processing-instruction' 'castable' || lk == 46847 // 'true' 'castable' || lk == 48723 // 'attribute' 'collation' || lk == 48762 // 'element' 'collation' || lk == 48775 // 'false' 'collation' || lk == 48827 // 'namespace' 'collation' || lk == 48837 // 'null' 'collation' || lk == 48860 // 'processing-instruction' 'collation' || lk == 48895 // 'true' 'collation' || lk == 51335 // 'false' 'contains' || lk == 51397 // 'null' 'contains' || lk == 51455 // 'true' 'contains' || lk == 54355 // 'attribute' 'count' || lk == 54394 // 'element' 'count' || lk == 54407 // 'false' 'count' || lk == 54459 // 'namespace' 'count' || lk == 54469 // 'null' 'count' || lk == 54492 // 'processing-instruction' 'count' || lk == 54527 // 'true' 'count' || lk == 56403 // 'attribute' 'default' || lk == 56442 // 'element' 'default' || lk == 56455 // 'false' 'default' || lk == 56507 // 'namespace' 'default' || lk == 56517 // 'null' 'default' || lk == 56540 // 'processing-instruction' 'default' || lk == 56575 // 'true' 'default' || lk == 58451 // 'attribute' 'descending' || lk == 58490 // 'element' 'descending' || lk == 58503 // 'false' 'descending' || lk == 58555 // 'namespace' 'descending' || lk == 58565 // 'null' 'descending' || lk == 58588 // 'processing-instruction' 'descending' || lk == 58623 // 'true' 'descending' || lk == 61011 // 'attribute' 'div' || lk == 61050 // 'element' 'div' || lk == 61063 // 'false' 'div' || lk == 61115 // 'namespace' 'div' || lk == 61125 // 'null' 'div' || lk == 61148 // 'processing-instruction' 'div' || lk == 61183 // 'true' 'div' || lk == 63059 // 'attribute' 'else' || lk == 63098 // 'element' 'else' || lk == 63111 // 'false' 'else' || lk == 63163 // 'namespace' 'else' || lk == 63173 // 'null' 'else' || lk == 63196 // 'processing-instruction' 'else' || lk == 63231 // 'true' 'else' || lk == 63571 // 'attribute' 'empty' || lk == 63610 // 'element' 'empty' || lk == 63623 // 'false' 'empty' || lk == 63675 // 'namespace' 'empty' || lk == 63685 // 'null' 'empty' || lk == 63708 // 'processing-instruction' 'empty' || lk == 63743 // 'true' 'empty' || lk == 65107 // 'attribute' 'end' || lk == 65146 // 'element' 'end' || lk == 65159 // 'false' 'end' || lk == 65211 // 'namespace' 'end' || lk == 65221 // 'null' 'end' || lk == 65244 // 'processing-instruction' 'end' || lk == 65279 // 'true' 'end' || lk == 66131 // 'attribute' 'eq' || lk == 66170 // 'element' 'eq' || lk == 66183 // 'false' 'eq' || lk == 66235 // 'namespace' 'eq' || lk == 66245 // 'null' 'eq' || lk == 66268 // 'processing-instruction' 'eq' || lk == 66303 // 'true' 'eq' || lk == 67667 // 'attribute' 'except' || lk == 67706 // 'element' 'except' || lk == 67719 // 'false' 'except' || lk == 67771 // 'namespace' 'except' || lk == 67781 // 'null' 'except' || lk == 67804 // 'processing-instruction' 'except' || lk == 67839 // 'true' 'except' || lk == 71251 // 'attribute' 'for' || lk == 71290 // 'element' 'for' || lk == 71303 // 'false' 'for' || lk == 71355 // 'namespace' 'for' || lk == 71365 // 'null' 'for' || lk == 71388 // 'processing-instruction' 'for' || lk == 71423 // 'true' 'for' || lk == 75859 // 'attribute' 'ge' || lk == 75898 // 'element' 'ge' || lk == 75911 // 'false' 'ge' || lk == 75963 // 'namespace' 'ge' || lk == 75973 // 'null' 'ge' || lk == 75996 // 'processing-instruction' 'ge' || lk == 76031 // 'true' 'ge' || lk == 76883 // 'attribute' 'group' || lk == 76922 // 'element' 'group' || lk == 76935 // 'false' 'group' || lk == 76987 // 'namespace' 'group' || lk == 76997 // 'null' 'group' || lk == 77020 // 'processing-instruction' 'group' || lk == 77055 // 'true' 'group' || lk == 77907 // 'attribute' 'gt' || lk == 77946 // 'element' 'gt' || lk == 77959 // 'false' 'gt' || lk == 78011 // 'namespace' 'gt' || lk == 78021 // 'null' 'gt' || lk == 78044 // 'processing-instruction' 'gt' || lk == 78079 // 'true' 'gt' || lk == 78419 // 'attribute' 'idiv' || lk == 78458 // 'element' 'idiv' || lk == 78471 // 'false' 'idiv' || lk == 78523 // 'namespace' 'idiv' || lk == 78533 // 'null' 'idiv' || lk == 78556 // 'processing-instruction' 'idiv' || lk == 78591 // 'true' 'idiv' || lk == 83027 // 'attribute' 'instance' || lk == 83066 // 'element' 'instance' || lk == 83079 // 'false' 'instance' || lk == 83131 // 'namespace' 'instance' || lk == 83141 // 'null' 'instance' || lk == 83164 // 'processing-instruction' 'instance' || lk == 83199 // 'true' 'instance' || lk == 84051 // 'attribute' 'intersect' || lk == 84090 // 'element' 'intersect' || lk == 84103 // 'false' 'intersect' || lk == 84155 // 'namespace' 'intersect' || lk == 84165 // 'null' 'intersect' || lk == 84188 // 'processing-instruction' 'intersect' || lk == 84223 // 'true' 'intersect' || lk == 84563 // 'attribute' 'into' || lk == 84602 // 'element' 'into' || lk == 84615 // 'false' 'into' || lk == 84667 // 'namespace' 'into' || lk == 84677 // 'null' 'into' || lk == 84700 // 'processing-instruction' 'into' || lk == 84735 // 'true' 'into' || lk == 85075 // 'attribute' 'is' || lk == 85114 // 'element' 'is' || lk == 85127 // 'false' 'is' || lk == 85179 // 'namespace' 'is' || lk == 85189 // 'null' 'is' || lk == 85212 // 'processing-instruction' 'is' || lk == 85247 // 'true' 'is' || lk == 89683 // 'attribute' 'le' || lk == 89722 // 'element' 'le' || lk == 89735 // 'false' 'le' || lk == 89787 // 'namespace' 'le' || lk == 89797 // 'null' 'le' || lk == 89820 // 'processing-instruction' 'le' || lk == 89855 // 'true' 'le' || lk == 90707 // 'attribute' 'let' || lk == 90746 // 'element' 'let' || lk == 90759 // 'false' 'let' || lk == 90811 // 'namespace' 'let' || lk == 90821 // 'null' 'let' || lk == 90844 // 'processing-instruction' 'let' || lk == 90879 // 'true' 'let' || lk == 92755 // 'attribute' 'lt' || lk == 92794 // 'element' 'lt' || lk == 92807 // 'false' 'lt' || lk == 92859 // 'namespace' 'lt' || lk == 92869 // 'null' 'lt' || lk == 92892 // 'processing-instruction' 'lt' || lk == 92927 // 'true' 'lt' || lk == 93779 // 'attribute' 'mod' || lk == 93818 // 'element' 'mod' || lk == 93831 // 'false' 'mod' || lk == 93883 // 'namespace' 'mod' || lk == 93893 // 'null' 'mod' || lk == 93916 // 'processing-instruction' 'mod' || lk == 93951 // 'true' 'mod' || lk == 94291 // 'attribute' 'modify' || lk == 94330 // 'element' 'modify' || lk == 94343 // 'false' 'modify' || lk == 94395 // 'namespace' 'modify' || lk == 94405 // 'null' 'modify' || lk == 94428 // 'processing-instruction' 'modify' || lk == 94463 // 'true' 'modify' || lk == 96851 // 'attribute' 'ne' || lk == 96890 // 'element' 'ne' || lk == 96903 // 'false' 'ne' || lk == 96955 // 'namespace' 'ne' || lk == 96965 // 'null' 'ne' || lk == 96988 // 'processing-instruction' 'ne' || lk == 97023 // 'true' 'ne' || lk == 103507 // 'attribute' 'only' || lk == 103546 // 'element' 'only' || lk == 103559 // 'false' 'only' || lk == 103611 // 'namespace' 'only' || lk == 103621 // 'null' 'only' || lk == 103644 // 'processing-instruction' 'only' || lk == 103679 // 'true' 'only' || lk == 104531 // 'attribute' 'or' || lk == 104570 // 'element' 'or' || lk == 104583 // 'false' 'or' || lk == 104635 // 'namespace' 'or' || lk == 104645 // 'null' 'or' || lk == 104668 // 'processing-instruction' 'or' || lk == 104703 // 'true' 'or' || lk == 105043 // 'attribute' 'order' || lk == 105082 // 'element' 'order' || lk == 105095 // 'false' 'order' || lk == 105147 // 'namespace' 'order' || lk == 105157 // 'null' 'order' || lk == 105180 // 'processing-instruction' 'order' || lk == 105215 // 'true' 'order' || lk == 107143 // 'false' 'paragraphs' || lk == 107205 // 'null' 'paragraphs' || lk == 107263 // 'true' 'paragraphs' || lk == 114771 // 'attribute' 'return' || lk == 114810 // 'element' 'return' || lk == 114823 // 'false' 'return' || lk == 114875 // 'namespace' 'return' || lk == 114885 // 'null' 'return' || lk == 114908 // 'processing-instruction' 'return' || lk == 114943 // 'true' 'return' || lk == 116819 // 'attribute' 'satisfies' || lk == 116858 // 'element' 'satisfies' || lk == 116871 // 'false' 'satisfies' || lk == 116923 // 'namespace' 'satisfies' || lk == 116933 // 'null' 'satisfies' || lk == 116956 // 'processing-instruction' 'satisfies' || lk == 116991 // 'true' 'satisfies' || lk == 121479 // 'false' 'sentences' || lk == 121541 // 'null' 'sentences' || lk == 121599 // 'true' 'sentences' || lk == 123475 // 'attribute' 'stable' || lk == 123514 // 'element' 'stable' || lk == 123527 // 'false' 'stable' || lk == 123579 // 'namespace' 'stable' || lk == 123589 // 'null' 'stable' || lk == 123612 // 'processing-instruction' 'stable' || lk == 123647 // 'true' 'stable' || lk == 123987 // 'attribute' 'start' || lk == 124026 // 'element' 'start' || lk == 124039 // 'false' 'start' || lk == 124091 // 'namespace' 'start' || lk == 124101 // 'null' 'start' || lk == 124124 // 'processing-instruction' 'start' || lk == 124159 // 'true' 'start' || lk == 129159 // 'false' 'times' || lk == 129221 // 'null' 'times' || lk == 129279 // 'true' 'times' || lk == 129619 // 'attribute' 'to' || lk == 129658 // 'element' 'to' || lk == 129671 // 'false' 'to' || lk == 129723 // 'namespace' 'to' || lk == 129733 // 'null' 'to' || lk == 129756 // 'processing-instruction' 'to' || lk == 129791 // 'true' 'to' || lk == 130131 // 'attribute' 'treat' || lk == 130170 // 'element' 'treat' || lk == 130183 // 'false' 'treat' || lk == 130235 // 'namespace' 'treat' || lk == 130245 // 'null' 'treat' || lk == 130268 // 'processing-instruction' 'treat' || lk == 130303 // 'true' 'treat' || lk == 133203 // 'attribute' 'union' || lk == 133242 // 'element' 'union' || lk == 133255 // 'false' 'union' || lk == 133307 // 'namespace' 'union' || lk == 133317 // 'null' 'union' || lk == 133340 // 'processing-instruction' 'union' || lk == 133375 // 'true' 'union' || lk == 139347 // 'attribute' 'where' || lk == 139386 // 'element' 'where' || lk == 139399 // 'false' 'where' || lk == 139451 // 'namespace' 'where' || lk == 139461 // 'null' 'where' || lk == 139484 // 'processing-instruction' 'where' || lk == 139519 // 'true' 'where' || lk == 141395 // 'attribute' 'with' || lk == 141434 // 'element' 'with' || lk == 141447 // 'false' 'with' || lk == 141499 // 'namespace' 'with' || lk == 141509 // 'null' 'with' || lk == 141532 // 'processing-instruction' 'with' || lk == 141567 // 'true' 'with' || lk == 142983 // 'false' 'words' || lk == 143045 // 'null' 'words' || lk == 143103 // 'true' 'words' || lk == 145543 // 'false' '|' || lk == 145605 // 'null' '|' || lk == 145663 // 'true' '|' || lk == 146055 // 'false' '||' || lk == 146117 // 'null' '||' || lk == 146175 // 'true' '||' || lk == 146567 // 'false' '|}' || lk == 146629 // 'null' '|}' || lk == 146687 // 'true' '|}' || lk == 147079 // 'false' '}' || lk == 147141 // 'null' '}' || lk == 147199) // 'true' '}' { lk = memoized(4, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_PostfixExpr(); lk = -1; } catch (p1A) { lk = -2; } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(4, e0, lk); } } switch (lk) { case -1: case 8: // IntegerLiteral case 9: // DecimalLiteral case 10: // DoubleLiteral case 11: // StringLiteral case 31: // '$' case 32: // '$$' case 33: // '%' case 35: // '(' case 55: // '<' case 56: // '' shift(44); // '-->' eventHandler.endNonterminal("DirCommentConstructor", e0); } function try_DirCommentConstructor() { shiftT(56); // '' shiftT(44); // '-->' } function parse_DirPIConstructor() { eventHandler.startNonterminal("DirPIConstructor", e0); shift(60); // '' if (l1 == 21) // S { shift(21); // S lookahead1(2); // DirPIContents shift(3); // DirPIContents } lookahead1(9); // '?>' shift(66); // '?>' eventHandler.endNonterminal("DirPIConstructor", e0); } function try_DirPIConstructor() { shiftT(60); // '' if (l1 == 21) // S { shiftT(21); // S lookahead1(2); // DirPIContents shiftT(3); // DirPIContents } lookahead1(9); // '?>' shiftT(66); // '?>' } function parse_ComputedConstructor() { eventHandler.startNonterminal("ComputedConstructor", e0); switch (l1) { case 120: // 'document' parse_CompDocConstructor(); break; case 122: // 'element' parse_CompElemConstructor(); break; case 83: // 'attribute' parse_CompAttrConstructor(); break; case 187: // 'namespace' parse_CompNamespaceConstructor(); break; case 249: // 'text' parse_CompTextConstructor(); break; case 97: // 'comment' parse_CompCommentConstructor(); break; default: parse_CompPIConstructor(); } eventHandler.endNonterminal("ComputedConstructor", e0); } function try_ComputedConstructor() { switch (l1) { case 120: // 'document' try_CompDocConstructor(); break; case 122: // 'element' try_CompElemConstructor(); break; case 83: // 'attribute' try_CompAttrConstructor(); break; case 187: // 'namespace' try_CompNamespaceConstructor(); break; case 249: // 'text' try_CompTextConstructor(); break; case 97: // 'comment' try_CompCommentConstructor(); break; default: try_CompPIConstructor(); } } function parse_CompElemConstructor() { eventHandler.startNonterminal("CompElemConstructor", e0); shift(122); // 'element' lookahead1W(250); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 281: // '{' shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(287); // '}' break; default: whitespace(); parse_EQName(); } lookahead1W(90); // S^WS | '(:' | '{' shift(281); // '{' lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | if (l1 != 287) // '}' { whitespace(); parse_ContentExpr(); } shift(287); // '}' eventHandler.endNonterminal("CompElemConstructor", e0); } function try_CompElemConstructor() { shiftT(122); // 'element' lookahead1W(250); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 281: // '{' shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(287); // '}' break; default: try_EQName(); } lookahead1W(90); // S^WS | '(:' | '{' shiftT(281); // '{' lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | if (l1 != 287) // '}' { try_ContentExpr(); } shiftT(287); // '}' } function parse_CompNamespaceConstructor() { eventHandler.startNonterminal("CompNamespaceConstructor", e0); shift(187); // 'namespace' lookahead1W(242); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 281: // '{' shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_PrefixExpr(); shift(287); // '}' break; default: whitespace(); parse_Prefix(); } lookahead1W(90); // S^WS | '(:' | '{' shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_URIExpr(); shift(287); // '}' eventHandler.endNonterminal("CompNamespaceConstructor", e0); } function try_CompNamespaceConstructor() { shiftT(187); // 'namespace' lookahead1W(242); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 281: // '{' shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_PrefixExpr(); shiftT(287); // '}' break; default: try_Prefix(); } lookahead1W(90); // S^WS | '(:' | '{' shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_URIExpr(); shiftT(287); // '}' } function parse_Prefix() { eventHandler.startNonterminal("Prefix", e0); parse_NCName(); eventHandler.endNonterminal("Prefix", e0); } function try_Prefix() { try_NCName(); } function parse_PrefixExpr() { eventHandler.startNonterminal("PrefixExpr", e0); parse_Expr(); eventHandler.endNonterminal("PrefixExpr", e0); } function try_PrefixExpr() { try_Expr(); } function parse_URIExpr() { eventHandler.startNonterminal("URIExpr", e0); parse_Expr(); eventHandler.endNonterminal("URIExpr", e0); } function try_URIExpr() { try_Expr(); } function parse_FunctionItemExpr() { eventHandler.startNonterminal("FunctionItemExpr", e0); switch (l1) { case 147: // 'function' lookahead2W(95); // S^WS | '#' | '(' | '(:' break; default: lk = l1; } switch (lk) { case 33: // '%' case 18067: // 'function' '(' parse_InlineFunctionExpr(); break; default: parse_NamedFunctionRef(); } eventHandler.endNonterminal("FunctionItemExpr", e0); } function try_FunctionItemExpr() { switch (l1) { case 147: // 'function' lookahead2W(95); // S^WS | '#' | '(' | '(:' break; default: lk = l1; } switch (lk) { case 33: // '%' case 18067: // 'function' '(' try_InlineFunctionExpr(); break; default: try_NamedFunctionRef(); } } function parse_NamedFunctionRef() { eventHandler.startNonterminal("NamedFunctionRef", e0); parse_EQName(); lookahead1W(20); // S^WS | '#' | '(:' shift(29); // '#' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral eventHandler.endNonterminal("NamedFunctionRef", e0); } function try_NamedFunctionRef() { try_EQName(); lookahead1W(20); // S^WS | '#' | '(:' shiftT(29); // '#' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral } function parse_InlineFunctionExpr() { eventHandler.startNonterminal("InlineFunctionExpr", e0); for (;;) { lookahead1W(101); // S^WS | '%' | '(:' | 'function' if (l1 != 33) // '%' { break; } whitespace(); parse_Annotation(); } shift(147); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(98); // S^WS | '$' | '(:' | ')' if (l1 == 31) // '$' { whitespace(); parse_ParamList(); } shift(38); // ')' lookahead1W(115); // S^WS | '(:' | 'as' | '{' if (l1 == 80) // 'as' { shift(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } lookahead1W(90); // S^WS | '(:' | '{' whitespace(); parse_FunctionBody(); eventHandler.endNonterminal("InlineFunctionExpr", e0); } function try_InlineFunctionExpr() { for (;;) { lookahead1W(101); // S^WS | '%' | '(:' | 'function' if (l1 != 33) // '%' { break; } try_Annotation(); } shiftT(147); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(98); // S^WS | '$' | '(:' | ')' if (l1 == 31) // '$' { try_ParamList(); } shiftT(38); // ')' lookahead1W(115); // S^WS | '(:' | 'as' | '{' if (l1 == 80) // 'as' { shiftT(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } lookahead1W(90); // S^WS | '(:' | '{' try_FunctionBody(); } function parse_SingleType() { eventHandler.startNonterminal("SingleType", e0); parse_SimpleTypeName(); lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 65) // '?' { shift(65); // '?' } eventHandler.endNonterminal("SingleType", e0); } function try_SingleType() { try_SimpleTypeName(); lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 65) // '?' { shiftT(65); // '?' } } function parse_TypeDeclaration() { eventHandler.startNonterminal("TypeDeclaration", e0); shift(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); eventHandler.endNonterminal("TypeDeclaration", e0); } function try_TypeDeclaration() { shiftT(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } function parse_SequenceType() { eventHandler.startNonterminal("SequenceType", e0); switch (l1) { case 35: // '(' lookahead2W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' | break; case 125: // 'empty-sequence' lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } switch (lk) { case 18045: // 'empty-sequence' '(' case 19491: // '(' ')' if (l1 == 125) // 'empty-sequence' { shift(125); // 'empty-sequence' } lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' break; default: parse_ItemType(); lookahead1W(229); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' | switch (l1) { case 40: // '*' case 41: // '+' case 65: // '?' whitespace(); parse_OccurrenceIndicator(); break; default: break; } } eventHandler.endNonterminal("SequenceType", e0); } function try_SequenceType() { switch (l1) { case 35: // '(' lookahead2W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' | break; case 125: // 'empty-sequence' lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } switch (lk) { case 18045: // 'empty-sequence' '(' case 19491: // '(' ')' if (l1 == 125) // 'empty-sequence' { shiftT(125); // 'empty-sequence' } lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' break; default: try_ItemType(); lookahead1W(229); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' | switch (l1) { case 40: // '*' case 41: // '+' case 65: // '?' try_OccurrenceIndicator(); break; default: break; } } } function parse_OccurrenceIndicator() { eventHandler.startNonterminal("OccurrenceIndicator", e0); switch (l1) { case 65: // '?' shift(65); // '?' break; case 40: // '*' shift(40); // '*' break; default: shift(41); // '+' } eventHandler.endNonterminal("OccurrenceIndicator", e0); } function try_OccurrenceIndicator() { switch (l1) { case 65: // '?' shiftT(65); // '?' break; case 40: // '*' shiftT(40); // '*' break; default: shiftT(41); // '+' } } function parse_ItemType() { eventHandler.startNonterminal("ItemType", e0); switch (l1) { case 79: // 'array' case 83: // 'attribute' case 97: // 'comment' case 121: // 'document-node' case 122: // 'element' case 147: // 'function' case 167: // 'item' case 169: // 'json-item' case 188: // 'namespace-node' case 194: // 'node' case 198: // 'object' case 220: // 'processing-instruction' case 230: // 'schema-attribute' case 231: // 'schema-element' case 247: // 'structured-item' case 249: // 'text' lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } if (lk == 12879 // 'array' EOF || lk == 12969 // 'json-item' EOF || lk == 12998 // 'object' EOF || lk == 13047 // 'structured-item' EOF || lk == 13903 // 'array' '!=' || lk == 13993 // 'json-item' '!=' || lk == 14022 // 'object' '!=' || lk == 14071 // 'structured-item' '!=' || lk == 19535 // 'array' ')' || lk == 19625 // 'json-item' ')' || lk == 19654 // 'object' ')' || lk == 19703 // 'structured-item' ')' || lk == 20047 // 'array' '*' || lk == 20137 // 'json-item' '*' || lk == 20166 // 'object' '*' || lk == 20215 // 'structured-item' '*' || lk == 20559 // 'array' '*' || lk == 20649 // 'json-item' '*' || lk == 20678 // 'object' '*' || lk == 20727 // 'structured-item' '*' || lk == 21071 // 'array' '+' || lk == 21161 // 'json-item' '+' || lk == 21190 // 'object' '+' || lk == 21239 // 'structured-item' '+' || lk == 21583 // 'array' ',' || lk == 21673 // 'json-item' ',' || lk == 21702 // 'object' ',' || lk == 21751 // 'structured-item' ',' || lk == 22095 // 'array' '-' || lk == 22185 // 'json-item' '-' || lk == 22214 // 'object' '-' || lk == 22263 // 'structured-item' '-' || lk == 25679 // 'array' ':' || lk == 25769 // 'json-item' ':' || lk == 25798 // 'object' ':' || lk == 25847 // 'structured-item' ':' || lk == 27215 // 'array' ':=' || lk == 27305 // 'json-item' ':=' || lk == 27334 // 'object' ':=' || lk == 27383 // 'structured-item' ':=' || lk == 27727 // 'array' ';' || lk == 27817 // 'json-item' ';' || lk == 27846 // 'object' ';' || lk == 27895 // 'structured-item' ';' || lk == 28239 // 'array' '<' || lk == 28329 // 'json-item' '<' || lk == 28358 // 'object' '<' || lk == 28407 // 'structured-item' '<' || lk == 29775 // 'array' '<<' || lk == 29865 // 'json-item' '<<' || lk == 29894 // 'object' '<<' || lk == 29943 // 'structured-item' '<<' || lk == 30287 // 'array' '<=' || lk == 30377 // 'json-item' '<=' || lk == 30406 // 'object' '<=' || lk == 30455 // 'structured-item' '<=' || lk == 31311 // 'array' '=' || lk == 31401 // 'json-item' '=' || lk == 31430 // 'object' '=' || lk == 31479 // 'structured-item' '=' || lk == 31823 // 'array' '>' || lk == 31913 // 'json-item' '>' || lk == 31942 // 'object' '>' || lk == 31991 // 'structured-item' '>' || lk == 32335 // 'array' '>=' || lk == 32425 // 'json-item' '>=' || lk == 32454 // 'object' '>=' || lk == 32503 // 'structured-item' '>=' || lk == 32847 // 'array' '>>' || lk == 32937 // 'json-item' '>>' || lk == 32966 // 'object' '>>' || lk == 33015 // 'structured-item' '>>' || lk == 33359 // 'array' '?' || lk == 33449 // 'json-item' '?' || lk == 33478 // 'object' '?' || lk == 33527 // 'structured-item' '?' || lk == 35919 // 'array' ']' || lk == 36009 // 'json-item' ']' || lk == 36038 // 'object' ']' || lk == 36087 // 'structured-item' ']' || lk == 36431 // 'array' 'after' || lk == 36521 // 'json-item' 'after' || lk == 36550 // 'object' 'after' || lk == 36599 // 'structured-item' 'after' || lk == 37455 // 'array' 'allowing' || lk == 37545 // 'json-item' 'allowing' || lk == 37574 // 'object' 'allowing' || lk == 37623 // 'structured-item' 'allowing' || lk == 38991 // 'array' 'and' || lk == 39081 // 'json-item' 'and' || lk == 39110 // 'object' 'and' || lk == 39159 // 'structured-item' 'and' || lk == 41039 // 'array' 'as' || lk == 41129 // 'json-item' 'as' || lk == 41158 // 'object' 'as' || lk == 41207 // 'structured-item' 'as' || lk == 41551 // 'array' 'ascending' || lk == 41641 // 'json-item' 'ascending' || lk == 41670 // 'object' 'ascending' || lk == 41719 // 'structured-item' 'ascending' || lk == 42063 // 'array' 'at' || lk == 42153 // 'json-item' 'at' || lk == 42182 // 'object' 'at' || lk == 42231 // 'structured-item' 'at' || lk == 43599 // 'array' 'before' || lk == 43689 // 'json-item' 'before' || lk == 43718 // 'object' 'before' || lk == 43767 // 'structured-item' 'before' || lk == 45647 // 'array' 'case' || lk == 45737 // 'json-item' 'case' || lk == 45766 // 'object' 'case' || lk == 45815 // 'structured-item' 'case' || lk == 48719 // 'array' 'collation' || lk == 48809 // 'json-item' 'collation' || lk == 48838 // 'object' 'collation' || lk == 48887 // 'structured-item' 'collation' || lk == 51279 // 'array' 'contains' || lk == 51369 // 'json-item' 'contains' || lk == 51398 // 'object' 'contains' || lk == 51447 // 'structured-item' 'contains' || lk == 54351 // 'array' 'count' || lk == 54441 // 'json-item' 'count' || lk == 54470 // 'object' 'count' || lk == 54519 // 'structured-item' 'count' || lk == 56399 // 'array' 'default' || lk == 56489 // 'json-item' 'default' || lk == 56518 // 'object' 'default' || lk == 56567 // 'structured-item' 'default' || lk == 58447 // 'array' 'descending' || lk == 58537 // 'json-item' 'descending' || lk == 58566 // 'object' 'descending' || lk == 58615 // 'structured-item' 'descending' || lk == 61007 // 'array' 'div' || lk == 61097 // 'json-item' 'div' || lk == 61126 // 'object' 'div' || lk == 61175 // 'structured-item' 'div' || lk == 63055 // 'array' 'else' || lk == 63145 // 'json-item' 'else' || lk == 63174 // 'object' 'else' || lk == 63223 // 'structured-item' 'else' || lk == 63567 // 'array' 'empty' || lk == 63657 // 'json-item' 'empty' || lk == 63686 // 'object' 'empty' || lk == 63735 // 'structured-item' 'empty' || lk == 65103 // 'array' 'end' || lk == 65193 // 'json-item' 'end' || lk == 65222 // 'object' 'end' || lk == 65271 // 'structured-item' 'end' || lk == 66127 // 'array' 'eq' || lk == 66217 // 'json-item' 'eq' || lk == 66246 // 'object' 'eq' || lk == 66295 // 'structured-item' 'eq' || lk == 67663 // 'array' 'except' || lk == 67753 // 'json-item' 'except' || lk == 67782 // 'object' 'except' || lk == 67831 // 'structured-item' 'except' || lk == 68687 // 'array' 'external' || lk == 68777 // 'json-item' 'external' || lk == 68806 // 'object' 'external' || lk == 68855 // 'structured-item' 'external' || lk == 71247 // 'array' 'for' || lk == 71337 // 'json-item' 'for' || lk == 71366 // 'object' 'for' || lk == 71415 // 'structured-item' 'for' || lk == 75855 // 'array' 'ge' || lk == 75945 // 'json-item' 'ge' || lk == 75974 // 'object' 'ge' || lk == 76023 // 'structured-item' 'ge' || lk == 76879 // 'array' 'group' || lk == 76969 // 'json-item' 'group' || lk == 76998 // 'object' 'group' || lk == 77047 // 'structured-item' 'group' || lk == 77903 // 'array' 'gt' || lk == 77993 // 'json-item' 'gt' || lk == 78022 // 'object' 'gt' || lk == 78071 // 'structured-item' 'gt' || lk == 78415 // 'array' 'idiv' || lk == 78505 // 'json-item' 'idiv' || lk == 78534 // 'object' 'idiv' || lk == 78583 // 'structured-item' 'idiv' || lk == 79951 // 'array' 'in' || lk == 80041 // 'json-item' 'in' || lk == 80070 // 'object' 'in' || lk == 80119 // 'structured-item' 'in' || lk == 83023 // 'array' 'instance' || lk == 83113 // 'json-item' 'instance' || lk == 83142 // 'object' 'instance' || lk == 83191 // 'structured-item' 'instance' || lk == 84047 // 'array' 'intersect' || lk == 84137 // 'json-item' 'intersect' || lk == 84166 // 'object' 'intersect' || lk == 84215 // 'structured-item' 'intersect' || lk == 84559 // 'array' 'into' || lk == 84649 // 'json-item' 'into' || lk == 84678 // 'object' 'into' || lk == 84727 // 'structured-item' 'into' || lk == 85071 // 'array' 'is' || lk == 85161 // 'json-item' 'is' || lk == 85190 // 'object' 'is' || lk == 85239 // 'structured-item' 'is' || lk == 89679 // 'array' 'le' || lk == 89769 // 'json-item' 'le' || lk == 89798 // 'object' 'le' || lk == 89847 // 'structured-item' 'le' || lk == 90703 // 'array' 'let' || lk == 90793 // 'json-item' 'let' || lk == 90822 // 'object' 'let' || lk == 90871 // 'structured-item' 'let' || lk == 92751 // 'array' 'lt' || lk == 92841 // 'json-item' 'lt' || lk == 92870 // 'object' 'lt' || lk == 92919 // 'structured-item' 'lt' || lk == 93775 // 'array' 'mod' || lk == 93865 // 'json-item' 'mod' || lk == 93894 // 'object' 'mod' || lk == 93943 // 'structured-item' 'mod' || lk == 94287 // 'array' 'modify' || lk == 94377 // 'json-item' 'modify' || lk == 94406 // 'object' 'modify' || lk == 94455 // 'structured-item' 'modify' || lk == 96847 // 'array' 'ne' || lk == 96937 // 'json-item' 'ne' || lk == 96966 // 'object' 'ne' || lk == 97015 // 'structured-item' 'ne' || lk == 103503 // 'array' 'only' || lk == 103593 // 'json-item' 'only' || lk == 103622 // 'object' 'only' || lk == 103671 // 'structured-item' 'only' || lk == 104527 // 'array' 'or' || lk == 104617 // 'json-item' 'or' || lk == 104646 // 'object' 'or' || lk == 104695 // 'structured-item' 'or' || lk == 105039 // 'array' 'order' || lk == 105129 // 'json-item' 'order' || lk == 105158 // 'object' 'order' || lk == 105207 // 'structured-item' 'order' || lk == 107087 // 'array' 'paragraphs' || lk == 107177 // 'json-item' 'paragraphs' || lk == 107206 // 'object' 'paragraphs' || lk == 107255 // 'structured-item' 'paragraphs' || lk == 114767 // 'array' 'return' || lk == 114857 // 'json-item' 'return' || lk == 114886 // 'object' 'return' || lk == 114935 // 'structured-item' 'return' || lk == 116815 // 'array' 'satisfies' || lk == 116905 // 'json-item' 'satisfies' || lk == 116934 // 'object' 'satisfies' || lk == 116983 // 'structured-item' 'satisfies' || lk == 118863 // 'array' 'score' || lk == 118953 // 'json-item' 'score' || lk == 118982 // 'object' 'score' || lk == 119031 // 'structured-item' 'score' || lk == 121423 // 'array' 'sentences' || lk == 121513 // 'json-item' 'sentences' || lk == 121542 // 'object' 'sentences' || lk == 121591 // 'structured-item' 'sentences' || lk == 123471 // 'array' 'stable' || lk == 123561 // 'json-item' 'stable' || lk == 123590 // 'object' 'stable' || lk == 123639 // 'structured-item' 'stable' || lk == 123983 // 'array' 'start' || lk == 124073 // 'json-item' 'start' || lk == 124102 // 'object' 'start' || lk == 124151 // 'structured-item' 'start' || lk == 129103 // 'array' 'times' || lk == 129193 // 'json-item' 'times' || lk == 129222 // 'object' 'times' || lk == 129271 // 'structured-item' 'times' || lk == 129615 // 'array' 'to' || lk == 129705 // 'json-item' 'to' || lk == 129734 // 'object' 'to' || lk == 129783 // 'structured-item' 'to' || lk == 133199 // 'array' 'union' || lk == 133289 // 'json-item' 'union' || lk == 133318 // 'object' 'union' || lk == 133367 // 'structured-item' 'union' || lk == 139343 // 'array' 'where' || lk == 139433 // 'json-item' 'where' || lk == 139462 // 'object' 'where' || lk == 139511 // 'structured-item' 'where' || lk == 141391 // 'array' 'with' || lk == 141481 // 'json-item' 'with' || lk == 141510 // 'object' 'with' || lk == 141559 // 'structured-item' 'with' || lk == 142927 // 'array' 'words' || lk == 143017 // 'json-item' 'words' || lk == 143046 // 'object' 'words' || lk == 143095 // 'structured-item' 'words' || lk == 143951 // 'array' '{' || lk == 144041 // 'json-item' '{' || lk == 144070 // 'object' '{' || lk == 144119 // 'structured-item' '{' || lk == 145487 // 'array' '|' || lk == 145577 // 'json-item' '|' || lk == 145606 // 'object' '|' || lk == 145655 // 'structured-item' '|' || lk == 145999 // 'array' '||' || lk == 146089 // 'json-item' '||' || lk == 146118 // 'object' '||' || lk == 146167 // 'structured-item' '||' || lk == 146511 // 'array' '|}' || lk == 146601 // 'json-item' '|}' || lk == 146630 // 'object' '|}' || lk == 146679 // 'structured-item' '|}' || lk == 147023 // 'array' '}' || lk == 147113 // 'json-item' '}' || lk == 147142 // 'object' '}' || lk == 147191) // 'structured-item' '}' { lk = memoized(6, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_AtomicOrUnionType(); lk = -4; } catch (p4A) { try { b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} try_JSONTest(); lk = -6; } catch (p6A) { lk = -7; } } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(6, e0, lk); } } switch (lk) { case 18003: // 'attribute' '(' case 18017: // 'comment' '(' case 18041: // 'document-node' '(' case 18042: // 'element' '(' case 18108: // 'namespace-node' '(' case 18114: // 'node' '(' case 18140: // 'processing-instruction' '(' case 18150: // 'schema-attribute' '(' case 18151: // 'schema-element' '(' case 18169: // 'text' '(' parse_KindTest(); break; case 18087: // 'item' '(' shift(167); // 'item' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' break; case 33: // '%' case 18067: // 'function' '(' parse_FunctionTest(); break; case 35: // '(' parse_ParenthesizedItemType(); break; case -6: case 17999: // 'array' '(' case 18089: // 'json-item' '(' case 18118: // 'object' '(' parse_JSONTest(); break; case -7: case 18167: // 'structured-item' '(' parse_StructuredItemTest(); break; default: parse_AtomicOrUnionType(); } eventHandler.endNonterminal("ItemType", e0); } function try_ItemType() { switch (l1) { case 79: // 'array' case 83: // 'attribute' case 97: // 'comment' case 121: // 'document-node' case 122: // 'element' case 147: // 'function' case 167: // 'item' case 169: // 'json-item' case 188: // 'namespace-node' case 194: // 'node' case 198: // 'object' case 220: // 'processing-instruction' case 230: // 'schema-attribute' case 231: // 'schema-element' case 247: // 'structured-item' case 249: // 'text' lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } if (lk == 12879 // 'array' EOF || lk == 12969 // 'json-item' EOF || lk == 12998 // 'object' EOF || lk == 13047 // 'structured-item' EOF || lk == 13903 // 'array' '!=' || lk == 13993 // 'json-item' '!=' || lk == 14022 // 'object' '!=' || lk == 14071 // 'structured-item' '!=' || lk == 19535 // 'array' ')' || lk == 19625 // 'json-item' ')' || lk == 19654 // 'object' ')' || lk == 19703 // 'structured-item' ')' || lk == 20047 // 'array' '*' || lk == 20137 // 'json-item' '*' || lk == 20166 // 'object' '*' || lk == 20215 // 'structured-item' '*' || lk == 20559 // 'array' '*' || lk == 20649 // 'json-item' '*' || lk == 20678 // 'object' '*' || lk == 20727 // 'structured-item' '*' || lk == 21071 // 'array' '+' || lk == 21161 // 'json-item' '+' || lk == 21190 // 'object' '+' || lk == 21239 // 'structured-item' '+' || lk == 21583 // 'array' ',' || lk == 21673 // 'json-item' ',' || lk == 21702 // 'object' ',' || lk == 21751 // 'structured-item' ',' || lk == 22095 // 'array' '-' || lk == 22185 // 'json-item' '-' || lk == 22214 // 'object' '-' || lk == 22263 // 'structured-item' '-' || lk == 25679 // 'array' ':' || lk == 25769 // 'json-item' ':' || lk == 25798 // 'object' ':' || lk == 25847 // 'structured-item' ':' || lk == 27215 // 'array' ':=' || lk == 27305 // 'json-item' ':=' || lk == 27334 // 'object' ':=' || lk == 27383 // 'structured-item' ':=' || lk == 27727 // 'array' ';' || lk == 27817 // 'json-item' ';' || lk == 27846 // 'object' ';' || lk == 27895 // 'structured-item' ';' || lk == 28239 // 'array' '<' || lk == 28329 // 'json-item' '<' || lk == 28358 // 'object' '<' || lk == 28407 // 'structured-item' '<' || lk == 29775 // 'array' '<<' || lk == 29865 // 'json-item' '<<' || lk == 29894 // 'object' '<<' || lk == 29943 // 'structured-item' '<<' || lk == 30287 // 'array' '<=' || lk == 30377 // 'json-item' '<=' || lk == 30406 // 'object' '<=' || lk == 30455 // 'structured-item' '<=' || lk == 31311 // 'array' '=' || lk == 31401 // 'json-item' '=' || lk == 31430 // 'object' '=' || lk == 31479 // 'structured-item' '=' || lk == 31823 // 'array' '>' || lk == 31913 // 'json-item' '>' || lk == 31942 // 'object' '>' || lk == 31991 // 'structured-item' '>' || lk == 32335 // 'array' '>=' || lk == 32425 // 'json-item' '>=' || lk == 32454 // 'object' '>=' || lk == 32503 // 'structured-item' '>=' || lk == 32847 // 'array' '>>' || lk == 32937 // 'json-item' '>>' || lk == 32966 // 'object' '>>' || lk == 33015 // 'structured-item' '>>' || lk == 33359 // 'array' '?' || lk == 33449 // 'json-item' '?' || lk == 33478 // 'object' '?' || lk == 33527 // 'structured-item' '?' || lk == 35919 // 'array' ']' || lk == 36009 // 'json-item' ']' || lk == 36038 // 'object' ']' || lk == 36087 // 'structured-item' ']' || lk == 36431 // 'array' 'after' || lk == 36521 // 'json-item' 'after' || lk == 36550 // 'object' 'after' || lk == 36599 // 'structured-item' 'after' || lk == 37455 // 'array' 'allowing' || lk == 37545 // 'json-item' 'allowing' || lk == 37574 // 'object' 'allowing' || lk == 37623 // 'structured-item' 'allowing' || lk == 38991 // 'array' 'and' || lk == 39081 // 'json-item' 'and' || lk == 39110 // 'object' 'and' || lk == 39159 // 'structured-item' 'and' || lk == 41039 // 'array' 'as' || lk == 41129 // 'json-item' 'as' || lk == 41158 // 'object' 'as' || lk == 41207 // 'structured-item' 'as' || lk == 41551 // 'array' 'ascending' || lk == 41641 // 'json-item' 'ascending' || lk == 41670 // 'object' 'ascending' || lk == 41719 // 'structured-item' 'ascending' || lk == 42063 // 'array' 'at' || lk == 42153 // 'json-item' 'at' || lk == 42182 // 'object' 'at' || lk == 42231 // 'structured-item' 'at' || lk == 43599 // 'array' 'before' || lk == 43689 // 'json-item' 'before' || lk == 43718 // 'object' 'before' || lk == 43767 // 'structured-item' 'before' || lk == 45647 // 'array' 'case' || lk == 45737 // 'json-item' 'case' || lk == 45766 // 'object' 'case' || lk == 45815 // 'structured-item' 'case' || lk == 48719 // 'array' 'collation' || lk == 48809 // 'json-item' 'collation' || lk == 48838 // 'object' 'collation' || lk == 48887 // 'structured-item' 'collation' || lk == 51279 // 'array' 'contains' || lk == 51369 // 'json-item' 'contains' || lk == 51398 // 'object' 'contains' || lk == 51447 // 'structured-item' 'contains' || lk == 54351 // 'array' 'count' || lk == 54441 // 'json-item' 'count' || lk == 54470 // 'object' 'count' || lk == 54519 // 'structured-item' 'count' || lk == 56399 // 'array' 'default' || lk == 56489 // 'json-item' 'default' || lk == 56518 // 'object' 'default' || lk == 56567 // 'structured-item' 'default' || lk == 58447 // 'array' 'descending' || lk == 58537 // 'json-item' 'descending' || lk == 58566 // 'object' 'descending' || lk == 58615 // 'structured-item' 'descending' || lk == 61007 // 'array' 'div' || lk == 61097 // 'json-item' 'div' || lk == 61126 // 'object' 'div' || lk == 61175 // 'structured-item' 'div' || lk == 63055 // 'array' 'else' || lk == 63145 // 'json-item' 'else' || lk == 63174 // 'object' 'else' || lk == 63223 // 'structured-item' 'else' || lk == 63567 // 'array' 'empty' || lk == 63657 // 'json-item' 'empty' || lk == 63686 // 'object' 'empty' || lk == 63735 // 'structured-item' 'empty' || lk == 65103 // 'array' 'end' || lk == 65193 // 'json-item' 'end' || lk == 65222 // 'object' 'end' || lk == 65271 // 'structured-item' 'end' || lk == 66127 // 'array' 'eq' || lk == 66217 // 'json-item' 'eq' || lk == 66246 // 'object' 'eq' || lk == 66295 // 'structured-item' 'eq' || lk == 67663 // 'array' 'except' || lk == 67753 // 'json-item' 'except' || lk == 67782 // 'object' 'except' || lk == 67831 // 'structured-item' 'except' || lk == 68687 // 'array' 'external' || lk == 68777 // 'json-item' 'external' || lk == 68806 // 'object' 'external' || lk == 68855 // 'structured-item' 'external' || lk == 71247 // 'array' 'for' || lk == 71337 // 'json-item' 'for' || lk == 71366 // 'object' 'for' || lk == 71415 // 'structured-item' 'for' || lk == 75855 // 'array' 'ge' || lk == 75945 // 'json-item' 'ge' || lk == 75974 // 'object' 'ge' || lk == 76023 // 'structured-item' 'ge' || lk == 76879 // 'array' 'group' || lk == 76969 // 'json-item' 'group' || lk == 76998 // 'object' 'group' || lk == 77047 // 'structured-item' 'group' || lk == 77903 // 'array' 'gt' || lk == 77993 // 'json-item' 'gt' || lk == 78022 // 'object' 'gt' || lk == 78071 // 'structured-item' 'gt' || lk == 78415 // 'array' 'idiv' || lk == 78505 // 'json-item' 'idiv' || lk == 78534 // 'object' 'idiv' || lk == 78583 // 'structured-item' 'idiv' || lk == 79951 // 'array' 'in' || lk == 80041 // 'json-item' 'in' || lk == 80070 // 'object' 'in' || lk == 80119 // 'structured-item' 'in' || lk == 83023 // 'array' 'instance' || lk == 83113 // 'json-item' 'instance' || lk == 83142 // 'object' 'instance' || lk == 83191 // 'structured-item' 'instance' || lk == 84047 // 'array' 'intersect' || lk == 84137 // 'json-item' 'intersect' || lk == 84166 // 'object' 'intersect' || lk == 84215 // 'structured-item' 'intersect' || lk == 84559 // 'array' 'into' || lk == 84649 // 'json-item' 'into' || lk == 84678 // 'object' 'into' || lk == 84727 // 'structured-item' 'into' || lk == 85071 // 'array' 'is' || lk == 85161 // 'json-item' 'is' || lk == 85190 // 'object' 'is' || lk == 85239 // 'structured-item' 'is' || lk == 89679 // 'array' 'le' || lk == 89769 // 'json-item' 'le' || lk == 89798 // 'object' 'le' || lk == 89847 // 'structured-item' 'le' || lk == 90703 // 'array' 'let' || lk == 90793 // 'json-item' 'let' || lk == 90822 // 'object' 'let' || lk == 90871 // 'structured-item' 'let' || lk == 92751 // 'array' 'lt' || lk == 92841 // 'json-item' 'lt' || lk == 92870 // 'object' 'lt' || lk == 92919 // 'structured-item' 'lt' || lk == 93775 // 'array' 'mod' || lk == 93865 // 'json-item' 'mod' || lk == 93894 // 'object' 'mod' || lk == 93943 // 'structured-item' 'mod' || lk == 94287 // 'array' 'modify' || lk == 94377 // 'json-item' 'modify' || lk == 94406 // 'object' 'modify' || lk == 94455 // 'structured-item' 'modify' || lk == 96847 // 'array' 'ne' || lk == 96937 // 'json-item' 'ne' || lk == 96966 // 'object' 'ne' || lk == 97015 // 'structured-item' 'ne' || lk == 103503 // 'array' 'only' || lk == 103593 // 'json-item' 'only' || lk == 103622 // 'object' 'only' || lk == 103671 // 'structured-item' 'only' || lk == 104527 // 'array' 'or' || lk == 104617 // 'json-item' 'or' || lk == 104646 // 'object' 'or' || lk == 104695 // 'structured-item' 'or' || lk == 105039 // 'array' 'order' || lk == 105129 // 'json-item' 'order' || lk == 105158 // 'object' 'order' || lk == 105207 // 'structured-item' 'order' || lk == 107087 // 'array' 'paragraphs' || lk == 107177 // 'json-item' 'paragraphs' || lk == 107206 // 'object' 'paragraphs' || lk == 107255 // 'structured-item' 'paragraphs' || lk == 114767 // 'array' 'return' || lk == 114857 // 'json-item' 'return' || lk == 114886 // 'object' 'return' || lk == 114935 // 'structured-item' 'return' || lk == 116815 // 'array' 'satisfies' || lk == 116905 // 'json-item' 'satisfies' || lk == 116934 // 'object' 'satisfies' || lk == 116983 // 'structured-item' 'satisfies' || lk == 118863 // 'array' 'score' || lk == 118953 // 'json-item' 'score' || lk == 118982 // 'object' 'score' || lk == 119031 // 'structured-item' 'score' || lk == 121423 // 'array' 'sentences' || lk == 121513 // 'json-item' 'sentences' || lk == 121542 // 'object' 'sentences' || lk == 121591 // 'structured-item' 'sentences' || lk == 123471 // 'array' 'stable' || lk == 123561 // 'json-item' 'stable' || lk == 123590 // 'object' 'stable' || lk == 123639 // 'structured-item' 'stable' || lk == 123983 // 'array' 'start' || lk == 124073 // 'json-item' 'start' || lk == 124102 // 'object' 'start' || lk == 124151 // 'structured-item' 'start' || lk == 129103 // 'array' 'times' || lk == 129193 // 'json-item' 'times' || lk == 129222 // 'object' 'times' || lk == 129271 // 'structured-item' 'times' || lk == 129615 // 'array' 'to' || lk == 129705 // 'json-item' 'to' || lk == 129734 // 'object' 'to' || lk == 129783 // 'structured-item' 'to' || lk == 133199 // 'array' 'union' || lk == 133289 // 'json-item' 'union' || lk == 133318 // 'object' 'union' || lk == 133367 // 'structured-item' 'union' || lk == 139343 // 'array' 'where' || lk == 139433 // 'json-item' 'where' || lk == 139462 // 'object' 'where' || lk == 139511 // 'structured-item' 'where' || lk == 141391 // 'array' 'with' || lk == 141481 // 'json-item' 'with' || lk == 141510 // 'object' 'with' || lk == 141559 // 'structured-item' 'with' || lk == 142927 // 'array' 'words' || lk == 143017 // 'json-item' 'words' || lk == 143046 // 'object' 'words' || lk == 143095 // 'structured-item' 'words' || lk == 143951 // 'array' '{' || lk == 144041 // 'json-item' '{' || lk == 144070 // 'object' '{' || lk == 144119 // 'structured-item' '{' || lk == 145487 // 'array' '|' || lk == 145577 // 'json-item' '|' || lk == 145606 // 'object' '|' || lk == 145655 // 'structured-item' '|' || lk == 145999 // 'array' '||' || lk == 146089 // 'json-item' '||' || lk == 146118 // 'object' '||' || lk == 146167 // 'structured-item' '||' || lk == 146511 // 'array' '|}' || lk == 146601 // 'json-item' '|}' || lk == 146630 // 'object' '|}' || lk == 146679 // 'structured-item' '|}' || lk == 147023 // 'array' '}' || lk == 147113 // 'json-item' '}' || lk == 147142 // 'object' '}' || lk == 147191) // 'structured-item' '}' { lk = memoized(6, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_AtomicOrUnionType(); memoize(6, e0A, -4); lk = -8; } catch (p4A) { try { b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} try_JSONTest(); memoize(6, e0A, -6); lk = -8; } catch (p6A) { lk = -7; b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(6, e0A, -7); } } } } switch (lk) { case 18003: // 'attribute' '(' case 18017: // 'comment' '(' case 18041: // 'document-node' '(' case 18042: // 'element' '(' case 18108: // 'namespace-node' '(' case 18114: // 'node' '(' case 18140: // 'processing-instruction' '(' case 18150: // 'schema-attribute' '(' case 18151: // 'schema-element' '(' case 18169: // 'text' '(' try_KindTest(); break; case 18087: // 'item' '(' shiftT(167); // 'item' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' break; case 33: // '%' case 18067: // 'function' '(' try_FunctionTest(); break; case 35: // '(' try_ParenthesizedItemType(); break; case -6: case 17999: // 'array' '(' case 18089: // 'json-item' '(' case 18118: // 'object' '(' try_JSONTest(); break; case -7: case 18167: // 'structured-item' '(' try_StructuredItemTest(); break; case -8: break; default: try_AtomicOrUnionType(); } } function parse_JSONTest() { eventHandler.startNonterminal("JSONTest", e0); switch (l1) { case 169: // 'json-item' parse_JSONItemTest(); break; case 198: // 'object' parse_JSONObjectTest(); break; default: parse_JSONArrayTest(); } eventHandler.endNonterminal("JSONTest", e0); } function try_JSONTest() { switch (l1) { case 169: // 'json-item' try_JSONItemTest(); break; case 198: // 'object' try_JSONObjectTest(); break; default: try_JSONArrayTest(); } } function parse_StructuredItemTest() { eventHandler.startNonterminal("StructuredItemTest", e0); shift(247); // 'structured-item' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' } eventHandler.endNonterminal("StructuredItemTest", e0); } function try_StructuredItemTest() { shiftT(247); // 'structured-item' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } } function parse_JSONItemTest() { eventHandler.startNonterminal("JSONItemTest", e0); shift(169); // 'json-item' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' } eventHandler.endNonterminal("JSONItemTest", e0); } function try_JSONItemTest() { shiftT(169); // 'json-item' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } } function parse_JSONObjectTest() { eventHandler.startNonterminal("JSONObjectTest", e0); shift(198); // 'object' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' } eventHandler.endNonterminal("JSONObjectTest", e0); } function try_JSONObjectTest() { shiftT(198); // 'object' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } } function parse_JSONArrayTest() { eventHandler.startNonterminal("JSONArrayTest", e0); shift(79); // 'array' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' } eventHandler.endNonterminal("JSONArrayTest", e0); } function try_JSONArrayTest() { shiftT(79); // 'array' lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | if (l1 == 35) // '(' { shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } } function parse_AtomicOrUnionType() { eventHandler.startNonterminal("AtomicOrUnionType", e0); parse_EQName(); eventHandler.endNonterminal("AtomicOrUnionType", e0); } function try_AtomicOrUnionType() { try_EQName(); } function parse_KindTest() { eventHandler.startNonterminal("KindTest", e0); switch (l1) { case 121: // 'document-node' parse_DocumentTest(); break; case 122: // 'element' parse_ElementTest(); break; case 83: // 'attribute' parse_AttributeTest(); break; case 231: // 'schema-element' parse_SchemaElementTest(); break; case 230: // 'schema-attribute' parse_SchemaAttributeTest(); break; case 220: // 'processing-instruction' parse_PITest(); break; case 97: // 'comment' parse_CommentTest(); break; case 249: // 'text' parse_TextTest(); break; case 188: // 'namespace-node' parse_NamespaceNodeTest(); break; default: parse_AnyKindTest(); } eventHandler.endNonterminal("KindTest", e0); } function try_KindTest() { switch (l1) { case 121: // 'document-node' try_DocumentTest(); break; case 122: // 'element' try_ElementTest(); break; case 83: // 'attribute' try_AttributeTest(); break; case 231: // 'schema-element' try_SchemaElementTest(); break; case 230: // 'schema-attribute' try_SchemaAttributeTest(); break; case 220: // 'processing-instruction' try_PITest(); break; case 97: // 'comment' try_CommentTest(); break; case 249: // 'text' try_TextTest(); break; case 188: // 'namespace-node' try_NamespaceNodeTest(); break; default: try_AnyKindTest(); } } function parse_AnyKindTest() { eventHandler.startNonterminal("AnyKindTest", e0); shift(194); // 'node' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("AnyKindTest", e0); } function try_AnyKindTest() { shiftT(194); // 'node' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_DocumentTest() { eventHandler.startNonterminal("DocumentTest", e0); shift(121); // 'document-node' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(154); // S^WS | '(:' | ')' | 'element' | 'schema-element' if (l1 != 38) // ')' { switch (l1) { case 122: // 'element' whitespace(); parse_ElementTest(); break; default: whitespace(); parse_SchemaElementTest(); } } lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("DocumentTest", e0); } function try_DocumentTest() { shiftT(121); // 'document-node' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(154); // S^WS | '(:' | ')' | 'element' | 'schema-element' if (l1 != 38) // ')' { switch (l1) { case 122: // 'element' try_ElementTest(); break; default: try_SchemaElementTest(); } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_TextTest() { eventHandler.startNonterminal("TextTest", e0); shift(249); // 'text' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("TextTest", e0); } function try_TextTest() { shiftT(249); // 'text' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_CommentTest() { eventHandler.startNonterminal("CommentTest", e0); shift(97); // 'comment' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("CommentTest", e0); } function try_CommentTest() { shiftT(97); // 'comment' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_NamespaceNodeTest() { eventHandler.startNonterminal("NamespaceNodeTest", e0); shift(188); // 'namespace-node' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("NamespaceNodeTest", e0); } function try_NamespaceNodeTest() { shiftT(188); // 'namespace-node' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_PITest() { eventHandler.startNonterminal("PITest", e0); shift(220); // 'processing-instruction' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(244); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' | if (l1 != 38) // ')' { switch (l1) { case 11: // StringLiteral shift(11); // StringLiteral break; default: whitespace(); parse_NCName(); } } lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("PITest", e0); } function try_PITest() { shiftT(220); // 'processing-instruction' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(244); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' | if (l1 != 38) // ')' { switch (l1) { case 11: // StringLiteral shiftT(11); // StringLiteral break; default: try_NCName(); } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_AttributeTest() { eventHandler.startNonterminal("AttributeTest", e0); shift(83); // 'attribute' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 38) // ')' { whitespace(); parse_AttribNameOrWildcard(); lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 == 42) // ',' { shift(42); // ',' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_TypeName(); } } lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("AttributeTest", e0); } function try_AttributeTest() { shiftT(83); // 'attribute' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 38) // ')' { try_AttribNameOrWildcard(); lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 == 42) // ',' { shiftT(42); // ',' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_TypeName(); } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_AttribNameOrWildcard() { eventHandler.startNonterminal("AttribNameOrWildcard", e0); switch (l1) { case 39: // '*' shift(39); // '*' break; default: parse_AttributeName(); } eventHandler.endNonterminal("AttribNameOrWildcard", e0); } function try_AttribNameOrWildcard() { switch (l1) { case 39: // '*' shiftT(39); // '*' break; default: try_AttributeName(); } } function parse_SchemaAttributeTest() { eventHandler.startNonterminal("SchemaAttributeTest", e0); shift(230); // 'schema-attribute' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_AttributeDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("SchemaAttributeTest", e0); } function try_SchemaAttributeTest() { shiftT(230); // 'schema-attribute' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_AttributeDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_AttributeDeclaration() { eventHandler.startNonterminal("AttributeDeclaration", e0); parse_AttributeName(); eventHandler.endNonterminal("AttributeDeclaration", e0); } function try_AttributeDeclaration() { try_AttributeName(); } function parse_ElementTest() { eventHandler.startNonterminal("ElementTest", e0); shift(122); // 'element' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 38) // ')' { whitespace(); parse_ElementNameOrWildcard(); lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 == 42) // ',' { shift(42); // ',' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_TypeName(); lookahead1W(106); // S^WS | '(:' | ')' | '?' if (l1 == 65) // '?' { shift(65); // '?' } } } lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("ElementTest", e0); } function try_ElementTest() { shiftT(122); // 'element' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 38) // ')' { try_ElementNameOrWildcard(); lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 == 42) // ',' { shiftT(42); // ',' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_TypeName(); lookahead1W(106); // S^WS | '(:' | ')' | '?' if (l1 == 65) // '?' { shiftT(65); // '?' } } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_ElementNameOrWildcard() { eventHandler.startNonterminal("ElementNameOrWildcard", e0); switch (l1) { case 39: // '*' shift(39); // '*' break; default: parse_ElementName(); } eventHandler.endNonterminal("ElementNameOrWildcard", e0); } function try_ElementNameOrWildcard() { switch (l1) { case 39: // '*' shiftT(39); // '*' break; default: try_ElementName(); } } function parse_SchemaElementTest() { eventHandler.startNonterminal("SchemaElementTest", e0); shift(231); // 'schema-element' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_ElementDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("SchemaElementTest", e0); } function try_SchemaElementTest() { shiftT(231); // 'schema-element' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_ElementDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_ElementDeclaration() { eventHandler.startNonterminal("ElementDeclaration", e0); parse_ElementName(); eventHandler.endNonterminal("ElementDeclaration", e0); } function try_ElementDeclaration() { try_ElementName(); } function parse_AttributeName() { eventHandler.startNonterminal("AttributeName", e0); parse_EQName(); eventHandler.endNonterminal("AttributeName", e0); } function try_AttributeName() { try_EQName(); } function parse_ElementName() { eventHandler.startNonterminal("ElementName", e0); parse_EQName(); eventHandler.endNonterminal("ElementName", e0); } function try_ElementName() { try_EQName(); } function parse_SimpleTypeName() { eventHandler.startNonterminal("SimpleTypeName", e0); parse_TypeName(); eventHandler.endNonterminal("SimpleTypeName", e0); } function try_SimpleTypeName() { try_TypeName(); } function parse_TypeName() { eventHandler.startNonterminal("TypeName", e0); parse_EQName(); eventHandler.endNonterminal("TypeName", e0); } function try_TypeName() { try_EQName(); } function parse_FunctionTest() { eventHandler.startNonterminal("FunctionTest", e0); for (;;) { lookahead1W(101); // S^WS | '%' | '(:' | 'function' if (l1 != 33) // '%' { break; } whitespace(); parse_Annotation(); } switch (l1) { case 147: // 'function' lookahead2W(22); // S^WS | '(' | '(:' break; default: lk = l1; } lk = memoized(7, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_AnyFunctionTest(); lk = -1; } catch (p1A) { lk = -2; } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(7, e0, lk); } switch (lk) { case -1: whitespace(); parse_AnyFunctionTest(); break; default: whitespace(); parse_TypedFunctionTest(); } eventHandler.endNonterminal("FunctionTest", e0); } function try_FunctionTest() { for (;;) { lookahead1W(101); // S^WS | '%' | '(:' | 'function' if (l1 != 33) // '%' { break; } try_Annotation(); } switch (l1) { case 147: // 'function' lookahead2W(22); // S^WS | '(' | '(:' break; default: lk = l1; } lk = memoized(7, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_AnyFunctionTest(); memoize(7, e0A, -1); lk = -3; } catch (p1A) { lk = -2; b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(7, e0A, -2); } } switch (lk) { case -1: try_AnyFunctionTest(); break; case -3: break; default: try_TypedFunctionTest(); } } function parse_AnyFunctionTest() { eventHandler.startNonterminal("AnyFunctionTest", e0); shift(147); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(24); // S^WS | '(:' | '*' shift(39); // '*' lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("AnyFunctionTest", e0); } function try_AnyFunctionTest() { shiftT(147); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(24); // S^WS | '(:' | '*' shiftT(39); // '*' lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_TypedFunctionTest() { eventHandler.startNonterminal("TypedFunctionTest", e0); shift(147); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shift(35); // '(' lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' | if (l1 != 38) // ')' { whitespace(); parse_SequenceType(); for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } } shift(38); // ')' lookahead1W(33); // S^WS | '(:' | 'as' shift(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); eventHandler.endNonterminal("TypedFunctionTest", e0); } function try_TypedFunctionTest() { shiftT(147); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shiftT(35); // '(' lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' | if (l1 != 38) // ')' { try_SequenceType(); for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } } shiftT(38); // ')' lookahead1W(33); // S^WS | '(:' | 'as' shiftT(80); // 'as' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } function parse_ParenthesizedItemType() { eventHandler.startNonterminal("ParenthesizedItemType", e0); shift(35); // '(' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_ItemType(); lookahead1W(23); // S^WS | '(:' | ')' shift(38); // ')' eventHandler.endNonterminal("ParenthesizedItemType", e0); } function try_ParenthesizedItemType() { shiftT(35); // '(' lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_ItemType(); lookahead1W(23); // S^WS | '(:' | ')' shiftT(38); // ')' } function parse_RevalidationDecl() { eventHandler.startNonterminal("RevalidationDecl", e0); shift(109); // 'declare' lookahead1W(75); // S^WS | '(:' | 'revalidation' shift(226); // 'revalidation' lookahead1W(162); // S^WS | '(:' | 'lax' | 'skip' | 'strict' switch (l1) { case 245: // 'strict' shift(245); // 'strict' break; case 174: // 'lax' shift(174); // 'lax' break; default: shift(238); // 'skip' } eventHandler.endNonterminal("RevalidationDecl", e0); } function parse_InsertExprTargetChoice() { eventHandler.startNonterminal("InsertExprTargetChoice", e0); switch (l1) { case 71: // 'after' shift(71); // 'after' break; case 85: // 'before' shift(85); // 'before' break; default: if (l1 == 80) // 'as' { shift(80); // 'as' lookahead1W(123); // S^WS | '(:' | 'first' | 'last' switch (l1) { case 136: // 'first' shift(136); // 'first' break; default: shift(173); // 'last' } } lookahead1W(57); // S^WS | '(:' | 'into' shift(165); // 'into' } eventHandler.endNonterminal("InsertExprTargetChoice", e0); } function try_InsertExprTargetChoice() { switch (l1) { case 71: // 'after' shiftT(71); // 'after' break; case 85: // 'before' shiftT(85); // 'before' break; default: if (l1 == 80) // 'as' { shiftT(80); // 'as' lookahead1W(123); // S^WS | '(:' | 'first' | 'last' switch (l1) { case 136: // 'first' shiftT(136); // 'first' break; default: shiftT(173); // 'last' } } lookahead1W(57); // S^WS | '(:' | 'into' shiftT(165); // 'into' } } function parse_InsertExpr() { eventHandler.startNonterminal("InsertExpr", e0); shift(161); // 'insert' lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 194: // 'node' shift(194); // 'node' break; default: shift(195); // 'nodes' } lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_SourceExpr(); whitespace(); parse_InsertExprTargetChoice(); lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_TargetExpr(); eventHandler.endNonterminal("InsertExpr", e0); } function try_InsertExpr() { shiftT(161); // 'insert' lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 194: // 'node' shiftT(194); // 'node' break; default: shiftT(195); // 'nodes' } lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_SourceExpr(); try_InsertExprTargetChoice(); lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_TargetExpr(); } function parse_DeleteExpr() { eventHandler.startNonterminal("DeleteExpr", e0); shift(111); // 'delete' lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 194: // 'node' shift(194); // 'node' break; default: shift(195); // 'nodes' } lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_TargetExpr(); eventHandler.endNonterminal("DeleteExpr", e0); } function try_DeleteExpr() { shiftT(111); // 'delete' lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 194: // 'node' shiftT(194); // 'node' break; default: shiftT(195); // 'nodes' } lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_TargetExpr(); } function parse_ReplaceExpr() { eventHandler.startNonterminal("ReplaceExpr", e0); shift(223); // 'replace' lookahead1W(134); // S^WS | '(:' | 'node' | 'value' if (l1 == 267) // 'value' { shift(267); // 'value' lookahead1W(67); // S^WS | '(:' | 'of' shift(200); // 'of' } lookahead1W(65); // S^WS | '(:' | 'node' shift(194); // 'node' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_TargetExpr(); shift(276); // 'with' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ReplaceExpr", e0); } function try_ReplaceExpr() { shiftT(223); // 'replace' lookahead1W(134); // S^WS | '(:' | 'node' | 'value' if (l1 == 267) // 'value' { shiftT(267); // 'value' lookahead1W(67); // S^WS | '(:' | 'of' shiftT(200); // 'of' } lookahead1W(65); // S^WS | '(:' | 'node' shiftT(194); // 'node' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_TargetExpr(); shiftT(276); // 'with' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_RenameExpr() { eventHandler.startNonterminal("RenameExpr", e0); shift(222); // 'rename' lookahead1W(65); // S^WS | '(:' | 'node' shift(194); // 'node' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_TargetExpr(); shift(80); // 'as' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_NewNameExpr(); eventHandler.endNonterminal("RenameExpr", e0); } function try_RenameExpr() { shiftT(222); // 'rename' lookahead1W(65); // S^WS | '(:' | 'node' shiftT(194); // 'node' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_TargetExpr(); shiftT(80); // 'as' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_NewNameExpr(); } function parse_SourceExpr() { eventHandler.startNonterminal("SourceExpr", e0); parse_ExprSingle(); eventHandler.endNonterminal("SourceExpr", e0); } function try_SourceExpr() { try_ExprSingle(); } function parse_TargetExpr() { eventHandler.startNonterminal("TargetExpr", e0); parse_ExprSingle(); eventHandler.endNonterminal("TargetExpr", e0); } function try_TargetExpr() { try_ExprSingle(); } function parse_NewNameExpr() { eventHandler.startNonterminal("NewNameExpr", e0); parse_ExprSingle(); eventHandler.endNonterminal("NewNameExpr", e0); } function try_NewNameExpr() { try_ExprSingle(); } function parse_TransformExpr() { eventHandler.startNonterminal("TransformExpr", e0); shift(104); // 'copy' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_TransformSpec(); for (;;) { if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_TransformSpec(); } shift(184); // 'modify' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); shift(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("TransformExpr", e0); } function try_TransformExpr() { shiftT(104); // 'copy' lookahead1W(21); // S^WS | '$' | '(:' try_TransformSpec(); for (;;) { if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(21); // S^WS | '$' | '(:' try_TransformSpec(); } shiftT(184); // 'modify' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); shiftT(224); // 'return' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_TransformSpec() { eventHandler.startNonterminal("TransformSpec", e0); shift(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(28); // S^WS | '(:' | ':=' shift(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("TransformSpec", e0); } function try_TransformSpec() { shiftT(31); // '$' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(28); // S^WS | '(:' | ':=' shiftT(53); // ':=' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_ExprSingle(); } function parse_FTSelection() { eventHandler.startNonterminal("FTSelection", e0); parse_FTOr(); for (;;) { lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 82: // 'at' lookahead2W(161); // S^WS | '(:' | 'end' | 'position' | 'start' break; default: lk = l1; } if (lk != 116 // 'different' && lk != 118 // 'distance' && lk != 128 // 'entire' && lk != 206 // 'ordered' && lk != 227 // 'same' && lk != 275 // 'window' && lk != 65106 // 'at' 'end' && lk != 123986) // 'at' 'start' { break; } whitespace(); parse_FTPosFilter(); } eventHandler.endNonterminal("FTSelection", e0); } function try_FTSelection() { try_FTOr(); for (;;) { lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 82: // 'at' lookahead2W(161); // S^WS | '(:' | 'end' | 'position' | 'start' break; default: lk = l1; } if (lk != 116 // 'different' && lk != 118 // 'distance' && lk != 128 // 'entire' && lk != 206 // 'ordered' && lk != 227 // 'same' && lk != 275 // 'window' && lk != 65106 // 'at' 'end' && lk != 123986) // 'at' 'start' { break; } try_FTPosFilter(); } } function parse_FTWeight() { eventHandler.startNonterminal("FTWeight", e0); shift(270); // 'weight' lookahead1W(90); // S^WS | '(:' | '{' shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(287); // '}' eventHandler.endNonterminal("FTWeight", e0); } function try_FTWeight() { shiftT(270); // 'weight' lookahead1W(90); // S^WS | '(:' | '{' shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(287); // '}' } function parse_FTOr() { eventHandler.startNonterminal("FTOr", e0); parse_FTAnd(); for (;;) { if (l1 != 146) // 'ftor' { break; } shift(146); // 'ftor' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTAnd(); } eventHandler.endNonterminal("FTOr", e0); } function try_FTOr() { try_FTAnd(); for (;;) { if (l1 != 146) // 'ftor' { break; } shiftT(146); // 'ftor' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTAnd(); } } function parse_FTAnd() { eventHandler.startNonterminal("FTAnd", e0); parse_FTMildNot(); for (;;) { if (l1 != 144) // 'ftand' { break; } shift(144); // 'ftand' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTMildNot(); } eventHandler.endNonterminal("FTAnd", e0); } function try_FTAnd() { try_FTMildNot(); for (;;) { if (l1 != 144) // 'ftand' { break; } shiftT(144); // 'ftand' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTMildNot(); } } function parse_FTMildNot() { eventHandler.startNonterminal("FTMildNot", e0); parse_FTUnaryNot(); for (;;) { lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 196) // 'not' { break; } shift(196); // 'not' lookahead1W(56); // S^WS | '(:' | 'in' shift(156); // 'in' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTUnaryNot(); } eventHandler.endNonterminal("FTMildNot", e0); } function try_FTMildNot() { try_FTUnaryNot(); for (;;) { lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 196) // 'not' { break; } shiftT(196); // 'not' lookahead1W(56); // S^WS | '(:' | 'in' shiftT(156); // 'in' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTUnaryNot(); } } function parse_FTUnaryNot() { eventHandler.startNonterminal("FTUnaryNot", e0); if (l1 == 145) // 'ftnot' { shift(145); // 'ftnot' } lookahead1W(164); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{' whitespace(); parse_FTPrimaryWithOptions(); eventHandler.endNonterminal("FTUnaryNot", e0); } function try_FTUnaryNot() { if (l1 == 145) // 'ftnot' { shiftT(145); // 'ftnot' } lookahead1W(164); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{' try_FTPrimaryWithOptions(); } function parse_FTPrimaryWithOptions() { eventHandler.startNonterminal("FTPrimaryWithOptions", e0); parse_FTPrimary(); lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 265) // 'using' { whitespace(); parse_FTMatchOptions(); } if (l1 == 270) // 'weight' { whitespace(); parse_FTWeight(); } eventHandler.endNonterminal("FTPrimaryWithOptions", e0); } function try_FTPrimaryWithOptions() { try_FTPrimary(); lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 265) // 'using' { try_FTMatchOptions(); } if (l1 == 270) // 'weight' { try_FTWeight(); } } function parse_FTPrimary() { eventHandler.startNonterminal("FTPrimary", e0); switch (l1) { case 35: // '(' shift(35); // '(' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTSelection(); shift(38); // ')' break; case 36: // '(#' parse_FTExtensionSelection(); break; default: parse_FTWords(); lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 199) // 'occurs' { whitespace(); parse_FTTimes(); } } eventHandler.endNonterminal("FTPrimary", e0); } function try_FTPrimary() { switch (l1) { case 35: // '(' shiftT(35); // '(' lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTSelection(); shiftT(38); // ')' break; case 36: // '(#' try_FTExtensionSelection(); break; default: try_FTWords(); lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 199) // 'occurs' { try_FTTimes(); } } } function parse_FTWords() { eventHandler.startNonterminal("FTWords", e0); parse_FTWordsValue(); lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 72 // 'all' || l1 == 77 // 'any' || l1 == 214) // 'phrase' { whitespace(); parse_FTAnyallOption(); } eventHandler.endNonterminal("FTWords", e0); } function try_FTWords() { try_FTWordsValue(); lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 72 // 'all' || l1 == 77 // 'any' || l1 == 214) // 'phrase' { try_FTAnyallOption(); } } function parse_FTWordsValue() { eventHandler.startNonterminal("FTWordsValue", e0); switch (l1) { case 11: // StringLiteral shift(11); // StringLiteral break; default: shift(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_Expr(); shift(287); // '}' } eventHandler.endNonterminal("FTWordsValue", e0); } function try_FTWordsValue() { switch (l1) { case 11: // StringLiteral shiftT(11); // StringLiteral break; default: shiftT(281); // '{' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_Expr(); shiftT(287); // '}' } } function parse_FTExtensionSelection() { eventHandler.startNonterminal("FTExtensionSelection", e0); for (;;) { whitespace(); parse_Pragma(); lookahead1W(104); // S^WS | '(#' | '(:' | '{' if (l1 != 36) // '(#' { break; } } shift(281); // '{' lookahead1W(184); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}' if (l1 != 287) // '}' { whitespace(); parse_FTSelection(); } shift(287); // '}' eventHandler.endNonterminal("FTExtensionSelection", e0); } function try_FTExtensionSelection() { for (;;) { try_Pragma(); lookahead1W(104); // S^WS | '(#' | '(:' | '{' if (l1 != 36) // '(#' { break; } } shiftT(281); // '{' lookahead1W(184); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}' if (l1 != 287) // '}' { try_FTSelection(); } shiftT(287); // '}' } function parse_FTAnyallOption() { eventHandler.startNonterminal("FTAnyallOption", e0); switch (l1) { case 77: // 'any' shift(77); // 'any' lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 278) // 'word' { shift(278); // 'word' } break; case 72: // 'all' shift(72); // 'all' lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 279) // 'words' { shift(279); // 'words' } break; default: shift(214); // 'phrase' } eventHandler.endNonterminal("FTAnyallOption", e0); } function try_FTAnyallOption() { switch (l1) { case 77: // 'any' shiftT(77); // 'any' lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 278) // 'word' { shiftT(278); // 'word' } break; case 72: // 'all' shiftT(72); // 'all' lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 279) // 'words' { shiftT(279); // 'words' } break; default: shiftT(214); // 'phrase' } } function parse_FTTimes() { eventHandler.startNonterminal("FTTimes", e0); shift(199); // 'occurs' lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from' whitespace(); parse_FTRange(); shift(252); // 'times' eventHandler.endNonterminal("FTTimes", e0); } function try_FTTimes() { shiftT(199); // 'occurs' lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from' try_FTRange(); shiftT(252); // 'times' } function parse_FTRange() { eventHandler.startNonterminal("FTRange", e0); switch (l1) { case 131: // 'exactly' shift(131); // 'exactly' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); break; case 82: // 'at' shift(82); // 'at' lookahead1W(129); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 176: // 'least' shift(176); // 'least' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); break; default: shift(186); // 'most' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); } break; default: shift(142); // 'from' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); shift(253); // 'to' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); } eventHandler.endNonterminal("FTRange", e0); } function try_FTRange() { switch (l1) { case 131: // 'exactly' shiftT(131); // 'exactly' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); break; case 82: // 'at' shiftT(82); // 'at' lookahead1W(129); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 176: // 'least' shiftT(176); // 'least' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); break; default: shiftT(186); // 'most' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); } break; default: shiftT(142); // 'from' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); shiftT(253); // 'to' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); } } function parse_FTPosFilter() { eventHandler.startNonterminal("FTPosFilter", e0); switch (l1) { case 206: // 'ordered' parse_FTOrder(); break; case 275: // 'window' parse_FTWindow(); break; case 118: // 'distance' parse_FTDistance(); break; case 116: // 'different' case 227: // 'same' parse_FTScope(); break; default: parse_FTContent(); } eventHandler.endNonterminal("FTPosFilter", e0); } function try_FTPosFilter() { switch (l1) { case 206: // 'ordered' try_FTOrder(); break; case 275: // 'window' try_FTWindow(); break; case 118: // 'distance' try_FTDistance(); break; case 116: // 'different' case 227: // 'same' try_FTScope(); break; default: try_FTContent(); } } function parse_FTOrder() { eventHandler.startNonterminal("FTOrder", e0); shift(206); // 'ordered' eventHandler.endNonterminal("FTOrder", e0); } function try_FTOrder() { shiftT(206); // 'ordered' } function parse_FTWindow() { eventHandler.startNonterminal("FTWindow", e0); shift(275); // 'window' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_AdditiveExpr(); whitespace(); parse_FTUnit(); eventHandler.endNonterminal("FTWindow", e0); } function try_FTWindow() { shiftT(275); // 'window' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_AdditiveExpr(); try_FTUnit(); } function parse_FTDistance() { eventHandler.startNonterminal("FTDistance", e0); shift(118); // 'distance' lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from' whitespace(); parse_FTRange(); whitespace(); parse_FTUnit(); eventHandler.endNonterminal("FTDistance", e0); } function try_FTDistance() { shiftT(118); // 'distance' lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from' try_FTRange(); try_FTUnit(); } function parse_FTUnit() { eventHandler.startNonterminal("FTUnit", e0); switch (l1) { case 279: // 'words' shift(279); // 'words' break; case 237: // 'sentences' shift(237); // 'sentences' break; default: shift(209); // 'paragraphs' } eventHandler.endNonterminal("FTUnit", e0); } function try_FTUnit() { switch (l1) { case 279: // 'words' shiftT(279); // 'words' break; case 237: // 'sentences' shiftT(237); // 'sentences' break; default: shiftT(209); // 'paragraphs' } } function parse_FTScope() { eventHandler.startNonterminal("FTScope", e0); switch (l1) { case 227: // 'same' shift(227); // 'same' break; default: shift(116); // 'different' } lookahead1W(136); // S^WS | '(:' | 'paragraph' | 'sentence' whitespace(); parse_FTBigUnit(); eventHandler.endNonterminal("FTScope", e0); } function try_FTScope() { switch (l1) { case 227: // 'same' shiftT(227); // 'same' break; default: shiftT(116); // 'different' } lookahead1W(136); // S^WS | '(:' | 'paragraph' | 'sentence' try_FTBigUnit(); } function parse_FTBigUnit() { eventHandler.startNonterminal("FTBigUnit", e0); switch (l1) { case 236: // 'sentence' shift(236); // 'sentence' break; default: shift(208); // 'paragraph' } eventHandler.endNonterminal("FTBigUnit", e0); } function try_FTBigUnit() { switch (l1) { case 236: // 'sentence' shiftT(236); // 'sentence' break; default: shiftT(208); // 'paragraph' } } function parse_FTContent() { eventHandler.startNonterminal("FTContent", e0); switch (l1) { case 82: // 'at' shift(82); // 'at' lookahead1W(121); // S^WS | '(:' | 'end' | 'start' switch (l1) { case 242: // 'start' shift(242); // 'start' break; default: shift(127); // 'end' } break; default: shift(128); // 'entire' lookahead1W(45); // S^WS | '(:' | 'content' shift(101); // 'content' } eventHandler.endNonterminal("FTContent", e0); } function try_FTContent() { switch (l1) { case 82: // 'at' shiftT(82); // 'at' lookahead1W(121); // S^WS | '(:' | 'end' | 'start' switch (l1) { case 242: // 'start' shiftT(242); // 'start' break; default: shiftT(127); // 'end' } break; default: shiftT(128); // 'entire' lookahead1W(45); // S^WS | '(:' | 'content' shiftT(101); // 'content' } } function parse_FTMatchOptions() { eventHandler.startNonterminal("FTMatchOptions", e0); for (;;) { shift(265); // 'using' lookahead1W(205); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' | whitespace(); parse_FTMatchOption(); lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 265) // 'using' { break; } } eventHandler.endNonterminal("FTMatchOptions", e0); } function try_FTMatchOptions() { for (;;) { shiftT(265); // 'using' lookahead1W(205); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' | try_FTMatchOption(); lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 265) // 'using' { break; } } } function parse_FTMatchOption() { eventHandler.startNonterminal("FTMatchOption", e0); switch (l1) { case 191: // 'no' lookahead2W(176); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards' break; default: lk = l1; } switch (lk) { case 172: // 'language' parse_FTLanguageOption(); break; case 274: // 'wildcards' case 140479: // 'no' 'wildcards' parse_FTWildCardOption(); break; case 251: // 'thesaurus' case 128703: // 'no' 'thesaurus' parse_FTThesaurusOption(); break; case 243: // 'stemming' case 124607: // 'no' 'stemming' parse_FTStemOption(); break; case 115: // 'diacritics' parse_FTDiacriticsOption(); break; case 244: // 'stop' case 125119: // 'no' 'stop' parse_FTStopWordOption(); break; case 203: // 'option' parse_FTExtensionOption(); break; default: parse_FTCaseOption(); } eventHandler.endNonterminal("FTMatchOption", e0); } function try_FTMatchOption() { switch (l1) { case 191: // 'no' lookahead2W(176); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards' break; default: lk = l1; } switch (lk) { case 172: // 'language' try_FTLanguageOption(); break; case 274: // 'wildcards' case 140479: // 'no' 'wildcards' try_FTWildCardOption(); break; case 251: // 'thesaurus' case 128703: // 'no' 'thesaurus' try_FTThesaurusOption(); break; case 243: // 'stemming' case 124607: // 'no' 'stemming' try_FTStemOption(); break; case 115: // 'diacritics' try_FTDiacriticsOption(); break; case 244: // 'stop' case 125119: // 'no' 'stop' try_FTStopWordOption(); break; case 203: // 'option' try_FTExtensionOption(); break; default: try_FTCaseOption(); } } function parse_FTCaseOption() { eventHandler.startNonterminal("FTCaseOption", e0); switch (l1) { case 89: // 'case' shift(89); // 'case' lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 160: // 'insensitive' shift(160); // 'insensitive' break; default: shift(235); // 'sensitive' } break; case 180: // 'lowercase' shift(180); // 'lowercase' break; default: shift(264); // 'uppercase' } eventHandler.endNonterminal("FTCaseOption", e0); } function try_FTCaseOption() { switch (l1) { case 89: // 'case' shiftT(89); // 'case' lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 160: // 'insensitive' shiftT(160); // 'insensitive' break; default: shiftT(235); // 'sensitive' } break; case 180: // 'lowercase' shiftT(180); // 'lowercase' break; default: shiftT(264); // 'uppercase' } } function parse_FTDiacriticsOption() { eventHandler.startNonterminal("FTDiacriticsOption", e0); shift(115); // 'diacritics' lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 160: // 'insensitive' shift(160); // 'insensitive' break; default: shift(235); // 'sensitive' } eventHandler.endNonterminal("FTDiacriticsOption", e0); } function try_FTDiacriticsOption() { shiftT(115); // 'diacritics' lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 160: // 'insensitive' shiftT(160); // 'insensitive' break; default: shiftT(235); // 'sensitive' } } function parse_FTStemOption() { eventHandler.startNonterminal("FTStemOption", e0); switch (l1) { case 243: // 'stemming' shift(243); // 'stemming' break; default: shift(191); // 'no' lookahead1W(77); // S^WS | '(:' | 'stemming' shift(243); // 'stemming' } eventHandler.endNonterminal("FTStemOption", e0); } function try_FTStemOption() { switch (l1) { case 243: // 'stemming' shiftT(243); // 'stemming' break; default: shiftT(191); // 'no' lookahead1W(77); // S^WS | '(:' | 'stemming' shiftT(243); // 'stemming' } } function parse_FTThesaurusOption() { eventHandler.startNonterminal("FTThesaurusOption", e0); switch (l1) { case 251: // 'thesaurus' shift(251); // 'thesaurus' lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 82: // 'at' whitespace(); parse_FTThesaurusID(); break; case 110: // 'default' shift(110); // 'default' break; default: shift(35); // '(' lookahead1W(116); // S^WS | '(:' | 'at' | 'default' switch (l1) { case 82: // 'at' whitespace(); parse_FTThesaurusID(); break; default: shift(110); // 'default' } for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(34); // S^WS | '(:' | 'at' whitespace(); parse_FTThesaurusID(); } shift(38); // ')' } break; default: shift(191); // 'no' lookahead1W(81); // S^WS | '(:' | 'thesaurus' shift(251); // 'thesaurus' } eventHandler.endNonterminal("FTThesaurusOption", e0); } function try_FTThesaurusOption() { switch (l1) { case 251: // 'thesaurus' shiftT(251); // 'thesaurus' lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 82: // 'at' try_FTThesaurusID(); break; case 110: // 'default' shiftT(110); // 'default' break; default: shiftT(35); // '(' lookahead1W(116); // S^WS | '(:' | 'at' | 'default' switch (l1) { case 82: // 'at' try_FTThesaurusID(); break; default: shiftT(110); // 'default' } for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(34); // S^WS | '(:' | 'at' try_FTThesaurusID(); } shiftT(38); // ')' } break; default: shiftT(191); // 'no' lookahead1W(81); // S^WS | '(:' | 'thesaurus' shiftT(251); // 'thesaurus' } } function parse_FTThesaurusID() { eventHandler.startNonterminal("FTThesaurusID", e0); shift(82); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 221) // 'relationship' { shift(221); // 'relationship' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral } lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 82: // 'at' lookahead2W(183); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start' break; default: lk = l1; } if (lk == 131 // 'exactly' || lk == 142 // 'from' || lk == 90194 // 'at' 'least' || lk == 95314) // 'at' 'most' { whitespace(); parse_FTLiteralRange(); lookahead1W(61); // S^WS | '(:' | 'levels' shift(178); // 'levels' } eventHandler.endNonterminal("FTThesaurusID", e0); } function try_FTThesaurusID() { shiftT(82); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 221) // 'relationship' { shiftT(221); // 'relationship' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 82: // 'at' lookahead2W(183); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start' break; default: lk = l1; } if (lk == 131 // 'exactly' || lk == 142 // 'from' || lk == 90194 // 'at' 'least' || lk == 95314) // 'at' 'most' { try_FTLiteralRange(); lookahead1W(61); // S^WS | '(:' | 'levels' shiftT(178); // 'levels' } } function parse_FTLiteralRange() { eventHandler.startNonterminal("FTLiteralRange", e0); switch (l1) { case 131: // 'exactly' shift(131); // 'exactly' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral break; case 82: // 'at' shift(82); // 'at' lookahead1W(129); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 176: // 'least' shift(176); // 'least' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral break; default: shift(186); // 'most' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral } break; default: shift(142); // 'from' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral lookahead1W(82); // S^WS | '(:' | 'to' shift(253); // 'to' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral } eventHandler.endNonterminal("FTLiteralRange", e0); } function try_FTLiteralRange() { switch (l1) { case 131: // 'exactly' shiftT(131); // 'exactly' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral break; case 82: // 'at' shiftT(82); // 'at' lookahead1W(129); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 176: // 'least' shiftT(176); // 'least' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral break; default: shiftT(186); // 'most' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral } break; default: shiftT(142); // 'from' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral lookahead1W(82); // S^WS | '(:' | 'to' shiftT(253); // 'to' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral } } function parse_FTStopWordOption() { eventHandler.startNonterminal("FTStopWordOption", e0); switch (l1) { case 244: // 'stop' shift(244); // 'stop' lookahead1W(89); // S^WS | '(:' | 'words' shift(279); // 'words' lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 110: // 'default' shift(110); // 'default' for (;;) { lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 132 // 'except' && l1 != 260) // 'union' { break; } whitespace(); parse_FTStopWordsInclExcl(); } break; default: whitespace(); parse_FTStopWords(); for (;;) { lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 132 // 'except' && l1 != 260) // 'union' { break; } whitespace(); parse_FTStopWordsInclExcl(); } } break; default: shift(191); // 'no' lookahead1W(78); // S^WS | '(:' | 'stop' shift(244); // 'stop' lookahead1W(89); // S^WS | '(:' | 'words' shift(279); // 'words' } eventHandler.endNonterminal("FTStopWordOption", e0); } function try_FTStopWordOption() { switch (l1) { case 244: // 'stop' shiftT(244); // 'stop' lookahead1W(89); // S^WS | '(:' | 'words' shiftT(279); // 'words' lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 110: // 'default' shiftT(110); // 'default' for (;;) { lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 132 // 'except' && l1 != 260) // 'union' { break; } try_FTStopWordsInclExcl(); } break; default: try_FTStopWords(); for (;;) { lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 132 // 'except' && l1 != 260) // 'union' { break; } try_FTStopWordsInclExcl(); } } break; default: shiftT(191); // 'no' lookahead1W(78); // S^WS | '(:' | 'stop' shiftT(244); // 'stop' lookahead1W(89); // S^WS | '(:' | 'words' shiftT(279); // 'words' } } function parse_FTStopWords() { eventHandler.startNonterminal("FTStopWords", e0); switch (l1) { case 82: // 'at' shift(82); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral break; default: shift(35); // '(' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral } shift(38); // ')' } eventHandler.endNonterminal("FTStopWords", e0); } function try_FTStopWords() { switch (l1) { case 82: // 'at' shiftT(82); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral break; default: shiftT(35); // '(' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral for (;;) { lookahead1W(105); // S^WS | '(:' | ')' | ',' if (l1 != 42) // ',' { break; } shiftT(42); // ',' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } shiftT(38); // ')' } } function parse_FTStopWordsInclExcl() { eventHandler.startNonterminal("FTStopWordsInclExcl", e0); switch (l1) { case 260: // 'union' shift(260); // 'union' break; default: shift(132); // 'except' } lookahead1W(103); // S^WS | '(' | '(:' | 'at' whitespace(); parse_FTStopWords(); eventHandler.endNonterminal("FTStopWordsInclExcl", e0); } function try_FTStopWordsInclExcl() { switch (l1) { case 260: // 'union' shiftT(260); // 'union' break; default: shiftT(132); // 'except' } lookahead1W(103); // S^WS | '(' | '(:' | 'at' try_FTStopWords(); } function parse_FTLanguageOption() { eventHandler.startNonterminal("FTLanguageOption", e0); shift(172); // 'language' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral eventHandler.endNonterminal("FTLanguageOption", e0); } function try_FTLanguageOption() { shiftT(172); // 'language' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } function parse_FTWildCardOption() { eventHandler.startNonterminal("FTWildCardOption", e0); switch (l1) { case 274: // 'wildcards' shift(274); // 'wildcards' break; default: shift(191); // 'no' lookahead1W(87); // S^WS | '(:' | 'wildcards' shift(274); // 'wildcards' } eventHandler.endNonterminal("FTWildCardOption", e0); } function try_FTWildCardOption() { switch (l1) { case 274: // 'wildcards' shiftT(274); // 'wildcards' break; default: shiftT(191); // 'no' lookahead1W(87); // S^WS | '(:' | 'wildcards' shiftT(274); // 'wildcards' } } function parse_FTExtensionOption() { eventHandler.startNonterminal("FTExtensionOption", e0); shift(203); // 'option' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral eventHandler.endNonterminal("FTExtensionOption", e0); } function try_FTExtensionOption() { shiftT(203); // 'option' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_EQName(); lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } function parse_FTIgnoreOption() { eventHandler.startNonterminal("FTIgnoreOption", e0); shift(277); // 'without' lookahead1W(45); // S^WS | '(:' | 'content' shift(101); // 'content' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_UnionExpr(); eventHandler.endNonterminal("FTIgnoreOption", e0); } function try_FTIgnoreOption() { shiftT(277); // 'without' lookahead1W(45); // S^WS | '(:' | 'content' shiftT(101); // 'content' lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | try_UnionExpr(); } function parse_CollectionDecl() { eventHandler.startNonterminal("CollectionDecl", e0); shift(96); // 'collection' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(111); // S^WS | '(:' | ';' | 'as' if (l1 == 80) // 'as' { whitespace(); parse_CollectionTypeDecl(); } eventHandler.endNonterminal("CollectionDecl", e0); } function parse_CollectionTypeDecl() { eventHandler.startNonterminal("CollectionTypeDecl", e0); shift(80); // 'as' lookahead1W(200); // S^WS | '(:' | 'attribute' | 'comment' | 'document-node' | 'element' | whitespace(); parse_KindTest(); lookahead1W(171); // S^WS | '(:' | '*' | '+' | ';' | '?' if (l1 != 54) // ';' { whitespace(); parse_OccurrenceIndicator(); } eventHandler.endNonterminal("CollectionTypeDecl", e0); } function parse_IndexName() { eventHandler.startNonterminal("IndexName", e0); parse_EQName(); eventHandler.endNonterminal("IndexName", e0); } function parse_IndexDomainExpr() { eventHandler.startNonterminal("IndexDomainExpr", e0); parse_PathExpr(); eventHandler.endNonterminal("IndexDomainExpr", e0); } function parse_IndexKeySpec() { eventHandler.startNonterminal("IndexKeySpec", e0); parse_IndexKeyExpr(); if (l1 == 80) // 'as' { whitespace(); parse_IndexKeyTypeDecl(); } lookahead1W(156); // S^WS | '(:' | ',' | ';' | 'collation' if (l1 == 95) // 'collation' { whitespace(); parse_IndexKeyCollation(); } eventHandler.endNonterminal("IndexKeySpec", e0); } function parse_IndexKeyExpr() { eventHandler.startNonterminal("IndexKeyExpr", e0); parse_PathExpr(); eventHandler.endNonterminal("IndexKeyExpr", e0); } function parse_IndexKeyTypeDecl() { eventHandler.startNonterminal("IndexKeyTypeDecl", e0); shift(80); // 'as' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_AtomicType(); lookahead1W(189); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation' if (l1 == 40 // '*' || l1 == 41 // '+' || l1 == 65) // '?' { whitespace(); parse_OccurrenceIndicator(); } eventHandler.endNonterminal("IndexKeyTypeDecl", e0); } function parse_AtomicType() { eventHandler.startNonterminal("AtomicType", e0); parse_EQName(); eventHandler.endNonterminal("AtomicType", e0); } function parse_IndexKeyCollation() { eventHandler.startNonterminal("IndexKeyCollation", e0); shift(95); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral eventHandler.endNonterminal("IndexKeyCollation", e0); } function parse_IndexDecl() { eventHandler.startNonterminal("IndexDecl", e0); shift(157); // 'index' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_IndexName(); lookahead1W(68); // S^WS | '(:' | 'on' shift(201); // 'on' lookahead1W(66); // S^WS | '(:' | 'nodes' shift(195); // 'nodes' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_IndexDomainExpr(); shift(88); // 'by' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_IndexKeySpec(); for (;;) { lookahead1W(107); // S^WS | '(:' | ',' | ';' if (l1 != 42) // ',' { break; } shift(42); // ',' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_IndexKeySpec(); } eventHandler.endNonterminal("IndexDecl", e0); } function parse_ICDecl() { eventHandler.startNonterminal("ICDecl", e0); shift(163); // 'integrity' lookahead1W(43); // S^WS | '(:' | 'constraint' shift(98); // 'constraint' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(124); // S^WS | '(:' | 'foreign' | 'on' switch (l1) { case 201: // 'on' whitespace(); parse_ICCollection(); break; default: whitespace(); parse_ICForeignKey(); } eventHandler.endNonterminal("ICDecl", e0); } function parse_ICCollection() { eventHandler.startNonterminal("ICCollection", e0); shift(201); // 'on' lookahead1W(42); // S^WS | '(:' | 'collection' shift(96); // 'collection' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(150); // S^WS | '$' | '(:' | 'foreach' | 'node' switch (l1) { case 31: // '$' whitespace(); parse_ICCollSequence(); break; case 194: // 'node' whitespace(); parse_ICCollSequenceUnique(); break; default: whitespace(); parse_ICCollNode(); } eventHandler.endNonterminal("ICCollection", e0); } function parse_ICCollSequence() { eventHandler.startNonterminal("ICCollSequence", e0); parse_VarRef(); lookahead1W(40); // S^WS | '(:' | 'check' shift(93); // 'check' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ICCollSequence", e0); } function parse_ICCollSequenceUnique() { eventHandler.startNonterminal("ICCollSequenceUnique", e0); shift(194); // 'node' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_VarRef(); lookahead1W(40); // S^WS | '(:' | 'check' shift(93); // 'check' lookahead1W(83); // S^WS | '(:' | 'unique' shift(261); // 'unique' lookahead1W(60); // S^WS | '(:' | 'key' shift(171); // 'key' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_PathExpr(); eventHandler.endNonterminal("ICCollSequenceUnique", e0); } function parse_ICCollNode() { eventHandler.startNonterminal("ICCollNode", e0); shift(140); // 'foreach' lookahead1W(65); // S^WS | '(:' | 'node' shift(194); // 'node' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_VarRef(); lookahead1W(40); // S^WS | '(:' | 'check' shift(93); // 'check' lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ICCollNode", e0); } function parse_ICForeignKey() { eventHandler.startNonterminal("ICForeignKey", e0); shift(141); // 'foreign' lookahead1W(60); // S^WS | '(:' | 'key' shift(171); // 'key' lookahead1W(54); // S^WS | '(:' | 'from' whitespace(); parse_ICForeignKeySource(); whitespace(); parse_ICForeignKeyTarget(); eventHandler.endNonterminal("ICForeignKey", e0); } function parse_ICForeignKeySource() { eventHandler.startNonterminal("ICForeignKeySource", e0); shift(142); // 'from' lookahead1W(42); // S^WS | '(:' | 'collection' whitespace(); parse_ICForeignKeyValues(); eventHandler.endNonterminal("ICForeignKeySource", e0); } function parse_ICForeignKeyTarget() { eventHandler.startNonterminal("ICForeignKeyTarget", e0); shift(253); // 'to' lookahead1W(42); // S^WS | '(:' | 'collection' whitespace(); parse_ICForeignKeyValues(); eventHandler.endNonterminal("ICForeignKeyTarget", e0); } function parse_ICForeignKeyValues() { eventHandler.startNonterminal("ICForeignKeyValues", e0); shift(96); // 'collection' lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(65); // S^WS | '(:' | 'node' shift(194); // 'node' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_VarRef(); lookahead1W(60); // S^WS | '(:' | 'key' shift(171); // 'key' lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | whitespace(); parse_PathExpr(); eventHandler.endNonterminal("ICForeignKeyValues", e0); } function try_Comment() { shiftT(37); // '(:' for (;;) { lookahead1(92); // CommentContents | '(:' | ':)' if (l1 == 51) // ':)' { break; } switch (l1) { case 24: // CommentContents shiftT(24); // CommentContents break; default: try_Comment(); } } shiftT(51); // ':)' } function try_Whitespace() { switch (l1) { case 22: // S^WS shiftT(22); // S^WS break; default: try_Comment(); } } function parse_EQName() { eventHandler.startNonterminal("EQName", e0); lookahead1(241); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | switch (l1) { case 83: // 'attribute' shift(83); // 'attribute' break; case 97: // 'comment' shift(97); // 'comment' break; case 121: // 'document-node' shift(121); // 'document-node' break; case 122: // 'element' shift(122); // 'element' break; case 125: // 'empty-sequence' shift(125); // 'empty-sequence' break; case 147: // 'function' shift(147); // 'function' break; case 154: // 'if' shift(154); // 'if' break; case 167: // 'item' shift(167); // 'item' break; case 188: // 'namespace-node' shift(188); // 'namespace-node' break; case 194: // 'node' shift(194); // 'node' break; case 220: // 'processing-instruction' shift(220); // 'processing-instruction' break; case 230: // 'schema-attribute' shift(230); // 'schema-attribute' break; case 231: // 'schema-element' shift(231); // 'schema-element' break; case 248: // 'switch' shift(248); // 'switch' break; case 249: // 'text' shift(249); // 'text' break; case 259: // 'typeswitch' shift(259); // 'typeswitch' break; case 79: // 'array' shift(79); // 'array' break; case 169: // 'json-item' shift(169); // 'json-item' break; case 247: // 'structured-item' shift(247); // 'structured-item' break; default: parse_FunctionName(); } eventHandler.endNonterminal("EQName", e0); } function try_EQName() { lookahead1(241); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | switch (l1) { case 83: // 'attribute' shiftT(83); // 'attribute' break; case 97: // 'comment' shiftT(97); // 'comment' break; case 121: // 'document-node' shiftT(121); // 'document-node' break; case 122: // 'element' shiftT(122); // 'element' break; case 125: // 'empty-sequence' shiftT(125); // 'empty-sequence' break; case 147: // 'function' shiftT(147); // 'function' break; case 154: // 'if' shiftT(154); // 'if' break; case 167: // 'item' shiftT(167); // 'item' break; case 188: // 'namespace-node' shiftT(188); // 'namespace-node' break; case 194: // 'node' shiftT(194); // 'node' break; case 220: // 'processing-instruction' shiftT(220); // 'processing-instruction' break; case 230: // 'schema-attribute' shiftT(230); // 'schema-attribute' break; case 231: // 'schema-element' shiftT(231); // 'schema-element' break; case 248: // 'switch' shiftT(248); // 'switch' break; case 249: // 'text' shiftT(249); // 'text' break; case 259: // 'typeswitch' shiftT(259); // 'typeswitch' break; case 79: // 'array' shiftT(79); // 'array' break; case 169: // 'json-item' shiftT(169); // 'json-item' break; case 247: // 'structured-item' shiftT(247); // 'structured-item' break; default: try_FunctionName(); } } function parse_FunctionName() { eventHandler.startNonterminal("FunctionName", e0); switch (l1) { case 6: // EQName^Token shift(6); // EQName^Token break; case 71: // 'after' shift(71); // 'after' break; case 74: // 'ancestor' shift(74); // 'ancestor' break; case 75: // 'ancestor-or-self' shift(75); // 'ancestor-or-self' break; case 76: // 'and' shift(76); // 'and' break; case 80: // 'as' shift(80); // 'as' break; case 81: // 'ascending' shift(81); // 'ascending' break; case 85: // 'before' shift(85); // 'before' break; case 89: // 'case' shift(89); // 'case' break; case 90: // 'cast' shift(90); // 'cast' break; case 91: // 'castable' shift(91); // 'castable' break; case 94: // 'child' shift(94); // 'child' break; case 95: // 'collation' shift(95); // 'collation' break; case 104: // 'copy' shift(104); // 'copy' break; case 106: // 'count' shift(106); // 'count' break; case 109: // 'declare' shift(109); // 'declare' break; case 110: // 'default' shift(110); // 'default' break; case 111: // 'delete' shift(111); // 'delete' break; case 112: // 'descendant' shift(112); // 'descendant' break; case 113: // 'descendant-or-self' shift(113); // 'descendant-or-self' break; case 114: // 'descending' shift(114); // 'descending' break; case 119: // 'div' shift(119); // 'div' break; case 120: // 'document' shift(120); // 'document' break; case 123: // 'else' shift(123); // 'else' break; case 124: // 'empty' shift(124); // 'empty' break; case 127: // 'end' shift(127); // 'end' break; case 129: // 'eq' shift(129); // 'eq' break; case 130: // 'every' shift(130); // 'every' break; case 132: // 'except' shift(132); // 'except' break; case 136: // 'first' shift(136); // 'first' break; case 137: // 'following' shift(137); // 'following' break; case 138: // 'following-sibling' shift(138); // 'following-sibling' break; case 139: // 'for' shift(139); // 'for' break; case 148: // 'ge' shift(148); // 'ge' break; case 150: // 'group' shift(150); // 'group' break; case 152: // 'gt' shift(152); // 'gt' break; case 153: // 'idiv' shift(153); // 'idiv' break; case 155: // 'import' shift(155); // 'import' break; case 161: // 'insert' shift(161); // 'insert' break; case 162: // 'instance' shift(162); // 'instance' break; case 164: // 'intersect' shift(164); // 'intersect' break; case 165: // 'into' shift(165); // 'into' break; case 166: // 'is' shift(166); // 'is' break; case 173: // 'last' shift(173); // 'last' break; case 175: // 'le' shift(175); // 'le' break; case 177: // 'let' shift(177); // 'let' break; case 181: // 'lt' shift(181); // 'lt' break; case 183: // 'mod' shift(183); // 'mod' break; case 184: // 'modify' shift(184); // 'modify' break; case 185: // 'module' shift(185); // 'module' break; case 187: // 'namespace' shift(187); // 'namespace' break; case 189: // 'ne' shift(189); // 'ne' break; case 202: // 'only' shift(202); // 'only' break; case 204: // 'or' shift(204); // 'or' break; case 205: // 'order' shift(205); // 'order' break; case 206: // 'ordered' shift(206); // 'ordered' break; case 210: // 'parent' shift(210); // 'parent' break; case 216: // 'preceding' shift(216); // 'preceding' break; case 217: // 'preceding-sibling' shift(217); // 'preceding-sibling' break; case 222: // 'rename' shift(222); // 'rename' break; case 223: // 'replace' shift(223); // 'replace' break; case 224: // 'return' shift(224); // 'return' break; case 228: // 'satisfies' shift(228); // 'satisfies' break; case 234: // 'self' shift(234); // 'self' break; case 240: // 'some' shift(240); // 'some' break; case 241: // 'stable' shift(241); // 'stable' break; case 242: // 'start' shift(242); // 'start' break; case 253: // 'to' shift(253); // 'to' break; case 254: // 'treat' shift(254); // 'treat' break; case 256: // 'try' shift(256); // 'try' break; case 260: // 'union' shift(260); // 'union' break; case 262: // 'unordered' shift(262); // 'unordered' break; case 266: // 'validate' shift(266); // 'validate' break; case 272: // 'where' shift(272); // 'where' break; case 276: // 'with' shift(276); // 'with' break; case 170: // 'jsoniq' shift(170); // 'jsoniq' break; case 73: // 'allowing' shift(73); // 'allowing' break; case 82: // 'at' shift(82); // 'at' break; case 84: // 'base-uri' shift(84); // 'base-uri' break; case 86: // 'boundary-space' shift(86); // 'boundary-space' break; case 87: // 'break' shift(87); // 'break' break; case 92: // 'catch' shift(92); // 'catch' break; case 99: // 'construction' shift(99); // 'construction' break; case 102: // 'context' shift(102); // 'context' break; case 103: // 'continue' shift(103); // 'continue' break; case 105: // 'copy-namespaces' shift(105); // 'copy-namespaces' break; case 107: // 'decimal-format' shift(107); // 'decimal-format' break; case 126: // 'encoding' shift(126); // 'encoding' break; case 133: // 'exit' shift(133); // 'exit' break; case 134: // 'external' shift(134); // 'external' break; case 143: // 'ft-option' shift(143); // 'ft-option' break; case 156: // 'in' shift(156); // 'in' break; case 157: // 'index' shift(157); // 'index' break; case 163: // 'integrity' shift(163); // 'integrity' break; case 174: // 'lax' shift(174); // 'lax' break; case 195: // 'nodes' shift(195); // 'nodes' break; case 203: // 'option' shift(203); // 'option' break; case 207: // 'ordering' shift(207); // 'ordering' break; case 226: // 'revalidation' shift(226); // 'revalidation' break; case 229: // 'schema' shift(229); // 'schema' break; case 232: // 'score' shift(232); // 'score' break; case 239: // 'sliding' shift(239); // 'sliding' break; case 245: // 'strict' shift(245); // 'strict' break; case 257: // 'tumbling' shift(257); // 'tumbling' break; case 258: // 'type' shift(258); // 'type' break; case 263: // 'updating' shift(263); // 'updating' break; case 267: // 'value' shift(267); // 'value' break; case 268: // 'variable' shift(268); // 'variable' break; case 269: // 'version' shift(269); // 'version' break; case 273: // 'while' shift(273); // 'while' break; case 98: // 'constraint' shift(98); // 'constraint' break; case 179: // 'loop' shift(179); // 'loop' break; case 225: // 'returning' shift(225); // 'returning' break; case 78: // 'append' shift(78); // 'append' break; case 135: // 'false' shift(135); // 'false' break; case 142: // 'from' shift(142); // 'from' break; case 197: // 'null' shift(197); // 'null' break; case 168: // 'json' shift(168); // 'json' break; case 198: // 'object' shift(198); // 'object' break; case 233: // 'select' shift(233); // 'select' break; default: shift(255); // 'true' } eventHandler.endNonterminal("FunctionName", e0); } function try_FunctionName() { switch (l1) { case 6: // EQName^Token shiftT(6); // EQName^Token break; case 71: // 'after' shiftT(71); // 'after' break; case 74: // 'ancestor' shiftT(74); // 'ancestor' break; case 75: // 'ancestor-or-self' shiftT(75); // 'ancestor-or-self' break; case 76: // 'and' shiftT(76); // 'and' break; case 80: // 'as' shiftT(80); // 'as' break; case 81: // 'ascending' shiftT(81); // 'ascending' break; case 85: // 'before' shiftT(85); // 'before' break; case 89: // 'case' shiftT(89); // 'case' break; case 90: // 'cast' shiftT(90); // 'cast' break; case 91: // 'castable' shiftT(91); // 'castable' break; case 94: // 'child' shiftT(94); // 'child' break; case 95: // 'collation' shiftT(95); // 'collation' break; case 104: // 'copy' shiftT(104); // 'copy' break; case 106: // 'count' shiftT(106); // 'count' break; case 109: // 'declare' shiftT(109); // 'declare' break; case 110: // 'default' shiftT(110); // 'default' break; case 111: // 'delete' shiftT(111); // 'delete' break; case 112: // 'descendant' shiftT(112); // 'descendant' break; case 113: // 'descendant-or-self' shiftT(113); // 'descendant-or-self' break; case 114: // 'descending' shiftT(114); // 'descending' break; case 119: // 'div' shiftT(119); // 'div' break; case 120: // 'document' shiftT(120); // 'document' break; case 123: // 'else' shiftT(123); // 'else' break; case 124: // 'empty' shiftT(124); // 'empty' break; case 127: // 'end' shiftT(127); // 'end' break; case 129: // 'eq' shiftT(129); // 'eq' break; case 130: // 'every' shiftT(130); // 'every' break; case 132: // 'except' shiftT(132); // 'except' break; case 136: // 'first' shiftT(136); // 'first' break; case 137: // 'following' shiftT(137); // 'following' break; case 138: // 'following-sibling' shiftT(138); // 'following-sibling' break; case 139: // 'for' shiftT(139); // 'for' break; case 148: // 'ge' shiftT(148); // 'ge' break; case 150: // 'group' shiftT(150); // 'group' break; case 152: // 'gt' shiftT(152); // 'gt' break; case 153: // 'idiv' shiftT(153); // 'idiv' break; case 155: // 'import' shiftT(155); // 'import' break; case 161: // 'insert' shiftT(161); // 'insert' break; case 162: // 'instance' shiftT(162); // 'instance' break; case 164: // 'intersect' shiftT(164); // 'intersect' break; case 165: // 'into' shiftT(165); // 'into' break; case 166: // 'is' shiftT(166); // 'is' break; case 173: // 'last' shiftT(173); // 'last' break; case 175: // 'le' shiftT(175); // 'le' break; case 177: // 'let' shiftT(177); // 'let' break; case 181: // 'lt' shiftT(181); // 'lt' break; case 183: // 'mod' shiftT(183); // 'mod' break; case 184: // 'modify' shiftT(184); // 'modify' break; case 185: // 'module' shiftT(185); // 'module' break; case 187: // 'namespace' shiftT(187); // 'namespace' break; case 189: // 'ne' shiftT(189); // 'ne' break; case 202: // 'only' shiftT(202); // 'only' break; case 204: // 'or' shiftT(204); // 'or' break; case 205: // 'order' shiftT(205); // 'order' break; case 206: // 'ordered' shiftT(206); // 'ordered' break; case 210: // 'parent' shiftT(210); // 'parent' break; case 216: // 'preceding' shiftT(216); // 'preceding' break; case 217: // 'preceding-sibling' shiftT(217); // 'preceding-sibling' break; case 222: // 'rename' shiftT(222); // 'rename' break; case 223: // 'replace' shiftT(223); // 'replace' break; case 224: // 'return' shiftT(224); // 'return' break; case 228: // 'satisfies' shiftT(228); // 'satisfies' break; case 234: // 'self' shiftT(234); // 'self' break; case 240: // 'some' shiftT(240); // 'some' break; case 241: // 'stable' shiftT(241); // 'stable' break; case 242: // 'start' shiftT(242); // 'start' break; case 253: // 'to' shiftT(253); // 'to' break; case 254: // 'treat' shiftT(254); // 'treat' break; case 256: // 'try' shiftT(256); // 'try' break; case 260: // 'union' shiftT(260); // 'union' break; case 262: // 'unordered' shiftT(262); // 'unordered' break; case 266: // 'validate' shiftT(266); // 'validate' break; case 272: // 'where' shiftT(272); // 'where' break; case 276: // 'with' shiftT(276); // 'with' break; case 170: // 'jsoniq' shiftT(170); // 'jsoniq' break; case 73: // 'allowing' shiftT(73); // 'allowing' break; case 82: // 'at' shiftT(82); // 'at' break; case 84: // 'base-uri' shiftT(84); // 'base-uri' break; case 86: // 'boundary-space' shiftT(86); // 'boundary-space' break; case 87: // 'break' shiftT(87); // 'break' break; case 92: // 'catch' shiftT(92); // 'catch' break; case 99: // 'construction' shiftT(99); // 'construction' break; case 102: // 'context' shiftT(102); // 'context' break; case 103: // 'continue' shiftT(103); // 'continue' break; case 105: // 'copy-namespaces' shiftT(105); // 'copy-namespaces' break; case 107: // 'decimal-format' shiftT(107); // 'decimal-format' break; case 126: // 'encoding' shiftT(126); // 'encoding' break; case 133: // 'exit' shiftT(133); // 'exit' break; case 134: // 'external' shiftT(134); // 'external' break; case 143: // 'ft-option' shiftT(143); // 'ft-option' break; case 156: // 'in' shiftT(156); // 'in' break; case 157: // 'index' shiftT(157); // 'index' break; case 163: // 'integrity' shiftT(163); // 'integrity' break; case 174: // 'lax' shiftT(174); // 'lax' break; case 195: // 'nodes' shiftT(195); // 'nodes' break; case 203: // 'option' shiftT(203); // 'option' break; case 207: // 'ordering' shiftT(207); // 'ordering' break; case 226: // 'revalidation' shiftT(226); // 'revalidation' break; case 229: // 'schema' shiftT(229); // 'schema' break; case 232: // 'score' shiftT(232); // 'score' break; case 239: // 'sliding' shiftT(239); // 'sliding' break; case 245: // 'strict' shiftT(245); // 'strict' break; case 257: // 'tumbling' shiftT(257); // 'tumbling' break; case 258: // 'type' shiftT(258); // 'type' break; case 263: // 'updating' shiftT(263); // 'updating' break; case 267: // 'value' shiftT(267); // 'value' break; case 268: // 'variable' shiftT(268); // 'variable' break; case 269: // 'version' shiftT(269); // 'version' break; case 273: // 'while' shiftT(273); // 'while' break; case 98: // 'constraint' shiftT(98); // 'constraint' break; case 179: // 'loop' shiftT(179); // 'loop' break; case 225: // 'returning' shiftT(225); // 'returning' break; case 78: // 'append' shiftT(78); // 'append' break; case 135: // 'false' shiftT(135); // 'false' break; case 142: // 'from' shiftT(142); // 'from' break; case 197: // 'null' shiftT(197); // 'null' break; case 168: // 'json' shiftT(168); // 'json' break; case 198: // 'object' shiftT(198); // 'object' break; case 233: // 'select' shiftT(233); // 'select' break; default: shiftT(255); // 'true' } } function parse_NCName() { eventHandler.startNonterminal("NCName", e0); switch (l1) { case 19: // NCName^Token shift(19); // NCName^Token break; case 71: // 'after' shift(71); // 'after' break; case 76: // 'and' shift(76); // 'and' break; case 80: // 'as' shift(80); // 'as' break; case 81: // 'ascending' shift(81); // 'ascending' break; case 85: // 'before' shift(85); // 'before' break; case 89: // 'case' shift(89); // 'case' break; case 90: // 'cast' shift(90); // 'cast' break; case 91: // 'castable' shift(91); // 'castable' break; case 95: // 'collation' shift(95); // 'collation' break; case 106: // 'count' shift(106); // 'count' break; case 110: // 'default' shift(110); // 'default' break; case 114: // 'descending' shift(114); // 'descending' break; case 119: // 'div' shift(119); // 'div' break; case 123: // 'else' shift(123); // 'else' break; case 124: // 'empty' shift(124); // 'empty' break; case 127: // 'end' shift(127); // 'end' break; case 129: // 'eq' shift(129); // 'eq' break; case 132: // 'except' shift(132); // 'except' break; case 139: // 'for' shift(139); // 'for' break; case 148: // 'ge' shift(148); // 'ge' break; case 150: // 'group' shift(150); // 'group' break; case 152: // 'gt' shift(152); // 'gt' break; case 153: // 'idiv' shift(153); // 'idiv' break; case 162: // 'instance' shift(162); // 'instance' break; case 164: // 'intersect' shift(164); // 'intersect' break; case 165: // 'into' shift(165); // 'into' break; case 166: // 'is' shift(166); // 'is' break; case 175: // 'le' shift(175); // 'le' break; case 177: // 'let' shift(177); // 'let' break; case 181: // 'lt' shift(181); // 'lt' break; case 183: // 'mod' shift(183); // 'mod' break; case 184: // 'modify' shift(184); // 'modify' break; case 189: // 'ne' shift(189); // 'ne' break; case 202: // 'only' shift(202); // 'only' break; case 204: // 'or' shift(204); // 'or' break; case 205: // 'order' shift(205); // 'order' break; case 224: // 'return' shift(224); // 'return' break; case 228: // 'satisfies' shift(228); // 'satisfies' break; case 241: // 'stable' shift(241); // 'stable' break; case 242: // 'start' shift(242); // 'start' break; case 253: // 'to' shift(253); // 'to' break; case 254: // 'treat' shift(254); // 'treat' break; case 260: // 'union' shift(260); // 'union' break; case 272: // 'where' shift(272); // 'where' break; case 276: // 'with' shift(276); // 'with' break; case 74: // 'ancestor' shift(74); // 'ancestor' break; case 75: // 'ancestor-or-self' shift(75); // 'ancestor-or-self' break; case 83: // 'attribute' shift(83); // 'attribute' break; case 94: // 'child' shift(94); // 'child' break; case 97: // 'comment' shift(97); // 'comment' break; case 104: // 'copy' shift(104); // 'copy' break; case 109: // 'declare' shift(109); // 'declare' break; case 111: // 'delete' shift(111); // 'delete' break; case 112: // 'descendant' shift(112); // 'descendant' break; case 113: // 'descendant-or-self' shift(113); // 'descendant-or-self' break; case 120: // 'document' shift(120); // 'document' break; case 121: // 'document-node' shift(121); // 'document-node' break; case 122: // 'element' shift(122); // 'element' break; case 125: // 'empty-sequence' shift(125); // 'empty-sequence' break; case 130: // 'every' shift(130); // 'every' break; case 136: // 'first' shift(136); // 'first' break; case 137: // 'following' shift(137); // 'following' break; case 138: // 'following-sibling' shift(138); // 'following-sibling' break; case 147: // 'function' shift(147); // 'function' break; case 154: // 'if' shift(154); // 'if' break; case 155: // 'import' shift(155); // 'import' break; case 161: // 'insert' shift(161); // 'insert' break; case 167: // 'item' shift(167); // 'item' break; case 173: // 'last' shift(173); // 'last' break; case 185: // 'module' shift(185); // 'module' break; case 187: // 'namespace' shift(187); // 'namespace' break; case 188: // 'namespace-node' shift(188); // 'namespace-node' break; case 194: // 'node' shift(194); // 'node' break; case 206: // 'ordered' shift(206); // 'ordered' break; case 210: // 'parent' shift(210); // 'parent' break; case 216: // 'preceding' shift(216); // 'preceding' break; case 217: // 'preceding-sibling' shift(217); // 'preceding-sibling' break; case 220: // 'processing-instruction' shift(220); // 'processing-instruction' break; case 222: // 'rename' shift(222); // 'rename' break; case 223: // 'replace' shift(223); // 'replace' break; case 230: // 'schema-attribute' shift(230); // 'schema-attribute' break; case 231: // 'schema-element' shift(231); // 'schema-element' break; case 234: // 'self' shift(234); // 'self' break; case 240: // 'some' shift(240); // 'some' break; case 248: // 'switch' shift(248); // 'switch' break; case 249: // 'text' shift(249); // 'text' break; case 256: // 'try' shift(256); // 'try' break; case 259: // 'typeswitch' shift(259); // 'typeswitch' break; case 262: // 'unordered' shift(262); // 'unordered' break; case 266: // 'validate' shift(266); // 'validate' break; case 268: // 'variable' shift(268); // 'variable' break; case 170: // 'jsoniq' shift(170); // 'jsoniq' break; case 73: // 'allowing' shift(73); // 'allowing' break; case 82: // 'at' shift(82); // 'at' break; case 84: // 'base-uri' shift(84); // 'base-uri' break; case 86: // 'boundary-space' shift(86); // 'boundary-space' break; case 87: // 'break' shift(87); // 'break' break; case 92: // 'catch' shift(92); // 'catch' break; case 99: // 'construction' shift(99); // 'construction' break; case 102: // 'context' shift(102); // 'context' break; case 103: // 'continue' shift(103); // 'continue' break; case 105: // 'copy-namespaces' shift(105); // 'copy-namespaces' break; case 107: // 'decimal-format' shift(107); // 'decimal-format' break; case 126: // 'encoding' shift(126); // 'encoding' break; case 133: // 'exit' shift(133); // 'exit' break; case 134: // 'external' shift(134); // 'external' break; case 143: // 'ft-option' shift(143); // 'ft-option' break; case 156: // 'in' shift(156); // 'in' break; case 157: // 'index' shift(157); // 'index' break; case 163: // 'integrity' shift(163); // 'integrity' break; case 174: // 'lax' shift(174); // 'lax' break; case 195: // 'nodes' shift(195); // 'nodes' break; case 203: // 'option' shift(203); // 'option' break; case 207: // 'ordering' shift(207); // 'ordering' break; case 226: // 'revalidation' shift(226); // 'revalidation' break; case 229: // 'schema' shift(229); // 'schema' break; case 232: // 'score' shift(232); // 'score' break; case 239: // 'sliding' shift(239); // 'sliding' break; case 245: // 'strict' shift(245); // 'strict' break; case 257: // 'tumbling' shift(257); // 'tumbling' break; case 258: // 'type' shift(258); // 'type' break; case 263: // 'updating' shift(263); // 'updating' break; case 267: // 'value' shift(267); // 'value' break; case 269: // 'version' shift(269); // 'version' break; case 273: // 'while' shift(273); // 'while' break; case 98: // 'constraint' shift(98); // 'constraint' break; case 179: // 'loop' shift(179); // 'loop' break; case 225: // 'returning' shift(225); // 'returning' break; case 78: // 'append' shift(78); // 'append' break; case 135: // 'false' shift(135); // 'false' break; case 142: // 'from' shift(142); // 'from' break; case 197: // 'null' shift(197); // 'null' break; case 168: // 'json' shift(168); // 'json' break; case 198: // 'object' shift(198); // 'object' break; case 233: // 'select' shift(233); // 'select' break; default: shift(255); // 'true' } eventHandler.endNonterminal("NCName", e0); } function try_NCName() { switch (l1) { case 19: // NCName^Token shiftT(19); // NCName^Token break; case 71: // 'after' shiftT(71); // 'after' break; case 76: // 'and' shiftT(76); // 'and' break; case 80: // 'as' shiftT(80); // 'as' break; case 81: // 'ascending' shiftT(81); // 'ascending' break; case 85: // 'before' shiftT(85); // 'before' break; case 89: // 'case' shiftT(89); // 'case' break; case 90: // 'cast' shiftT(90); // 'cast' break; case 91: // 'castable' shiftT(91); // 'castable' break; case 95: // 'collation' shiftT(95); // 'collation' break; case 106: // 'count' shiftT(106); // 'count' break; case 110: // 'default' shiftT(110); // 'default' break; case 114: // 'descending' shiftT(114); // 'descending' break; case 119: // 'div' shiftT(119); // 'div' break; case 123: // 'else' shiftT(123); // 'else' break; case 124: // 'empty' shiftT(124); // 'empty' break; case 127: // 'end' shiftT(127); // 'end' break; case 129: // 'eq' shiftT(129); // 'eq' break; case 132: // 'except' shiftT(132); // 'except' break; case 139: // 'for' shiftT(139); // 'for' break; case 148: // 'ge' shiftT(148); // 'ge' break; case 150: // 'group' shiftT(150); // 'group' break; case 152: // 'gt' shiftT(152); // 'gt' break; case 153: // 'idiv' shiftT(153); // 'idiv' break; case 162: // 'instance' shiftT(162); // 'instance' break; case 164: // 'intersect' shiftT(164); // 'intersect' break; case 165: // 'into' shiftT(165); // 'into' break; case 166: // 'is' shiftT(166); // 'is' break; case 175: // 'le' shiftT(175); // 'le' break; case 177: // 'let' shiftT(177); // 'let' break; case 181: // 'lt' shiftT(181); // 'lt' break; case 183: // 'mod' shiftT(183); // 'mod' break; case 184: // 'modify' shiftT(184); // 'modify' break; case 189: // 'ne' shiftT(189); // 'ne' break; case 202: // 'only' shiftT(202); // 'only' break; case 204: // 'or' shiftT(204); // 'or' break; case 205: // 'order' shiftT(205); // 'order' break; case 224: // 'return' shiftT(224); // 'return' break; case 228: // 'satisfies' shiftT(228); // 'satisfies' break; case 241: // 'stable' shiftT(241); // 'stable' break; case 242: // 'start' shiftT(242); // 'start' break; case 253: // 'to' shiftT(253); // 'to' break; case 254: // 'treat' shiftT(254); // 'treat' break; case 260: // 'union' shiftT(260); // 'union' break; case 272: // 'where' shiftT(272); // 'where' break; case 276: // 'with' shiftT(276); // 'with' break; case 74: // 'ancestor' shiftT(74); // 'ancestor' break; case 75: // 'ancestor-or-self' shiftT(75); // 'ancestor-or-self' break; case 83: // 'attribute' shiftT(83); // 'attribute' break; case 94: // 'child' shiftT(94); // 'child' break; case 97: // 'comment' shiftT(97); // 'comment' break; case 104: // 'copy' shiftT(104); // 'copy' break; case 109: // 'declare' shiftT(109); // 'declare' break; case 111: // 'delete' shiftT(111); // 'delete' break; case 112: // 'descendant' shiftT(112); // 'descendant' break; case 113: // 'descendant-or-self' shiftT(113); // 'descendant-or-self' break; case 120: // 'document' shiftT(120); // 'document' break; case 121: // 'document-node' shiftT(121); // 'document-node' break; case 122: // 'element' shiftT(122); // 'element' break; case 125: // 'empty-sequence' shiftT(125); // 'empty-sequence' break; case 130: // 'every' shiftT(130); // 'every' break; case 136: // 'first' shiftT(136); // 'first' break; case 137: // 'following' shiftT(137); // 'following' break; case 138: // 'following-sibling' shiftT(138); // 'following-sibling' break; case 147: // 'function' shiftT(147); // 'function' break; case 154: // 'if' shiftT(154); // 'if' break; case 155: // 'import' shiftT(155); // 'import' break; case 161: // 'insert' shiftT(161); // 'insert' break; case 167: // 'item' shiftT(167); // 'item' break; case 173: // 'last' shiftT(173); // 'last' break; case 185: // 'module' shiftT(185); // 'module' break; case 187: // 'namespace' shiftT(187); // 'namespace' break; case 188: // 'namespace-node' shiftT(188); // 'namespace-node' break; case 194: // 'node' shiftT(194); // 'node' break; case 206: // 'ordered' shiftT(206); // 'ordered' break; case 210: // 'parent' shiftT(210); // 'parent' break; case 216: // 'preceding' shiftT(216); // 'preceding' break; case 217: // 'preceding-sibling' shiftT(217); // 'preceding-sibling' break; case 220: // 'processing-instruction' shiftT(220); // 'processing-instruction' break; case 222: // 'rename' shiftT(222); // 'rename' break; case 223: // 'replace' shiftT(223); // 'replace' break; case 230: // 'schema-attribute' shiftT(230); // 'schema-attribute' break; case 231: // 'schema-element' shiftT(231); // 'schema-element' break; case 234: // 'self' shiftT(234); // 'self' break; case 240: // 'some' shiftT(240); // 'some' break; case 248: // 'switch' shiftT(248); // 'switch' break; case 249: // 'text' shiftT(249); // 'text' break; case 256: // 'try' shiftT(256); // 'try' break; case 259: // 'typeswitch' shiftT(259); // 'typeswitch' break; case 262: // 'unordered' shiftT(262); // 'unordered' break; case 266: // 'validate' shiftT(266); // 'validate' break; case 268: // 'variable' shiftT(268); // 'variable' break; case 170: // 'jsoniq' shiftT(170); // 'jsoniq' break; case 73: // 'allowing' shiftT(73); // 'allowing' break; case 82: // 'at' shiftT(82); // 'at' break; case 84: // 'base-uri' shiftT(84); // 'base-uri' break; case 86: // 'boundary-space' shiftT(86); // 'boundary-space' break; case 87: // 'break' shiftT(87); // 'break' break; case 92: // 'catch' shiftT(92); // 'catch' break; case 99: // 'construction' shiftT(99); // 'construction' break; case 102: // 'context' shiftT(102); // 'context' break; case 103: // 'continue' shiftT(103); // 'continue' break; case 105: // 'copy-namespaces' shiftT(105); // 'copy-namespaces' break; case 107: // 'decimal-format' shiftT(107); // 'decimal-format' break; case 126: // 'encoding' shiftT(126); // 'encoding' break; case 133: // 'exit' shiftT(133); // 'exit' break; case 134: // 'external' shiftT(134); // 'external' break; case 143: // 'ft-option' shiftT(143); // 'ft-option' break; case 156: // 'in' shiftT(156); // 'in' break; case 157: // 'index' shiftT(157); // 'index' break; case 163: // 'integrity' shiftT(163); // 'integrity' break; case 174: // 'lax' shiftT(174); // 'lax' break; case 195: // 'nodes' shiftT(195); // 'nodes' break; case 203: // 'option' shiftT(203); // 'option' break; case 207: // 'ordering' shiftT(207); // 'ordering' break; case 226: // 'revalidation' shiftT(226); // 'revalidation' break; case 229: // 'schema' shiftT(229); // 'schema' break; case 232: // 'score' shiftT(232); // 'score' break; case 239: // 'sliding' shiftT(239); // 'sliding' break; case 245: // 'strict' shiftT(245); // 'strict' break; case 257: // 'tumbling' shiftT(257); // 'tumbling' break; case 258: // 'type' shiftT(258); // 'type' break; case 263: // 'updating' shiftT(263); // 'updating' break; case 267: // 'value' shiftT(267); // 'value' break; case 269: // 'version' shiftT(269); // 'version' break; case 273: // 'while' shiftT(273); // 'while' break; case 98: // 'constraint' shiftT(98); // 'constraint' break; case 179: // 'loop' shiftT(179); // 'loop' break; case 225: // 'returning' shiftT(225); // 'returning' break; case 78: // 'append' shiftT(78); // 'append' break; case 135: // 'false' shiftT(135); // 'false' break; case 142: // 'from' shiftT(142); // 'from' break; case 197: // 'null' shiftT(197); // 'null' break; case 168: // 'json' shiftT(168); // 'json' break; case 198: // 'object' shiftT(198); // 'object' break; case 233: // 'select' shiftT(233); // 'select' break; default: shiftT(255); // 'true' } } function parse_MainModule() { eventHandler.startNonterminal("MainModule", e0); parse_Prolog(); whitespace(); parse_Program(); eventHandler.endNonterminal("MainModule", e0); } function parse_Program() { eventHandler.startNonterminal("Program", e0); parse_StatementsAndOptionalExpr(); eventHandler.endNonterminal("Program", e0); } function parse_Statements() { eventHandler.startNonterminal("Statements", e0); for (;;) { lookahead1W(284); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | switch (l1) { case 35: // '(' lookahead2W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | break; case 36: // '(#' lookahead2(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | break; case 47: // '/' lookahead2W(286); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | break; case 48: // '//' lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | break; case 55: // '<' lookahead2(4); // QName break; case 56: // ''", "'.'", "'..'", "'/'", "'//'", "'/>'", "':'", "':)'", "'::'", "':='", "';'", "'<'", "'' shift(43); // '-->' eventHandler.endNonterminal("DirCommentConstructor", e0); } function try_DirCommentConstructor() { shiftT(55); // '' shiftT(43); // '-->' } function parse_DirPIConstructor() { eventHandler.startNonterminal("DirPIConstructor", e0); shift(59); // '' if (l1 == 21) // S { shift(21); // S lookahead1(2); // DirPIContents shift(3); // DirPIContents } lookahead1(9); // '?>' shift(65); // '?>' eventHandler.endNonterminal("DirPIConstructor", e0); } function try_DirPIConstructor() { shiftT(59); // '' if (l1 == 21) // S { shiftT(21); // S lookahead1(2); // DirPIContents shiftT(3); // DirPIContents } lookahead1(9); // '?>' shiftT(65); // '?>' } function parse_ComputedConstructor() { eventHandler.startNonterminal("ComputedConstructor", e0); switch (l1) { case 119: // 'document' parse_CompDocConstructor(); break; case 121: // 'element' parse_CompElemConstructor(); break; case 82: // 'attribute' parse_CompAttrConstructor(); break; case 184: // 'namespace' parse_CompNamespaceConstructor(); break; case 244: // 'text' parse_CompTextConstructor(); break; case 96: // 'comment' parse_CompCommentConstructor(); break; default: parse_CompPIConstructor(); } eventHandler.endNonterminal("ComputedConstructor", e0); } function try_ComputedConstructor() { switch (l1) { case 119: // 'document' try_CompDocConstructor(); break; case 121: // 'element' try_CompElemConstructor(); break; case 82: // 'attribute' try_CompAttrConstructor(); break; case 184: // 'namespace' try_CompNamespaceConstructor(); break; case 244: // 'text' try_CompTextConstructor(); break; case 96: // 'comment' try_CompCommentConstructor(); break; default: try_CompPIConstructor(); } } function parse_CompElemConstructor() { eventHandler.startNonterminal("CompElemConstructor", e0); shift(121); // 'element' lookahead1W(258); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 276: // '{' shift(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_Expr(); shift(282); // '}' break; default: whitespace(); parse_EQName(); } lookahead1W(87); // S^WS | '(:' | '{' shift(276); // '{' lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | if (l1 != 282) // '}' { whitespace(); parse_ContentExpr(); } shift(282); // '}' eventHandler.endNonterminal("CompElemConstructor", e0); } function try_CompElemConstructor() { shiftT(121); // 'element' lookahead1W(258); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 276: // '{' shiftT(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_Expr(); shiftT(282); // '}' break; default: try_EQName(); } lookahead1W(87); // S^WS | '(:' | '{' shiftT(276); // '{' lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | if (l1 != 282) // '}' { try_ContentExpr(); } shiftT(282); // '}' } function parse_CompNamespaceConstructor() { eventHandler.startNonterminal("CompNamespaceConstructor", e0); shift(184); // 'namespace' lookahead1W(251); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 276: // '{' shift(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_PrefixExpr(); shift(282); // '}' break; default: whitespace(); parse_Prefix(); } lookahead1W(87); // S^WS | '(:' | '{' shift(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_URIExpr(); shift(282); // '}' eventHandler.endNonterminal("CompNamespaceConstructor", e0); } function try_CompNamespaceConstructor() { shiftT(184); // 'namespace' lookahead1W(251); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | switch (l1) { case 276: // '{' shiftT(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_PrefixExpr(); shiftT(282); // '}' break; default: try_Prefix(); } lookahead1W(87); // S^WS | '(:' | '{' shiftT(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_URIExpr(); shiftT(282); // '}' } function parse_Prefix() { eventHandler.startNonterminal("Prefix", e0); parse_NCName(); eventHandler.endNonterminal("Prefix", e0); } function try_Prefix() { try_NCName(); } function parse_PrefixExpr() { eventHandler.startNonterminal("PrefixExpr", e0); parse_Expr(); eventHandler.endNonterminal("PrefixExpr", e0); } function try_PrefixExpr() { try_Expr(); } function parse_URIExpr() { eventHandler.startNonterminal("URIExpr", e0); parse_Expr(); eventHandler.endNonterminal("URIExpr", e0); } function try_URIExpr() { try_Expr(); } function parse_FunctionItemExpr() { eventHandler.startNonterminal("FunctionItemExpr", e0); switch (l1) { case 145: // 'function' lookahead2W(92); // S^WS | '#' | '(' | '(:' break; default: lk = l1; } switch (lk) { case 32: // '%' case 17553: // 'function' '(' parse_InlineFunctionExpr(); break; default: parse_NamedFunctionRef(); } eventHandler.endNonterminal("FunctionItemExpr", e0); } function try_FunctionItemExpr() { switch (l1) { case 145: // 'function' lookahead2W(92); // S^WS | '#' | '(' | '(:' break; default: lk = l1; } switch (lk) { case 32: // '%' case 17553: // 'function' '(' try_InlineFunctionExpr(); break; default: try_NamedFunctionRef(); } } function parse_NamedFunctionRef() { eventHandler.startNonterminal("NamedFunctionRef", e0); parse_EQName(); lookahead1W(20); // S^WS | '#' | '(:' shift(29); // '#' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral eventHandler.endNonterminal("NamedFunctionRef", e0); } function try_NamedFunctionRef() { try_EQName(); lookahead1W(20); // S^WS | '#' | '(:' shiftT(29); // '#' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral } function parse_InlineFunctionExpr() { eventHandler.startNonterminal("InlineFunctionExpr", e0); for (;;) { lookahead1W(97); // S^WS | '%' | '(:' | 'function' if (l1 != 32) // '%' { break; } whitespace(); parse_Annotation(); } shift(145); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(94); // S^WS | '$' | '(:' | ')' if (l1 == 31) // '$' { whitespace(); parse_ParamList(); } shift(37); // ')' lookahead1W(111); // S^WS | '(:' | 'as' | '{' if (l1 == 79) // 'as' { shift(79); // 'as' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } lookahead1W(87); // S^WS | '(:' | '{' whitespace(); parse_FunctionBody(); eventHandler.endNonterminal("InlineFunctionExpr", e0); } function try_InlineFunctionExpr() { for (;;) { lookahead1W(97); // S^WS | '%' | '(:' | 'function' if (l1 != 32) // '%' { break; } try_Annotation(); } shiftT(145); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(94); // S^WS | '$' | '(:' | ')' if (l1 == 31) // '$' { try_ParamList(); } shiftT(37); // ')' lookahead1W(111); // S^WS | '(:' | 'as' | '{' if (l1 == 79) // 'as' { shiftT(79); // 'as' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } lookahead1W(87); // S^WS | '(:' | '{' try_FunctionBody(); } function parse_SingleType() { eventHandler.startNonterminal("SingleType", e0); parse_SimpleTypeName(); lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 64) // '?' { shift(64); // '?' } eventHandler.endNonterminal("SingleType", e0); } function try_SingleType() { try_SimpleTypeName(); lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' | if (l1 == 64) // '?' { shiftT(64); // '?' } } function parse_TypeDeclaration() { eventHandler.startNonterminal("TypeDeclaration", e0); shift(79); // 'as' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); eventHandler.endNonterminal("TypeDeclaration", e0); } function try_TypeDeclaration() { shiftT(79); // 'as' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } function parse_SequenceType() { eventHandler.startNonterminal("SequenceType", e0); switch (l1) { case 124: // 'empty-sequence' lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } switch (lk) { case 17532: // 'empty-sequence' '(' shift(124); // 'empty-sequence' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' break; default: parse_ItemType(); lookahead1W(239); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' | switch (l1) { case 39: // '*' case 40: // '+' case 64: // '?' whitespace(); parse_OccurrenceIndicator(); break; default: break; } } eventHandler.endNonterminal("SequenceType", e0); } function try_SequenceType() { switch (l1) { case 124: // 'empty-sequence' lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } switch (lk) { case 17532: // 'empty-sequence' '(' shiftT(124); // 'empty-sequence' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' break; default: try_ItemType(); lookahead1W(239); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' | switch (l1) { case 39: // '*' case 40: // '+' case 64: // '?' try_OccurrenceIndicator(); break; default: break; } } } function parse_OccurrenceIndicator() { eventHandler.startNonterminal("OccurrenceIndicator", e0); switch (l1) { case 64: // '?' shift(64); // '?' break; case 39: // '*' shift(39); // '*' break; default: shift(40); // '+' } eventHandler.endNonterminal("OccurrenceIndicator", e0); } function try_OccurrenceIndicator() { switch (l1) { case 64: // '?' shiftT(64); // '?' break; case 39: // '*' shiftT(39); // '*' break; default: shiftT(40); // '+' } } function parse_ItemType() { eventHandler.startNonterminal("ItemType", e0); switch (l1) { case 78: // 'array' case 82: // 'attribute' case 96: // 'comment' case 120: // 'document-node' case 121: // 'element' case 145: // 'function' case 165: // 'item' case 167: // 'json-item' case 185: // 'namespace-node' case 191: // 'node' case 194: // 'object' case 216: // 'processing-instruction' case 226: // 'schema-attribute' case 227: // 'schema-element' case 242: // 'structured-item' case 244: // 'text' lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } switch (lk) { case 17490: // 'attribute' '(' case 17504: // 'comment' '(' case 17528: // 'document-node' '(' case 17529: // 'element' '(' case 17593: // 'namespace-node' '(' case 17599: // 'node' '(' case 17624: // 'processing-instruction' '(' case 17634: // 'schema-attribute' '(' case 17635: // 'schema-element' '(' case 17652: // 'text' '(' parse_KindTest(); break; case 17573: // 'item' '(' shift(165); // 'item' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' break; case 32: // '%' case 17553: // 'function' '(' parse_FunctionTest(); break; case 34: // '(' parse_ParenthesizedItemType(); break; case 17486: // 'array' '(' case 17575: // 'json-item' '(' case 17602: // 'object' '(' parse_JSONTest(); break; case 17650: // 'structured-item' '(' parse_StructuredItemTest(); break; default: parse_AtomicOrUnionType(); } eventHandler.endNonterminal("ItemType", e0); } function try_ItemType() { switch (l1) { case 78: // 'array' case 82: // 'attribute' case 96: // 'comment' case 120: // 'document-node' case 121: // 'element' case 145: // 'function' case 165: // 'item' case 167: // 'json-item' case 185: // 'namespace-node' case 191: // 'node' case 194: // 'object' case 216: // 'processing-instruction' case 226: // 'schema-attribute' case 227: // 'schema-element' case 242: // 'structured-item' case 244: // 'text' lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | break; default: lk = l1; } switch (lk) { case 17490: // 'attribute' '(' case 17504: // 'comment' '(' case 17528: // 'document-node' '(' case 17529: // 'element' '(' case 17593: // 'namespace-node' '(' case 17599: // 'node' '(' case 17624: // 'processing-instruction' '(' case 17634: // 'schema-attribute' '(' case 17635: // 'schema-element' '(' case 17652: // 'text' '(' try_KindTest(); break; case 17573: // 'item' '(' shiftT(165); // 'item' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' break; case 32: // '%' case 17553: // 'function' '(' try_FunctionTest(); break; case 34: // '(' try_ParenthesizedItemType(); break; case 17486: // 'array' '(' case 17575: // 'json-item' '(' case 17602: // 'object' '(' try_JSONTest(); break; case 17650: // 'structured-item' '(' try_StructuredItemTest(); break; default: try_AtomicOrUnionType(); } } function parse_JSONTest() { eventHandler.startNonterminal("JSONTest", e0); switch (l1) { case 167: // 'json-item' parse_JSONItemTest(); break; case 194: // 'object' parse_JSONObjectTest(); break; default: parse_JSONArrayTest(); } eventHandler.endNonterminal("JSONTest", e0); } function try_JSONTest() { switch (l1) { case 167: // 'json-item' try_JSONItemTest(); break; case 194: // 'object' try_JSONObjectTest(); break; default: try_JSONArrayTest(); } } function parse_StructuredItemTest() { eventHandler.startNonterminal("StructuredItemTest", e0); shift(242); // 'structured-item' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("StructuredItemTest", e0); } function try_StructuredItemTest() { shiftT(242); // 'structured-item' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_JSONItemTest() { eventHandler.startNonterminal("JSONItemTest", e0); shift(167); // 'json-item' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("JSONItemTest", e0); } function try_JSONItemTest() { shiftT(167); // 'json-item' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_JSONObjectTest() { eventHandler.startNonterminal("JSONObjectTest", e0); shift(194); // 'object' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("JSONObjectTest", e0); } function try_JSONObjectTest() { shiftT(194); // 'object' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_JSONArrayTest() { eventHandler.startNonterminal("JSONArrayTest", e0); shift(78); // 'array' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("JSONArrayTest", e0); } function try_JSONArrayTest() { shiftT(78); // 'array' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_AtomicOrUnionType() { eventHandler.startNonterminal("AtomicOrUnionType", e0); parse_EQName(); eventHandler.endNonterminal("AtomicOrUnionType", e0); } function try_AtomicOrUnionType() { try_EQName(); } function parse_KindTest() { eventHandler.startNonterminal("KindTest", e0); switch (l1) { case 120: // 'document-node' parse_DocumentTest(); break; case 121: // 'element' parse_ElementTest(); break; case 82: // 'attribute' parse_AttributeTest(); break; case 227: // 'schema-element' parse_SchemaElementTest(); break; case 226: // 'schema-attribute' parse_SchemaAttributeTest(); break; case 216: // 'processing-instruction' parse_PITest(); break; case 96: // 'comment' parse_CommentTest(); break; case 244: // 'text' parse_TextTest(); break; case 185: // 'namespace-node' parse_NamespaceNodeTest(); break; default: parse_AnyKindTest(); } eventHandler.endNonterminal("KindTest", e0); } function try_KindTest() { switch (l1) { case 120: // 'document-node' try_DocumentTest(); break; case 121: // 'element' try_ElementTest(); break; case 82: // 'attribute' try_AttributeTest(); break; case 227: // 'schema-element' try_SchemaElementTest(); break; case 226: // 'schema-attribute' try_SchemaAttributeTest(); break; case 216: // 'processing-instruction' try_PITest(); break; case 96: // 'comment' try_CommentTest(); break; case 244: // 'text' try_TextTest(); break; case 185: // 'namespace-node' try_NamespaceNodeTest(); break; default: try_AnyKindTest(); } } function parse_AnyKindTest() { eventHandler.startNonterminal("AnyKindTest", e0); shift(191); // 'node' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("AnyKindTest", e0); } function try_AnyKindTest() { shiftT(191); // 'node' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_DocumentTest() { eventHandler.startNonterminal("DocumentTest", e0); shift(120); // 'document-node' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(144); // S^WS | '(:' | ')' | 'element' | 'schema-element' if (l1 != 37) // ')' { switch (l1) { case 121: // 'element' whitespace(); parse_ElementTest(); break; default: whitespace(); parse_SchemaElementTest(); } } lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("DocumentTest", e0); } function try_DocumentTest() { shiftT(120); // 'document-node' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(144); // S^WS | '(:' | ')' | 'element' | 'schema-element' if (l1 != 37) // ')' { switch (l1) { case 121: // 'element' try_ElementTest(); break; default: try_SchemaElementTest(); } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_TextTest() { eventHandler.startNonterminal("TextTest", e0); shift(244); // 'text' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("TextTest", e0); } function try_TextTest() { shiftT(244); // 'text' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_CommentTest() { eventHandler.startNonterminal("CommentTest", e0); shift(96); // 'comment' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("CommentTest", e0); } function try_CommentTest() { shiftT(96); // 'comment' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_NamespaceNodeTest() { eventHandler.startNonterminal("NamespaceNodeTest", e0); shift(185); // 'namespace-node' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("NamespaceNodeTest", e0); } function try_NamespaceNodeTest() { shiftT(185); // 'namespace-node' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_PITest() { eventHandler.startNonterminal("PITest", e0); shift(216); // 'processing-instruction' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(253); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' | if (l1 != 37) // ')' { switch (l1) { case 11: // StringLiteral shift(11); // StringLiteral break; default: whitespace(); parse_NCName(); } } lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("PITest", e0); } function try_PITest() { shiftT(216); // 'processing-instruction' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(253); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' | if (l1 != 37) // ')' { switch (l1) { case 11: // StringLiteral shiftT(11); // StringLiteral break; default: try_NCName(); } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_AttributeTest() { eventHandler.startNonterminal("AttributeTest", e0); shift(82); // 'attribute' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 37) // ')' { whitespace(); parse_AttribNameOrWildcard(); lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 == 41) // ',' { shift(41); // ',' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_TypeName(); } } lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("AttributeTest", e0); } function try_AttributeTest() { shiftT(82); // 'attribute' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 37) // ')' { try_AttribNameOrWildcard(); lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 == 41) // ',' { shiftT(41); // ',' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_TypeName(); } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_AttribNameOrWildcard() { eventHandler.startNonterminal("AttribNameOrWildcard", e0); switch (l1) { case 38: // '*' shift(38); // '*' break; default: parse_AttributeName(); } eventHandler.endNonterminal("AttribNameOrWildcard", e0); } function try_AttribNameOrWildcard() { switch (l1) { case 38: // '*' shiftT(38); // '*' break; default: try_AttributeName(); } } function parse_SchemaAttributeTest() { eventHandler.startNonterminal("SchemaAttributeTest", e0); shift(226); // 'schema-attribute' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_AttributeDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("SchemaAttributeTest", e0); } function try_SchemaAttributeTest() { shiftT(226); // 'schema-attribute' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_AttributeDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_AttributeDeclaration() { eventHandler.startNonterminal("AttributeDeclaration", e0); parse_AttributeName(); eventHandler.endNonterminal("AttributeDeclaration", e0); } function try_AttributeDeclaration() { try_AttributeName(); } function parse_ElementTest() { eventHandler.startNonterminal("ElementTest", e0); shift(121); // 'element' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 37) // ')' { whitespace(); parse_ElementNameOrWildcard(); lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 == 41) // ',' { shift(41); // ',' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_TypeName(); lookahead1W(102); // S^WS | '(:' | ')' | '?' if (l1 == 64) // '?' { shift(64); // '?' } } } lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("ElementTest", e0); } function try_ElementTest() { shiftT(121); // 'element' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' | if (l1 != 37) // ')' { try_ElementNameOrWildcard(); lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 == 41) // ',' { shiftT(41); // ',' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_TypeName(); lookahead1W(102); // S^WS | '(:' | ')' | '?' if (l1 == 64) // '?' { shiftT(64); // '?' } } } lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_ElementNameOrWildcard() { eventHandler.startNonterminal("ElementNameOrWildcard", e0); switch (l1) { case 38: // '*' shift(38); // '*' break; default: parse_ElementName(); } eventHandler.endNonterminal("ElementNameOrWildcard", e0); } function try_ElementNameOrWildcard() { switch (l1) { case 38: // '*' shiftT(38); // '*' break; default: try_ElementName(); } } function parse_SchemaElementTest() { eventHandler.startNonterminal("SchemaElementTest", e0); shift(227); // 'schema-element' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_ElementDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("SchemaElementTest", e0); } function try_SchemaElementTest() { shiftT(227); // 'schema-element' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_ElementDeclaration(); lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_ElementDeclaration() { eventHandler.startNonterminal("ElementDeclaration", e0); parse_ElementName(); eventHandler.endNonterminal("ElementDeclaration", e0); } function try_ElementDeclaration() { try_ElementName(); } function parse_AttributeName() { eventHandler.startNonterminal("AttributeName", e0); parse_EQName(); eventHandler.endNonterminal("AttributeName", e0); } function try_AttributeName() { try_EQName(); } function parse_ElementName() { eventHandler.startNonterminal("ElementName", e0); parse_EQName(); eventHandler.endNonterminal("ElementName", e0); } function try_ElementName() { try_EQName(); } function parse_SimpleTypeName() { eventHandler.startNonterminal("SimpleTypeName", e0); parse_TypeName(); eventHandler.endNonterminal("SimpleTypeName", e0); } function try_SimpleTypeName() { try_TypeName(); } function parse_TypeName() { eventHandler.startNonterminal("TypeName", e0); parse_EQName(); eventHandler.endNonterminal("TypeName", e0); } function try_TypeName() { try_EQName(); } function parse_FunctionTest() { eventHandler.startNonterminal("FunctionTest", e0); for (;;) { lookahead1W(97); // S^WS | '%' | '(:' | 'function' if (l1 != 32) // '%' { break; } whitespace(); parse_Annotation(); } switch (l1) { case 145: // 'function' lookahead2W(22); // S^WS | '(' | '(:' break; default: lk = l1; } lk = memoized(5, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_AnyFunctionTest(); lk = -1; } catch (p1A) { lk = -2; } b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(5, e0, lk); } switch (lk) { case -1: whitespace(); parse_AnyFunctionTest(); break; default: whitespace(); parse_TypedFunctionTest(); } eventHandler.endNonterminal("FunctionTest", e0); } function try_FunctionTest() { for (;;) { lookahead1W(97); // S^WS | '%' | '(:' | 'function' if (l1 != 32) // '%' { break; } try_Annotation(); } switch (l1) { case 145: // 'function' lookahead2W(22); // S^WS | '(' | '(:' break; default: lk = l1; } lk = memoized(5, e0); if (lk == 0) { var b0A = b0; var e0A = e0; var l1A = l1; var b1A = b1; var e1A = e1; var l2A = l2; var b2A = b2; var e2A = e2; try { try_AnyFunctionTest(); memoize(5, e0A, -1); lk = -3; } catch (p1A) { lk = -2; b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else { b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else { b2 = b2A; e2 = e2A; end = e2A; }} memoize(5, e0A, -2); } } switch (lk) { case -1: try_AnyFunctionTest(); break; case -3: break; default: try_TypedFunctionTest(); } } function parse_AnyFunctionTest() { eventHandler.startNonterminal("AnyFunctionTest", e0); shift(145); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(24); // S^WS | '(:' | '*' shift(38); // '*' lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("AnyFunctionTest", e0); } function try_AnyFunctionTest() { shiftT(145); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(24); // S^WS | '(:' | '*' shiftT(38); // '*' lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_TypedFunctionTest() { eventHandler.startNonterminal("TypedFunctionTest", e0); shift(145); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shift(34); // '(' lookahead1W(263); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' | if (l1 != 37) // ')' { whitespace(); parse_SequenceType(); for (;;) { lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 != 41) // ',' { break; } shift(41); // ',' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); } } shift(37); // ')' lookahead1W(30); // S^WS | '(:' | 'as' shift(79); // 'as' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_SequenceType(); eventHandler.endNonterminal("TypedFunctionTest", e0); } function try_TypedFunctionTest() { shiftT(145); // 'function' lookahead1W(22); // S^WS | '(' | '(:' shiftT(34); // '(' lookahead1W(263); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' | if (l1 != 37) // ')' { try_SequenceType(); for (;;) { lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 != 41) // ',' { break; } shiftT(41); // ',' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } } shiftT(37); // ')' lookahead1W(30); // S^WS | '(:' | 'as' shiftT(79); // 'as' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_SequenceType(); } function parse_ParenthesizedItemType() { eventHandler.startNonterminal("ParenthesizedItemType", e0); shift(34); // '(' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_ItemType(); lookahead1W(23); // S^WS | '(:' | ')' shift(37); // ')' eventHandler.endNonterminal("ParenthesizedItemType", e0); } function try_ParenthesizedItemType() { shiftT(34); // '(' lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' | try_ItemType(); lookahead1W(23); // S^WS | '(:' | ')' shiftT(37); // ')' } function parse_RevalidationDecl() { eventHandler.startNonterminal("RevalidationDecl", e0); shift(108); // 'declare' lookahead1W(72); // S^WS | '(:' | 'revalidation' shift(222); // 'revalidation' lookahead1W(152); // S^WS | '(:' | 'lax' | 'skip' | 'strict' switch (l1) { case 240: // 'strict' shift(240); // 'strict' break; case 171: // 'lax' shift(171); // 'lax' break; default: shift(233); // 'skip' } eventHandler.endNonterminal("RevalidationDecl", e0); } function parse_InsertExprTargetChoice() { eventHandler.startNonterminal("InsertExprTargetChoice", e0); switch (l1) { case 70: // 'after' shift(70); // 'after' break; case 84: // 'before' shift(84); // 'before' break; default: if (l1 == 79) // 'as' { shift(79); // 'as' lookahead1W(119); // S^WS | '(:' | 'first' | 'last' switch (l1) { case 134: // 'first' shift(134); // 'first' break; default: shift(170); // 'last' } } lookahead1W(54); // S^WS | '(:' | 'into' shift(163); // 'into' } eventHandler.endNonterminal("InsertExprTargetChoice", e0); } function try_InsertExprTargetChoice() { switch (l1) { case 70: // 'after' shiftT(70); // 'after' break; case 84: // 'before' shiftT(84); // 'before' break; default: if (l1 == 79) // 'as' { shiftT(79); // 'as' lookahead1W(119); // S^WS | '(:' | 'first' | 'last' switch (l1) { case 134: // 'first' shiftT(134); // 'first' break; default: shiftT(170); // 'last' } } lookahead1W(54); // S^WS | '(:' | 'into' shiftT(163); // 'into' } } function parse_InsertExpr() { eventHandler.startNonterminal("InsertExpr", e0); shift(159); // 'insert' lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 191: // 'node' shift(191); // 'node' break; default: shift(192); // 'nodes' } lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_SourceExpr(); whitespace(); parse_InsertExprTargetChoice(); lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_TargetExpr(); eventHandler.endNonterminal("InsertExpr", e0); } function try_InsertExpr() { shiftT(159); // 'insert' lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 191: // 'node' shiftT(191); // 'node' break; default: shiftT(192); // 'nodes' } lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_SourceExpr(); try_InsertExprTargetChoice(); lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_TargetExpr(); } function parse_DeleteExpr() { eventHandler.startNonterminal("DeleteExpr", e0); shift(110); // 'delete' lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 191: // 'node' shift(191); // 'node' break; default: shift(192); // 'nodes' } lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_TargetExpr(); eventHandler.endNonterminal("DeleteExpr", e0); } function try_DeleteExpr() { shiftT(110); // 'delete' lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes' switch (l1) { case 191: // 'node' shiftT(191); // 'node' break; default: shiftT(192); // 'nodes' } lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_TargetExpr(); } function parse_ReplaceExpr() { eventHandler.startNonterminal("ReplaceExpr", e0); shift(219); // 'replace' lookahead1W(130); // S^WS | '(:' | 'node' | 'value' if (l1 == 261) // 'value' { shift(261); // 'value' lookahead1W(64); // S^WS | '(:' | 'of' shift(196); // 'of' } lookahead1W(62); // S^WS | '(:' | 'node' shift(191); // 'node' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_TargetExpr(); shift(270); // 'with' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ReplaceExpr", e0); } function try_ReplaceExpr() { shiftT(219); // 'replace' lookahead1W(130); // S^WS | '(:' | 'node' | 'value' if (l1 == 261) // 'value' { shiftT(261); // 'value' lookahead1W(64); // S^WS | '(:' | 'of' shiftT(196); // 'of' } lookahead1W(62); // S^WS | '(:' | 'node' shiftT(191); // 'node' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_TargetExpr(); shiftT(270); // 'with' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_ExprSingle(); } function parse_RenameExpr() { eventHandler.startNonterminal("RenameExpr", e0); shift(218); // 'rename' lookahead1W(62); // S^WS | '(:' | 'node' shift(191); // 'node' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_TargetExpr(); shift(79); // 'as' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_NewNameExpr(); eventHandler.endNonterminal("RenameExpr", e0); } function try_RenameExpr() { shiftT(218); // 'rename' lookahead1W(62); // S^WS | '(:' | 'node' shiftT(191); // 'node' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_TargetExpr(); shiftT(79); // 'as' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_NewNameExpr(); } function parse_SourceExpr() { eventHandler.startNonterminal("SourceExpr", e0); parse_ExprSingle(); eventHandler.endNonterminal("SourceExpr", e0); } function try_SourceExpr() { try_ExprSingle(); } function parse_TargetExpr() { eventHandler.startNonterminal("TargetExpr", e0); parse_ExprSingle(); eventHandler.endNonterminal("TargetExpr", e0); } function try_TargetExpr() { try_ExprSingle(); } function parse_NewNameExpr() { eventHandler.startNonterminal("NewNameExpr", e0); parse_ExprSingle(); eventHandler.endNonterminal("NewNameExpr", e0); } function try_NewNameExpr() { try_ExprSingle(); } function parse_TransformExpr() { eventHandler.startNonterminal("TransformExpr", e0); shift(103); // 'copy' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_TransformSpec(); for (;;) { if (l1 != 41) // ',' { break; } shift(41); // ',' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_TransformSpec(); } shift(181); // 'modify' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_ExprSingle(); shift(220); // 'return' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("TransformExpr", e0); } function try_TransformExpr() { shiftT(103); // 'copy' lookahead1W(21); // S^WS | '$' | '(:' try_TransformSpec(); for (;;) { if (l1 != 41) // ',' { break; } shiftT(41); // ',' lookahead1W(21); // S^WS | '$' | '(:' try_TransformSpec(); } shiftT(181); // 'modify' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_ExprSingle(); shiftT(220); // 'return' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_ExprSingle(); } function parse_TransformSpec() { eventHandler.startNonterminal("TransformSpec", e0); shift(31); // '$' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_VarName(); lookahead1W(27); // S^WS | '(:' | ':=' shift(52); // ':=' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("TransformSpec", e0); } function try_TransformSpec() { shiftT(31); // '$' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_VarName(); lookahead1W(27); // S^WS | '(:' | ':=' shiftT(52); // ':=' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_ExprSingle(); } function parse_FTSelection() { eventHandler.startNonterminal("FTSelection", e0); parse_FTOr(); for (;;) { lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 81: // 'at' lookahead2W(151); // S^WS | '(:' | 'end' | 'position' | 'start' break; default: lk = l1; } if (lk != 115 // 'different' && lk != 117 // 'distance' && lk != 127 // 'entire' && lk != 202 // 'ordered' && lk != 223 // 'same' && lk != 269 // 'window' && lk != 64593 // 'at' 'end' && lk != 121425) // 'at' 'start' { break; } whitespace(); parse_FTPosFilter(); } eventHandler.endNonterminal("FTSelection", e0); } function try_FTSelection() { try_FTOr(); for (;;) { lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 81: // 'at' lookahead2W(151); // S^WS | '(:' | 'end' | 'position' | 'start' break; default: lk = l1; } if (lk != 115 // 'different' && lk != 117 // 'distance' && lk != 127 // 'entire' && lk != 202 // 'ordered' && lk != 223 // 'same' && lk != 269 // 'window' && lk != 64593 // 'at' 'end' && lk != 121425) // 'at' 'start' { break; } try_FTPosFilter(); } } function parse_FTWeight() { eventHandler.startNonterminal("FTWeight", e0); shift(264); // 'weight' lookahead1W(87); // S^WS | '(:' | '{' shift(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_Expr(); shift(282); // '}' eventHandler.endNonterminal("FTWeight", e0); } function try_FTWeight() { shiftT(264); // 'weight' lookahead1W(87); // S^WS | '(:' | '{' shiftT(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_Expr(); shiftT(282); // '}' } function parse_FTOr() { eventHandler.startNonterminal("FTOr", e0); parse_FTAnd(); for (;;) { if (l1 != 144) // 'ftor' { break; } shift(144); // 'ftor' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTAnd(); } eventHandler.endNonterminal("FTOr", e0); } function try_FTOr() { try_FTAnd(); for (;;) { if (l1 != 144) // 'ftor' { break; } shiftT(144); // 'ftor' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTAnd(); } } function parse_FTAnd() { eventHandler.startNonterminal("FTAnd", e0); parse_FTMildNot(); for (;;) { if (l1 != 142) // 'ftand' { break; } shift(142); // 'ftand' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTMildNot(); } eventHandler.endNonterminal("FTAnd", e0); } function try_FTAnd() { try_FTMildNot(); for (;;) { if (l1 != 142) // 'ftand' { break; } shiftT(142); // 'ftand' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTMildNot(); } } function parse_FTMildNot() { eventHandler.startNonterminal("FTMildNot", e0); parse_FTUnaryNot(); for (;;) { lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 193) // 'not' { break; } shift(193); // 'not' lookahead1W(53); // S^WS | '(:' | 'in' shift(154); // 'in' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTUnaryNot(); } eventHandler.endNonterminal("FTMildNot", e0); } function try_FTMildNot() { try_FTUnaryNot(); for (;;) { lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 193) // 'not' { break; } shiftT(193); // 'not' lookahead1W(53); // S^WS | '(:' | 'in' shiftT(154); // 'in' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTUnaryNot(); } } function parse_FTUnaryNot() { eventHandler.startNonterminal("FTUnaryNot", e0); if (l1 == 143) // 'ftnot' { shift(143); // 'ftnot' } lookahead1W(155); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{' whitespace(); parse_FTPrimaryWithOptions(); eventHandler.endNonterminal("FTUnaryNot", e0); } function try_FTUnaryNot() { if (l1 == 143) // 'ftnot' { shiftT(143); // 'ftnot' } lookahead1W(155); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{' try_FTPrimaryWithOptions(); } function parse_FTPrimaryWithOptions() { eventHandler.startNonterminal("FTPrimaryWithOptions", e0); parse_FTPrimary(); lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 259) // 'using' { whitespace(); parse_FTMatchOptions(); } if (l1 == 264) // 'weight' { whitespace(); parse_FTWeight(); } eventHandler.endNonterminal("FTPrimaryWithOptions", e0); } function try_FTPrimaryWithOptions() { try_FTPrimary(); lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 259) // 'using' { try_FTMatchOptions(); } if (l1 == 264) // 'weight' { try_FTWeight(); } } function parse_FTPrimary() { eventHandler.startNonterminal("FTPrimary", e0); switch (l1) { case 34: // '(' shift(34); // '(' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' whitespace(); parse_FTSelection(); shift(37); // ')' break; case 35: // '(#' parse_FTExtensionSelection(); break; default: parse_FTWords(); lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 195) // 'occurs' { whitespace(); parse_FTTimes(); } } eventHandler.endNonterminal("FTPrimary", e0); } function try_FTPrimary() { switch (l1) { case 34: // '(' shiftT(34); // '(' lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' try_FTSelection(); shiftT(37); // ')' break; case 35: // '(#' try_FTExtensionSelection(); break; default: try_FTWords(); lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 195) // 'occurs' { try_FTTimes(); } } } function parse_FTWords() { eventHandler.startNonterminal("FTWords", e0); parse_FTWordsValue(); lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 71 // 'all' || l1 == 76 // 'any' || l1 == 210) // 'phrase' { whitespace(); parse_FTAnyallOption(); } eventHandler.endNonterminal("FTWords", e0); } function try_FTWords() { try_FTWordsValue(); lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 71 // 'all' || l1 == 76 // 'any' || l1 == 210) // 'phrase' { try_FTAnyallOption(); } } function parse_FTWordsValue() { eventHandler.startNonterminal("FTWordsValue", e0); switch (l1) { case 11: // StringLiteral shift(11); // StringLiteral break; default: shift(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_Expr(); shift(282); // '}' } eventHandler.endNonterminal("FTWordsValue", e0); } function try_FTWordsValue() { switch (l1) { case 11: // StringLiteral shiftT(11); // StringLiteral break; default: shiftT(276); // '{' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_Expr(); shiftT(282); // '}' } } function parse_FTExtensionSelection() { eventHandler.startNonterminal("FTExtensionSelection", e0); for (;;) { whitespace(); parse_Pragma(); lookahead1W(100); // S^WS | '(#' | '(:' | '{' if (l1 != 35) // '(#' { break; } } shift(276); // '{' lookahead1W(166); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}' if (l1 != 282) // '}' { whitespace(); parse_FTSelection(); } shift(282); // '}' eventHandler.endNonterminal("FTExtensionSelection", e0); } function try_FTExtensionSelection() { for (;;) { try_Pragma(); lookahead1W(100); // S^WS | '(#' | '(:' | '{' if (l1 != 35) // '(#' { break; } } shiftT(276); // '{' lookahead1W(166); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}' if (l1 != 282) // '}' { try_FTSelection(); } shiftT(282); // '}' } function parse_FTAnyallOption() { eventHandler.startNonterminal("FTAnyallOption", e0); switch (l1) { case 76: // 'any' shift(76); // 'any' lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 272) // 'word' { shift(272); // 'word' } break; case 71: // 'all' shift(71); // 'all' lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 273) // 'words' { shift(273); // 'words' } break; default: shift(210); // 'phrase' } eventHandler.endNonterminal("FTAnyallOption", e0); } function try_FTAnyallOption() { switch (l1) { case 76: // 'any' shiftT(76); // 'any' lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 272) // 'word' { shiftT(272); // 'word' } break; case 71: // 'all' shiftT(71); // 'all' lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 273) // 'words' { shiftT(273); // 'words' } break; default: shiftT(210); // 'phrase' } } function parse_FTTimes() { eventHandler.startNonterminal("FTTimes", e0); shift(195); // 'occurs' lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from' whitespace(); parse_FTRange(); shift(247); // 'times' eventHandler.endNonterminal("FTTimes", e0); } function try_FTTimes() { shiftT(195); // 'occurs' lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from' try_FTRange(); shiftT(247); // 'times' } function parse_FTRange() { eventHandler.startNonterminal("FTRange", e0); switch (l1) { case 130: // 'exactly' shift(130); // 'exactly' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_AdditiveExpr(); break; case 81: // 'at' shift(81); // 'at' lookahead1W(125); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 173: // 'least' shift(173); // 'least' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_AdditiveExpr(); break; default: shift(183); // 'most' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_AdditiveExpr(); } break; default: shift(140); // 'from' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_AdditiveExpr(); shift(248); // 'to' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_AdditiveExpr(); } eventHandler.endNonterminal("FTRange", e0); } function try_FTRange() { switch (l1) { case 130: // 'exactly' shiftT(130); // 'exactly' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_AdditiveExpr(); break; case 81: // 'at' shiftT(81); // 'at' lookahead1W(125); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 173: // 'least' shiftT(173); // 'least' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_AdditiveExpr(); break; default: shiftT(183); // 'most' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_AdditiveExpr(); } break; default: shiftT(140); // 'from' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_AdditiveExpr(); shiftT(248); // 'to' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_AdditiveExpr(); } } function parse_FTPosFilter() { eventHandler.startNonterminal("FTPosFilter", e0); switch (l1) { case 202: // 'ordered' parse_FTOrder(); break; case 269: // 'window' parse_FTWindow(); break; case 117: // 'distance' parse_FTDistance(); break; case 115: // 'different' case 223: // 'same' parse_FTScope(); break; default: parse_FTContent(); } eventHandler.endNonterminal("FTPosFilter", e0); } function try_FTPosFilter() { switch (l1) { case 202: // 'ordered' try_FTOrder(); break; case 269: // 'window' try_FTWindow(); break; case 117: // 'distance' try_FTDistance(); break; case 115: // 'different' case 223: // 'same' try_FTScope(); break; default: try_FTContent(); } } function parse_FTOrder() { eventHandler.startNonterminal("FTOrder", e0); shift(202); // 'ordered' eventHandler.endNonterminal("FTOrder", e0); } function try_FTOrder() { shiftT(202); // 'ordered' } function parse_FTWindow() { eventHandler.startNonterminal("FTWindow", e0); shift(269); // 'window' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_AdditiveExpr(); whitespace(); parse_FTUnit(); eventHandler.endNonterminal("FTWindow", e0); } function try_FTWindow() { shiftT(269); // 'window' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_AdditiveExpr(); try_FTUnit(); } function parse_FTDistance() { eventHandler.startNonterminal("FTDistance", e0); shift(117); // 'distance' lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from' whitespace(); parse_FTRange(); whitespace(); parse_FTUnit(); eventHandler.endNonterminal("FTDistance", e0); } function try_FTDistance() { shiftT(117); // 'distance' lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from' try_FTRange(); try_FTUnit(); } function parse_FTUnit() { eventHandler.startNonterminal("FTUnit", e0); switch (l1) { case 273: // 'words' shift(273); // 'words' break; case 232: // 'sentences' shift(232); // 'sentences' break; default: shift(205); // 'paragraphs' } eventHandler.endNonterminal("FTUnit", e0); } function try_FTUnit() { switch (l1) { case 273: // 'words' shiftT(273); // 'words' break; case 232: // 'sentences' shiftT(232); // 'sentences' break; default: shiftT(205); // 'paragraphs' } } function parse_FTScope() { eventHandler.startNonterminal("FTScope", e0); switch (l1) { case 223: // 'same' shift(223); // 'same' break; default: shift(115); // 'different' } lookahead1W(132); // S^WS | '(:' | 'paragraph' | 'sentence' whitespace(); parse_FTBigUnit(); eventHandler.endNonterminal("FTScope", e0); } function try_FTScope() { switch (l1) { case 223: // 'same' shiftT(223); // 'same' break; default: shiftT(115); // 'different' } lookahead1W(132); // S^WS | '(:' | 'paragraph' | 'sentence' try_FTBigUnit(); } function parse_FTBigUnit() { eventHandler.startNonterminal("FTBigUnit", e0); switch (l1) { case 231: // 'sentence' shift(231); // 'sentence' break; default: shift(204); // 'paragraph' } eventHandler.endNonterminal("FTBigUnit", e0); } function try_FTBigUnit() { switch (l1) { case 231: // 'sentence' shiftT(231); // 'sentence' break; default: shiftT(204); // 'paragraph' } } function parse_FTContent() { eventHandler.startNonterminal("FTContent", e0); switch (l1) { case 81: // 'at' shift(81); // 'at' lookahead1W(117); // S^WS | '(:' | 'end' | 'start' switch (l1) { case 237: // 'start' shift(237); // 'start' break; default: shift(126); // 'end' } break; default: shift(127); // 'entire' lookahead1W(42); // S^WS | '(:' | 'content' shift(100); // 'content' } eventHandler.endNonterminal("FTContent", e0); } function try_FTContent() { switch (l1) { case 81: // 'at' shiftT(81); // 'at' lookahead1W(117); // S^WS | '(:' | 'end' | 'start' switch (l1) { case 237: // 'start' shiftT(237); // 'start' break; default: shiftT(126); // 'end' } break; default: shiftT(127); // 'entire' lookahead1W(42); // S^WS | '(:' | 'content' shiftT(100); // 'content' } } function parse_FTMatchOptions() { eventHandler.startNonterminal("FTMatchOptions", e0); for (;;) { shift(259); // 'using' lookahead1W(182); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' | whitespace(); parse_FTMatchOption(); lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 259) // 'using' { break; } } eventHandler.endNonterminal("FTMatchOptions", e0); } function try_FTMatchOptions() { for (;;) { shiftT(259); // 'using' lookahead1W(182); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' | try_FTMatchOption(); lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 259) // 'using' { break; } } } function parse_FTMatchOption() { eventHandler.startNonterminal("FTMatchOption", e0); switch (l1) { case 188: // 'no' lookahead2W(161); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards' break; default: lk = l1; } switch (lk) { case 169: // 'language' parse_FTLanguageOption(); break; case 268: // 'wildcards' case 137404: // 'no' 'wildcards' parse_FTWildCardOption(); break; case 246: // 'thesaurus' case 126140: // 'no' 'thesaurus' parse_FTThesaurusOption(); break; case 238: // 'stemming' case 122044: // 'no' 'stemming' parse_FTStemOption(); break; case 114: // 'diacritics' parse_FTDiacriticsOption(); break; case 239: // 'stop' case 122556: // 'no' 'stop' parse_FTStopWordOption(); break; case 199: // 'option' parse_FTExtensionOption(); break; default: parse_FTCaseOption(); } eventHandler.endNonterminal("FTMatchOption", e0); } function try_FTMatchOption() { switch (l1) { case 188: // 'no' lookahead2W(161); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards' break; default: lk = l1; } switch (lk) { case 169: // 'language' try_FTLanguageOption(); break; case 268: // 'wildcards' case 137404: // 'no' 'wildcards' try_FTWildCardOption(); break; case 246: // 'thesaurus' case 126140: // 'no' 'thesaurus' try_FTThesaurusOption(); break; case 238: // 'stemming' case 122044: // 'no' 'stemming' try_FTStemOption(); break; case 114: // 'diacritics' try_FTDiacriticsOption(); break; case 239: // 'stop' case 122556: // 'no' 'stop' try_FTStopWordOption(); break; case 199: // 'option' try_FTExtensionOption(); break; default: try_FTCaseOption(); } } function parse_FTCaseOption() { eventHandler.startNonterminal("FTCaseOption", e0); switch (l1) { case 88: // 'case' shift(88); // 'case' lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 158: // 'insensitive' shift(158); // 'insensitive' break; default: shift(230); // 'sensitive' } break; case 177: // 'lowercase' shift(177); // 'lowercase' break; default: shift(258); // 'uppercase' } eventHandler.endNonterminal("FTCaseOption", e0); } function try_FTCaseOption() { switch (l1) { case 88: // 'case' shiftT(88); // 'case' lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 158: // 'insensitive' shiftT(158); // 'insensitive' break; default: shiftT(230); // 'sensitive' } break; case 177: // 'lowercase' shiftT(177); // 'lowercase' break; default: shiftT(258); // 'uppercase' } } function parse_FTDiacriticsOption() { eventHandler.startNonterminal("FTDiacriticsOption", e0); shift(114); // 'diacritics' lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 158: // 'insensitive' shift(158); // 'insensitive' break; default: shift(230); // 'sensitive' } eventHandler.endNonterminal("FTDiacriticsOption", e0); } function try_FTDiacriticsOption() { shiftT(114); // 'diacritics' lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive' switch (l1) { case 158: // 'insensitive' shiftT(158); // 'insensitive' break; default: shiftT(230); // 'sensitive' } } function parse_FTStemOption() { eventHandler.startNonterminal("FTStemOption", e0); switch (l1) { case 238: // 'stemming' shift(238); // 'stemming' break; default: shift(188); // 'no' lookahead1W(74); // S^WS | '(:' | 'stemming' shift(238); // 'stemming' } eventHandler.endNonterminal("FTStemOption", e0); } function try_FTStemOption() { switch (l1) { case 238: // 'stemming' shiftT(238); // 'stemming' break; default: shiftT(188); // 'no' lookahead1W(74); // S^WS | '(:' | 'stemming' shiftT(238); // 'stemming' } } function parse_FTThesaurusOption() { eventHandler.startNonterminal("FTThesaurusOption", e0); switch (l1) { case 246: // 'thesaurus' shift(246); // 'thesaurus' lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 81: // 'at' whitespace(); parse_FTThesaurusID(); break; case 109: // 'default' shift(109); // 'default' break; default: shift(34); // '(' lookahead1W(112); // S^WS | '(:' | 'at' | 'default' switch (l1) { case 81: // 'at' whitespace(); parse_FTThesaurusID(); break; default: shift(109); // 'default' } for (;;) { lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 != 41) // ',' { break; } shift(41); // ',' lookahead1W(31); // S^WS | '(:' | 'at' whitespace(); parse_FTThesaurusID(); } shift(37); // ')' } break; default: shift(188); // 'no' lookahead1W(78); // S^WS | '(:' | 'thesaurus' shift(246); // 'thesaurus' } eventHandler.endNonterminal("FTThesaurusOption", e0); } function try_FTThesaurusOption() { switch (l1) { case 246: // 'thesaurus' shiftT(246); // 'thesaurus' lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 81: // 'at' try_FTThesaurusID(); break; case 109: // 'default' shiftT(109); // 'default' break; default: shiftT(34); // '(' lookahead1W(112); // S^WS | '(:' | 'at' | 'default' switch (l1) { case 81: // 'at' try_FTThesaurusID(); break; default: shiftT(109); // 'default' } for (;;) { lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 != 41) // ',' { break; } shiftT(41); // ',' lookahead1W(31); // S^WS | '(:' | 'at' try_FTThesaurusID(); } shiftT(37); // ')' } break; default: shiftT(188); // 'no' lookahead1W(78); // S^WS | '(:' | 'thesaurus' shiftT(246); // 'thesaurus' } } function parse_FTThesaurusID() { eventHandler.startNonterminal("FTThesaurusID", e0); shift(81); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 217) // 'relationship' { shift(217); // 'relationship' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral } lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 81: // 'at' lookahead2W(165); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start' break; default: lk = l1; } if (lk == 130 // 'exactly' || lk == 140 // 'from' || lk == 88657 // 'at' 'least' || lk == 93777) // 'at' 'most' { whitespace(); parse_FTLiteralRange(); lookahead1W(58); // S^WS | '(:' | 'levels' shift(175); // 'levels' } eventHandler.endNonterminal("FTThesaurusID", e0); } function try_FTThesaurusID() { shiftT(81); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 == 217) // 'relationship' { shiftT(217); // 'relationship' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | switch (l1) { case 81: // 'at' lookahead2W(165); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start' break; default: lk = l1; } if (lk == 130 // 'exactly' || lk == 140 // 'from' || lk == 88657 // 'at' 'least' || lk == 93777) // 'at' 'most' { try_FTLiteralRange(); lookahead1W(58); // S^WS | '(:' | 'levels' shiftT(175); // 'levels' } } function parse_FTLiteralRange() { eventHandler.startNonterminal("FTLiteralRange", e0); switch (l1) { case 130: // 'exactly' shift(130); // 'exactly' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral break; case 81: // 'at' shift(81); // 'at' lookahead1W(125); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 173: // 'least' shift(173); // 'least' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral break; default: shift(183); // 'most' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral } break; default: shift(140); // 'from' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral lookahead1W(79); // S^WS | '(:' | 'to' shift(248); // 'to' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shift(8); // IntegerLiteral } eventHandler.endNonterminal("FTLiteralRange", e0); } function try_FTLiteralRange() { switch (l1) { case 130: // 'exactly' shiftT(130); // 'exactly' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral break; case 81: // 'at' shiftT(81); // 'at' lookahead1W(125); // S^WS | '(:' | 'least' | 'most' switch (l1) { case 173: // 'least' shiftT(173); // 'least' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral break; default: shiftT(183); // 'most' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral } break; default: shiftT(140); // 'from' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral lookahead1W(79); // S^WS | '(:' | 'to' shiftT(248); // 'to' lookahead1W(16); // IntegerLiteral | S^WS | '(:' shiftT(8); // IntegerLiteral } } function parse_FTStopWordOption() { eventHandler.startNonterminal("FTStopWordOption", e0); switch (l1) { case 239: // 'stop' shift(239); // 'stop' lookahead1W(86); // S^WS | '(:' | 'words' shift(273); // 'words' lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 109: // 'default' shift(109); // 'default' for (;;) { lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 131 // 'except' && l1 != 254) // 'union' { break; } whitespace(); parse_FTStopWordsInclExcl(); } break; default: whitespace(); parse_FTStopWords(); for (;;) { lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 131 // 'except' && l1 != 254) // 'union' { break; } whitespace(); parse_FTStopWordsInclExcl(); } } break; default: shift(188); // 'no' lookahead1W(75); // S^WS | '(:' | 'stop' shift(239); // 'stop' lookahead1W(86); // S^WS | '(:' | 'words' shift(273); // 'words' } eventHandler.endNonterminal("FTStopWordOption", e0); } function try_FTStopWordOption() { switch (l1) { case 239: // 'stop' shiftT(239); // 'stop' lookahead1W(86); // S^WS | '(:' | 'words' shiftT(273); // 'words' lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default' switch (l1) { case 109: // 'default' shiftT(109); // 'default' for (;;) { lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 131 // 'except' && l1 != 254) // 'union' { break; } try_FTStopWordsInclExcl(); } break; default: try_FTStopWords(); for (;;) { lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' | if (l1 != 131 // 'except' && l1 != 254) // 'union' { break; } try_FTStopWordsInclExcl(); } } break; default: shiftT(188); // 'no' lookahead1W(75); // S^WS | '(:' | 'stop' shiftT(239); // 'stop' lookahead1W(86); // S^WS | '(:' | 'words' shiftT(273); // 'words' } } function parse_FTStopWords() { eventHandler.startNonterminal("FTStopWords", e0); switch (l1) { case 81: // 'at' shift(81); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral break; default: shift(34); // '(' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral for (;;) { lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 != 41) // ',' { break; } shift(41); // ',' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral } shift(37); // ')' } eventHandler.endNonterminal("FTStopWords", e0); } function try_FTStopWords() { switch (l1) { case 81: // 'at' shiftT(81); // 'at' lookahead1W(15); // URILiteral | S^WS | '(:' shiftT(7); // URILiteral break; default: shiftT(34); // '(' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral for (;;) { lookahead1W(101); // S^WS | '(:' | ')' | ',' if (l1 != 41) // ',' { break; } shiftT(41); // ',' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } shiftT(37); // ')' } } function parse_FTStopWordsInclExcl() { eventHandler.startNonterminal("FTStopWordsInclExcl", e0); switch (l1) { case 254: // 'union' shift(254); // 'union' break; default: shift(131); // 'except' } lookahead1W(99); // S^WS | '(' | '(:' | 'at' whitespace(); parse_FTStopWords(); eventHandler.endNonterminal("FTStopWordsInclExcl", e0); } function try_FTStopWordsInclExcl() { switch (l1) { case 254: // 'union' shiftT(254); // 'union' break; default: shiftT(131); // 'except' } lookahead1W(99); // S^WS | '(' | '(:' | 'at' try_FTStopWords(); } function parse_FTLanguageOption() { eventHandler.startNonterminal("FTLanguageOption", e0); shift(169); // 'language' lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral eventHandler.endNonterminal("FTLanguageOption", e0); } function try_FTLanguageOption() { shiftT(169); // 'language' lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } function parse_FTWildCardOption() { eventHandler.startNonterminal("FTWildCardOption", e0); switch (l1) { case 268: // 'wildcards' shift(268); // 'wildcards' break; default: shift(188); // 'no' lookahead1W(84); // S^WS | '(:' | 'wildcards' shift(268); // 'wildcards' } eventHandler.endNonterminal("FTWildCardOption", e0); } function try_FTWildCardOption() { switch (l1) { case 268: // 'wildcards' shiftT(268); // 'wildcards' break; default: shiftT(188); // 'no' lookahead1W(84); // S^WS | '(:' | 'wildcards' shiftT(268); // 'wildcards' } } function parse_FTExtensionOption() { eventHandler.startNonterminal("FTExtensionOption", e0); shift(199); // 'option' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(17); // StringLiteral | S^WS | '(:' shift(11); // StringLiteral eventHandler.endNonterminal("FTExtensionOption", e0); } function try_FTExtensionOption() { shiftT(199); // 'option' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | try_EQName(); lookahead1W(17); // StringLiteral | S^WS | '(:' shiftT(11); // StringLiteral } function parse_FTIgnoreOption() { eventHandler.startNonterminal("FTIgnoreOption", e0); shift(271); // 'without' lookahead1W(42); // S^WS | '(:' | 'content' shift(100); // 'content' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_UnionExpr(); eventHandler.endNonterminal("FTIgnoreOption", e0); } function try_FTIgnoreOption() { shiftT(271); // 'without' lookahead1W(42); // S^WS | '(:' | 'content' shiftT(100); // 'content' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | try_UnionExpr(); } function parse_CollectionDecl() { eventHandler.startNonterminal("CollectionDecl", e0); shift(95); // 'collection' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(107); // S^WS | '(:' | ';' | 'as' if (l1 == 79) // 'as' { whitespace(); parse_CollectionTypeDecl(); } eventHandler.endNonterminal("CollectionDecl", e0); } function parse_CollectionTypeDecl() { eventHandler.startNonterminal("CollectionTypeDecl", e0); shift(79); // 'as' lookahead1W(178); // S^WS | '(:' | 'attribute' | 'comment' | 'document-node' | 'element' | whitespace(); parse_KindTest(); lookahead1W(156); // S^WS | '(:' | '*' | '+' | ';' | '?' if (l1 != 53) // ';' { whitespace(); parse_OccurrenceIndicator(); } eventHandler.endNonterminal("CollectionTypeDecl", e0); } function parse_IndexName() { eventHandler.startNonterminal("IndexName", e0); parse_EQName(); eventHandler.endNonterminal("IndexName", e0); } function parse_IndexDomainExpr() { eventHandler.startNonterminal("IndexDomainExpr", e0); parse_PathExpr(); eventHandler.endNonterminal("IndexDomainExpr", e0); } function parse_IndexKeySpec() { eventHandler.startNonterminal("IndexKeySpec", e0); parse_IndexKeyExpr(); if (l1 == 79) // 'as' { whitespace(); parse_IndexKeyTypeDecl(); } lookahead1W(146); // S^WS | '(:' | ',' | ';' | 'collation' if (l1 == 94) // 'collation' { whitespace(); parse_IndexKeyCollation(); } eventHandler.endNonterminal("IndexKeySpec", e0); } function parse_IndexKeyExpr() { eventHandler.startNonterminal("IndexKeyExpr", e0); parse_PathExpr(); eventHandler.endNonterminal("IndexKeyExpr", e0); } function parse_IndexKeyTypeDecl() { eventHandler.startNonterminal("IndexKeyTypeDecl", e0); shift(79); // 'as' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_AtomicType(); lookahead1W(169); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation' if (l1 == 39 // '*' || l1 == 40 // '+' || l1 == 64) // '?' { whitespace(); parse_OccurrenceIndicator(); } eventHandler.endNonterminal("IndexKeyTypeDecl", e0); } function parse_AtomicType() { eventHandler.startNonterminal("AtomicType", e0); parse_EQName(); eventHandler.endNonterminal("AtomicType", e0); } function parse_IndexKeyCollation() { eventHandler.startNonterminal("IndexKeyCollation", e0); shift(94); // 'collation' lookahead1W(15); // URILiteral | S^WS | '(:' shift(7); // URILiteral eventHandler.endNonterminal("IndexKeyCollation", e0); } function parse_IndexDecl() { eventHandler.startNonterminal("IndexDecl", e0); shift(155); // 'index' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_IndexName(); lookahead1W(65); // S^WS | '(:' | 'on' shift(197); // 'on' lookahead1W(63); // S^WS | '(:' | 'nodes' shift(192); // 'nodes' lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_IndexDomainExpr(); shift(87); // 'by' lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_IndexKeySpec(); for (;;) { lookahead1W(103); // S^WS | '(:' | ',' | ';' if (l1 != 41) // ',' { break; } shift(41); // ',' lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_IndexKeySpec(); } eventHandler.endNonterminal("IndexDecl", e0); } function parse_ICDecl() { eventHandler.startNonterminal("ICDecl", e0); shift(161); // 'integrity' lookahead1W(40); // S^WS | '(:' | 'constraint' shift(97); // 'constraint' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(120); // S^WS | '(:' | 'foreign' | 'on' switch (l1) { case 197: // 'on' whitespace(); parse_ICCollection(); break; default: whitespace(); parse_ICForeignKey(); } eventHandler.endNonterminal("ICDecl", e0); } function parse_ICCollection() { eventHandler.startNonterminal("ICCollection", e0); shift(197); // 'on' lookahead1W(39); // S^WS | '(:' | 'collection' shift(95); // 'collection' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(140); // S^WS | '$' | '(:' | 'foreach' | 'node' switch (l1) { case 31: // '$' whitespace(); parse_ICCollSequence(); break; case 191: // 'node' whitespace(); parse_ICCollSequenceUnique(); break; default: whitespace(); parse_ICCollNode(); } eventHandler.endNonterminal("ICCollection", e0); } function parse_ICCollSequence() { eventHandler.startNonterminal("ICCollSequence", e0); parse_VarRef(); lookahead1W(37); // S^WS | '(:' | 'check' shift(92); // 'check' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ICCollSequence", e0); } function parse_ICCollSequenceUnique() { eventHandler.startNonterminal("ICCollSequenceUnique", e0); shift(191); // 'node' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_VarRef(); lookahead1W(37); // S^WS | '(:' | 'check' shift(92); // 'check' lookahead1W(80); // S^WS | '(:' | 'unique' shift(255); // 'unique' lookahead1W(57); // S^WS | '(:' | 'key' shift(168); // 'key' lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_PathExpr(); eventHandler.endNonterminal("ICCollSequenceUnique", e0); } function parse_ICCollNode() { eventHandler.startNonterminal("ICCollNode", e0); shift(138); // 'foreach' lookahead1W(62); // S^WS | '(:' | 'node' shift(191); // 'node' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_VarRef(); lookahead1W(37); // S^WS | '(:' | 'check' shift(92); // 'check' lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_ExprSingle(); eventHandler.endNonterminal("ICCollNode", e0); } function parse_ICForeignKey() { eventHandler.startNonterminal("ICForeignKey", e0); shift(139); // 'foreign' lookahead1W(57); // S^WS | '(:' | 'key' shift(168); // 'key' lookahead1W(51); // S^WS | '(:' | 'from' whitespace(); parse_ICForeignKeySource(); whitespace(); parse_ICForeignKeyTarget(); eventHandler.endNonterminal("ICForeignKey", e0); } function parse_ICForeignKeySource() { eventHandler.startNonterminal("ICForeignKeySource", e0); shift(140); // 'from' lookahead1W(39); // S^WS | '(:' | 'collection' whitespace(); parse_ICForeignKeyValues(); eventHandler.endNonterminal("ICForeignKeySource", e0); } function parse_ICForeignKeyTarget() { eventHandler.startNonterminal("ICForeignKeyTarget", e0); shift(248); // 'to' lookahead1W(39); // S^WS | '(:' | 'collection' whitespace(); parse_ICForeignKeyValues(); eventHandler.endNonterminal("ICForeignKeyTarget", e0); } function parse_ICForeignKeyValues() { eventHandler.startNonterminal("ICForeignKeyValues", e0); shift(95); // 'collection' lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' | whitespace(); parse_EQName(); lookahead1W(62); // S^WS | '(:' | 'node' shift(191); // 'node' lookahead1W(21); // S^WS | '$' | '(:' whitespace(); parse_VarRef(); lookahead1W(57); // S^WS | '(:' | 'key' shift(168); // 'key' lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | whitespace(); parse_PathExpr(); eventHandler.endNonterminal("ICForeignKeyValues", e0); } function try_Comment() { shiftT(36); // '(:' for (;;) { lookahead1(89); // CommentContents | '(:' | ':)' if (l1 == 50) // ':)' { break; } switch (l1) { case 24: // CommentContents shiftT(24); // CommentContents break; default: try_Comment(); } } shiftT(50); // ':)' } function try_Whitespace() { switch (l1) { case 22: // S^WS shiftT(22); // S^WS break; default: try_Comment(); } } function parse_EQName() { eventHandler.startNonterminal("EQName", e0); lookahead1(250); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | switch (l1) { case 82: // 'attribute' shift(82); // 'attribute' break; case 96: // 'comment' shift(96); // 'comment' break; case 120: // 'document-node' shift(120); // 'document-node' break; case 121: // 'element' shift(121); // 'element' break; case 124: // 'empty-sequence' shift(124); // 'empty-sequence' break; case 145: // 'function' shift(145); // 'function' break; case 152: // 'if' shift(152); // 'if' break; case 165: // 'item' shift(165); // 'item' break; case 185: // 'namespace-node' shift(185); // 'namespace-node' break; case 191: // 'node' shift(191); // 'node' break; case 216: // 'processing-instruction' shift(216); // 'processing-instruction' break; case 226: // 'schema-attribute' shift(226); // 'schema-attribute' break; case 227: // 'schema-element' shift(227); // 'schema-element' break; case 243: // 'switch' shift(243); // 'switch' break; case 244: // 'text' shift(244); // 'text' break; case 253: // 'typeswitch' shift(253); // 'typeswitch' break; case 78: // 'array' shift(78); // 'array' break; case 167: // 'json-item' shift(167); // 'json-item' break; case 242: // 'structured-item' shift(242); // 'structured-item' break; default: parse_FunctionName(); } eventHandler.endNonterminal("EQName", e0); } function try_EQName() { lookahead1(250); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | switch (l1) { case 82: // 'attribute' shiftT(82); // 'attribute' break; case 96: // 'comment' shiftT(96); // 'comment' break; case 120: // 'document-node' shiftT(120); // 'document-node' break; case 121: // 'element' shiftT(121); // 'element' break; case 124: // 'empty-sequence' shiftT(124); // 'empty-sequence' break; case 145: // 'function' shiftT(145); // 'function' break; case 152: // 'if' shiftT(152); // 'if' break; case 165: // 'item' shiftT(165); // 'item' break; case 185: // 'namespace-node' shiftT(185); // 'namespace-node' break; case 191: // 'node' shiftT(191); // 'node' break; case 216: // 'processing-instruction' shiftT(216); // 'processing-instruction' break; case 226: // 'schema-attribute' shiftT(226); // 'schema-attribute' break; case 227: // 'schema-element' shiftT(227); // 'schema-element' break; case 243: // 'switch' shiftT(243); // 'switch' break; case 244: // 'text' shiftT(244); // 'text' break; case 253: // 'typeswitch' shiftT(253); // 'typeswitch' break; case 78: // 'array' shiftT(78); // 'array' break; case 167: // 'json-item' shiftT(167); // 'json-item' break; case 242: // 'structured-item' shiftT(242); // 'structured-item' break; default: try_FunctionName(); } } function parse_FunctionName() { eventHandler.startNonterminal("FunctionName", e0); switch (l1) { case 6: // EQName^Token shift(6); // EQName^Token break; case 70: // 'after' shift(70); // 'after' break; case 73: // 'ancestor' shift(73); // 'ancestor' break; case 74: // 'ancestor-or-self' shift(74); // 'ancestor-or-self' break; case 75: // 'and' shift(75); // 'and' break; case 79: // 'as' shift(79); // 'as' break; case 80: // 'ascending' shift(80); // 'ascending' break; case 84: // 'before' shift(84); // 'before' break; case 88: // 'case' shift(88); // 'case' break; case 89: // 'cast' shift(89); // 'cast' break; case 90: // 'castable' shift(90); // 'castable' break; case 93: // 'child' shift(93); // 'child' break; case 94: // 'collation' shift(94); // 'collation' break; case 103: // 'copy' shift(103); // 'copy' break; case 105: // 'count' shift(105); // 'count' break; case 108: // 'declare' shift(108); // 'declare' break; case 109: // 'default' shift(109); // 'default' break; case 110: // 'delete' shift(110); // 'delete' break; case 111: // 'descendant' shift(111); // 'descendant' break; case 112: // 'descendant-or-self' shift(112); // 'descendant-or-self' break; case 113: // 'descending' shift(113); // 'descending' break; case 118: // 'div' shift(118); // 'div' break; case 119: // 'document' shift(119); // 'document' break; case 122: // 'else' shift(122); // 'else' break; case 123: // 'empty' shift(123); // 'empty' break; case 126: // 'end' shift(126); // 'end' break; case 128: // 'eq' shift(128); // 'eq' break; case 129: // 'every' shift(129); // 'every' break; case 131: // 'except' shift(131); // 'except' break; case 134: // 'first' shift(134); // 'first' break; case 135: // 'following' shift(135); // 'following' break; case 136: // 'following-sibling' shift(136); // 'following-sibling' break; case 137: // 'for' shift(137); // 'for' break; case 146: // 'ge' shift(146); // 'ge' break; case 148: // 'group' shift(148); // 'group' break; case 150: // 'gt' shift(150); // 'gt' break; case 151: // 'idiv' shift(151); // 'idiv' break; case 153: // 'import' shift(153); // 'import' break; case 159: // 'insert' shift(159); // 'insert' break; case 160: // 'instance' shift(160); // 'instance' break; case 162: // 'intersect' shift(162); // 'intersect' break; case 163: // 'into' shift(163); // 'into' break; case 164: // 'is' shift(164); // 'is' break; case 170: // 'last' shift(170); // 'last' break; case 172: // 'le' shift(172); // 'le' break; case 174: // 'let' shift(174); // 'let' break; case 178: // 'lt' shift(178); // 'lt' break; case 180: // 'mod' shift(180); // 'mod' break; case 181: // 'modify' shift(181); // 'modify' break; case 182: // 'module' shift(182); // 'module' break; case 184: // 'namespace' shift(184); // 'namespace' break; case 186: // 'ne' shift(186); // 'ne' break; case 198: // 'only' shift(198); // 'only' break; case 200: // 'or' shift(200); // 'or' break; case 201: // 'order' shift(201); // 'order' break; case 202: // 'ordered' shift(202); // 'ordered' break; case 206: // 'parent' shift(206); // 'parent' break; case 212: // 'preceding' shift(212); // 'preceding' break; case 213: // 'preceding-sibling' shift(213); // 'preceding-sibling' break; case 218: // 'rename' shift(218); // 'rename' break; case 219: // 'replace' shift(219); // 'replace' break; case 220: // 'return' shift(220); // 'return' break; case 224: // 'satisfies' shift(224); // 'satisfies' break; case 229: // 'self' shift(229); // 'self' break; case 235: // 'some' shift(235); // 'some' break; case 236: // 'stable' shift(236); // 'stable' break; case 237: // 'start' shift(237); // 'start' break; case 248: // 'to' shift(248); // 'to' break; case 249: // 'treat' shift(249); // 'treat' break; case 250: // 'try' shift(250); // 'try' break; case 254: // 'union' shift(254); // 'union' break; case 256: // 'unordered' shift(256); // 'unordered' break; case 260: // 'validate' shift(260); // 'validate' break; case 266: // 'where' shift(266); // 'where' break; case 270: // 'with' shift(270); // 'with' break; case 274: // 'xquery' shift(274); // 'xquery' break; case 72: // 'allowing' shift(72); // 'allowing' break; case 81: // 'at' shift(81); // 'at' break; case 83: // 'base-uri' shift(83); // 'base-uri' break; case 85: // 'boundary-space' shift(85); // 'boundary-space' break; case 86: // 'break' shift(86); // 'break' break; case 91: // 'catch' shift(91); // 'catch' break; case 98: // 'construction' shift(98); // 'construction' break; case 101: // 'context' shift(101); // 'context' break; case 102: // 'continue' shift(102); // 'continue' break; case 104: // 'copy-namespaces' shift(104); // 'copy-namespaces' break; case 106: // 'decimal-format' shift(106); // 'decimal-format' break; case 125: // 'encoding' shift(125); // 'encoding' break; case 132: // 'exit' shift(132); // 'exit' break; case 133: // 'external' shift(133); // 'external' break; case 141: // 'ft-option' shift(141); // 'ft-option' break; case 154: // 'in' shift(154); // 'in' break; case 155: // 'index' shift(155); // 'index' break; case 161: // 'integrity' shift(161); // 'integrity' break; case 171: // 'lax' shift(171); // 'lax' break; case 192: // 'nodes' shift(192); // 'nodes' break; case 199: // 'option' shift(199); // 'option' break; case 203: // 'ordering' shift(203); // 'ordering' break; case 222: // 'revalidation' shift(222); // 'revalidation' break; case 225: // 'schema' shift(225); // 'schema' break; case 228: // 'score' shift(228); // 'score' break; case 234: // 'sliding' shift(234); // 'sliding' break; case 240: // 'strict' shift(240); // 'strict' break; case 251: // 'tumbling' shift(251); // 'tumbling' break; case 252: // 'type' shift(252); // 'type' break; case 257: // 'updating' shift(257); // 'updating' break; case 261: // 'value' shift(261); // 'value' break; case 262: // 'variable' shift(262); // 'variable' break; case 263: // 'version' shift(263); // 'version' break; case 267: // 'while' shift(267); // 'while' break; case 97: // 'constraint' shift(97); // 'constraint' break; case 176: // 'loop' shift(176); // 'loop' break; case 221: // 'returning' shift(221); // 'returning' break; case 77: // 'append' shift(77); // 'append' break; case 166: // 'json' shift(166); // 'json' break; default: shift(194); // 'object' } eventHandler.endNonterminal("FunctionName", e0); } function try_FunctionName() { switch (l1) { case 6: // EQName^Token shiftT(6); // EQName^Token break; case 70: // 'after' shiftT(70); // 'after' break; case 73: // 'ancestor' shiftT(73); // 'ancestor' break; case 74: // 'ancestor-or-self' shiftT(74); // 'ancestor-or-self' break; case 75: // 'and' shiftT(75); // 'and' break; case 79: // 'as' shiftT(79); // 'as' break; case 80: // 'ascending' shiftT(80); // 'ascending' break; case 84: // 'before' shiftT(84); // 'before' break; case 88: // 'case' shiftT(88); // 'case' break; case 89: // 'cast' shiftT(89); // 'cast' break; case 90: // 'castable' shiftT(90); // 'castable' break; case 93: // 'child' shiftT(93); // 'child' break; case 94: // 'collation' shiftT(94); // 'collation' break; case 103: // 'copy' shiftT(103); // 'copy' break; case 105: // 'count' shiftT(105); // 'count' break; case 108: // 'declare' shiftT(108); // 'declare' break; case 109: // 'default' shiftT(109); // 'default' break; case 110: // 'delete' shiftT(110); // 'delete' break; case 111: // 'descendant' shiftT(111); // 'descendant' break; case 112: // 'descendant-or-self' shiftT(112); // 'descendant-or-self' break; case 113: // 'descending' shiftT(113); // 'descending' break; case 118: // 'div' shiftT(118); // 'div' break; case 119: // 'document' shiftT(119); // 'document' break; case 122: // 'else' shiftT(122); // 'else' break; case 123: // 'empty' shiftT(123); // 'empty' break; case 126: // 'end' shiftT(126); // 'end' break; case 128: // 'eq' shiftT(128); // 'eq' break; case 129: // 'every' shiftT(129); // 'every' break; case 131: // 'except' shiftT(131); // 'except' break; case 134: // 'first' shiftT(134); // 'first' break; case 135: // 'following' shiftT(135); // 'following' break; case 136: // 'following-sibling' shiftT(136); // 'following-sibling' break; case 137: // 'for' shiftT(137); // 'for' break; case 146: // 'ge' shiftT(146); // 'ge' break; case 148: // 'group' shiftT(148); // 'group' break; case 150: // 'gt' shiftT(150); // 'gt' break; case 151: // 'idiv' shiftT(151); // 'idiv' break; case 153: // 'import' shiftT(153); // 'import' break; case 159: // 'insert' shiftT(159); // 'insert' break; case 160: // 'instance' shiftT(160); // 'instance' break; case 162: // 'intersect' shiftT(162); // 'intersect' break; case 163: // 'into' shiftT(163); // 'into' break; case 164: // 'is' shiftT(164); // 'is' break; case 170: // 'last' shiftT(170); // 'last' break; case 172: // 'le' shiftT(172); // 'le' break; case 174: // 'let' shiftT(174); // 'let' break; case 178: // 'lt' shiftT(178); // 'lt' break; case 180: // 'mod' shiftT(180); // 'mod' break; case 181: // 'modify' shiftT(181); // 'modify' break; case 182: // 'module' shiftT(182); // 'module' break; case 184: // 'namespace' shiftT(184); // 'namespace' break; case 186: // 'ne' shiftT(186); // 'ne' break; case 198: // 'only' shiftT(198); // 'only' break; case 200: // 'or' shiftT(200); // 'or' break; case 201: // 'order' shiftT(201); // 'order' break; case 202: // 'ordered' shiftT(202); // 'ordered' break; case 206: // 'parent' shiftT(206); // 'parent' break; case 212: // 'preceding' shiftT(212); // 'preceding' break; case 213: // 'preceding-sibling' shiftT(213); // 'preceding-sibling' break; case 218: // 'rename' shiftT(218); // 'rename' break; case 219: // 'replace' shiftT(219); // 'replace' break; case 220: // 'return' shiftT(220); // 'return' break; case 224: // 'satisfies' shiftT(224); // 'satisfies' break; case 229: // 'self' shiftT(229); // 'self' break; case 235: // 'some' shiftT(235); // 'some' break; case 236: // 'stable' shiftT(236); // 'stable' break; case 237: // 'start' shiftT(237); // 'start' break; case 248: // 'to' shiftT(248); // 'to' break; case 249: // 'treat' shiftT(249); // 'treat' break; case 250: // 'try' shiftT(250); // 'try' break; case 254: // 'union' shiftT(254); // 'union' break; case 256: // 'unordered' shiftT(256); // 'unordered' break; case 260: // 'validate' shiftT(260); // 'validate' break; case 266: // 'where' shiftT(266); // 'where' break; case 270: // 'with' shiftT(270); // 'with' break; case 274: // 'xquery' shiftT(274); // 'xquery' break; case 72: // 'allowing' shiftT(72); // 'allowing' break; case 81: // 'at' shiftT(81); // 'at' break; case 83: // 'base-uri' shiftT(83); // 'base-uri' break; case 85: // 'boundary-space' shiftT(85); // 'boundary-space' break; case 86: // 'break' shiftT(86); // 'break' break; case 91: // 'catch' shiftT(91); // 'catch' break; case 98: // 'construction' shiftT(98); // 'construction' break; case 101: // 'context' shiftT(101); // 'context' break; case 102: // 'continue' shiftT(102); // 'continue' break; case 104: // 'copy-namespaces' shiftT(104); // 'copy-namespaces' break; case 106: // 'decimal-format' shiftT(106); // 'decimal-format' break; case 125: // 'encoding' shiftT(125); // 'encoding' break; case 132: // 'exit' shiftT(132); // 'exit' break; case 133: // 'external' shiftT(133); // 'external' break; case 141: // 'ft-option' shiftT(141); // 'ft-option' break; case 154: // 'in' shiftT(154); // 'in' break; case 155: // 'index' shiftT(155); // 'index' break; case 161: // 'integrity' shiftT(161); // 'integrity' break; case 171: // 'lax' shiftT(171); // 'lax' break; case 192: // 'nodes' shiftT(192); // 'nodes' break; case 199: // 'option' shiftT(199); // 'option' break; case 203: // 'ordering' shiftT(203); // 'ordering' break; case 222: // 'revalidation' shiftT(222); // 'revalidation' break; case 225: // 'schema' shiftT(225); // 'schema' break; case 228: // 'score' shiftT(228); // 'score' break; case 234: // 'sliding' shiftT(234); // 'sliding' break; case 240: // 'strict' shiftT(240); // 'strict' break; case 251: // 'tumbling' shiftT(251); // 'tumbling' break; case 252: // 'type' shiftT(252); // 'type' break; case 257: // 'updating' shiftT(257); // 'updating' break; case 261: // 'value' shiftT(261); // 'value' break; case 262: // 'variable' shiftT(262); // 'variable' break; case 263: // 'version' shiftT(263); // 'version' break; case 267: // 'while' shiftT(267); // 'while' break; case 97: // 'constraint' shiftT(97); // 'constraint' break; case 176: // 'loop' shiftT(176); // 'loop' break; case 221: // 'returning' shiftT(221); // 'returning' break; case 77: // 'append' shiftT(77); // 'append' break; case 166: // 'json' shiftT(166); // 'json' break; default: shiftT(194); // 'object' } } function parse_NCName() { eventHandler.startNonterminal("NCName", e0); switch (l1) { case 19: // NCName^Token shift(19); // NCName^Token break; case 70: // 'after' shift(70); // 'after' break; case 75: // 'and' shift(75); // 'and' break; case 79: // 'as' shift(79); // 'as' break; case 80: // 'ascending' shift(80); // 'ascending' break; case 84: // 'before' shift(84); // 'before' break; case 88: // 'case' shift(88); // 'case' break; case 89: // 'cast' shift(89); // 'cast' break; case 90: // 'castable' shift(90); // 'castable' break; case 94: // 'collation' shift(94); // 'collation' break; case 105: // 'count' shift(105); // 'count' break; case 109: // 'default' shift(109); // 'default' break; case 113: // 'descending' shift(113); // 'descending' break; case 118: // 'div' shift(118); // 'div' break; case 122: // 'else' shift(122); // 'else' break; case 123: // 'empty' shift(123); // 'empty' break; case 126: // 'end' shift(126); // 'end' break; case 128: // 'eq' shift(128); // 'eq' break; case 131: // 'except' shift(131); // 'except' break; case 137: // 'for' shift(137); // 'for' break; case 146: // 'ge' shift(146); // 'ge' break; case 148: // 'group' shift(148); // 'group' break; case 150: // 'gt' shift(150); // 'gt' break; case 151: // 'idiv' shift(151); // 'idiv' break; case 160: // 'instance' shift(160); // 'instance' break; case 162: // 'intersect' shift(162); // 'intersect' break; case 163: // 'into' shift(163); // 'into' break; case 164: // 'is' shift(164); // 'is' break; case 172: // 'le' shift(172); // 'le' break; case 174: // 'let' shift(174); // 'let' break; case 178: // 'lt' shift(178); // 'lt' break; case 180: // 'mod' shift(180); // 'mod' break; case 181: // 'modify' shift(181); // 'modify' break; case 186: // 'ne' shift(186); // 'ne' break; case 198: // 'only' shift(198); // 'only' break; case 200: // 'or' shift(200); // 'or' break; case 201: // 'order' shift(201); // 'order' break; case 220: // 'return' shift(220); // 'return' break; case 224: // 'satisfies' shift(224); // 'satisfies' break; case 236: // 'stable' shift(236); // 'stable' break; case 237: // 'start' shift(237); // 'start' break; case 248: // 'to' shift(248); // 'to' break; case 249: // 'treat' shift(249); // 'treat' break; case 254: // 'union' shift(254); // 'union' break; case 266: // 'where' shift(266); // 'where' break; case 270: // 'with' shift(270); // 'with' break; case 73: // 'ancestor' shift(73); // 'ancestor' break; case 74: // 'ancestor-or-self' shift(74); // 'ancestor-or-self' break; case 82: // 'attribute' shift(82); // 'attribute' break; case 93: // 'child' shift(93); // 'child' break; case 96: // 'comment' shift(96); // 'comment' break; case 103: // 'copy' shift(103); // 'copy' break; case 108: // 'declare' shift(108); // 'declare' break; case 110: // 'delete' shift(110); // 'delete' break; case 111: // 'descendant' shift(111); // 'descendant' break; case 112: // 'descendant-or-self' shift(112); // 'descendant-or-self' break; case 119: // 'document' shift(119); // 'document' break; case 120: // 'document-node' shift(120); // 'document-node' break; case 121: // 'element' shift(121); // 'element' break; case 124: // 'empty-sequence' shift(124); // 'empty-sequence' break; case 129: // 'every' shift(129); // 'every' break; case 134: // 'first' shift(134); // 'first' break; case 135: // 'following' shift(135); // 'following' break; case 136: // 'following-sibling' shift(136); // 'following-sibling' break; case 145: // 'function' shift(145); // 'function' break; case 152: // 'if' shift(152); // 'if' break; case 153: // 'import' shift(153); // 'import' break; case 159: // 'insert' shift(159); // 'insert' break; case 165: // 'item' shift(165); // 'item' break; case 170: // 'last' shift(170); // 'last' break; case 182: // 'module' shift(182); // 'module' break; case 184: // 'namespace' shift(184); // 'namespace' break; case 185: // 'namespace-node' shift(185); // 'namespace-node' break; case 191: // 'node' shift(191); // 'node' break; case 202: // 'ordered' shift(202); // 'ordered' break; case 206: // 'parent' shift(206); // 'parent' break; case 212: // 'preceding' shift(212); // 'preceding' break; case 213: // 'preceding-sibling' shift(213); // 'preceding-sibling' break; case 216: // 'processing-instruction' shift(216); // 'processing-instruction' break; case 218: // 'rename' shift(218); // 'rename' break; case 219: // 'replace' shift(219); // 'replace' break; case 226: // 'schema-attribute' shift(226); // 'schema-attribute' break; case 227: // 'schema-element' shift(227); // 'schema-element' break; case 229: // 'self' shift(229); // 'self' break; case 235: // 'some' shift(235); // 'some' break; case 243: // 'switch' shift(243); // 'switch' break; case 244: // 'text' shift(244); // 'text' break; case 250: // 'try' shift(250); // 'try' break; case 253: // 'typeswitch' shift(253); // 'typeswitch' break; case 256: // 'unordered' shift(256); // 'unordered' break; case 260: // 'validate' shift(260); // 'validate' break; case 262: // 'variable' shift(262); // 'variable' break; case 274: // 'xquery' shift(274); // 'xquery' break; case 72: // 'allowing' shift(72); // 'allowing' break; case 81: // 'at' shift(81); // 'at' break; case 83: // 'base-uri' shift(83); // 'base-uri' break; case 85: // 'boundary-space' shift(85); // 'boundary-space' break; case 86: // 'break' shift(86); // 'break' break; case 91: // 'catch' shift(91); // 'catch' break; case 98: // 'construction' shift(98); // 'construction' break; case 101: // 'context' shift(101); // 'context' break; case 102: // 'continue' shift(102); // 'continue' break; case 104: // 'copy-namespaces' shift(104); // 'copy-namespaces' break; case 106: // 'decimal-format' shift(106); // 'decimal-format' break; case 125: // 'encoding' shift(125); // 'encoding' break; case 132: // 'exit' shift(132); // 'exit' break; case 133: // 'external' shift(133); // 'external' break; case 141: // 'ft-option' shift(141); // 'ft-option' break; case 154: // 'in' shift(154); // 'in' break; case 155: // 'index' shift(155); // 'index' break; case 161: // 'integrity' shift(161); // 'integrity' break; case 171: // 'lax' shift(171); // 'lax' break; case 192: // 'nodes' shift(192); // 'nodes' break; case 199: // 'option' shift(199); // 'option' break; case 203: // 'ordering' shift(203); // 'ordering' break; case 222: // 'revalidation' shift(222); // 'revalidation' break; case 225: // 'schema' shift(225); // 'schema' break; case 228: // 'score' shift(228); // 'score' break; case 234: // 'sliding' shift(234); // 'sliding' break; case 240: // 'strict' shift(240); // 'strict' break; case 251: // 'tumbling' shift(251); // 'tumbling' break; case 252: // 'type' shift(252); // 'type' break; case 257: // 'updating' shift(257); // 'updating' break; case 261: // 'value' shift(261); // 'value' break; case 263: // 'version' shift(263); // 'version' break; case 267: // 'while' shift(267); // 'while' break; case 97: // 'constraint' shift(97); // 'constraint' break; case 176: // 'loop' shift(176); // 'loop' break; case 221: // 'returning' shift(221); // 'returning' break; case 77: // 'append' shift(77); // 'append' break; case 166: // 'json' shift(166); // 'json' break; default: shift(194); // 'object' } eventHandler.endNonterminal("NCName", e0); } function try_NCName() { switch (l1) { case 19: // NCName^Token shiftT(19); // NCName^Token break; case 70: // 'after' shiftT(70); // 'after' break; case 75: // 'and' shiftT(75); // 'and' break; case 79: // 'as' shiftT(79); // 'as' break; case 80: // 'ascending' shiftT(80); // 'ascending' break; case 84: // 'before' shiftT(84); // 'before' break; case 88: // 'case' shiftT(88); // 'case' break; case 89: // 'cast' shiftT(89); // 'cast' break; case 90: // 'castable' shiftT(90); // 'castable' break; case 94: // 'collation' shiftT(94); // 'collation' break; case 105: // 'count' shiftT(105); // 'count' break; case 109: // 'default' shiftT(109); // 'default' break; case 113: // 'descending' shiftT(113); // 'descending' break; case 118: // 'div' shiftT(118); // 'div' break; case 122: // 'else' shiftT(122); // 'else' break; case 123: // 'empty' shiftT(123); // 'empty' break; case 126: // 'end' shiftT(126); // 'end' break; case 128: // 'eq' shiftT(128); // 'eq' break; case 131: // 'except' shiftT(131); // 'except' break; case 137: // 'for' shiftT(137); // 'for' break; case 146: // 'ge' shiftT(146); // 'ge' break; case 148: // 'group' shiftT(148); // 'group' break; case 150: // 'gt' shiftT(150); // 'gt' break; case 151: // 'idiv' shiftT(151); // 'idiv' break; case 160: // 'instance' shiftT(160); // 'instance' break; case 162: // 'intersect' shiftT(162); // 'intersect' break; case 163: // 'into' shiftT(163); // 'into' break; case 164: // 'is' shiftT(164); // 'is' break; case 172: // 'le' shiftT(172); // 'le' break; case 174: // 'let' shiftT(174); // 'let' break; case 178: // 'lt' shiftT(178); // 'lt' break; case 180: // 'mod' shiftT(180); // 'mod' break; case 181: // 'modify' shiftT(181); // 'modify' break; case 186: // 'ne' shiftT(186); // 'ne' break; case 198: // 'only' shiftT(198); // 'only' break; case 200: // 'or' shiftT(200); // 'or' break; case 201: // 'order' shiftT(201); // 'order' break; case 220: // 'return' shiftT(220); // 'return' break; case 224: // 'satisfies' shiftT(224); // 'satisfies' break; case 236: // 'stable' shiftT(236); // 'stable' break; case 237: // 'start' shiftT(237); // 'start' break; case 248: // 'to' shiftT(248); // 'to' break; case 249: // 'treat' shiftT(249); // 'treat' break; case 254: // 'union' shiftT(254); // 'union' break; case 266: // 'where' shiftT(266); // 'where' break; case 270: // 'with' shiftT(270); // 'with' break; case 73: // 'ancestor' shiftT(73); // 'ancestor' break; case 74: // 'ancestor-or-self' shiftT(74); // 'ancestor-or-self' break; case 82: // 'attribute' shiftT(82); // 'attribute' break; case 93: // 'child' shiftT(93); // 'child' break; case 96: // 'comment' shiftT(96); // 'comment' break; case 103: // 'copy' shiftT(103); // 'copy' break; case 108: // 'declare' shiftT(108); // 'declare' break; case 110: // 'delete' shiftT(110); // 'delete' break; case 111: // 'descendant' shiftT(111); // 'descendant' break; case 112: // 'descendant-or-self' shiftT(112); // 'descendant-or-self' break; case 119: // 'document' shiftT(119); // 'document' break; case 120: // 'document-node' shiftT(120); // 'document-node' break; case 121: // 'element' shiftT(121); // 'element' break; case 124: // 'empty-sequence' shiftT(124); // 'empty-sequence' break; case 129: // 'every' shiftT(129); // 'every' break; case 134: // 'first' shiftT(134); // 'first' break; case 135: // 'following' shiftT(135); // 'following' break; case 136: // 'following-sibling' shiftT(136); // 'following-sibling' break; case 145: // 'function' shiftT(145); // 'function' break; case 152: // 'if' shiftT(152); // 'if' break; case 153: // 'import' shiftT(153); // 'import' break; case 159: // 'insert' shiftT(159); // 'insert' break; case 165: // 'item' shiftT(165); // 'item' break; case 170: // 'last' shiftT(170); // 'last' break; case 182: // 'module' shiftT(182); // 'module' break; case 184: // 'namespace' shiftT(184); // 'namespace' break; case 185: // 'namespace-node' shiftT(185); // 'namespace-node' break; case 191: // 'node' shiftT(191); // 'node' break; case 202: // 'ordered' shiftT(202); // 'ordered' break; case 206: // 'parent' shiftT(206); // 'parent' break; case 212: // 'preceding' shiftT(212); // 'preceding' break; case 213: // 'preceding-sibling' shiftT(213); // 'preceding-sibling' break; case 216: // 'processing-instruction' shiftT(216); // 'processing-instruction' break; case 218: // 'rename' shiftT(218); // 'rename' break; case 219: // 'replace' shiftT(219); // 'replace' break; case 226: // 'schema-attribute' shiftT(226); // 'schema-attribute' break; case 227: // 'schema-element' shiftT(227); // 'schema-element' break; case 229: // 'self' shiftT(229); // 'self' break; case 235: // 'some' shiftT(235); // 'some' break; case 243: // 'switch' shiftT(243); // 'switch' break; case 244: // 'text' shiftT(244); // 'text' break; case 250: // 'try' shiftT(250); // 'try' break; case 253: // 'typeswitch' shiftT(253); // 'typeswitch' break; case 256: // 'unordered' shiftT(256); // 'unordered' break; case 260: // 'validate' shiftT(260); // 'validate' break; case 262: // 'variable' shiftT(262); // 'variable' break; case 274: // 'xquery' shiftT(274); // 'xquery' break; case 72: // 'allowing' shiftT(72); // 'allowing' break; case 81: // 'at' shiftT(81); // 'at' break; case 83: // 'base-uri' shiftT(83); // 'base-uri' break; case 85: // 'boundary-space' shiftT(85); // 'boundary-space' break; case 86: // 'break' shiftT(86); // 'break' break; case 91: // 'catch' shiftT(91); // 'catch' break; case 98: // 'construction' shiftT(98); // 'construction' break; case 101: // 'context' shiftT(101); // 'context' break; case 102: // 'continue' shiftT(102); // 'continue' break; case 104: // 'copy-namespaces' shiftT(104); // 'copy-namespaces' break; case 106: // 'decimal-format' shiftT(106); // 'decimal-format' break; case 125: // 'encoding' shiftT(125); // 'encoding' break; case 132: // 'exit' shiftT(132); // 'exit' break; case 133: // 'external' shiftT(133); // 'external' break; case 141: // 'ft-option' shiftT(141); // 'ft-option' break; case 154: // 'in' shiftT(154); // 'in' break; case 155: // 'index' shiftT(155); // 'index' break; case 161: // 'integrity' shiftT(161); // 'integrity' break; case 171: // 'lax' shiftT(171); // 'lax' break; case 192: // 'nodes' shiftT(192); // 'nodes' break; case 199: // 'option' shiftT(199); // 'option' break; case 203: // 'ordering' shiftT(203); // 'ordering' break; case 222: // 'revalidation' shiftT(222); // 'revalidation' break; case 225: // 'schema' shiftT(225); // 'schema' break; case 228: // 'score' shiftT(228); // 'score' break; case 234: // 'sliding' shiftT(234); // 'sliding' break; case 240: // 'strict' shiftT(240); // 'strict' break; case 251: // 'tumbling' shiftT(251); // 'tumbling' break; case 252: // 'type' shiftT(252); // 'type' break; case 257: // 'updating' shiftT(257); // 'updating' break; case 261: // 'value' shiftT(261); // 'value' break; case 263: // 'version' shiftT(263); // 'version' break; case 267: // 'while' shiftT(267); // 'while' break; case 97: // 'constraint' shiftT(97); // 'constraint' break; case 176: // 'loop' shiftT(176); // 'loop' break; case 221: // 'returning' shiftT(221); // 'returning' break; case 77: // 'append' shiftT(77); // 'append' break; case 166: // 'json' shiftT(166); // 'json' break; default: shiftT(194); // 'object' } } function parse_MainModule() { eventHandler.startNonterminal("MainModule", e0); parse_Prolog(); whitespace(); parse_Program(); eventHandler.endNonterminal("MainModule", e0); } function parse_Program() { eventHandler.startNonterminal("Program", e0); parse_StatementsAndOptionalExpr(); eventHandler.endNonterminal("Program", e0); } function parse_Statements() { eventHandler.startNonterminal("Statements", e0); for (;;) { lookahead1W(278); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | switch (l1) { case 34: // '(' lookahead2W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | break; case 35: // '(#' lookahead2(252); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | break; case 46: // '/' lookahead2W(284); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | break; case 47: // '//' lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | break; case 54: // '<' lookahead2(4); // QName break; case 55: // ''", "'.'", "'..'", "'/'", "'//'", "'/>'", "':'", "':)'", "'::'", "':='", "';'", "'<'", "'", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var XmlFoldMode = require("./folding/xml").FoldMode; var WorkerClient = require("../worker/worker_client").WorkerClient; var Mode = function() { this.HighlightRules = XmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.foldingRules = new XmlFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.voidElements = lang.arrayToMap([]); this.blockComment = {start: ""}; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/xml"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var SvgHighlightRules = function() { XmlHighlightRules.call(this); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); this.normalizeRules(); }; oop.inherits(SvgHighlightRules, XmlHighlightRules); exports.SvgHighlightRules = SvgHighlightRules; }); define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(defaultMode, subModes) { this.defaultMode = defaultMode; this.subModes = subModes; }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.$getMode = function(state) { if (typeof state != "string") state = state[0]; for (var key in this.subModes) { if (state.indexOf(key) === 0) return this.subModes[key]; } return null; }; this.$tryMode = function(state, session, foldStyle, row) { var mode = this.$getMode(state); return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); }; this.getFoldWidget = function(session, foldStyle, row) { return ( this.$tryMode(session.getState(row-1), session, foldStyle, row) || this.$tryMode(session.getState(row), session, foldStyle, row) || this.defaultMode.getFoldWidget(session, foldStyle, row) ); }; this.getFoldWidgetRange = function(session, foldStyle, row) { var mode = this.$getMode(session.getState(row-1)); if (!mode || !mode.getFoldWidget(session, foldStyle, row)) mode = this.$getMode(session.getState(row)); if (!mode || !mode.getFoldWidget(session, foldStyle, row)) mode = this.defaultMode; return mode.getFoldWidgetRange(session, foldStyle, row); }; }).call(FoldMode.prototype); }); define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var XmlMode = require("./xml").Mode; var JavaScriptMode = require("./javascript").Mode; var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules; var MixedFoldMode = require("./folding/mixed").FoldMode; var XmlFoldMode = require("./folding/xml").FoldMode; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { XmlMode.call(this); this.HighlightRules = SvgHighlightRules; this.createModeDelegates({ "js-": JavaScriptMode }); this.foldingRules = new MixedFoldMode(new XmlFoldMode(), { "js-": new CStyleFoldMode() }); }; oop.inherits(Mode, XmlMode); (function() { this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.$id = "ace/mode/svg"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-lisp.js0000644000076400007640000000615312554155240023126 0ustar pravipravidefine("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LispHighlightRules = function() { var keywordControl = "case|do|let|loop|if|else|when"; var keywordOperator = "eq|neq|and|or"; var constantLanguage = "null|nil"; var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn"; var keywordMapper = this.createKeywordMapper({ "keyword.control": keywordControl, "keyword.operator": keywordOperator, "constant.language": constantLanguage, "support.function": supportFunctions }, "identifier", true); this.$rules = { "start": [ { token : "comment", regex : ";.*$" }, { token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"], regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" }, { token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"], regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)" }, { token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"], regex: "(\\*)(\\S*)(\\*)" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "string", regex : '"(?=.)', next : "qqstring" } ], "qqstring": [ { token: "constant.character.escape.lisp", regex: "\\\\." }, { token : "string", regex : '[^"\\\\]+' }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "start" } ] } }; oop.inherits(LispHighlightRules, TextHighlightRules); exports.LispHighlightRules = LispHighlightRules; }); define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules; var Mode = function() { this.HighlightRules = LispHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ";"; this.$id = "ace/mode/lisp"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-toml.js0000644000076400007640000000730212554155240023127 0ustar pravipravidefine("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TomlHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "constant.language.boolean": "true|false" }, "identifier"); var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; this.$rules = { "start": [ { token: "comment.toml", regex: /#.*$/ }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token: ["variable.keygroup.toml"], regex: "(?:^\\s*)(\\[([^\\]]+)\\])" }, { token : keywordMapper, regex : identifierRe }, { token : "support.date.toml", regex: "\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)" }, { token: "constant.numeric.toml", regex: "-?\\d+(\\.?\\d+)?" } ], "qqstring" : [ { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "constant.language.escape", regex : '\\\\[0tnr"\\\\]' }, { token : "string", regex : '"|$', next : "start" }, { defaultToken: "string" } ] } }; oop.inherits(TomlHighlightRules, TextHighlightRules); exports.TomlHighlightRules = TomlHighlightRules; }); define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function() { }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/; this.getFoldWidgetRange = function(session, foldStyle, row) { var re = this.foldingStartMarker; var line = session.getLine(row); var m = line.match(re); if (!m) return; var startName = m[1] + "."; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); if (/^\s*$/.test(line)) continue; m = line.match(re); if (m && m[1].lastIndexOf(startName, 0) !== 0) break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; }).call(FoldMode.prototype); }); define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules; var FoldMode = require("./folding/ini").FoldMode; var Mode = function() { this.HighlightRules = TomlHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.$id = "ace/mode/toml"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-kr_theme.js0000644000076400007640000000503112554155240024125 0ustar pravipravidefine("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-kr-theme"; exports.cssText = ".ace-kr-theme .ace_gutter {\ background: #1c1917;\ color: #FCFFE0\ }\ .ace-kr-theme .ace_print-margin {\ width: 1px;\ background: #1c1917\ }\ .ace-kr-theme {\ background-color: #0B0A09;\ color: #FCFFE0\ }\ .ace-kr-theme .ace_cursor {\ color: #FF9900\ }\ .ace-kr-theme .ace_marker-layer .ace_selection {\ background: rgba(170, 0, 255, 0.45)\ }\ .ace-kr-theme.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #0B0A09;\ border-radius: 2px\ }\ .ace-kr-theme .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-kr-theme .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgba(255, 177, 111, 0.32)\ }\ .ace-kr-theme .ace_marker-layer .ace_active-line {\ background: #38403D\ }\ .ace-kr-theme .ace_gutter-active-line {\ background-color : #38403D\ }\ .ace-kr-theme .ace_marker-layer .ace_selected-word {\ border: 1px solid rgba(170, 0, 255, 0.45)\ }\ .ace-kr-theme .ace_invisible {\ color: rgba(255, 177, 111, 0.32)\ }\ .ace-kr-theme .ace_keyword,\ .ace-kr-theme .ace_meta {\ color: #949C8B\ }\ .ace-kr-theme .ace_constant,\ .ace-kr-theme .ace_constant.ace_character,\ .ace-kr-theme .ace_constant.ace_character.ace_escape,\ .ace-kr-theme .ace_constant.ace_other {\ color: rgba(210, 117, 24, 0.76)\ }\ .ace-kr-theme .ace_invalid {\ color: #F8F8F8;\ background-color: #A41300\ }\ .ace-kr-theme .ace_support {\ color: #9FC28A\ }\ .ace-kr-theme .ace_support.ace_constant {\ color: #C27E66\ }\ .ace-kr-theme .ace_fold {\ background-color: #949C8B;\ border-color: #FCFFE0\ }\ .ace-kr-theme .ace_support.ace_function {\ color: #85873A\ }\ .ace-kr-theme .ace_storage {\ color: #FFEE80\ }\ .ace-kr-theme .ace_string {\ color: rgba(164, 161, 181, 0.8)\ }\ .ace-kr-theme .ace_string.ace_regexp {\ color: rgba(125, 255, 192, 0.65)\ }\ .ace-kr-theme .ace_comment {\ font-style: italic;\ color: #706D5B\ }\ .ace-kr-theme .ace_variable {\ color: #D1A796\ }\ .ace-kr-theme .ace_list,\ .ace-kr-theme .ace_markup.ace_list {\ background-color: #0F0040\ }\ .ace-kr-theme .ace_variable.ace_language {\ color: #FF80E1\ }\ .ace-kr-theme .ace_meta.ace_tag {\ color: #BABD9C\ }\ .ace-kr-theme .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-ejs.js0000644000076400007640000034170112554155240022741 0ustar pravipravidefine("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var constantOtherSymbol = exports.constantOtherSymbol = { token : "constant.other.symbol.ruby", // symbol regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" }; var qString = exports.qString = { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }; var qqString = exports.qqString = { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }; var tString = exports.tString = { token : "string", // backtick string regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" }; var constantNumericHex = exports.constantNumericHex = { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" }; var constantNumericFloat = exports.constantNumericFloat = { token : "constant.numeric", // float regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" }; var RubyHighlightRules = function() { var builtinFunctions = ( "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + "has_many|has_one|belongs_to|has_and_belongs_to_many" ); var keywords = ( "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" ); var buildinConstants = ( "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" ); var builtinVariables = ( "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + "$!|root_url|flash|session|cookies|params|request|response|logger|self" ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword": keywords, "constant.language": buildinConstants, "variable.language": builtinVariables, "support.function": builtinFunctions, "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? }, "identifier"); this.$rules = { "start" : [ { token : "comment", regex : "#.*$" }, { token : "comment", // multi line comment regex : "^=begin(?:$|\\s.*$)", next : "comment" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, [{ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren.lparen"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.start", regex : /"/, push : [{ token : "constant.language.escape", regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ }, { token : "paren.start", regex : /\#{/, push : "start" }, { token : "string.end", regex : /"/, next : "pop" }, { defaultToken: "string" }] }, { token : "string.start", regex : /`/, push : [{ token : "constant.language.escape", regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ }, { token : "paren.start", regex : /\#{/, push : "start" }, { token : "string.end", regex : /`/, next : "pop" }, { defaultToken: "string" }] }, { token : "string.start", regex : /'/, push : [{ token : "constant.language.escape", regex : /\\['\\]/ }, { token : "string.end", regex : /'/, next : "pop" }, { defaultToken: "string" }] }], { token : "text", // namespaces aren't symbols regex : "::" }, { token : "variable.instance", // instance variable regex : "@{1,2}[a-zA-Z_\\d]+" }, { token : "support.class", // class name regex : "[A-Z][a-zA-Z_\\d]+" }, constantOtherSymbol, constantNumericHex, constantNumericFloat, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "punctuation.separator.key-value", regex : "=>" }, { stateName: "heredoc", onMatch : function(value, currentState, stack) { var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; var tokens = value.split(this.splitRegex); stack.push(next, tokens[3]); return [ {type:"constant", value: tokens[1]}, {type:"string", value: tokens[2]}, {type:"support.class", value: tokens[3]}, {type:"string", value: tokens[4]} ]; }, regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", rules: { heredoc: [{ onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }], indentedHeredoc: [{ token: "string", regex: "^ +" }, { onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }] } }, { regex : "$", token : "empty", next : function(currentState, stack) { if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") return stack[0]; return currentState; } }, { token : "string.character", regex : "\\B\\?." }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : "^=end(?:$|\\s.*$)", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ] }; this.normalizeRules(); }; oop.inherits(RubyHighlightRules, TextHighlightRules); exports.RubyHighlightRules = RubyHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = RubyHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); var startingConditional = line.match(/^\s*(if|else)\s*/) if (match || startingClassOrMethod || startingDoBlock || startingConditional) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, session, row) { var line = session.getLine(row); if (/}/.test(line)) return this.$outdent.autoOutdent(session, row); var indent = this.$getIndent(line); var prevLine = session.getLine(row - 1); var prevIndent = this.$getIndent(prevLine); var tab = session.getTabString(); if (prevIndent.length <= indent.length) { if (indent.slice(-tab.length) == tab) session.remove(new Range(row, indent.length-tab.length, row, indent.length)); } }; this.$id = "ace/mode/ruby"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var EjsHighlightRules = function(start, end) { HtmlHighlightRules.call(this); if (!start) start = "(?:<%|<\\?|{{)"; if (!end) end = "(?:%>|\\?>|}})"; for (var i in this.$rules) { this.$rules[i].unshift({ token : "markup.list.meta.tag", regex : start + "(?![>}])[-=]?", push : "ejs-start" }); } this.embedRules(JavaScriptHighlightRules, "ejs-"); this.$rules["ejs-start"].unshift({ token : "markup.list.meta.tag", regex : "-?" + end, next : "pop" }, { token: "comment", regex: "//.*?" + end, next: "pop" }); this.$rules["ejs-no_regex"].unshift({ token : "markup.list.meta.tag", regex : "-?" + end, next : "pop" }, { token: "comment", regex: "//.*?" + end, next: "pop" }); this.normalizeRules(); }; oop.inherits(EjsHighlightRules, HtmlHighlightRules); exports.EjsHighlightRules = EjsHighlightRules; var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var RubyMode = require("./ruby").Mode; var Mode = function() { HtmlMode.call(this); this.HighlightRules = EjsHighlightRules; this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode, "ejs-": JavaScriptMode }); }; oop.inherits(Mode, HtmlMode); (function() { this.$id = "ace/mode/ejs"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-gcode.js0000644000076400007640000000534412554155240023241 0ustar pravipravidefine("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var GcodeHighlightRules = function() { var keywords = ( "IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL" ); var builtinConstants = ( "PI" ); var builtinFunctions = ( "ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN" ); var keywordMapper = this.createKeywordMapper({ "support.function": builtinFunctions, "keyword": keywords, "constant.language": builtinConstants }, "identifier", true); this.$rules = { "start" : [ { token : "comment", regex : "\\(.*\\)" }, { token : "comment", // block number regex : "([N])([0-9]+)" }, { token : "string", // " string regex : "([G])([0-9]+\\.?[0-9]?)" }, { token : "string", // ' string regex : "([M])([0-9]+\\.?[0-9]?)" }, { token : "constant.numeric", // float regex : "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)" }, { token : keywordMapper, regex : "[A-Z]" }, { token : "keyword.operator", regex : "EQ|LT|GT|NE|GE|LE|OR|XOR" }, { token : "paren.lparen", regex : "[\\[]" }, { token : "paren.rparen", regex : "[\\]]" }, { token : "text", regex : "\\s+" } ] }; }; oop.inherits(GcodeHighlightRules, TextHighlightRules); exports.GcodeHighlightRules = GcodeHighlightRules; }); define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = GcodeHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/gcode"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-xml.js0000644000076400007640000032440612554155240023350 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) { "use strict"; var Document = require("../document").Document; var lang = require("../lib/lang"); var Mirror = exports.Mirror = function(sender) { this.sender = sender; var doc = this.doc = new Document(""); var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); var _self = this; sender.on("change", function(e) { doc.applyDeltas(e.data); if (_self.$timeout) return deferredUpdate.schedule(_self.$timeout); _self.onUpdate(); }); }; (function() { this.$timeout = 500; this.setTimeout = function(timeout) { this.$timeout = timeout; }; this.setValue = function(value) { this.doc.setValue(value); this.deferredUpdate.schedule(this.$timeout); }; this.getValue = function(callbackId) { this.sender.callback(this.doc.getValue(), callbackId); }; this.onUpdate = function() { }; this.isPending = function() { return this.deferredUpdate.isPending(); }; }).call(Mirror.prototype); }); define("ace/mode/xml/sax",["require","exports","module"], function(require, exports, module) { 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 var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]"); var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$'); var S_TAG = 0;//tag name offerring var S_ATTR = 1;//attr name offerring var S_ATTR_S=2;//attr name end and space offer var S_EQ = 3;//=space? var S_V = 4;//attr value(no quot value only) var S_E = 5;//attr value end and no space(quot end) var S_S = 6;//(attr value end || tag end ) && (space offer) var S_C = 7;//closed el function XMLReader(){ } XMLReader.prototype = { parse:function(source,defaultNSMap,entityMap){ var domBuilder = this.domBuilder; domBuilder.startDocument(); _copy(defaultNSMap ,defaultNSMap = {}) parse(source,defaultNSMap,entityMap, domBuilder,this.errorHandler); domBuilder.endDocument(); } } function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ function fixedFromCharCode(code) { if (code > 0xffff) { code -= 0x10000; var surrogate1 = 0xd800 + (code >> 10) , surrogate2 = 0xdc00 + (code & 0x3ff); return String.fromCharCode(surrogate1, surrogate2); } else { return String.fromCharCode(code); } } function entityReplacer(a){ var k = a.slice(1,-1); if(k in entityMap){ return entityMap[k]; }else if(k.charAt(0) === '#'){ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) }else{ errorHandler.error('entity not found:'+a); return a; } } function appendText(end){//has some bugs var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); locator&&position(start); domBuilder.characters(xt,0,end-start); start = end } function position(start,m){ while(start>=endPos && (m = linePattern.exec(source))){ startPos = m.index; endPos = startPos + m[0].length; locator.lineNumber++; } locator.columnNumber = start-startPos+1; } var startPos = 0; var endPos = 0; var linePattern = /.+(?:\r\n?|\n)|.*$/g var locator = domBuilder.locator; var parseStack = [{currentNSMap:defaultNSMapCopy}] var closeMap = {}; var start = 0; while(true){ var i = source.indexOf('<',start); if(i<0){ if(!source.substr(start).match(/^\s*$/)){ var doc = domBuilder.document; var text = doc.createTextNode(source.substr(start)); doc.appendChild(text); domBuilder.currentElement = text; } return; } if(i>start){ appendText(i); } switch(source.charAt(i+1)){ case '/': var end = source.indexOf('>',i+3); var tagName = source.substring(i+2,end); var config; if (parseStack.length > 1) { config = parseStack.pop(); } else { errorHandler.fatalError("end tag name not found for: "+tagName); break; } var localNSMap = config.localNSMap; if(config.tagName != tagName){ errorHandler.fatalError("end tag name: " + tagName + " does not match the current start tagName: "+config.tagName ); } domBuilder.endElement(config.uri,config.localName,tagName); if(localNSMap){ for(var prefix in localNSMap){ domBuilder.endPrefixMapping(prefix) ; } } end++; break; case '?':// locator&&position(i); end = parseInstruction(source,i,domBuilder); break; case '!':// 0){ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); el.add(attrName,value,start-1); s = S_E; }else{ throw new Error('attribute value no end \''+c+'\' match'); } }else if(s == S_V){ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); el.add(attrName,value,start); errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); start = p+1; s = S_E }else{ throw new Error('attribute value must after "="'); } break; case '/': switch(s){ case S_TAG: el.setTagName(source.slice(start,p)); case S_E: case S_S: case S_C: s = S_C; el.closed = true; case S_V: case S_ATTR: case S_ATTR_S: break; default: throw new Error("attribute invalid close char('/')") } break; case ''://end document errorHandler.error('unexpected end of input'); case '>': switch(s){ case S_TAG: el.setTagName(source.slice(start,p)); case S_E: case S_S: case S_C: break;//normal case S_V://Compatible state case S_ATTR: value = source.slice(start,p); if(value.slice(-1) === '/'){ el.closed = true; value = value.slice(0,-1) } case S_ATTR_S: if(s === S_ATTR_S){ value = attrName; } if(s == S_V){ errorHandler.warning('attribute "'+value+'" missed quot(")!!'); el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) }else{ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') el.add(value,value,start) } break; case S_EQ: throw new Error('attribute value missed!!'); } return p; case '\u0080': c = ' '; default: if(c<= ' '){//space switch(s){ case S_TAG: el.setTagName(source.slice(start,p));//tagName s = S_S; break; case S_ATTR: attrName = source.slice(start,p) s = S_ATTR_S; break; case S_V: var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); errorHandler.warning('attribute "'+value+'" missed quot(")!!'); el.add(attrName,value,start) case S_E: s = S_S; break; } }else{//not space switch(s){ case S_ATTR_S: errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') el.add(attrName,attrName,start); start = p; s = S_ATTR; break; case S_E: errorHandler.warning('attribute space is required"'+attrName+'"!!') case S_S: s = S_ATTR; start = p; break; case S_EQ: s = S_V; start = p; break; case S_C: throw new Error("elements closed character '/' and '>' must be connected to"); } } } p++; } } function appendElement(el,domBuilder,parseStack){ var tagName = el.tagName; var localNSMap = null; var currentNSMap = parseStack[parseStack.length-1].currentNSMap; var i = el.length; while(i--){ var a = el[i]; var qName = a.qName; var value = a.value; var nsp = qName.indexOf(':'); if(nsp>0){ var prefix = a.prefix = qName.slice(0,nsp); var localName = qName.slice(nsp+1); var nsPrefix = prefix === 'xmlns' && localName }else{ localName = qName; prefix = null nsPrefix = qName === 'xmlns' && '' } a.localName = localName ; if(nsPrefix !== false){//hack!! if(localNSMap == null){ localNSMap = {} _copy(currentNSMap,currentNSMap={}) } currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; a.uri = 'http://www.w3.org/2000/xmlns/' domBuilder.startPrefixMapping(nsPrefix, value) } } var i = el.length; while(i--){ a = el[i]; var prefix = a.prefix; if(prefix){//no prefix attribute has no namespace if(prefix === 'xml'){ a.uri = 'http://www.w3.org/XML/1998/namespace'; }if(prefix !== 'xmlns'){ a.uri = currentNSMap[prefix] } } } var nsp = tagName.indexOf(':'); if(nsp>0){ prefix = el.prefix = tagName.slice(0,nsp); localName = el.localName = tagName.slice(nsp+1); }else{ prefix = null;//important!! localName = el.localName = tagName; } var ns = el.uri = currentNSMap[prefix || '']; domBuilder.startElement(ns,localName,tagName,el); if(el.closed){ domBuilder.endElement(ns,localName,tagName); if(localNSMap){ for(prefix in localNSMap){ domBuilder.endPrefixMapping(prefix) } } }else{ el.currentNSMap = currentNSMap; el.localNSMap = localNSMap; parseStack.push(el); } } function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ if(/^(?:script|textarea)$/i.test(tagName)){ var elEndStart = source.indexOf('',elStartEnd); var text = source.substring(elStartEnd+1,elEndStart); if(/[&<]/.test(text)){ if(/^script$/i.test(tagName)){ domBuilder.characters(text,0,text.length); return elEndStart; }//}else{//text area text = text.replace(/&#?\w+;/g,entityReplacer); domBuilder.characters(text,0,text.length); return elEndStart; } } return elStartEnd+1; } function fixSelfClosed(source,elStartEnd,tagName,closeMap){ var pos = closeMap[tagName]; if(pos == null){ pos = closeMap[tagName] = source.lastIndexOf('') } return pos',start+4); if(end>start){ domBuilder.comment(source,start+4,end-start-4); return end+3; }else{ errorHandler.error("Unclosed comment"); return -1; } }else{ return -1; } default: if(source.substr(start+3,6) == 'CDATA['){ var end = source.indexOf(']]>',start+9); domBuilder.startCDATA(); domBuilder.characters(source,start+9,end-start-9); domBuilder.endCDATA() return end+3; } var matchs = split(source,start); var len = matchs.length; if(len>1 && /!doctype/i.test(matchs[0][0])){ var name = matchs[1][0]; var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0] var sysid = len>4 && matchs[4][0]; var lastMatch = matchs[len-1] domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'), sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2')); domBuilder.endDTD(); return lastMatch.index+lastMatch[0].length } } return -1; } function parseInstruction(source,start,domBuilder){ var end = source.indexOf('?>',start); if(end){ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); if(match){ var len = match[0].length; domBuilder.processingInstruction(match[1], match[2]) ; return end+2; }else{//error return -1; } } return -1; } function ElementAttributes(source){ } ElementAttributes.prototype = { setTagName:function(tagName){ if(!tagNamePattern.test(tagName)){ throw new Error('invalid tagName:'+tagName) } this.tagName = tagName }, add:function(qName,value,offset){ if(!tagNamePattern.test(qName)){ throw new Error('invalid attribute:'+qName) } this[this.length++] = {qName:qName,value:value,offset:offset} }, length:0, getLocalName:function(i){return this[i].localName}, getOffset:function(i){return this[i].offset}, getQName:function(i){return this[i].qName}, getURI:function(i){return this[i].uri}, getValue:function(i){return this[i].value} } function _set_proto_(thiz,parent){ thiz.__proto__ = parent; return thiz; } if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){ _set_proto_ = function(thiz,parent){ function p(){}; p.prototype = parent; p = new p(); for(parent in thiz){ p[parent] = thiz[parent]; } return p; } } function split(source,start){ var match; var buf = []; var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; reg.lastIndex = start; reg.exec(source);//skip < while(match = reg.exec(source)){ buf.push(match); if(match[1])return buf; } } return XMLReader; }); define("ace/mode/xml/dom",["require","exports","module"], function(require, exports, module) { function copy(src,dest){ for(var p in src){ dest[p] = src[p]; } } function _extends(Class,Super){ var pt = Class.prototype; if(Object.create){ var ppt = Object.create(Super.prototype) pt.__proto__ = ppt; } if(!(pt instanceof Super)){ function t(){}; t.prototype = Super.prototype; t = new t(); copy(pt,t); Class.prototype = pt = t; } if(pt.constructor != Class){ if(typeof Class != 'function'){ console.error("unknow Class:"+Class) } pt.constructor = Class } } var htmlns = 'http://www.w3.org/1999/xhtml' ; var NodeType = {} var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; var TEXT_NODE = NodeType.TEXT_NODE = 3; var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; var ENTITY_NODE = NodeType.ENTITY_NODE = 6; var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; var COMMENT_NODE = NodeType.COMMENT_NODE = 8; var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; var NOTATION_NODE = NodeType.NOTATION_NODE = 12; var ExceptionCode = {} var ExceptionMessage = {}; var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); function DOMException(code, message) { if(message instanceof Error){ var error = message; }else{ error = this; Error.call(this, ExceptionMessage[code]); this.message = ExceptionMessage[code]; if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); } error.code = code; if(message) this.message = this.message + ": " + message; return error; }; DOMException.prototype = Error.prototype; copy(ExceptionCode,DOMException) function NodeList() { }; NodeList.prototype = { length:0, item: function(index) { return this[index] || null; } }; function LiveNodeList(node,refresh){ this._node = node; this._refresh = refresh _updateLiveList(this); } function _updateLiveList(list){ var inc = list._node._inc || list._node.ownerDocument._inc; if(list._inc != inc){ var ls = list._refresh(list._node); __set__(list,'length',ls.length); copy(ls,list); list._inc = inc; } } LiveNodeList.prototype.item = function(i){ _updateLiveList(this); return this[i]; } _extends(LiveNodeList,NodeList); function NamedNodeMap() { }; function _findNodeIndex(list,node){ var i = list.length; while(i--){ if(list[i] === node){return i} } } function _addNamedNode(el,list,newAttr,oldAttr){ if(oldAttr){ list[_findNodeIndex(list,oldAttr)] = newAttr; }else{ list[list.length++] = newAttr; } if(el){ newAttr.ownerElement = el; var doc = el.ownerDocument; if(doc){ oldAttr && _onRemoveAttribute(doc,el,oldAttr); _onAddAttribute(doc,el,newAttr); } } } function _removeNamedNode(el,list,attr){ var i = _findNodeIndex(list,attr); if(i>=0){ var lastIndex = list.length-1 while(i0; }, lookupPrefix:function(namespaceURI){ var el = this; while(el){ var map = el._nsMap; if(map){ for(var n in map){ if(map[n] == namespaceURI){ return n; } } } el = el.nodeType == 2?el.ownerDocument : el.parentNode; } return null; }, lookupNamespaceURI:function(prefix){ var el = this; while(el){ var map = el._nsMap; if(map){ if(prefix in map){ return map[prefix] ; } } el = el.nodeType == 2?el.ownerDocument : el.parentNode; } return null; }, isDefaultNamespace:function(namespaceURI){ var prefix = this.lookupPrefix(namespaceURI); return prefix == null; } }; function _xmlEncoder(c){ return c == '<' && '<' || c == '>' && '>' || c == '&' && '&' || c == '"' && '"' || '&#'+c.charCodeAt()+';' } copy(NodeType,Node); copy(NodeType,Node.prototype); function _visitNode(node,callback){ if(callback(node)){ return true; } if(node = node.firstChild){ do{ if(_visitNode(node,callback)){return true} }while(node=node.nextSibling) } } function Document(){ } function _onAddAttribute(doc,el,newAttr){ doc && doc._inc++; var ns = newAttr.namespaceURI ; if(ns == 'http://www.w3.org/2000/xmlns/'){ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value } } function _onRemoveAttribute(doc,el,newAttr,remove){ doc && doc._inc++; var ns = newAttr.namespaceURI ; if(ns == 'http://www.w3.org/2000/xmlns/'){ delete el._nsMap[newAttr.prefix?newAttr.localName:''] } } function _onUpdateChild(doc,el,newChild){ if(doc && doc._inc){ doc._inc++; var cs = el.childNodes; if(newChild){ cs[cs.length++] = newChild; }else{ var child = el.firstChild; var i = 0; while(child){ cs[i++] = child; child =child.nextSibling; } cs.length = i; } } } function _removeChild(parentNode,child){ var previous = child.previousSibling; var next = child.nextSibling; if(previous){ previous.nextSibling = next; }else{ parentNode.firstChild = next } if(next){ next.previousSibling = previous; }else{ parentNode.lastChild = previous; } _onUpdateChild(parentNode.ownerDocument,parentNode); return child; } function _insertBefore(parentNode,newChild,nextChild){ var cp = newChild.parentNode; if(cp){ cp.removeChild(newChild);//remove and update } if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ var newFirst = newChild.firstChild; if (newFirst == null) { return newChild; } var newLast = newChild.lastChild; }else{ newFirst = newLast = newChild; } var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; newFirst.previousSibling = pre; newLast.nextSibling = nextChild; if(pre){ pre.nextSibling = newFirst; }else{ parentNode.firstChild = newFirst; } if(nextChild == null){ parentNode.lastChild = newLast; }else{ nextChild.previousSibling = newLast; } do{ newFirst.parentNode = parentNode; }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { newChild.firstChild = newChild.lastChild = null; } return newChild; } function _appendSingleChild(parentNode,newChild){ var cp = newChild.parentNode; if(cp){ var pre = parentNode.lastChild; cp.removeChild(newChild);//remove and update var pre = parentNode.lastChild; } var pre = parentNode.lastChild; newChild.parentNode = parentNode; newChild.previousSibling = pre; newChild.nextSibling = null; if(pre){ pre.nextSibling = newChild; }else{ parentNode.firstChild = newChild; } parentNode.lastChild = newChild; _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); return newChild; } Document.prototype = { nodeName : '#document', nodeType : DOCUMENT_NODE, doctype : null, documentElement : null, _inc : 1, insertBefore : function(newChild, refChild){//raises if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ var child = newChild.firstChild; while(child){ var next = child.nextSibling; this.insertBefore(child,refChild); child = next; } return newChild; } if(this.documentElement == null && newChild.nodeType == 1){ this.documentElement = newChild; } return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; }, removeChild : function(oldChild){ if(this.documentElement == oldChild){ this.documentElement = null; } return _removeChild(this,oldChild); }, importNode : function(importedNode,deep){ return importNode(this,importedNode,deep); }, getElementById : function(id){ var rtv = null; _visitNode(this.documentElement,function(node){ if(node.nodeType == 1){ if(node.getAttribute('id') == id){ rtv = node; return true; } } }) return rtv; }, createElement : function(tagName){ var node = new Element(); node.ownerDocument = this; node.nodeName = tagName; node.tagName = tagName; node.childNodes = new NodeList(); var attrs = node.attributes = new NamedNodeMap(); attrs._ownerElement = node; return node; }, createDocumentFragment : function(){ var node = new DocumentFragment(); node.ownerDocument = this; node.childNodes = new NodeList(); return node; }, createTextNode : function(data){ var node = new Text(); node.ownerDocument = this; node.appendData(data) return node; }, createComment : function(data){ var node = new Comment(); node.ownerDocument = this; node.appendData(data) return node; }, createCDATASection : function(data){ var node = new CDATASection(); node.ownerDocument = this; node.appendData(data) return node; }, createProcessingInstruction : function(target,data){ var node = new ProcessingInstruction(); node.ownerDocument = this; node.tagName = node.target = target; node.nodeValue= node.data = data; return node; }, createAttribute : function(name){ var node = new Attr(); node.ownerDocument = this; node.name = name; node.nodeName = name; node.localName = name; node.specified = true; return node; }, createEntityReference : function(name){ var node = new EntityReference(); node.ownerDocument = this; node.nodeName = name; return node; }, createElementNS : function(namespaceURI,qualifiedName){ var node = new Element(); var pl = qualifiedName.split(':'); var attrs = node.attributes = new NamedNodeMap(); node.childNodes = new NodeList(); node.ownerDocument = this; node.nodeName = qualifiedName; node.tagName = qualifiedName; node.namespaceURI = namespaceURI; if(pl.length == 2){ node.prefix = pl[0]; node.localName = pl[1]; }else{ node.localName = qualifiedName; } attrs._ownerElement = node; return node; }, createAttributeNS : function(namespaceURI,qualifiedName){ var node = new Attr(); var pl = qualifiedName.split(':'); node.ownerDocument = this; node.nodeName = qualifiedName; node.name = qualifiedName; node.namespaceURI = namespaceURI; node.specified = true; if(pl.length == 2){ node.prefix = pl[0]; node.localName = pl[1]; }else{ node.localName = qualifiedName; } return node; } }; _extends(Document,Node); function Element() { this._nsMap = {}; }; Element.prototype = { nodeType : ELEMENT_NODE, hasAttribute : function(name){ return this.getAttributeNode(name)!=null; }, getAttribute : function(name){ var attr = this.getAttributeNode(name); return attr && attr.value || ''; }, getAttributeNode : function(name){ return this.attributes.getNamedItem(name); }, setAttribute : function(name, value){ var attr = this.ownerDocument.createAttribute(name); attr.value = attr.nodeValue = "" + value; this.setAttributeNode(attr) }, removeAttribute : function(name){ var attr = this.getAttributeNode(name) attr && this.removeAttributeNode(attr); }, appendChild:function(newChild){ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ return this.insertBefore(newChild,null); }else{ return _appendSingleChild(this,newChild); } }, setAttributeNode : function(newAttr){ return this.attributes.setNamedItem(newAttr); }, setAttributeNodeNS : function(newAttr){ return this.attributes.setNamedItemNS(newAttr); }, removeAttributeNode : function(oldAttr){ return this.attributes.removeNamedItem(oldAttr.nodeName); }, removeAttributeNS : function(namespaceURI, localName){ var old = this.getAttributeNodeNS(namespaceURI, localName); old && this.removeAttributeNode(old); }, hasAttributeNS : function(namespaceURI, localName){ return this.getAttributeNodeNS(namespaceURI, localName)!=null; }, getAttributeNS : function(namespaceURI, localName){ var attr = this.getAttributeNodeNS(namespaceURI, localName); return attr && attr.value || ''; }, setAttributeNS : function(namespaceURI, qualifiedName, value){ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); attr.value = attr.nodeValue = "" + value; this.setAttributeNode(attr) }, getAttributeNodeNS : function(namespaceURI, localName){ return this.attributes.getNamedItemNS(namespaceURI, localName); }, getElementsByTagName : function(tagName){ return new LiveNodeList(this,function(base){ var ls = []; _visitNode(base,function(node){ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ ls.push(node); } }); return ls; }); }, getElementsByTagNameNS : function(namespaceURI, localName){ return new LiveNodeList(this,function(base){ var ls = []; _visitNode(base,function(node){ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ ls.push(node); } }); return ls; }); } }; Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; _extends(Element,Node); function Attr() { }; Attr.prototype.nodeType = ATTRIBUTE_NODE; _extends(Attr,Node); function CharacterData() { }; CharacterData.prototype = { data : '', substringData : function(offset, count) { return this.data.substring(offset, offset+count); }, appendData: function(text) { text = this.data+text; this.nodeValue = this.data = text; this.length = text.length; }, insertData: function(offset,text) { this.replaceData(offset,0,text); }, appendChild:function(newChild){ throw new Error(ExceptionMessage[3]) return Node.prototype.appendChild.apply(this,arguments) }, deleteData: function(offset, count) { this.replaceData(offset,count,""); }, replaceData: function(offset, count, text) { var start = this.data.substring(0,offset); var end = this.data.substring(offset+count); text = start + text + end; this.nodeValue = this.data = text; this.length = text.length; } } _extends(CharacterData,Node); function Text() { }; Text.prototype = { nodeName : "#text", nodeType : TEXT_NODE, splitText : function(offset) { var text = this.data; var newText = text.substring(offset); text = text.substring(0, offset); this.data = this.nodeValue = text; this.length = text.length; var newNode = this.ownerDocument.createTextNode(newText); if(this.parentNode){ this.parentNode.insertBefore(newNode, this.nextSibling); } return newNode; } } _extends(Text,CharacterData); function Comment() { }; Comment.prototype = { nodeName : "#comment", nodeType : COMMENT_NODE } _extends(Comment,CharacterData); function CDATASection() { }; CDATASection.prototype = { nodeName : "#cdata-section", nodeType : CDATA_SECTION_NODE } _extends(CDATASection,CharacterData); function DocumentType() { }; DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; _extends(DocumentType,Node); function Notation() { }; Notation.prototype.nodeType = NOTATION_NODE; _extends(Notation,Node); function Entity() { }; Entity.prototype.nodeType = ENTITY_NODE; _extends(Entity,Node); function EntityReference() { }; EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; _extends(EntityReference,Node); function DocumentFragment() { }; DocumentFragment.prototype.nodeName = "#document-fragment"; DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; _extends(DocumentFragment,Node); function ProcessingInstruction() { } ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; _extends(ProcessingInstruction,Node); function XMLSerializer(){} XMLSerializer.prototype.serializeToString = function(node){ var buf = []; serializeToString(node,buf); return buf.join(''); } Node.prototype.toString =function(){ return XMLSerializer.prototype.serializeToString(this); } function serializeToString(node,buf){ switch(node.nodeType){ case ELEMENT_NODE: var attrs = node.attributes; var len = attrs.length; var child = node.firstChild; var nodeName = node.tagName; var isHTML = htmlns === node.namespaceURI buf.push('<',nodeName); for(var i=0;i'); if(isHTML && /^script$/i.test(nodeName)){ if(child){ buf.push(child.data); } }else{ while(child){ serializeToString(child,buf); child = child.nextSibling; } } buf.push(''); }else{ buf.push('/>'); } return; case DOCUMENT_NODE: case DOCUMENT_FRAGMENT_NODE: var child = node.firstChild; while(child){ serializeToString(child,buf); child = child.nextSibling; } return; case ATTRIBUTE_NODE: return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); case TEXT_NODE: return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); case CDATA_SECTION_NODE: return buf.push( ''); case COMMENT_NODE: return buf.push( ""); case DOCUMENT_TYPE_NODE: var pubid = node.publicId; var sysid = node.systemId; buf.push(''); }else if(sysid && sysid!='.'){ buf.push(' SYSTEM "',sysid,'">'); }else{ var sub = node.internalSubset; if(sub){ buf.push(" [",sub,"]"); } buf.push(">"); } return; case PROCESSING_INSTRUCTION_NODE: return buf.push( ""); case ENTITY_REFERENCE_NODE: return buf.push( '&',node.nodeName,';'); default: buf.push('??',node.nodeName); } } function importNode(doc,node,deep){ var node2; switch (node.nodeType) { case ELEMENT_NODE: node2 = node.cloneNode(false); node2.ownerDocument = doc; case DOCUMENT_FRAGMENT_NODE: break; case ATTRIBUTE_NODE: deep = true; break; } if(!node2){ node2 = node.cloneNode(false);//false } node2.ownerDocument = doc; node2.parentNode = null; if(deep){ var child = node.firstChild; while(child){ node2.appendChild(importNode(doc,child,deep)); child = child.nextSibling; } } return node2; } function cloneNode(doc,node,deep){ var node2 = new node.constructor(); for(var n in node){ var v = node[n]; if(typeof v != 'object' ){ if(v != node2[n]){ node2[n] = v; } } } if(node.childNodes){ node2.childNodes = new NodeList(); } node2.ownerDocument = doc; switch (node2.nodeType) { case ELEMENT_NODE: var attrs = node.attributes; var attrs2 = node2.attributes = new NamedNodeMap(); var len = attrs.length attrs2._ownerElement = node2; for(var i=0;i','amp':'&','quot':'"','apos':"'"} if(locator){ domBuilder.setDocumentLocator(locator) } sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); sax.domBuilder = options.domBuilder || domBuilder; if(/\/x?html?$/.test(mimeType)){ entityMap.nbsp = '\xa0'; entityMap.copy = '\xa9'; defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; } if(source){ sax.parse(source,defaultNSMap,entityMap); }else{ sax.errorHandler.error("invalid document source"); } return domBuilder.document; } function buildErrorHandler(errorImpl,domBuilder,locator){ if(!errorImpl){ if(domBuilder instanceof DOMHandler){ return domBuilder; } errorImpl = domBuilder ; } var errorHandler = {} var isCallback = errorImpl instanceof Function; locator = locator||{} function build(key){ var fn = errorImpl[key]; if(!fn){ if(isCallback){ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; }else{ var i=arguments.length; while(--i){ if(fn = errorImpl[arguments[i]]){ break; } } } } errorHandler[key] = fn && function(msg){ fn(msg+_locator(locator), msg, locator); }||function(){}; } build('warning','warn'); build('error','warn','warning'); build('fatalError','warn','warning','error'); return errorHandler; } function DOMHandler() { this.cdata = false; } function position(locator,node){ node.lineNumber = locator.lineNumber; node.columnNumber = locator.columnNumber; } DOMHandler.prototype = { startDocument : function() { this.document = new DOMImplementation().createDocument(null, null, null); if (this.locator) { this.document.documentURI = this.locator.systemId; } }, startElement:function(namespaceURI, localName, qName, attrs) { var doc = this.document; var el = doc.createElementNS(namespaceURI, qName||localName); var len = attrs.length; appendElement(this, el); this.currentElement = el; this.locator && position(this.locator,el) for (var i = 0 ; i < len; i++) { var namespaceURI = attrs.getURI(i); var value = attrs.getValue(i); var qName = attrs.getQName(i); var attr = doc.createAttributeNS(namespaceURI, qName); if( attr.getOffset){ position(attr.getOffset(1),attr) } attr.value = attr.nodeValue = value; el.setAttributeNode(attr) } }, endElement:function(namespaceURI, localName, qName) { var current = this.currentElement var tagName = current.tagName; this.currentElement = current.parentNode; }, startPrefixMapping:function(prefix, uri) { }, endPrefixMapping:function(prefix) { }, processingInstruction:function(target, data) { var ins = this.document.createProcessingInstruction(target, data); this.locator && position(this.locator,ins) appendElement(this, ins); }, ignorableWhitespace:function(ch, start, length) { }, characters:function(chars, start, length) { chars = _toString.apply(this,arguments) if(this.currentElement && chars){ if (this.cdata) { var charNode = this.document.createCDATASection(chars); this.currentElement.appendChild(charNode); } else { var charNode = this.document.createTextNode(chars); this.currentElement.appendChild(charNode); } this.locator && position(this.locator,charNode) } }, skippedEntity:function(name) { }, endDocument:function() { this.document.normalize(); }, setDocumentLocator:function (locator) { if(this.locator = locator){// && !('lineNumber' in locator)){ locator.lineNumber = 0; } }, comment:function(chars, start, length) { chars = _toString.apply(this,arguments) var comm = this.document.createComment(chars); this.locator && position(this.locator,comm) appendElement(this, comm); }, startCDATA:function() { this.cdata = true; }, endCDATA:function() { this.cdata = false; }, startDTD:function(name, publicId, systemId) { var impl = this.document.implementation; if (impl && impl.createDocumentType) { var dt = impl.createDocumentType(name, publicId, systemId); this.locator && position(this.locator,dt) appendElement(this, dt); } }, warning:function(error) { console.warn(error,_locator(this.locator)); }, error:function(error) { console.error(error,_locator(this.locator)); }, fatalError:function(error) { console.error(error,_locator(this.locator)); throw error; } } function _locator(l){ if(l){ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' } } function _toString(chars,start,length){ if(typeof chars == 'string'){ return chars.substr(start,length) }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") if(chars.length >= start+length || start){ return new java.lang.String(chars,start,length)+''; } return chars; } } "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ DOMHandler.prototype[key] = function(){return null} }) function appendElement (hander,node) { if (!hander.currentElement) { hander.document.appendChild(node); } else { hander.currentElement.appendChild(node); } }//appendChild and setAttributeNS are preformance key return { DOMParser: DOMParser }; }); define("ace/mode/xml_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/xml/dom-parser"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var Mirror = require("../worker/mirror").Mirror; var DOMParser = require("./xml/dom-parser").DOMParser; var Worker = exports.Worker = function(sender) { Mirror.call(this, sender); this.setTimeout(400); this.context = null; }; oop.inherits(Worker, Mirror); (function() { this.setOptions = function(options) { this.context = options.context; }; this.onUpdate = function() { var value = this.doc.getValue(); if (!value) return; var parser = new DOMParser(); var errors = []; parser.options.errorHandler = { fatalError: function(fullMsg, errorMsg, locator) { errors.push({ row: locator.lineNumber, column: locator.columnNumber, text: errorMsg, type: "error" }); }, error: function(fullMsg, errorMsg, locator) { errors.push({ row: locator.lineNumber, column: locator.columnNumber, text: errorMsg, type: "error" }); }, warning: function(fullMsg, errorMsg, locator) { errors.push({ row: locator.lineNumber, column: locator.columnNumber, text: errorMsg, type: "warning" }); } }; parser.parseFromString(value); this.sender.emit("error", errors); }; }).call(Worker.prototype); }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-rust.js0000644000076400007640000002677212554155240023165 0ustar pravipravidefine("ace/mode/rust_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var stringEscape = /\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source; var RustHighlightRules = function() { this.$rules = { start: [ { token: 'variable.other.source.rust', regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' }, { token: 'string.quoted.single.source.rust', regex: "'(?:[^'\\\\]|" + stringEscape + ")'" }, { stateName: "bracketedComment", onMatch : function(value, currentState, stack){ stack.unshift(this.next, value.length - 1, currentState); return "string.quoted.raw.source.rust"; }, regex : /r#*"/, next : [ { onMatch : function(value, currentState, stack) { var token = "string.quoted.raw.source.rust"; if (value.length >= stack[1]) { if (value.length > stack[1]) token = "invalid"; stack.shift(); stack.shift(); this.next = stack.shift(); } else { this.next = ""; } return token; }, regex : /"#*/, next : "start" }, { defaultToken : "string.quoted.raw.source.rust" } ] }, { token: 'string.quoted.double.source.rust', regex: '"', push: [ { token: 'string.quoted.double.source.rust', regex: '"', next: 'pop' }, { token: 'constant.character.escape.source.rust', regex: stringEscape }, { defaultToken: 'string.quoted.double.source.rust' } ] }, { token: [ 'keyword.source.rust', 'meta.function.source.rust', 'entity.name.function.source.rust', 'meta.function.source.rust' ], regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' }, { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' }, { token: 'keyword.source.rust', regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' }, { token: 'storage.type.source.rust', regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|isize|usize|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' }, { token: 'variable.language.source.rust', regex: '\\bself\\b' }, { token: 'keyword.operator', regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' }, { token: 'constant.language.source.rust', regex: '\\b(?:true|false|Some|None|Left|Right|Ok|Err)\\b' }, { token: 'support.constant.source.rust', regex: '\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b' }, { token: 'meta.preprocessor.source.rust', regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' }, { token: 'constant.numeric.integer.source.rust', regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|us|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|is|i8|i16|i32|i64))\\b' }, { token: 'constant.numeric.hex.source.rust', regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|us|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|is|i8|i16|i32|i64))\\b' }, { token: 'constant.numeric.binary.source.rust', regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|us|u8|u16|u32|u64)|0b[01_]+(?:i|is|i8|i16|i32|i64))\\b' }, { token: 'constant.numeric.float.source.rust', regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' }, { token: 'comment.line.documentation.source.rust', regex: '//!.*$', push_: [ { token: 'comment.line.documentation.source.rust', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.documentation.source.rust' } ] }, { token: 'comment.line.double-dash.source.rust', regex: '//.*$', push_: [ { token: 'comment.line.double-dash.source.rust', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.double-dash.source.rust' } ] }, { token: 'comment.start.block.source.rust', regex: '/\\*', stateName: 'comment', push: [ { token: 'comment.start.block.source.rust', regex: '/\\*', push: 'comment' }, { token: 'comment.end.block.source.rust', regex: '\\*/', next: 'pop' }, { defaultToken: 'comment.block.source.rust' } ] } ] } this.normalizeRules(); }; RustHighlightRules.metaData = { fileTypes: [ 'rs', 'rc' ], foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$', foldingStopMarker: '^\\s*\\}', name: 'Rust', scopeName: 'source.rust' } oop.inherits(RustHighlightRules, TextHighlightRules); exports.RustHighlightRules = RustHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = RustHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/rust"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/0000755000076400007640000000000012554155240022537 5ustar pravipraviace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/scala.js0000644000076400007640000000025612554155240024163 0ustar pravipravidefine("ace/snippets/scala",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "scala"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/haskell.js0000644000076400007640000000417312554155240024525 0ustar pravipravidefine("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet lang\n\ {-# LANGUAGE ${1:OverloadedStrings} #-}\n\ snippet info\n\ -- |\n\ -- Module : ${1:Module.Namespace}\n\ -- Copyright : ${2:Author} ${3:2011-2012}\n\ -- License : ${4:BSD3}\n\ --\n\ -- Maintainer : ${5:email@something.com}\n\ -- Stability : ${6:experimental}\n\ -- Portability : ${7:unknown}\n\ --\n\ -- ${8:Description}\n\ --\n\ snippet import\n\ import ${1:Data.Text}\n\ snippet import2\n\ import ${1:Data.Text} (${2:head})\n\ snippet importq\n\ import qualified ${1:Data.Text} as ${2:T}\n\ snippet inst\n\ instance ${1:Monoid} ${2:Type} where\n\ ${3}\n\ snippet type\n\ type ${1:Type} = ${2:Type}\n\ snippet data\n\ data ${1:Type} = ${2:$1} ${3:Int}\n\ snippet newtype\n\ newtype ${1:Type} = ${2:$1} ${3:Int}\n\ snippet class\n\ class ${1:Class} a where\n\ ${2}\n\ snippet module\n\ module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n\ ) where\n\ `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\ \n\ snippet const\n\ ${1:name} :: ${2:a}\n\ $1 = ${3:undefined}\n\ snippet fn\n\ ${1:fn} :: ${2:a} -> ${3:a}\n\ $1 ${4} = ${5:undefined}\n\ snippet fn2\n\ ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n\ $1 ${5} = ${6:undefined}\n\ snippet ap\n\ ${1:map} ${2:fn} ${3:list}\n\ snippet do\n\ do\n\ \n\ snippet λ\n\ \\${1:x} -> ${2}\n\ snippet \\\n\ \\${1:x} -> ${2}\n\ snippet <-\n\ ${1:a} <- ${2:m a}\n\ snippet ←\n\ ${1:a} <- ${2:m a}\n\ snippet ->\n\ ${1:m a} -> ${2:a}\n\ snippet →\n\ ${1:m a} -> ${2:a}\n\ snippet tup\n\ (${1:a}, ${2:b})\n\ snippet tup2\n\ (${1:a}, ${2:b}, ${3:c})\n\ snippet tup3\n\ (${1:a}, ${2:b}, ${3:c}, ${4:d})\n\ snippet rec\n\ ${1:Record} { ${2:recFieldA} = ${3:undefined}\n\ , ${4:recFieldB} = ${5:undefined}\n\ }\n\ snippet case\n\ case ${1:something} of\n\ ${2} -> ${3}\n\ snippet let\n\ let ${1} = ${2}\n\ in ${3}\n\ snippet where\n\ where\n\ ${1:fn} = ${2:undefined}\n\ "; exports.scope = "haskell"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/dart.js0000644000076400007640000000276712554155240024043 0ustar pravipravidefine("ace/snippets/dart",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet lib\n\ library ${1};\n\ ${2}\n\ snippet im\n\ import '${1}';\n\ ${2}\n\ snippet pa\n\ part '${1}';\n\ ${2}\n\ snippet pao\n\ part of ${1};\n\ ${2}\n\ snippet main\n\ void main() {\n\ ${1:/* code */}\n\ }\n\ snippet st\n\ static ${1}\n\ snippet fi\n\ final ${1}\n\ snippet re\n\ return ${1}\n\ snippet br\n\ break;\n\ snippet th\n\ throw ${1}\n\ snippet cl\n\ class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ snippet imp\n\ implements ${1}\n\ snippet ext\n\ extends ${1}\n\ snippet if\n\ if (${1:true}) {\n\ ${2}\n\ }\n\ snippet ife\n\ if (${1:true}) {\n\ ${2}\n\ } else {\n\ ${3}\n\ }\n\ snippet el\n\ else\n\ snippet sw\n\ switch (${1}) {\n\ ${2}\n\ }\n\ snippet cs\n\ case ${1}:\n\ ${2}\n\ snippet de\n\ default:\n\ ${1}\n\ snippet for\n\ for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n\ ${4:$1[$2]}\n\ }\n\ snippet fore\n\ for (final ${2:item} in ${1:itemList}) {\n\ ${3:/* code */}\n\ }\n\ snippet wh\n\ while (${1:/* condition */}) {\n\ ${2:/* code */}\n\ }\n\ snippet dowh\n\ do {\n\ ${2:/* code */}\n\ } while (${1:/* condition */});\n\ snippet as\n\ assert(${1:/* condition */});\n\ snippet try\n\ try {\n\ ${2}\n\ } catch (${1:Exception e}) {\n\ }\n\ snippet tryf\n\ try {\n\ ${2}\n\ } catch (${1:Exception e}) {\n\ } finally {\n\ }\n\ "; exports.scope = "dart"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/sh.js0000644000076400007640000000434312554155240023513 0ustar pravipravidefine("ace/snippets/sh",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\n\ snippet #!\n\ #!/usr/bin/env bash\n\ \n\ snippet if\n\ if [[ ${1:condition} ]]; then\n\ ${2:#statements}\n\ fi\n\ snippet elif\n\ elif [[ ${1:condition} ]]; then\n\ ${2:#statements}\n\ snippet for\n\ for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n\ ${3:#statements}\n\ done\n\ snippet fori\n\ for ${1:needle} in ${2:haystack} ; do\n\ ${3:#statements}\n\ done\n\ snippet wh\n\ while [[ ${1:condition} ]]; do\n\ ${2:#statements}\n\ done\n\ snippet until\n\ until [[ ${1:condition} ]]; do\n\ ${2:#statements}\n\ done\n\ snippet case\n\ case ${1:word} in\n\ ${2:pattern})\n\ ${3};;\n\ esac\n\ snippet go \n\ while getopts '${1:o}' ${2:opts} \n\ do \n\ case $$2 in\n\ ${3:o0})\n\ ${4:#staments};;\n\ esac\n\ done\n\ # Set SCRIPT_DIR variable to directory script is located.\n\ snippet sdir\n\ SCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\ # getopt\n\ snippet getopt\n\ __ScriptVersion=\"${1:version}\"\n\ \n\ #=== FUNCTION ================================================================\n\ # NAME: usage\n\ # DESCRIPTION: Display usage information.\n\ #===============================================================================\n\ function usage ()\n\ {\n\ cat <<- EOT\n\ \n\ Usage : $${0:0} [options] [--] \n\ \n\ Options: \n\ -h|help Display this message\n\ -v|version Display script version\n\ \n\ EOT\n\ } # ---------- end of function usage ----------\n\ \n\ #-----------------------------------------------------------------------\n\ # Handle command line arguments\n\ #-----------------------------------------------------------------------\n\ \n\ while getopts \":hv\" opt\n\ do\n\ case $opt in\n\ \n\ h|help ) usage; exit 0 ;;\n\ \n\ v|version ) echo \"$${0:0} -- Version $__ScriptVersion\"; exit 0 ;;\n\ \n\ \\? ) echo -e \"\\n Option does not exist : $OPTARG\\n\"\n\ usage; exit 1 ;;\n\ \n\ esac # --- end of case ---\n\ done\n\ shift $(($OPTIND-1))\n\ \n\ "; exports.scope = "sh"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/mips_assembler.js0000644000076400007640000000030012554155240026073 0ustar pravipravidefine("ace/snippets/mips_assembler",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "mips_assembler"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/vbscript.js0000644000076400007640000000026412554155240024733 0ustar pravipravidefine("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "vbscript"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/mysql.js0000644000076400007640000000025612554155240024245 0ustar pravipravidefine("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "mysql"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/scss.js0000644000076400007640000000025412554155240024051 0ustar pravipravidefine("ace/snippets/scss",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "scss"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/csharp.js0000644000076400007640000000026012554155240024353 0ustar pravipravidefine("ace/snippets/csharp",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "csharp"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/mushcode.js0000644000076400007640000000026412554155240024706 0ustar pravipravidefine("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "mushcode"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/velocity.js0000644000076400007640000000137212554155240024736 0ustar pravipravidefine("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# macro\n\ snippet #macro\n\ #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\ ${3:## macro code}\n\ #end\n\ # foreach\n\ snippet #foreach\n\ #foreach ( ${1:\\$item} in ${2:\\$collection} )\n\ ${3:## foreach code}\n\ #end\n\ # if\n\ snippet #if\n\ #if ( ${1:true} )\n\ ${0}\n\ #end\n\ # if ... else\n\ snippet #ife\n\ #if ( ${1:true} )\n\ ${2}\n\ #else\n\ ${0}\n\ #end\n\ #import\n\ snippet #import\n\ #import ( \"${1:path/to/velocity/format}\" )\n\ # set\n\ snippet #set\n\ #set ( $${1:var} = ${0} )\n\ "; exports.scope = "velocity"; exports.includeScopes = ["html", "javascript", "css"]; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/groovy.js0000644000076400007640000000026012554155240024420 0ustar pravipravidefine("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "groovy"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/gcode.js0000644000076400007640000000025612554155240024161 0ustar pravipravidefine("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "gcode"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/html_ruby.js0000644000076400007640000000026612554155240025106 0ustar pravipravidefine("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "html_ruby"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/haxe.js0000644000076400007640000000025412554155240024023 0ustar pravipravidefine("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "haxe"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/gherkin.js0000644000076400007640000000026212554155240024524 0ustar pravipravidefine("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "gherkin"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/liquid.js0000644000076400007640000000026012554155240024362 0ustar pravipravidefine("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "liquid"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/json.js0000644000076400007640000000025412554155240024047 0ustar pravipravidefine("ace/snippets/json",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "json"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/nix.js0000644000076400007640000000025212554155240023672 0ustar pravipravidefine("ace/snippets/nix",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "nix"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/mel.js0000644000076400007640000000025212554155240023651 0ustar pravipravidefine("ace/snippets/mel",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "mel"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/elm.js0000644000076400007640000000025212554155240023651 0ustar pravipravidefine("ace/snippets/elm",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "elm"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/curly.js0000644000076400007640000000025612554155240024236 0ustar pravipravidefine("ace/snippets/curly",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "curly"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/latex.js0000644000076400007640000000025612554155240024215 0ustar pravipravidefine("ace/snippets/latex",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "latex"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/io.js0000644000076400007640000000351512554155240023510 0ustar pravipravidefine("ace/snippets/io",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippets = [ { "content": "assertEquals(${1:expected}, ${2:expr})", "name": "assertEquals", "scope": "io", "tabTrigger": "ae" }, { "content": "${1:${2:newValue} := ${3:Object} }clone do(\n\t$0\n)", "name": "clone do", "scope": "io", "tabTrigger": "cdo" }, { "content": "docSlot(\"${1:slotName}\", \"${2:documentation}\")", "name": "docSlot", "scope": "io", "tabTrigger": "ds" }, { "content": "(${1:header,}\n\t${2:body}\n)$0", "keyEquivalent": "@(", "name": "Indented Bracketed Line", "scope": "io", "tabTrigger": "(" }, { "content": "\n\t$0\n", "keyEquivalent": "\r", "name": "Special: Return Inside Empty Parenthesis", "scope": "io meta.empty-parenthesis.io, io meta.comma-parenthesis.io" }, { "content": "${1:methodName} := method(${2:args,}\n\t$0\n)", "name": "method", "scope": "io", "tabTrigger": "m" }, { "content": "newSlot(\"${1:slotName}\", ${2:defaultValue}, \"${3:docString}\")$0", "name": "newSlot", "scope": "io", "tabTrigger": "ns" }, { "content": "${1:name} := Object clone do(\n\t$0\n)", "name": "Object clone do", "scope": "io", "tabTrigger": "ocdo" }, { "content": "test${1:SomeFeature} := method(\n\t$0\n)", "name": "testMethod", "scope": "io", "tabTrigger": "ts" }, { "content": "${1:Something}Test := ${2:UnitTest} clone do(\n\t$0\n)", "name": "UnitTest", "scope": "io", "tabTrigger": "ut" } ]; exports.scope = "io"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/lean.js0000644000076400007640000000025412554155240024015 0ustar pravipravidefine("ace/snippets/lean",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "lean"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/rhtml.js0000644000076400007640000000025612554155240024226 0ustar pravipravidefine("ace/snippets/rhtml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "rhtml"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/r.js0000644000076400007640000000554412554155240023346 0ustar pravipravidefine("ace/snippets/r",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet #!\n\ #!/usr/bin/env Rscript\n\ \n\ # includes\n\ snippet lib\n\ library(${1:package})\n\ snippet req\n\ require(${1:package})\n\ snippet source\n\ source('${1:file}')\n\ \n\ # conditionals\n\ snippet if\n\ if (${1:condition}) {\n\ ${2:code}\n\ }\n\ snippet el\n\ else {\n\ ${1:code}\n\ }\n\ snippet ei\n\ else if (${1:condition}) {\n\ ${2:code}\n\ }\n\ \n\ # functions\n\ snippet fun\n\ ${1:name} = function (${2:variables}) {\n\ ${3:code}\n\ }\n\ snippet ret\n\ return(${1:code})\n\ \n\ # dataframes, lists, etc\n\ snippet df\n\ ${1:name}[${2:rows}, ${3:cols}]\n\ snippet c\n\ c(${1:items})\n\ snippet li\n\ list(${1:items})\n\ snippet mat\n\ matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})\n\ \n\ # apply functions\n\ snippet apply\n\ apply(${1:array}, ${2:margin}, ${3:function})\n\ snippet lapply\n\ lapply(${1:list}, ${2:function})\n\ snippet sapply\n\ sapply(${1:list}, ${2:function})\n\ snippet vapply\n\ vapply(${1:list}, ${2:function}, ${3:type})\n\ snippet mapply\n\ mapply(${1:function}, ${2:...})\n\ snippet tapply\n\ tapply(${1:vector}, ${2:index}, ${3:function})\n\ snippet rapply\n\ rapply(${1:list}, ${2:function})\n\ \n\ # plyr functions\n\ snippet dd\n\ ddply(${1:frame}, ${2:variables}, ${3:function})\n\ snippet dl\n\ dlply(${1:frame}, ${2:variables}, ${3:function})\n\ snippet da\n\ daply(${1:frame}, ${2:variables}, ${3:function})\n\ snippet d_\n\ d_ply(${1:frame}, ${2:variables}, ${3:function})\n\ \n\ snippet ad\n\ adply(${1:array}, ${2:margin}, ${3:function})\n\ snippet al\n\ alply(${1:array}, ${2:margin}, ${3:function})\n\ snippet aa\n\ aaply(${1:array}, ${2:margin}, ${3:function})\n\ snippet a_\n\ a_ply(${1:array}, ${2:margin}, ${3:function})\n\ \n\ snippet ld\n\ ldply(${1:list}, ${2:function})\n\ snippet ll\n\ llply(${1:list}, ${2:function})\n\ snippet la\n\ laply(${1:list}, ${2:function})\n\ snippet l_\n\ l_ply(${1:list}, ${2:function})\n\ \n\ snippet md\n\ mdply(${1:matrix}, ${2:function})\n\ snippet ml\n\ mlply(${1:matrix}, ${2:function})\n\ snippet ma\n\ maply(${1:matrix}, ${2:function})\n\ snippet m_\n\ m_ply(${1:matrix}, ${2:function})\n\ \n\ # plot functions\n\ snippet pl\n\ plot(${1:x}, ${2:y})\n\ snippet ggp\n\ ggplot(${1:data}, aes(${2:aesthetics}))\n\ snippet img\n\ ${1:(jpeg,bmp,png,tiff)}(filename=\"${2:filename}\", width=${3}, height=${4}, unit=\"${5}\")\n\ ${6:plot}\n\ dev.off()\n\ \n\ # statistical test functions\n\ snippet fis\n\ fisher.test(${1:x}, ${2:y})\n\ snippet chi\n\ chisq.test(${1:x}, ${2:y})\n\ snippet tt\n\ t.test(${1:x}, ${2:y})\n\ snippet wil\n\ wilcox.test(${1:x}, ${2:y})\n\ snippet cor\n\ cor.test(${1:x}, ${2:y})\n\ snippet fte\n\ var.test(${1:x}, ${2:y})\n\ snippet kvt \n\ kv.test(${1:x}, ${2:y})\n\ "; exports.scope = "r"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/autohotkey.js0000644000076400007640000000027012554155240025270 0ustar pravipravidefine("ace/snippets/autohotkey",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "autohotkey"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/jsx.js0000644000076400007640000000025212554155240023700 0ustar pravipravidefine("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "jsx"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/abc.js0000644000076400007640000000211312554155240023617 0ustar pravipravidefine("ace/snippets/abc",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "\n\ snippet zupfnoter.print\n\ %%%%hn.print {\"startpos\": ${1:pos_y}, \"t\":\"${2:title}\", \"v\":[${3:voices}], \"s\":[[${4:syncvoices}1,2]], \"f\":[${5:flowlines}], \"sf\":[${6:subflowlines}], \"j\":[${7:jumplines}]}\n\ \n\ snippet zupfnoter.note\n\ %%%%hn.note {\"pos\": [${1:pos_x},${2:pos_y}], \"text\": \"${3:text}\", \"style\": \"${4:style}\"}\n\ \n\ snippet zupfnoter.annotation\n\ %%%%hn.annotation {\"id\": \"${1:id}\", \"pos\": [${2:pos}], \"text\": \"${3:text}\"}\n\ \n\ snippet zupfnoter.lyrics\n\ %%%%hn.lyrics {\"pos\": [${1:x_pos},${2:y_pos}]}\n\ \n\ snippet zupfnoter.legend\n\ %%%%hn.legend {\"pos\": [${1:x_pos},${2:y_pos}]}\n\ \n\ \n\ \n\ snippet zupfnoter.target\n\ \"^:${1:target}\"\n\ \n\ snippet zupfnoter.goto\n\ \"^@${1:target}@${2:distance}\"\n\ \n\ snippet zupfnoter.annotationref\n\ \"^#${1:target}\"\n\ \n\ snippet zupfnoter.annotation\n\ \"^!${1:text}@${2:x_offset},${3:y_offset}\"\n\ \n\ \n\ "; exports.scope = "abc"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/toml.js0000644000076400007640000000025412554155240024051 0ustar pravipravidefine("ace/snippets/toml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "toml"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/css.js0000644000076400007640000005217212554155240023674 0ustar pravipravidefine("ace/snippets/css",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet .\n\ ${1} {\n\ ${2}\n\ }\n\ snippet !\n\ !important\n\ snippet bdi:m+\n\ -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\ snippet bdi:m\n\ -moz-border-image: ${1};\n\ snippet bdrz:m\n\ -moz-border-radius: ${1};\n\ snippet bxsh:m+\n\ -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ snippet bxsh:m\n\ -moz-box-shadow: ${1};\n\ snippet bdi:w+\n\ -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\ snippet bdi:w\n\ -webkit-border-image: ${1};\n\ snippet bdrz:w\n\ -webkit-border-radius: ${1};\n\ snippet bxsh:w+\n\ -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ snippet bxsh:w\n\ -webkit-box-shadow: ${1};\n\ snippet @f\n\ @font-face {\n\ font-family: ${1};\n\ src: url(${2});\n\ }\n\ snippet @i\n\ @import url(${1});\n\ snippet @m\n\ @media ${1:print} {\n\ ${2}\n\ }\n\ snippet bg+\n\ background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\n\ snippet bga\n\ background-attachment: ${1};\n\ snippet bga:f\n\ background-attachment: fixed;\n\ snippet bga:s\n\ background-attachment: scroll;\n\ snippet bgbk\n\ background-break: ${1};\n\ snippet bgbk:bb\n\ background-break: bounding-box;\n\ snippet bgbk:c\n\ background-break: continuous;\n\ snippet bgbk:eb\n\ background-break: each-box;\n\ snippet bgcp\n\ background-clip: ${1};\n\ snippet bgcp:bb\n\ background-clip: border-box;\n\ snippet bgcp:cb\n\ background-clip: content-box;\n\ snippet bgcp:nc\n\ background-clip: no-clip;\n\ snippet bgcp:pb\n\ background-clip: padding-box;\n\ snippet bgc\n\ background-color: #${1:FFF};\n\ snippet bgc:t\n\ background-color: transparent;\n\ snippet bgi\n\ background-image: url(${1});\n\ snippet bgi:n\n\ background-image: none;\n\ snippet bgo\n\ background-origin: ${1};\n\ snippet bgo:bb\n\ background-origin: border-box;\n\ snippet bgo:cb\n\ background-origin: content-box;\n\ snippet bgo:pb\n\ background-origin: padding-box;\n\ snippet bgpx\n\ background-position-x: ${1};\n\ snippet bgpy\n\ background-position-y: ${1};\n\ snippet bgp\n\ background-position: ${1:0} ${2:0};\n\ snippet bgr\n\ background-repeat: ${1};\n\ snippet bgr:n\n\ background-repeat: no-repeat;\n\ snippet bgr:x\n\ background-repeat: repeat-x;\n\ snippet bgr:y\n\ background-repeat: repeat-y;\n\ snippet bgr:r\n\ background-repeat: repeat;\n\ snippet bgz\n\ background-size: ${1};\n\ snippet bgz:a\n\ background-size: auto;\n\ snippet bgz:ct\n\ background-size: contain;\n\ snippet bgz:cv\n\ background-size: cover;\n\ snippet bg\n\ background: ${1};\n\ snippet bg:ie\n\ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\n\ snippet bg:n\n\ background: none;\n\ snippet bd+\n\ border: ${1:1px} ${2:solid} #${3:000};\n\ snippet bdb+\n\ border-bottom: ${1:1px} ${2:solid} #${3:000};\n\ snippet bdbc\n\ border-bottom-color: #${1:000};\n\ snippet bdbi\n\ border-bottom-image: url(${1});\n\ snippet bdbi:n\n\ border-bottom-image: none;\n\ snippet bdbli\n\ border-bottom-left-image: url(${1});\n\ snippet bdbli:c\n\ border-bottom-left-image: continue;\n\ snippet bdbli:n\n\ border-bottom-left-image: none;\n\ snippet bdblrz\n\ border-bottom-left-radius: ${1};\n\ snippet bdbri\n\ border-bottom-right-image: url(${1});\n\ snippet bdbri:c\n\ border-bottom-right-image: continue;\n\ snippet bdbri:n\n\ border-bottom-right-image: none;\n\ snippet bdbrrz\n\ border-bottom-right-radius: ${1};\n\ snippet bdbs\n\ border-bottom-style: ${1};\n\ snippet bdbs:n\n\ border-bottom-style: none;\n\ snippet bdbw\n\ border-bottom-width: ${1};\n\ snippet bdb\n\ border-bottom: ${1};\n\ snippet bdb:n\n\ border-bottom: none;\n\ snippet bdbk\n\ border-break: ${1};\n\ snippet bdbk:c\n\ border-break: close;\n\ snippet bdcl\n\ border-collapse: ${1};\n\ snippet bdcl:c\n\ border-collapse: collapse;\n\ snippet bdcl:s\n\ border-collapse: separate;\n\ snippet bdc\n\ border-color: #${1:000};\n\ snippet bdci\n\ border-corner-image: url(${1});\n\ snippet bdci:c\n\ border-corner-image: continue;\n\ snippet bdci:n\n\ border-corner-image: none;\n\ snippet bdf\n\ border-fit: ${1};\n\ snippet bdf:c\n\ border-fit: clip;\n\ snippet bdf:of\n\ border-fit: overwrite;\n\ snippet bdf:ow\n\ border-fit: overwrite;\n\ snippet bdf:r\n\ border-fit: repeat;\n\ snippet bdf:sc\n\ border-fit: scale;\n\ snippet bdf:sp\n\ border-fit: space;\n\ snippet bdf:st\n\ border-fit: stretch;\n\ snippet bdi\n\ border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\ snippet bdi:n\n\ border-image: none;\n\ snippet bdl+\n\ border-left: ${1:1px} ${2:solid} #${3:000};\n\ snippet bdlc\n\ border-left-color: #${1:000};\n\ snippet bdli\n\ border-left-image: url(${1});\n\ snippet bdli:n\n\ border-left-image: none;\n\ snippet bdls\n\ border-left-style: ${1};\n\ snippet bdls:n\n\ border-left-style: none;\n\ snippet bdlw\n\ border-left-width: ${1};\n\ snippet bdl\n\ border-left: ${1};\n\ snippet bdl:n\n\ border-left: none;\n\ snippet bdlt\n\ border-length: ${1};\n\ snippet bdlt:a\n\ border-length: auto;\n\ snippet bdrz\n\ border-radius: ${1};\n\ snippet bdr+\n\ border-right: ${1:1px} ${2:solid} #${3:000};\n\ snippet bdrc\n\ border-right-color: #${1:000};\n\ snippet bdri\n\ border-right-image: url(${1});\n\ snippet bdri:n\n\ border-right-image: none;\n\ snippet bdrs\n\ border-right-style: ${1};\n\ snippet bdrs:n\n\ border-right-style: none;\n\ snippet bdrw\n\ border-right-width: ${1};\n\ snippet bdr\n\ border-right: ${1};\n\ snippet bdr:n\n\ border-right: none;\n\ snippet bdsp\n\ border-spacing: ${1};\n\ snippet bds\n\ border-style: ${1};\n\ snippet bds:ds\n\ border-style: dashed;\n\ snippet bds:dtds\n\ border-style: dot-dash;\n\ snippet bds:dtdtds\n\ border-style: dot-dot-dash;\n\ snippet bds:dt\n\ border-style: dotted;\n\ snippet bds:db\n\ border-style: double;\n\ snippet bds:g\n\ border-style: groove;\n\ snippet bds:h\n\ border-style: hidden;\n\ snippet bds:i\n\ border-style: inset;\n\ snippet bds:n\n\ border-style: none;\n\ snippet bds:o\n\ border-style: outset;\n\ snippet bds:r\n\ border-style: ridge;\n\ snippet bds:s\n\ border-style: solid;\n\ snippet bds:w\n\ border-style: wave;\n\ snippet bdt+\n\ border-top: ${1:1px} ${2:solid} #${3:000};\n\ snippet bdtc\n\ border-top-color: #${1:000};\n\ snippet bdti\n\ border-top-image: url(${1});\n\ snippet bdti:n\n\ border-top-image: none;\n\ snippet bdtli\n\ border-top-left-image: url(${1});\n\ snippet bdtli:c\n\ border-corner-image: continue;\n\ snippet bdtli:n\n\ border-corner-image: none;\n\ snippet bdtlrz\n\ border-top-left-radius: ${1};\n\ snippet bdtri\n\ border-top-right-image: url(${1});\n\ snippet bdtri:c\n\ border-top-right-image: continue;\n\ snippet bdtri:n\n\ border-top-right-image: none;\n\ snippet bdtrrz\n\ border-top-right-radius: ${1};\n\ snippet bdts\n\ border-top-style: ${1};\n\ snippet bdts:n\n\ border-top-style: none;\n\ snippet bdtw\n\ border-top-width: ${1};\n\ snippet bdt\n\ border-top: ${1};\n\ snippet bdt:n\n\ border-top: none;\n\ snippet bdw\n\ border-width: ${1};\n\ snippet bd\n\ border: ${1};\n\ snippet bd:n\n\ border: none;\n\ snippet b\n\ bottom: ${1};\n\ snippet b:a\n\ bottom: auto;\n\ snippet bxsh+\n\ box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ snippet bxsh\n\ box-shadow: ${1};\n\ snippet bxsh:n\n\ box-shadow: none;\n\ snippet bxz\n\ box-sizing: ${1};\n\ snippet bxz:bb\n\ box-sizing: border-box;\n\ snippet bxz:cb\n\ box-sizing: content-box;\n\ snippet cps\n\ caption-side: ${1};\n\ snippet cps:b\n\ caption-side: bottom;\n\ snippet cps:t\n\ caption-side: top;\n\ snippet cl\n\ clear: ${1};\n\ snippet cl:b\n\ clear: both;\n\ snippet cl:l\n\ clear: left;\n\ snippet cl:n\n\ clear: none;\n\ snippet cl:r\n\ clear: right;\n\ snippet cp\n\ clip: ${1};\n\ snippet cp:a\n\ clip: auto;\n\ snippet cp:r\n\ clip: rect(${1:0} ${2:0} ${3:0} ${4:0});\n\ snippet c\n\ color: #${1:000};\n\ snippet ct\n\ content: ${1};\n\ snippet ct:a\n\ content: attr(${1});\n\ snippet ct:cq\n\ content: close-quote;\n\ snippet ct:c\n\ content: counter(${1});\n\ snippet ct:cs\n\ content: counters(${1});\n\ snippet ct:ncq\n\ content: no-close-quote;\n\ snippet ct:noq\n\ content: no-open-quote;\n\ snippet ct:n\n\ content: normal;\n\ snippet ct:oq\n\ content: open-quote;\n\ snippet coi\n\ counter-increment: ${1};\n\ snippet cor\n\ counter-reset: ${1};\n\ snippet cur\n\ cursor: ${1};\n\ snippet cur:a\n\ cursor: auto;\n\ snippet cur:c\n\ cursor: crosshair;\n\ snippet cur:d\n\ cursor: default;\n\ snippet cur:ha\n\ cursor: hand;\n\ snippet cur:he\n\ cursor: help;\n\ snippet cur:m\n\ cursor: move;\n\ snippet cur:p\n\ cursor: pointer;\n\ snippet cur:t\n\ cursor: text;\n\ snippet d\n\ display: ${1};\n\ snippet d:mib\n\ display: -moz-inline-box;\n\ snippet d:mis\n\ display: -moz-inline-stack;\n\ snippet d:b\n\ display: block;\n\ snippet d:cp\n\ display: compact;\n\ snippet d:ib\n\ display: inline-block;\n\ snippet d:itb\n\ display: inline-table;\n\ snippet d:i\n\ display: inline;\n\ snippet d:li\n\ display: list-item;\n\ snippet d:n\n\ display: none;\n\ snippet d:ri\n\ display: run-in;\n\ snippet d:tbcp\n\ display: table-caption;\n\ snippet d:tbc\n\ display: table-cell;\n\ snippet d:tbclg\n\ display: table-column-group;\n\ snippet d:tbcl\n\ display: table-column;\n\ snippet d:tbfg\n\ display: table-footer-group;\n\ snippet d:tbhg\n\ display: table-header-group;\n\ snippet d:tbrg\n\ display: table-row-group;\n\ snippet d:tbr\n\ display: table-row;\n\ snippet d:tb\n\ display: table;\n\ snippet ec\n\ empty-cells: ${1};\n\ snippet ec:h\n\ empty-cells: hide;\n\ snippet ec:s\n\ empty-cells: show;\n\ snippet exp\n\ expression()\n\ snippet fl\n\ float: ${1};\n\ snippet fl:l\n\ float: left;\n\ snippet fl:n\n\ float: none;\n\ snippet fl:r\n\ float: right;\n\ snippet f+\n\ font: ${1:1em} ${2:Arial},${3:sans-serif};\n\ snippet fef\n\ font-effect: ${1};\n\ snippet fef:eb\n\ font-effect: emboss;\n\ snippet fef:eg\n\ font-effect: engrave;\n\ snippet fef:n\n\ font-effect: none;\n\ snippet fef:o\n\ font-effect: outline;\n\ snippet femp\n\ font-emphasize-position: ${1};\n\ snippet femp:a\n\ font-emphasize-position: after;\n\ snippet femp:b\n\ font-emphasize-position: before;\n\ snippet fems\n\ font-emphasize-style: ${1};\n\ snippet fems:ac\n\ font-emphasize-style: accent;\n\ snippet fems:c\n\ font-emphasize-style: circle;\n\ snippet fems:ds\n\ font-emphasize-style: disc;\n\ snippet fems:dt\n\ font-emphasize-style: dot;\n\ snippet fems:n\n\ font-emphasize-style: none;\n\ snippet fem\n\ font-emphasize: ${1};\n\ snippet ff\n\ font-family: ${1};\n\ snippet ff:c\n\ font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\n\ snippet ff:f\n\ font-family: ${1:Capitals,Impact},fantasy;\n\ snippet ff:m\n\ font-family: ${1:Monaco,'Courier New'},monospace;\n\ snippet ff:ss\n\ font-family: ${1:Helvetica,Arial},sans-serif;\n\ snippet ff:s\n\ font-family: ${1:Georgia,'Times New Roman'},serif;\n\ snippet fza\n\ font-size-adjust: ${1};\n\ snippet fza:n\n\ font-size-adjust: none;\n\ snippet fz\n\ font-size: ${1};\n\ snippet fsm\n\ font-smooth: ${1};\n\ snippet fsm:aw\n\ font-smooth: always;\n\ snippet fsm:a\n\ font-smooth: auto;\n\ snippet fsm:n\n\ font-smooth: never;\n\ snippet fst\n\ font-stretch: ${1};\n\ snippet fst:c\n\ font-stretch: condensed;\n\ snippet fst:e\n\ font-stretch: expanded;\n\ snippet fst:ec\n\ font-stretch: extra-condensed;\n\ snippet fst:ee\n\ font-stretch: extra-expanded;\n\ snippet fst:n\n\ font-stretch: normal;\n\ snippet fst:sc\n\ font-stretch: semi-condensed;\n\ snippet fst:se\n\ font-stretch: semi-expanded;\n\ snippet fst:uc\n\ font-stretch: ultra-condensed;\n\ snippet fst:ue\n\ font-stretch: ultra-expanded;\n\ snippet fs\n\ font-style: ${1};\n\ snippet fs:i\n\ font-style: italic;\n\ snippet fs:n\n\ font-style: normal;\n\ snippet fs:o\n\ font-style: oblique;\n\ snippet fv\n\ font-variant: ${1};\n\ snippet fv:n\n\ font-variant: normal;\n\ snippet fv:sc\n\ font-variant: small-caps;\n\ snippet fw\n\ font-weight: ${1};\n\ snippet fw:b\n\ font-weight: bold;\n\ snippet fw:br\n\ font-weight: bolder;\n\ snippet fw:lr\n\ font-weight: lighter;\n\ snippet fw:n\n\ font-weight: normal;\n\ snippet f\n\ font: ${1};\n\ snippet h\n\ height: ${1};\n\ snippet h:a\n\ height: auto;\n\ snippet l\n\ left: ${1};\n\ snippet l:a\n\ left: auto;\n\ snippet lts\n\ letter-spacing: ${1};\n\ snippet lh\n\ line-height: ${1};\n\ snippet lisi\n\ list-style-image: url(${1});\n\ snippet lisi:n\n\ list-style-image: none;\n\ snippet lisp\n\ list-style-position: ${1};\n\ snippet lisp:i\n\ list-style-position: inside;\n\ snippet lisp:o\n\ list-style-position: outside;\n\ snippet list\n\ list-style-type: ${1};\n\ snippet list:c\n\ list-style-type: circle;\n\ snippet list:dclz\n\ list-style-type: decimal-leading-zero;\n\ snippet list:dc\n\ list-style-type: decimal;\n\ snippet list:d\n\ list-style-type: disc;\n\ snippet list:lr\n\ list-style-type: lower-roman;\n\ snippet list:n\n\ list-style-type: none;\n\ snippet list:s\n\ list-style-type: square;\n\ snippet list:ur\n\ list-style-type: upper-roman;\n\ snippet lis\n\ list-style: ${1};\n\ snippet lis:n\n\ list-style: none;\n\ snippet mb\n\ margin-bottom: ${1};\n\ snippet mb:a\n\ margin-bottom: auto;\n\ snippet ml\n\ margin-left: ${1};\n\ snippet ml:a\n\ margin-left: auto;\n\ snippet mr\n\ margin-right: ${1};\n\ snippet mr:a\n\ margin-right: auto;\n\ snippet mt\n\ margin-top: ${1};\n\ snippet mt:a\n\ margin-top: auto;\n\ snippet m\n\ margin: ${1};\n\ snippet m:4\n\ margin: ${1:0} ${2:0} ${3:0} ${4:0};\n\ snippet m:3\n\ margin: ${1:0} ${2:0} ${3:0};\n\ snippet m:2\n\ margin: ${1:0} ${2:0};\n\ snippet m:0\n\ margin: 0;\n\ snippet m:a\n\ margin: auto;\n\ snippet mah\n\ max-height: ${1};\n\ snippet mah:n\n\ max-height: none;\n\ snippet maw\n\ max-width: ${1};\n\ snippet maw:n\n\ max-width: none;\n\ snippet mih\n\ min-height: ${1};\n\ snippet miw\n\ min-width: ${1};\n\ snippet op\n\ opacity: ${1};\n\ snippet op:ie\n\ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\n\ snippet op:ms\n\ -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\n\ snippet orp\n\ orphans: ${1};\n\ snippet o+\n\ outline: ${1:1px} ${2:solid} #${3:000};\n\ snippet oc\n\ outline-color: ${1:#000};\n\ snippet oc:i\n\ outline-color: invert;\n\ snippet oo\n\ outline-offset: ${1};\n\ snippet os\n\ outline-style: ${1};\n\ snippet ow\n\ outline-width: ${1};\n\ snippet o\n\ outline: ${1};\n\ snippet o:n\n\ outline: none;\n\ snippet ovs\n\ overflow-style: ${1};\n\ snippet ovs:a\n\ overflow-style: auto;\n\ snippet ovs:mq\n\ overflow-style: marquee;\n\ snippet ovs:mv\n\ overflow-style: move;\n\ snippet ovs:p\n\ overflow-style: panner;\n\ snippet ovs:s\n\ overflow-style: scrollbar;\n\ snippet ovx\n\ overflow-x: ${1};\n\ snippet ovx:a\n\ overflow-x: auto;\n\ snippet ovx:h\n\ overflow-x: hidden;\n\ snippet ovx:s\n\ overflow-x: scroll;\n\ snippet ovx:v\n\ overflow-x: visible;\n\ snippet ovy\n\ overflow-y: ${1};\n\ snippet ovy:a\n\ overflow-y: auto;\n\ snippet ovy:h\n\ overflow-y: hidden;\n\ snippet ovy:s\n\ overflow-y: scroll;\n\ snippet ovy:v\n\ overflow-y: visible;\n\ snippet ov\n\ overflow: ${1};\n\ snippet ov:a\n\ overflow: auto;\n\ snippet ov:h\n\ overflow: hidden;\n\ snippet ov:s\n\ overflow: scroll;\n\ snippet ov:v\n\ overflow: visible;\n\ snippet pb\n\ padding-bottom: ${1};\n\ snippet pl\n\ padding-left: ${1};\n\ snippet pr\n\ padding-right: ${1};\n\ snippet pt\n\ padding-top: ${1};\n\ snippet p\n\ padding: ${1};\n\ snippet p:4\n\ padding: ${1:0} ${2:0} ${3:0} ${4:0};\n\ snippet p:3\n\ padding: ${1:0} ${2:0} ${3:0};\n\ snippet p:2\n\ padding: ${1:0} ${2:0};\n\ snippet p:0\n\ padding: 0;\n\ snippet pgba\n\ page-break-after: ${1};\n\ snippet pgba:aw\n\ page-break-after: always;\n\ snippet pgba:a\n\ page-break-after: auto;\n\ snippet pgba:l\n\ page-break-after: left;\n\ snippet pgba:r\n\ page-break-after: right;\n\ snippet pgbb\n\ page-break-before: ${1};\n\ snippet pgbb:aw\n\ page-break-before: always;\n\ snippet pgbb:a\n\ page-break-before: auto;\n\ snippet pgbb:l\n\ page-break-before: left;\n\ snippet pgbb:r\n\ page-break-before: right;\n\ snippet pgbi\n\ page-break-inside: ${1};\n\ snippet pgbi:a\n\ page-break-inside: auto;\n\ snippet pgbi:av\n\ page-break-inside: avoid;\n\ snippet pos\n\ position: ${1};\n\ snippet pos:a\n\ position: absolute;\n\ snippet pos:f\n\ position: fixed;\n\ snippet pos:r\n\ position: relative;\n\ snippet pos:s\n\ position: static;\n\ snippet q\n\ quotes: ${1};\n\ snippet q:en\n\ quotes: '\\201C' '\\201D' '\\2018' '\\2019';\n\ snippet q:n\n\ quotes: none;\n\ snippet q:ru\n\ quotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\n\ snippet rz\n\ resize: ${1};\n\ snippet rz:b\n\ resize: both;\n\ snippet rz:h\n\ resize: horizontal;\n\ snippet rz:n\n\ resize: none;\n\ snippet rz:v\n\ resize: vertical;\n\ snippet r\n\ right: ${1};\n\ snippet r:a\n\ right: auto;\n\ snippet tbl\n\ table-layout: ${1};\n\ snippet tbl:a\n\ table-layout: auto;\n\ snippet tbl:f\n\ table-layout: fixed;\n\ snippet tal\n\ text-align-last: ${1};\n\ snippet tal:a\n\ text-align-last: auto;\n\ snippet tal:c\n\ text-align-last: center;\n\ snippet tal:l\n\ text-align-last: left;\n\ snippet tal:r\n\ text-align-last: right;\n\ snippet ta\n\ text-align: ${1};\n\ snippet ta:c\n\ text-align: center;\n\ snippet ta:l\n\ text-align: left;\n\ snippet ta:r\n\ text-align: right;\n\ snippet td\n\ text-decoration: ${1};\n\ snippet td:l\n\ text-decoration: line-through;\n\ snippet td:n\n\ text-decoration: none;\n\ snippet td:o\n\ text-decoration: overline;\n\ snippet td:u\n\ text-decoration: underline;\n\ snippet te\n\ text-emphasis: ${1};\n\ snippet te:ac\n\ text-emphasis: accent;\n\ snippet te:a\n\ text-emphasis: after;\n\ snippet te:b\n\ text-emphasis: before;\n\ snippet te:c\n\ text-emphasis: circle;\n\ snippet te:ds\n\ text-emphasis: disc;\n\ snippet te:dt\n\ text-emphasis: dot;\n\ snippet te:n\n\ text-emphasis: none;\n\ snippet th\n\ text-height: ${1};\n\ snippet th:a\n\ text-height: auto;\n\ snippet th:f\n\ text-height: font-size;\n\ snippet th:m\n\ text-height: max-size;\n\ snippet th:t\n\ text-height: text-size;\n\ snippet ti\n\ text-indent: ${1};\n\ snippet ti:-\n\ text-indent: -9999px;\n\ snippet tj\n\ text-justify: ${1};\n\ snippet tj:a\n\ text-justify: auto;\n\ snippet tj:d\n\ text-justify: distribute;\n\ snippet tj:ic\n\ text-justify: inter-cluster;\n\ snippet tj:ii\n\ text-justify: inter-ideograph;\n\ snippet tj:iw\n\ text-justify: inter-word;\n\ snippet tj:k\n\ text-justify: kashida;\n\ snippet tj:t\n\ text-justify: tibetan;\n\ snippet to+\n\ text-outline: ${1:0} ${2:0} #${3:000};\n\ snippet to\n\ text-outline: ${1};\n\ snippet to:n\n\ text-outline: none;\n\ snippet tr\n\ text-replace: ${1};\n\ snippet tr:n\n\ text-replace: none;\n\ snippet tsh+\n\ text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ snippet tsh\n\ text-shadow: ${1};\n\ snippet tsh:n\n\ text-shadow: none;\n\ snippet tt\n\ text-transform: ${1};\n\ snippet tt:c\n\ text-transform: capitalize;\n\ snippet tt:l\n\ text-transform: lowercase;\n\ snippet tt:n\n\ text-transform: none;\n\ snippet tt:u\n\ text-transform: uppercase;\n\ snippet tw\n\ text-wrap: ${1};\n\ snippet tw:no\n\ text-wrap: none;\n\ snippet tw:n\n\ text-wrap: normal;\n\ snippet tw:s\n\ text-wrap: suppress;\n\ snippet tw:u\n\ text-wrap: unrestricted;\n\ snippet t\n\ top: ${1};\n\ snippet t:a\n\ top: auto;\n\ snippet va\n\ vertical-align: ${1};\n\ snippet va:bl\n\ vertical-align: baseline;\n\ snippet va:b\n\ vertical-align: bottom;\n\ snippet va:m\n\ vertical-align: middle;\n\ snippet va:sub\n\ vertical-align: sub;\n\ snippet va:sup\n\ vertical-align: super;\n\ snippet va:tb\n\ vertical-align: text-bottom;\n\ snippet va:tt\n\ vertical-align: text-top;\n\ snippet va:t\n\ vertical-align: top;\n\ snippet v\n\ visibility: ${1};\n\ snippet v:c\n\ visibility: collapse;\n\ snippet v:h\n\ visibility: hidden;\n\ snippet v:v\n\ visibility: visible;\n\ snippet whsc\n\ white-space-collapse: ${1};\n\ snippet whsc:ba\n\ white-space-collapse: break-all;\n\ snippet whsc:bs\n\ white-space-collapse: break-strict;\n\ snippet whsc:k\n\ white-space-collapse: keep-all;\n\ snippet whsc:l\n\ white-space-collapse: loose;\n\ snippet whsc:n\n\ white-space-collapse: normal;\n\ snippet whs\n\ white-space: ${1};\n\ snippet whs:n\n\ white-space: normal;\n\ snippet whs:nw\n\ white-space: nowrap;\n\ snippet whs:pl\n\ white-space: pre-line;\n\ snippet whs:pw\n\ white-space: pre-wrap;\n\ snippet whs:p\n\ white-space: pre;\n\ snippet wid\n\ widows: ${1};\n\ snippet w\n\ width: ${1};\n\ snippet w:a\n\ width: auto;\n\ snippet wob\n\ word-break: ${1};\n\ snippet wob:ba\n\ word-break: break-all;\n\ snippet wob:bs\n\ word-break: break-strict;\n\ snippet wob:k\n\ word-break: keep-all;\n\ snippet wob:l\n\ word-break: loose;\n\ snippet wob:n\n\ word-break: normal;\n\ snippet wos\n\ word-spacing: ${1};\n\ snippet wow\n\ word-wrap: ${1};\n\ snippet wow:no\n\ word-wrap: none;\n\ snippet wow:n\n\ word-wrap: normal;\n\ snippet wow:s\n\ word-wrap: suppress;\n\ snippet wow:u\n\ word-wrap: unrestricted;\n\ snippet z\n\ z-index: ${1};\n\ snippet z:a\n\ z-index: auto;\n\ snippet zoo\n\ zoom: 1;\n\ "; exports.scope = "css"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/textile.js0000644000076400007640000000120412554155240024550 0ustar pravipravidefine("ace/snippets/textile",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Jekyll post header\n\ snippet header\n\ ---\n\ title: ${1:title}\n\ layout: post\n\ date: ${2:date} ${3:hour:minute:second} -05:00\n\ ---\n\ \n\ # Image\n\ snippet img\n\ !${1:url}(${2:title}):${3:link}!\n\ \n\ # Table\n\ snippet |\n\ |${1}|${2}\n\ \n\ # Link\n\ snippet link\n\ \"${1:link text}\":${2:url}\n\ \n\ # Acronym\n\ snippet (\n\ (${1:Expand acronym})${2}\n\ \n\ # Footnote\n\ snippet fn\n\ [${1:ref number}] ${3}\n\ \n\ fn$1. ${2:footnote}\n\ \n\ "; exports.scope = "textile"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/assembly_x86.js0000644000076400007640000000027412554155240025424 0ustar pravipravidefine("ace/snippets/assembly_x86",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "assembly_x86"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/tcl.js0000644000076400007640000000357412554155240023670 0ustar pravipravidefine("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# #!/usr/bin/env tclsh\n\ snippet #!\n\ #!/usr/bin/env tclsh\n\ \n\ # Process\n\ snippet pro\n\ proc ${1:function_name} {${2:args}} {\n\ ${3:#body ...}\n\ }\n\ #xif\n\ snippet xif\n\ ${1:expr}? ${2:true} : ${3:false}\n\ # Conditional\n\ snippet if\n\ if {${1}} {\n\ ${2:# body...}\n\ }\n\ # Conditional if..else\n\ snippet ife\n\ if {${1}} {\n\ ${2:# body...}\n\ } else {\n\ ${3:# else...}\n\ }\n\ # Conditional if..elsif..else\n\ snippet ifee\n\ if {${1}} {\n\ ${2:# body...}\n\ } elseif {${3}} {\n\ ${4:# elsif...}\n\ } else {\n\ ${5:# else...}\n\ }\n\ # If catch then\n\ snippet ifc\n\ if { [catch {${1:#do something...}} ${2:err}] } {\n\ ${3:# handle failure...}\n\ }\n\ # Catch\n\ snippet catch\n\ catch {${1}} ${2:err} ${3:options}\n\ # While Loop\n\ snippet wh\n\ while {${1}} {\n\ ${2:# body...}\n\ }\n\ # For Loop\n\ snippet for\n\ for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n\ ${4:# body...}\n\ }\n\ # Foreach Loop\n\ snippet fore\n\ foreach ${1:x} {${2:#list}} {\n\ ${3:# body...}\n\ }\n\ # after ms script...\n\ snippet af\n\ after ${1:ms} ${2:#do something}\n\ # after cancel id\n\ snippet afc\n\ after cancel ${1:id or script}\n\ # after idle\n\ snippet afi\n\ after idle ${1:script}\n\ # after info id\n\ snippet afin\n\ after info ${1:id}\n\ # Expr\n\ snippet exp\n\ expr {${1:#expression here}}\n\ # Switch\n\ snippet sw\n\ switch ${1:var} {\n\ ${3:pattern 1} {\n\ ${4:#do something}\n\ }\n\ default {\n\ ${2:#do something}\n\ }\n\ }\n\ # Case\n\ snippet ca\n\ ${1:pattern} {\n\ ${2:#do something}\n\ }${3}\n\ # Namespace eval\n\ snippet ns\n\ namespace eval ${1:path} {${2:#script...}}\n\ # Namespace current\n\ snippet nsc\n\ namespace current\n\ "; exports.scope = "tcl"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/text.js0000644000076400007640000000025412554155240024062 0ustar pravipravidefine("ace/snippets/text",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "text"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/jsoniq.js0000644000076400007640000000354012554155240024402 0ustar pravipravidefine("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet for\n\ for $${1:item} in ${2:expr}\n\ snippet return\n\ return ${1:expr}\n\ snippet import\n\ import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\ snippet some\n\ some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ snippet every\n\ every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ snippet if\n\ if(${1:true}) then ${2:expr} else ${3:true}\n\ snippet switch\n\ switch(${1:\"foo\"})\n\ case ${2:\"foo\"}\n\ return ${3:true}\n\ default return ${4:false}\n\ snippet try\n\ try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\ snippet tumbling\n\ for tumbling window $${1:varname} in ${2:expr}\n\ start at $${3:start} when ${4:expr}\n\ end at $${5:end} when ${6:expr}\n\ return ${7:expr}\n\ snippet sliding\n\ for sliding window $${1:varname} in ${2:expr}\n\ start at $${3:start} when ${4:expr}\n\ end at $${5:end} when ${6:expr}\n\ return ${7:expr}\n\ snippet let\n\ let $${1:varname} := ${2:expr}\n\ snippet group\n\ group by $${1:varname} := ${2:expr}\n\ snippet order\n\ order by ${1:expr} ${2:descending}\n\ snippet stable\n\ stable order by ${1:expr}\n\ snippet count\n\ count $${1:varname}\n\ snippet ordered\n\ ordered { ${1:expr} }\n\ snippet unordered\n\ unordered { ${1:expr} }\n\ snippet treat \n\ treat as ${1:expr}\n\ snippet castable\n\ castable as ${1:atomicType}\n\ snippet cast\n\ cast as ${1:atomicType}\n\ snippet typeswitch\n\ typeswitch(${1:expr})\n\ case ${2:type} return ${3:expr}\n\ default return ${4:expr}\n\ snippet var\n\ declare variable $${1:varname} := ${2:expr};\n\ snippet fn\n\ declare function ${1:ns}:${2:name}(){\n\ ${3:expr}\n\ };\n\ snippet module\n\ module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\ "; exports.scope = "jsoniq"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/powershell.js0000644000076400007640000000027012554155240025260 0ustar pravipravidefine("ace/snippets/powershell",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "powershell"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/typescript.js0000644000076400007640000000027012554155240025302 0ustar pravipravidefine("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "typescript"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/apache_conf.js0000644000076400007640000000027212554155240025324 0ustar pravipravidefine("ace/snippets/apache_conf",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "apache_conf"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/jade.js0000644000076400007640000000025412554155240024001 0ustar pravipravidefine("ace/snippets/jade",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "jade"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/java.js0000644000076400007640000001132312554155240024016 0ustar pravipravidefine("ace/snippets/java",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "## Access Modifiers\n\ snippet po\n\ protected\n\ snippet pu\n\ public\n\ snippet pr\n\ private\n\ ##\n\ ## Annotations\n\ snippet before\n\ @Before\n\ static void ${1:intercept}(${2:args}) { ${3} }\n\ snippet mm\n\ @ManyToMany\n\ ${1}\n\ snippet mo\n\ @ManyToOne\n\ ${1}\n\ snippet om\n\ @OneToMany${1:(cascade=CascadeType.ALL)}\n\ ${2}\n\ snippet oo\n\ @OneToOne\n\ ${1}\n\ ##\n\ ## Basic Java packages and import\n\ snippet im\n\ import\n\ snippet j.b\n\ java.beans.\n\ snippet j.i\n\ java.io.\n\ snippet j.m\n\ java.math.\n\ snippet j.n\n\ java.net.\n\ snippet j.u\n\ java.util.\n\ ##\n\ ## Class\n\ snippet cl\n\ class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ snippet in\n\ interface ${1:`Filename(\"\", \"untitled\")`} ${2:extends Parent}${3}\n\ snippet tc\n\ public class ${1:`Filename()`} extends ${2:TestCase}\n\ ##\n\ ## Class Enhancements\n\ snippet ext\n\ extends \n\ snippet imp\n\ implements\n\ ##\n\ ## Comments\n\ snippet /*\n\ ##\n\ ## Constants\n\ snippet co\n\ static public final ${1:String} ${2:var} = ${3};${4}\n\ snippet cos\n\ static public final String ${1:var} = \"${2}\";${3}\n\ ##\n\ ## Control Statements\n\ snippet case\n\ case ${1}:\n\ ${2}\n\ snippet def\n\ default:\n\ ${2}\n\ snippet el\n\ else\n\ snippet elif\n\ else if (${1}) ${2}\n\ snippet if\n\ if (${1}) ${2}\n\ snippet sw\n\ switch (${1}) {\n\ ${2}\n\ }\n\ ##\n\ ## Create a Method\n\ snippet m\n\ ${1:void} ${2:method}(${3}) ${4:throws }${5}\n\ ##\n\ ## Create a Variable\n\ snippet v\n\ ${1:String} ${2:var}${3: = null}${4};${5}\n\ ##\n\ ## Enhancements to Methods, variables, classes, etc.\n\ snippet ab\n\ abstract\n\ snippet fi\n\ final\n\ snippet st\n\ static\n\ snippet sy\n\ synchronized\n\ ##\n\ ## Error Methods\n\ snippet err\n\ System.err.print(\"${1:Message}\");\n\ snippet errf\n\ System.err.printf(\"${1:Message}\", ${2:exception});\n\ snippet errln\n\ System.err.println(\"${1:Message}\");\n\ ##\n\ ## Exception Handling\n\ snippet as\n\ assert ${1:test} : \"${2:Failure message}\";${3}\n\ snippet ca\n\ catch(${1:Exception} ${2:e}) ${3}\n\ snippet thr\n\ throw\n\ snippet ths\n\ throws\n\ snippet try\n\ try {\n\ ${3}\n\ } catch(${1:Exception} ${2:e}) {\n\ }\n\ snippet tryf\n\ try {\n\ ${3}\n\ } catch(${1:Exception} ${2:e}) {\n\ } finally {\n\ }\n\ ##\n\ ## Find Methods\n\ snippet findall\n\ List<${1:listName}> ${2:items} = ${1}.findAll();${3}\n\ snippet findbyid\n\ ${1:var} ${2:item} = ${1}.findById(${3});${4}\n\ ##\n\ ## Javadocs\n\ snippet /**\n\ snippet @au\n\ @author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\ snippet @br\n\ @brief ${1:Description}\n\ snippet @fi\n\ @file ${1:`Filename()`}.java\n\ snippet @pa\n\ @param ${1:param}\n\ snippet @re\n\ @return ${1:param}\n\ ##\n\ ## Logger Methods\n\ snippet debug\n\ Logger.debug(${1:param});${2}\n\ snippet error\n\ Logger.error(${1:param});${2}\n\ snippet info\n\ Logger.info(${1:param});${2}\n\ snippet warn\n\ Logger.warn(${1:param});${2}\n\ ##\n\ ## Loops\n\ snippet enfor\n\ for (${1} : ${2}) ${3}\n\ snippet for\n\ for (${1}; ${2}; ${3}) ${4}\n\ snippet wh\n\ while (${1}) ${2}\n\ ##\n\ ## Main method\n\ snippet main\n\ public static void main (String[] args) {\n\ ${1:/* code */}\n\ }\n\ ##\n\ ## Print Methods\n\ snippet print\n\ System.out.print(\"${1:Message}\");\n\ snippet printf\n\ System.out.printf(\"${1:Message}\", ${2:args});\n\ snippet println\n\ System.out.println(${1});\n\ ##\n\ ## Render Methods\n\ snippet ren\n\ render(${1:param});${2}\n\ snippet rena\n\ renderArgs.put(\"${1}\", ${2});${3}\n\ snippet renb\n\ renderBinary(${1:param});${2}\n\ snippet renj\n\ renderJSON(${1:param});${2}\n\ snippet renx\n\ renderXml(${1:param});${2}\n\ ##\n\ ## Setter and Getter Methods\n\ snippet set\n\ ${1:public} void set${3:}(${2:String} ${4:}){\n\ this.$4 = $4;\n\ }\n\ snippet get\n\ ${1:public} ${2:String} get${3:}(){\n\ return this.${4:};\n\ }\n\ ##\n\ ## Terminate Methods or Loops\n\ snippet re\n\ return\n\ snippet br\n\ break;\n\ ##\n\ ## Test Methods\n\ snippet t\n\ public void test${1:Name}() throws Exception {\n\ ${2}\n\ }\n\ snippet test\n\ @Test\n\ public void test${1:Name}() throws Exception {\n\ ${2}\n\ }\n\ ##\n\ ## Utils\n\ snippet Sc\n\ Scanner\n\ ##\n\ ## Miscellaneous\n\ snippet action\n\ public static void ${1:index}(${2:args}) { ${3} }\n\ snippet rnf\n\ notFound(${1:param});${2}\n\ snippet rnfin\n\ notFoundIfNull(${1:param});${2}\n\ snippet rr\n\ redirect(${1:param});${2}\n\ snippet ru\n\ unauthorized(${1:param});${2}\n\ snippet unless\n\ (unless=${1:param});${2}\n\ "; exports.scope = "java"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/livescript.js0000644000076400007640000000027012554155240025260 0ustar pravipravidefine("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "livescript"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/sass.js0000644000076400007640000000025412554155240024047 0ustar pravipravidefine("ace/snippets/sass",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "sass"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/applescript.js0000644000076400007640000000027212554155240025424 0ustar pravipravidefine("ace/snippets/applescript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "applescript"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/objectivec.js0000644000076400007640000000027012554155240025211 0ustar pravipravidefine("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "objectivec"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/tex.js0000644000076400007640000000773212554155240023706 0ustar pravipravidefine("ace/snippets/tex",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "#PREAMBLE\n\ #newcommand\n\ snippet nc\n\ \\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}}${4}\n\ #usepackage\n\ snippet up\n\ \\usepackage[${1:[options}]{${2:package}}\n\ #newunicodechar\n\ snippet nuc\n\ \\newunicodechar{${1}}{${2:\\ensuremath}${3:tex-substitute}}}\n\ #DeclareMathOperator\n\ snippet dmo\n\ \\DeclareMathOperator{${1}}{${2}}\n\ \n\ #DOCUMENT\n\ # \\begin{}...\\end{}\n\ snippet begin\n\ \\begin{${1:env}}\n\ ${2}\n\ \\end{$1}\n\ # Tabular\n\ snippet tab\n\ \\begin{${1:tabular}}{${2:c}}\n\ ${3}\n\ \\end{$1}\n\ snippet thm\n\ \\begin[${1:author}]{${2:thm}}\n\ ${3}\n\ \\end{$1}\n\ snippet center\n\ \\begin{center}\n\ ${1}\n\ \\end{center}\n\ # Align(ed)\n\ snippet ali\n\ \\begin{align${1:ed}}\n\ ${2}\n\ \\end{align$1}\n\ # Gather(ed)\n\ snippet gat\n\ \\begin{gather${1:ed}}\n\ ${2}\n\ \\end{gather$1}\n\ # Equation\n\ snippet eq\n\ \\begin{equation}\n\ ${1}\n\ \\end{equation}\n\ # Equation\n\ snippet eq*\n\ \\begin{equation*}\n\ ${1}\n\ \\end{equation*}\n\ # Unnumbered Equation\n\ snippet \\\n\ \\[\n\ ${1}\n\ \\]\n\ # Enumerate\n\ snippet enum\n\ \\begin{enumerate}\n\ \\item ${1}\n\ \\end{enumerate}\n\ # Itemize\n\ snippet itemize\n\ \\begin{itemize}\n\ \\item ${1}\n\ \\end{itemize}\n\ # Description\n\ snippet desc\n\ \\begin{description}\n\ \\item[${1}] ${2}\n\ \\end{description}\n\ # Matrix\n\ snippet mat\n\ \\begin{${1:p/b/v/V/B/small}matrix}\n\ ${2}\n\ \\end{$1matrix}\n\ # Cases\n\ snippet cas\n\ \\begin{cases}\n\ ${1:equation}, &\\text{ if }${2:case}\\\\\n\ ${3}\n\ \\end{cases}\n\ # Split\n\ snippet spl\n\ \\begin{split}\n\ ${1}\n\ \\end{split}\n\ # Part\n\ snippet part\n\ \\part{${1:part name}} % (fold)\n\ \\label{prt:${2:$1}}\n\ ${3}\n\ % part $2 (end)\n\ # Chapter\n\ snippet cha\n\ \\chapter{${1:chapter name}}\n\ \\label{cha:${2:$1}}\n\ ${3}\n\ # Section\n\ snippet sec\n\ \\section{${1:section name}}\n\ \\label{sec:${2:$1}}\n\ ${3}\n\ # Sub Section\n\ snippet sub\n\ \\subsection{${1:subsection name}}\n\ \\label{sub:${2:$1}}\n\ ${3}\n\ # Sub Sub Section\n\ snippet subs\n\ \\subsubsection{${1:subsubsection name}}\n\ \\label{ssub:${2:$1}}\n\ ${3}\n\ # Paragraph\n\ snippet par\n\ \\paragraph{${1:paragraph name}}\n\ \\label{par:${2:$1}}\n\ ${3}\n\ # Sub Paragraph\n\ snippet subp\n\ \\subparagraph{${1:subparagraph name}}\n\ \\label{subp:${2:$1}}\n\ ${3}\n\ #References\n\ snippet itd\n\ \\item[${1:description}] ${2:item}\n\ snippet figure\n\ ${1:Figure}~\\ref{${2:fig:}}${3}\n\ snippet table\n\ ${1:Table}~\\ref{${2:tab:}}${3}\n\ snippet listing\n\ ${1:Listing}~\\ref{${2:list}}${3}\n\ snippet section\n\ ${1:Section}~\\ref{${2:sec:}}${3}\n\ snippet page\n\ ${1:page}~\\pageref{${2}}${3}\n\ snippet index\n\ \\index{${1:index}}${2}\n\ #Citations\n\ snippet cite\n\ \\cite[${1}]{${2}}${3}\n\ snippet fcite\n\ \\footcite[${1}]{${2}}${3}\n\ #Formating text: italic, bold, underline, small capital, emphase ..\n\ snippet it\n\ \\textit{${1:text}}\n\ snippet bf\n\ \\textbf{${1:text}}\n\ snippet under\n\ \\underline{${1:text}}\n\ snippet emp\n\ \\emph{${1:text}}\n\ snippet sc\n\ \\textsc{${1:text}}\n\ #Choosing font\n\ snippet sf\n\ \\textsf{${1:text}}\n\ snippet rm\n\ \\textrm{${1:text}}\n\ snippet tt\n\ \\texttt{${1:text}}\n\ #misc\n\ snippet ft\n\ \\footnote{${1:text}}\n\ snippet fig\n\ \\begin{figure}\n\ \\begin{center}\n\ \\includegraphics[scale=${1}]{Figures/${2}}\n\ \\end{center}\n\ \\caption{${3}}\n\ \\label{fig:${4}}\n\ \\end{figure}\n\ snippet tikz\n\ \\begin{figure}\n\ \\begin{center}\n\ \\begin{tikzpicture}[scale=${1:1}]\n\ ${2}\n\ \\end{tikzpicture}\n\ \\end{center}\n\ \\caption{${3}}\n\ \\label{fig:${4}}\n\ \\end{figure}\n\ #math\n\ snippet stackrel\n\ \\stackrel{${1:above}}{${2:below}} ${3}\n\ snippet frac\n\ \\frac{${1:num}}{${2:denom}}\n\ snippet sum\n\ \\sum^{${1:n}}_{${2:i=1}}{${3}}"; exports.scope = "tex"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/gitignore.js0000644000076400007640000000026612554155240025070 0ustar pravipravidefine("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "gitignore"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/cirru.js0000644000076400007640000000025612554155240024224 0ustar pravipravidefine("ace/snippets/cirru",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "cirru"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/coldfusion.js0000644000076400007640000000027012554155240025241 0ustar pravipravidefine("ace/snippets/coldfusion",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "coldfusion"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/pascal.js0000644000076400007640000000026012554155240024336 0ustar pravipravidefine("ace/snippets/pascal",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "pascal"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/xquery.js0000644000076400007640000000354012554155240024434 0ustar pravipravidefine("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet for\n\ for $${1:item} in ${2:expr}\n\ snippet return\n\ return ${1:expr}\n\ snippet import\n\ import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\ snippet some\n\ some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ snippet every\n\ every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ snippet if\n\ if(${1:true}) then ${2:expr} else ${3:true}\n\ snippet switch\n\ switch(${1:\"foo\"})\n\ case ${2:\"foo\"}\n\ return ${3:true}\n\ default return ${4:false}\n\ snippet try\n\ try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\ snippet tumbling\n\ for tumbling window $${1:varname} in ${2:expr}\n\ start at $${3:start} when ${4:expr}\n\ end at $${5:end} when ${6:expr}\n\ return ${7:expr}\n\ snippet sliding\n\ for sliding window $${1:varname} in ${2:expr}\n\ start at $${3:start} when ${4:expr}\n\ end at $${5:end} when ${6:expr}\n\ return ${7:expr}\n\ snippet let\n\ let $${1:varname} := ${2:expr}\n\ snippet group\n\ group by $${1:varname} := ${2:expr}\n\ snippet order\n\ order by ${1:expr} ${2:descending}\n\ snippet stable\n\ stable order by ${1:expr}\n\ snippet count\n\ count $${1:varname}\n\ snippet ordered\n\ ordered { ${1:expr} }\n\ snippet unordered\n\ unordered { ${1:expr} }\n\ snippet treat \n\ treat as ${1:expr}\n\ snippet castable\n\ castable as ${1:atomicType}\n\ snippet cast\n\ cast as ${1:atomicType}\n\ snippet typeswitch\n\ typeswitch(${1:expr})\n\ case ${2:type} return ${3:expr}\n\ default return ${4:expr}\n\ snippet var\n\ declare variable $${1:varname} := ${2:expr};\n\ snippet fn\n\ declare function ${1:ns}:${2:name}(){\n\ ${3:expr}\n\ };\n\ snippet module\n\ module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\ "; exports.scope = "xquery"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/smarty.js0000644000076400007640000000026012554155240024412 0ustar pravipravidefine("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "smarty"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/forth.js0000644000076400007640000000025612554155240024222 0ustar pravipravidefine("ace/snippets/forth",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "forth"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/plain_text.js0000644000076400007640000000027012554155240025243 0ustar pravipravidefine("ace/snippets/plain_text",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "plain_text"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/less.js0000644000076400007640000000025412554155240024044 0ustar pravipravidefine("ace/snippets/less",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "less"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/julia.js0000644000076400007640000000025612554155240024204 0ustar pravipravidefine("ace/snippets/julia",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "julia"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/ftl.js0000644000076400007640000000025212554155240023661 0ustar pravipravidefine("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "ftl"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/protobuf.js0000644000076400007640000000025612554155240024740 0ustar pravipravidefine("ace/snippets/protobuf",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = ""; exports.scope = "protobuf"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/lisp.js0000644000076400007640000000025412554155240024045 0ustar pravipravidefine("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "lisp"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/verilog.js0000644000076400007640000000026212554155240024544 0ustar pravipravidefine("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "verilog"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/cobol.js0000644000076400007640000000025612554155240024176 0ustar pravipravidefine("ace/snippets/cobol",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "cobol"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/sjs.js0000644000076400007640000000025212554155240023673 0ustar pravipravidefine("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "sjs"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/lsl.js0000644000076400007640000010755512554155240023704 0ustar pravipravidefine("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet @\n\ @${1:label};\n\ snippet CAMERA_ACTIVE\n\ CAMERA_ACTIVE, ${1:integer isActive}, $0\n\ snippet CAMERA_BEHINDNESS_ANGLE\n\ CAMERA_BEHINDNESS_ANGLE, ${1:float degrees}, $0\n\ snippet CAMERA_BEHINDNESS_LAG\n\ CAMERA_BEHINDNESS_LAG, ${1:float seconds}, $0\n\ snippet CAMERA_DISTANCE\n\ CAMERA_DISTANCE, ${1:float meters}, $0\n\ snippet CAMERA_FOCUS\n\ CAMERA_FOCUS, ${1:vector position}, $0\n\ snippet CAMERA_FOCUS_LAG\n\ CAMERA_FOCUS_LAG, ${1:float seconds}, $0\n\ snippet CAMERA_FOCUS_LOCKED\n\ CAMERA_FOCUS_LOCKED, ${1:integer isLocked}, $0\n\ snippet CAMERA_FOCUS_OFFSET\n\ CAMERA_FOCUS_OFFSET, ${1:vector meters}, $0\n\ snippet CAMERA_FOCUS_THRESHOLD\n\ CAMERA_FOCUS_THRESHOLD, ${1:float meters}, $0\n\ snippet CAMERA_PITCH\n\ CAMERA_PITCH, ${1:float degrees}, $0\n\ snippet CAMERA_POSITION\n\ CAMERA_POSITION, ${1:vector position}, $0\n\ snippet CAMERA_POSITION_LAG\n\ CAMERA_POSITION_LAG, ${1:float seconds}, $0\n\ snippet CAMERA_POSITION_LOCKED\n\ CAMERA_POSITION_LOCKED, ${1:integer isLocked}, $0\n\ snippet CAMERA_POSITION_THRESHOLD\n\ CAMERA_POSITION_THRESHOLD, ${1:float meters}, $0\n\ snippet CHARACTER_AVOIDANCE_MODE\n\ CHARACTER_AVOIDANCE_MODE, ${1:integer flags}, $0\n\ snippet CHARACTER_DESIRED_SPEED\n\ CHARACTER_DESIRED_SPEED, ${1:float speed}, $0\n\ snippet CHARACTER_DESIRED_TURN_SPEED\n\ CHARACTER_DESIRED_TURN_SPEED, ${1:float speed}, $0\n\ snippet CHARACTER_LENGTH\n\ CHARACTER_LENGTH, ${1:float length}, $0\n\ snippet CHARACTER_MAX_TURN_RADIUS\n\ CHARACTER_MAX_TURN_RADIUS, ${1:float radius}, $0\n\ snippet CHARACTER_ORIENTATION\n\ CHARACTER_ORIENTATION, ${1:integer orientation}, $0\n\ snippet CHARACTER_RADIUS\n\ CHARACTER_RADIUS, ${1:float radius}, $0\n\ snippet CHARACTER_STAY_WITHIN_PARCEL\n\ CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay}, $0\n\ snippet CHARACTER_TYPE\n\ CHARACTER_TYPE, ${1:integer type}, $0\n\ snippet HTTP_BODY_MAXLENGTH\n\ HTTP_BODY_MAXLENGTH, ${1:integer length}, $0\n\ snippet HTTP_CUSTOM_HEADER\n\ HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value}, $0\n\ snippet HTTP_METHOD\n\ HTTP_METHOD, ${1:string method}, $0\n\ snippet HTTP_MIMETYPE\n\ HTTP_MIMETYPE, ${1:string mimeType}, $0\n\ snippet HTTP_PRAGMA_NO_CACHE\n\ HTTP_PRAGMA_NO_CACHE, ${1:integer send_header}, $0\n\ snippet HTTP_VERBOSE_THROTTLE\n\ HTTP_VERBOSE_THROTTLE, ${1:integer noisy}, $0\n\ snippet HTTP_VERIFY_CERT\n\ HTTP_VERIFY_CERT, ${1:integer verify}, $0\n\ snippet RC_DATA_FLAGS\n\ RC_DATA_FLAGS, ${1:integer flags}, $0\n\ snippet RC_DETECT_PHANTOM\n\ RC_DETECT_PHANTOM, ${1:integer dectedPhantom}, $0\n\ snippet RC_MAX_HITS\n\ RC_MAX_HITS, ${1:integer maxHits}, $0\n\ snippet RC_REJECT_TYPES\n\ RC_REJECT_TYPES, ${1:integer filterMask}, $0\n\ snippet at_rot_target\n\ at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})\n\ {\n\ $0\n\ }\n\ snippet at_target\n\ at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})\n\ {\n\ $0\n\ }\n\ snippet attach\n\ attach(${1:key id})\n\ {\n\ $0\n\ }\n\ snippet changed\n\ changed(${1:integer change})\n\ {\n\ $0\n\ }\n\ snippet collision\n\ collision(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet collision_end\n\ collision_end(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet collision_start\n\ collision_start(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet control\n\ control(${1:key id}, ${2:integer level}, ${3:integer edge})\n\ {\n\ $0\n\ }\n\ snippet dataserver\n\ dataserver(${1:key query_id}, ${2:string data})\n\ {\n\ $0\n\ }\n\ snippet do\n\ do\n\ {\n\ $0\n\ }\n\ while (${1:condition});\n\ snippet else\n\ else\n\ {\n\ $0\n\ }\n\ snippet email\n\ email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})\n\ {\n\ $0\n\ }\n\ snippet experience_permissions\n\ experience_permissions(${1:key agent_id})\n\ {\n\ $0\n\ }\n\ snippet experience_permissions_denied\n\ experience_permissions_denied(${1:key agent_id}, ${2:integer reason})\n\ {\n\ $0\n\ }\n\ snippet for\n\ for (${1:start}; ${3:condition}; ${3:step})\n\ {\n\ $0\n\ }\n\ snippet http_request\n\ http_request(${1:key request_id}, ${2:string method}, ${3:string body})\n\ {\n\ $0\n\ }\n\ snippet http_response\n\ http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})\n\ {\n\ $0\n\ }\n\ snippet if\n\ if (${1:condition})\n\ {\n\ $0\n\ }\n\ snippet jump\n\ jump ${1:label};\n\ snippet land_collision\n\ land_collision(${1:vector pos})\n\ {\n\ $0\n\ }\n\ snippet land_collision_end\n\ land_collision_end(${1:vector pos})\n\ {\n\ $0\n\ }\n\ snippet land_collision_start\n\ land_collision_start(${1:vector pos})\n\ {\n\ $0\n\ }\n\ snippet link_message\n\ link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})\n\ {\n\ $0\n\ }\n\ snippet listen\n\ listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})\n\ {\n\ $0\n\ }\n\ snippet llAbs\n\ llAbs(${1:integer val})\n\ snippet llAcos\n\ llAcos(${1:float val})\n\ snippet llAddToLandBanList\n\ llAddToLandBanList(${1:key agent}, ${2:float hours});\n\ snippet llAddToLandPassList\n\ llAddToLandPassList(${1:key agent}, ${2:float hours});\n\ snippet llAdjustSoundVolume\n\ llAdjustSoundVolume(${1:float volume});\n\ snippet llAgentInExperience\n\ llAgentInExperience(${1:key agent})\n\ snippet llAllowInventoryDrop\n\ llAllowInventoryDrop(${1:integer add});\n\ snippet llAngleBetween\n\ llAngleBetween(${1:rotation a}, ${2:rotation b})\n\ snippet llApplyImpulse\n\ llApplyImpulse(${1:vector force}, ${2:integer local});\n\ snippet llApplyRotationalImpulse\n\ llApplyRotationalImpulse(${1:vector force}, ${2:integer local});\n\ snippet llAsin\n\ llAsin(${1:float val})\n\ snippet llAtan2\n\ llAtan2(${1:float y}, ${2:float x})\n\ snippet llAttachToAvatar\n\ llAttachToAvatar(${1:integer attach_point});\n\ snippet llAttachToAvatarTemp\n\ llAttachToAvatarTemp(${1:integer attach_point});\n\ snippet llAvatarOnLinkSitTarget\n\ llAvatarOnLinkSitTarget(${1:integer link})\n\ snippet llAvatarOnSitTarget\n\ llAvatarOnSitTarget()\n\ snippet llAxes2Rot\n\ llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})\n\ snippet llAxisAngle2Rot\n\ llAxisAngle2Rot(${1:vector axis}, ${2:float angle})\n\ snippet llBase64ToInteger\n\ llBase64ToInteger(${1:string str})\n\ snippet llBase64ToString\n\ llBase64ToString(${1:string str})\n\ snippet llBreakAllLinks\n\ llBreakAllLinks();\n\ snippet llBreakLink\n\ llBreakLink(${1:integer link});\n\ snippet llCastRay\n\ llCastRay(${1:vector start}, ${2:vector end}, ${3:list options});\n\ snippet llCeil\n\ llCeil(${1:float val})\n\ snippet llClearCameraParams\n\ llClearCameraParams();\n\ snippet llClearLinkMedia\n\ llClearLinkMedia(${1:integer link}, ${2:integer face});\n\ snippet llClearPrimMedia\n\ llClearPrimMedia(${1:integer face});\n\ snippet llCloseRemoteDataChannel\n\ llCloseRemoteDataChannel(${1:key channel});\n\ snippet llCollisionFilter\n\ llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept});\n\ snippet llCollisionSound\n\ llCollisionSound(${1:string impact_sound}, ${2:float impact_volume});\n\ snippet llCos\n\ llCos(${1:float theta})\n\ snippet llCreateCharacter\n\ llCreateCharacter(${1:list options});\n\ snippet llCreateKeyValue\n\ llCreateKeyValue(${1:string k})\n\ snippet llCreateLink\n\ llCreateLink(${1:key target}, ${2:integer parent});\n\ snippet llCSV2List\n\ llCSV2List(${1:string src})\n\ snippet llDataSizeKeyValue\n\ llDataSizeKeyValue()\n\ snippet llDeleteCharacter\n\ llDeleteCharacter();\n\ snippet llDeleteKeyValue\n\ llDeleteKeyValue(${1:string k})\n\ snippet llDeleteSubList\n\ llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})\n\ snippet llDeleteSubString\n\ llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\ snippet llDetachFromAvatar\n\ llDetachFromAvatar();\n\ snippet llDetectedGrab\n\ llDetectedGrab(${1:integer number})\n\ snippet llDetectedGroup\n\ llDetectedGroup(${1:integer number})\n\ snippet llDetectedKey\n\ llDetectedKey(${1:integer number})\n\ snippet llDetectedLinkNumber\n\ llDetectedLinkNumber(${1:integer number})\n\ snippet llDetectedName\n\ llDetectedName(${1:integer number})\n\ snippet llDetectedOwner\n\ llDetectedOwner(${1:integer number})\n\ snippet llDetectedPos\n\ llDetectedPosl(${1:integer number})\n\ snippet llDetectedRot\n\ llDetectedRot(${1:integer number})\n\ snippet llDetectedTouchBinormal\n\ llDetectedTouchBinormal(${1:integer number})\n\ snippet llDetectedTouchFace\n\ llDetectedTouchFace(${1:integer number})\n\ snippet llDetectedTouchNormal\n\ llDetectedTouchNormal(${1:integer number})\n\ snippet llDetectedTouchPos\n\ llDetectedTouchPos(${1:integer number})\n\ snippet llDetectedTouchST\n\ llDetectedTouchST(${1:integer number})\n\ snippet llDetectedTouchUV\n\ llDetectedTouchUV(${1:integer number})\n\ snippet llDetectedType\n\ llDetectedType(${1:integer number})\n\ snippet llDetectedVel\n\ llDetectedVel(${1:integer number})\n\ snippet llDialog\n\ llDialog(${1:key agent}, ${2:string message}, ${3:list buttons}, ${4:integer channel});\n\ snippet llDie\n\ llDie();\n\ snippet llDumpList2String\n\ llDumpList2String(${1:list src}, ${2:string separator})\n\ snippet llEdgeOfWorld\n\ llEdgeOfWorld(${1:vector pos}, ${2:vector dir})\n\ snippet llEjectFromLand\n\ llEjectFromLand(${1:key agent});\n\ snippet llEmail\n\ llEmail(${1:string address}, ${2:string subject}, ${3:string message});\n\ snippet llEscapeURL\n\ llEscapeURL(${1:string url})\n\ snippet llEuler2Rot\n\ llEuler2Rot(${1:vector v})\n\ snippet llExecCharacterCmd\n\ llExecCharacterCmd(${1:integer command}, ${2:list options});\n\ snippet llEvade\n\ llEvade(${1:key target}, ${2:list options});\n\ snippet llFabs\n\ llFabs(${1:float val})\n\ snippet llFleeFrom\n\ llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options});\n\ snippet llFloor\n\ llFloor(${1:float val})\n\ snippet llForceMouselook\n\ llForceMouselook(${1:integer mouselook});\n\ snippet llFrand\n\ llFrand(${1:float mag})\n\ snippet llGenerateKey\n\ llGenerateKey()\n\ snippet llGetAccel\n\ llGetAccel()\n\ snippet llGetAgentInfo\n\ llGetAgentInfo(${1:key id})\n\ snippet llGetAgentLanguage\n\ llGetAgentLanguage(${1:key agent})\n\ snippet llGetAgentList\n\ llGetAgentList(${1:integer scope}, ${2:list options})\n\ snippet llGetAgentSize\n\ llGetAgentSize(${1:key agent})\n\ snippet llGetAlpha\n\ llGetAlpha(${1:integer face})\n\ snippet llGetAndResetTime\n\ llGetAndResetTime()\n\ snippet llGetAnimation\n\ llGetAnimation(${1:key id})\n\ snippet llGetAnimationList\n\ llGetAnimationList(${1:key agent})\n\ snippet llGetAnimationOverride\n\ llGetAnimationOverride(${1:string anim_state})\n\ snippet llGetAttached\n\ llGetAttached()\n\ snippet llGetBoundingBox\n\ llGetBoundingBox(${1:key object})\n\ snippet llGetCameraPos\n\ llGetCameraPos()\n\ snippet llGetCameraRot\n\ llGetCameraRot()\n\ snippet llGetCenterOfMass\n\ llGetCenterOfMass()\n\ snippet llGetClosestNavPoint\n\ llGetClosestNavPoint(${1:vector point}, ${2:list options})\n\ snippet llGetColor\n\ llGetColor(${1:integer face})\n\ snippet llGetCreator\n\ llGetCreator()\n\ snippet llGetDate\n\ llGetDate()\n\ snippet llGetDisplayName\n\ llGetDisplayName(${1:key id})\n\ snippet llGetEnergy\n\ llGetEnergy()\n\ snippet llGetEnv\n\ llGetEnv(${1:string name})\n\ snippet llGetExperienceDetails\n\ llGetExperienceDetails(${1:key experience_id})\n\ snippet llGetExperienceErrorMessage\n\ llGetExperienceErrorMessage(${1:integer error})\n\ snippet llGetForce\n\ llGetForce()\n\ snippet llGetFreeMemory\n\ llGetFreeMemory()\n\ snippet llGetFreeURLs\n\ llGetFreeURLs()\n\ snippet llGetGeometricCenter\n\ llGetGeometricCenter()\n\ snippet llGetGMTclock\n\ llGetGMTclock()\n\ snippet llGetHTTPHeader\n\ llGetHTTPHeader(${1:key request_id}, ${2:string header})\n\ snippet llGetInventoryCreator\n\ llGetInventoryCreator(${1:string item})\n\ snippet llGetInventoryKey\n\ llGetInventoryKey(${1:string name})\n\ snippet llGetInventoryName\n\ llGetInventoryName(${1:integer type}, ${2:integer number})\n\ snippet llGetInventoryNumber\n\ llGetInventoryNumber(${1:integer type})\n\ snippet llGetInventoryPermMask\n\ llGetInventoryPermMask(${1:string item}, ${2:integer mask})\n\ snippet llGetInventoryType\n\ llGetInventoryType(${1:string name})\n\ snippet llGetKey\n\ llGetKey()\n\ snippet llGetLandOwnerAt\n\ llGetLandOwnerAt(${1:vector pos})\n\ snippet llGetLinkKey\n\ llGetLinkKey(${1:integer link})\n\ snippet llGetLinkMedia\n\ llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\ snippet llGetLinkName\n\ llGetLinkName(${1:integer link})\n\ snippet llGetLinkNumber\n\ llGetLinkNumber()\n\ snippet llGetLinkNumberOfSides\n\ llGetLinkNumberOfSides(${1:integer link})\n\ snippet llGetLinkPrimitiveParams\n\ llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})\n\ snippet llGetListEntryType\n\ llGetListEntryType(${1:list src}, ${2:integer index})\n\ snippet llGetListLength\n\ llGetListLength(${1:list src})\n\ snippet llGetLocalPos\n\ llGetLocalPos()\n\ snippet llGetLocalRot\n\ llGetLocalRot()\n\ snippet llGetMass\n\ llGetMass()\n\ snippet llGetMassMKS\n\ llGetMassMKS()\n\ snippet llGetMaxScaleFactor\n\ llGetMaxScaleFactor()\n\ snippet llGetMemoryLimit\n\ llGetMemoryLimit()\n\ snippet llGetMinScaleFactor\n\ llGetMinScaleFactor()\n\ snippet llGetNextEmail\n\ llGetNextEmail(${1:string address}, ${2:string subject});\n\ snippet llGetNotecardLine\n\ llGetNotecardLine(${1:string name}, ${2:integer line})\n\ snippet llGetNumberOfNotecardLines\n\ llGetNumberOfNotecardLines(${1:string name})\n\ snippet llGetNumberOfPrims\n\ llGetNumberOfPrims()\n\ snippet llGetNumberOfSides\n\ llGetNumberOfSides()\n\ snippet llGetObjectDesc\n\ llGetObjectDesc()\n\ snippet llGetObjectDetails\n\ llGetObjectDetails(${1:key id}, ${2:list params})\n\ snippet llGetObjectMass\n\ llGetObjectMass(${1:key id})\n\ snippet llGetObjectName\n\ llGetObjectName()\n\ snippet llGetObjectPermMask\n\ llGetObjectPermMask(${1:integer mask})\n\ snippet llGetObjectPrimCount\n\ llGetObjectPrimCount(${1:key prim})\n\ snippet llGetOmega\n\ llGetOmega()\n\ snippet llGetOwner\n\ llGetOwner()\n\ snippet llGetOwnerKey\n\ llGetOwnerKey(${1:key id})\n\ snippet llGetParcelDetails\n\ llGetParcelDetails(${1:vector pos}, ${2:list params})\n\ snippet llGetParcelFlags\n\ llGetParcelFlags(${1:vector pos})\n\ snippet llGetParcelMaxPrims\n\ llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})\n\ snippet llGetParcelMusicURL\n\ llGetParcelMusicURL()\n\ snippet llGetParcelPrimCount\n\ llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})\n\ snippet llGetParcelPrimOwners\n\ llGetParcelPrimOwners(${1:vector pos})\n\ snippet llGetPermissions\n\ llGetPermissions()\n\ snippet llGetPermissionsKey\n\ llGetPermissionsKey()\n\ snippet llGetPhysicsMaterial\n\ llGetPhysicsMaterial()\n\ snippet llGetPos\n\ llGetPos()\n\ snippet llGetPrimitiveParams\n\ llGetPrimitiveParams(${1:list params})\n\ snippet llGetPrimMediaParams\n\ llGetPrimMediaParams(${1:integer face}, ${2:list params})\n\ snippet llGetRegionAgentCount\n\ llGetRegionAgentCount()\n\ snippet llGetRegionCorner\n\ llGetRegionCorner()\n\ snippet llGetRegionFlags\n\ llGetRegionFlags()\n\ snippet llGetRegionFPS\n\ llGetRegionFPS()\n\ snippet llGetRegionName\n\ llGetRegionName()\n\ snippet llGetRegionTimeDilation\n\ llGetRegionTimeDilation()\n\ snippet llGetRootPosition\n\ llGetRootPosition()\n\ snippet llGetRootRotation\n\ llGetRootRotation()\n\ snippet llGetRot\n\ llGetRot()\n\ snippet llGetScale\n\ llGetScale()\n\ snippet llGetScriptName\n\ llGetScriptName()\n\ snippet llGetScriptState\n\ llGetScriptState(${1:string script})\n\ snippet llGetSimStats\n\ llGetSimStats(${1:integer stat_type})\n\ snippet llGetSimulatorHostname\n\ llGetSimulatorHostname()\n\ snippet llGetSPMaxMemory\n\ llGetSPMaxMemory()\n\ snippet llGetStartParameter\n\ llGetStartParameter()\n\ snippet llGetStaticPath\n\ llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})\n\ snippet llGetStatus\n\ llGetStatus(${1:integer status})\n\ snippet llGetSubString\n\ llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\ snippet llGetSunDirection\n\ llGetSunDirection()\n\ snippet llGetTexture\n\ llGetTexture(${1:integer face})\n\ snippet llGetTextureOffset\n\ llGetTextureOffset(${1:integer face})\n\ snippet llGetTextureRot\n\ llGetTextureRot(${1:integer face})\n\ snippet llGetTextureScale\n\ llGetTextureScale(${1:integer face})\n\ snippet llGetTime\n\ llGetTime()\n\ snippet llGetTimeOfDay\n\ llGetTimeOfDay()\n\ snippet llGetTimestamp\n\ llGetTimestamp()\n\ snippet llGetTorque\n\ llGetTorque()\n\ snippet llGetUnixTime\n\ llGetUnixTime()\n\ snippet llGetUsedMemory\n\ llGetUsedMemory()\n\ snippet llGetUsername\n\ llGetUsername(${1:key id})\n\ snippet llGetVel\n\ llGetVel()\n\ snippet llGetWallclock\n\ llGetWallclock()\n\ snippet llGiveInventory\n\ llGiveInventory(${1:key destination}, ${2:string inventory});\n\ snippet llGiveInventoryList\n\ llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory});\n\ snippet llGiveMoney\n\ llGiveMoney(${1:key destination}, ${2:integer amount})\n\ snippet llGround\n\ llGround(${1:vector offset})\n\ snippet llGroundContour\n\ llGroundContour(${1:vector offset})\n\ snippet llGroundNormal\n\ llGroundNormal(${1:vector offset})\n\ snippet llGroundRepel\n\ llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau});\n\ snippet llGroundSlope\n\ llGroundSlope(${1:vector offset})\n\ snippet llHTTPRequest\n\ llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})\n\ snippet llHTTPResponse\n\ llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body});\n\ snippet llInsertString\n\ llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})\n\ snippet llInstantMessage\n\ llInstantMessage(${1:key user}, ${2:string message});\n\ snippet llIntegerToBase64\n\ llIntegerToBase64(${1:integer number})\n\ snippet llJson2List\n\ llJson2List(${1:string json})\n\ snippet llJsonGetValue\n\ llJsonGetValue(${1:string json}, ${2:list specifiers})\n\ snippet llJsonSetValue\n\ llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})\n\ snippet llJsonValueType\n\ llJsonValueType(${1:string json}, ${2:list specifiers})\n\ snippet llKey2Name\n\ llKey2Name(${1:key id})\n\ snippet llKeyCountKeyValue\n\ llKeyCountKeyValue()\n\ snippet llKeysKeyValue\n\ llKeysKeyValue(${1:integer first}, ${2:integer count})\n\ snippet llLinkParticleSystem\n\ llLinkParticleSystem(${1:integer link}, ${2:list rules});\n\ snippet llLinkSitTarget\n\ llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot});\n\ snippet llList2CSV\n\ llList2CSV(${1:list src})\n\ snippet llList2Float\n\ llList2Float(${1:list src}, ${2:integer index})\n\ snippet llList2Integer\n\ llList2Integer(${1:list src}, ${2:integer index})\n\ snippet llList2Json\n\ llList2Json(${1:string type}, ${2:list values})\n\ snippet llList2Key\n\ llList2Key(${1:list src}, ${2:integer index})\n\ snippet llList2List\n\ llList2List(${1:list src}, ${2:integer start}, ${3:integer end})\n\ snippet llList2ListStrided\n\ llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})\n\ snippet llList2Rot\n\ llList2Rot(${1:list src}, ${2:integer index})\n\ snippet llList2String\n\ llList2String(${1:list src}, ${2:integer index})\n\ snippet llList2Vector\n\ llList2Vector(${1:list src}, ${2:integer index})\n\ snippet llListen\n\ llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})\n\ snippet llListenControl\n\ llListenControl(${1:integer handle}, ${2:integer active});\n\ snippet llListenRemove\n\ llListenRemove(${1:integer handle});\n\ snippet llListFindList\n\ llListFindList(${1:list src}, ${2:list test})\n\ snippet llListInsertList\n\ llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})\n\ snippet llListRandomize\n\ llListRandomize(${1:list src}, ${2:integer stride})\n\ snippet llListReplaceList\n\ llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})\n\ snippet llListSort\n\ llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})\n\ snippet llListStatistics\n\ llListStatistics(${1:integer operation}, ${2:list src})\n\ snippet llLoadURL\n\ llLoadURL(${1:key agent}, ${2:string message}, ${3:string url});\n\ snippet llLog\n\ llLog(${1:float val})\n\ snippet llLog10\n\ llLog10(${1:float val})\n\ snippet llLookAt\n\ llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping});\n\ snippet llLoopSound\n\ llLoopSound(${1:string sound}, ${2:float volume});\n\ snippet llLoopSoundMaster\n\ llLoopSoundMaster(${1:string sound}, ${2:float volume});\n\ snippet llLoopSoundSlave\n\ llLoopSoundSlave(${1:string sound}, ${2:float volume});\n\ snippet llManageEstateAccess\n\ llManageEstateAccess(${1:integer action}, ${2:key agent})\n\ snippet llMapDestination\n\ llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at});\n\ snippet llMD5String\n\ llMD5String(${1:string src}, ${2:integer nonce})\n\ snippet llMessageLinked\n\ llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id});\n\ snippet llMinEventDelay\n\ llMinEventDelay(${1:float delay});\n\ snippet llModifyLand\n\ llModifyLand(${1:integer action}, ${2:integer brush});\n\ snippet llModPow\n\ llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})\n\ snippet llMoveToTarget\n\ llMoveToTarget(${1:vector target}, ${2:float tau});\n\ snippet llNavigateTo\n\ llNavigateTo(${1:vector pos}, ${2:list options});\n\ snippet llOffsetTexture\n\ llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\ snippet llOpenRemoteDataChannel\n\ llOpenRemoteDataChannel();\n\ snippet llOverMyLand\n\ llOverMyLand(${1:key id})\n\ snippet llOwnerSay\n\ llOwnerSay(${1:string msg});\n\ snippet llParcelMediaCommandList\n\ llParcelMediaCommandList(${1:list commandList});\n\ snippet llParcelMediaQuery\n\ llParcelMediaQuery(${1:list query})\n\ snippet llParseString2List\n\ llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})\n\ snippet llParseStringKeepNulls\n\ llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})\n\ snippet llParticleSystem\n\ llParticleSystem(${1:list rules});\n\ snippet llPassCollisions\n\ llPassCollisions(${1:integer pass});\n\ snippet llPassTouches\n\ llPassTouches(${1:integer pass});\n\ snippet llPatrolPoints\n\ llPatrolPoints(${1:list patrolPoints}, ${2:list options});\n\ snippet llPlaySound\n\ llPlaySound(${1:string sound}, ${2:float volume});\n\ snippet llPlaySoundSlave\n\ llPlaySoundSlave(${1:string sound}, ${2:float volume});\n\ snippet llPow\n\ llPow(${1:float base}, ${2:float exponent})\n\ snippet llPreloadSound\n\ llPreloadSound(${1:string sound});\n\ snippet llPursue\n\ llPursue(${1:key target}, ${2:list options});\n\ snippet llPushObject\n\ llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local});\n\ snippet llReadKeyValue\n\ llReadKeyValue(${1:string k})\n\ snippet llRegionSay\n\ llRegionSay(${1:integer channel}, ${2:string msg});\n\ snippet llRegionSayTo\n\ llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg});\n\ snippet llReleaseControls\n\ llReleaseControls();\n\ snippet llReleaseURL\n\ llReleaseURL(${1:string url});\n\ snippet llRemoteDataReply\n\ llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata});\n\ snippet llRemoteLoadScriptPin\n\ llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param});\n\ snippet llRemoveFromLandBanList\n\ llRemoveFromLandBanList(${1:key agent});\n\ snippet llRemoveFromLandPassList\n\ llRemoveFromLandPassList(${1:key agent});\n\ snippet llRemoveInventory\n\ llRemoveInventory(${1:string item});\n\ snippet llRemoveVehicleFlags\n\ llRemoveVehicleFlags(${1:integer flags});\n\ snippet llRequestAgentData\n\ llRequestAgentData(${1:key id}, ${2:integer data})\n\ snippet llRequestDisplayName\n\ llRequestDisplayName(${1:key id})\n\ snippet llRequestExperiencePermissions\n\ llRequestExperiencePermissions(${1:key agent}, ${2:string name})\n\ snippet llRequestInventoryData\n\ llRequestInventoryData(${1:string name})\n\ snippet llRequestPermissions\n\ llRequestPermissions(${1:key agent}, ${2:integer permissions})\n\ snippet llRequestSecureURL\n\ llRequestSecureURL()\n\ snippet llRequestSimulatorData\n\ llRequestSimulatorData(${1:string region}, ${2:integer data})\n\ snippet llRequestURL\n\ llRequestURL()\n\ snippet llRequestUsername\n\ llRequestUsername(${1:key id})\n\ snippet llResetAnimationOverride\n\ llResetAnimationOverride(${1:string anim_state});\n\ snippet llResetLandBanList\n\ llResetLandBanList();\n\ snippet llResetLandPassList\n\ llResetLandPassList();\n\ snippet llResetOtherScript\n\ llResetOtherScript(${1:string name});\n\ snippet llResetScript\n\ llResetScript();\n\ snippet llResetTime\n\ llResetTime();\n\ snippet llReturnObjectsByID\n\ llReturnObjectsByID(${1:list objects})\n\ snippet llReturnObjectsByOwner\n\ llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})\n\ snippet llRezAtRoot\n\ llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param});\n\ snippet llRezObject\n\ llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param});\n\ snippet llRot2Angle\n\ llRot2Angle(${1:rotation rot})\n\ snippet llRot2Axis\n\ llRot2Axis(${1:rotation rot})\n\ snippet llRot2Euler\n\ llRot2Euler(${1:rotation quat})\n\ snippet llRot2Fwd\n\ llRot2Fwd(${1:rotation q})\n\ snippet llRot2Left\n\ llRot2Left(${1:rotation q})\n\ snippet llRot2Up\n\ llRot2Up(${1:rotation q})\n\ snippet llRotateTexture\n\ llRotateTexture(${1:float angle}, ${2:integer face});\n\ snippet llRotBetween\n\ llRotBetween(${1:vector start}, ${2:vector end})\n\ snippet llRotLookAt\n\ llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping});\n\ snippet llRotTarget\n\ llRotTarget(${1:rotation rot}, ${2:float error})\n\ snippet llRotTargetRemove\n\ llRotTargetRemove(${1:integer handle});\n\ snippet llRound\n\ llRound(${1:float val})\n\ snippet llSameGroup\n\ llSameGroup(${1:key group})\n\ snippet llSay\n\ llSay(${1:integer channel}, ${2:string msg});\n\ snippet llScaleByFactor\n\ llScaleByFactor(${1:float scaling_factor})\n\ snippet llScaleTexture\n\ llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\ snippet llScriptDanger\n\ llScriptDanger(${1:vector pos})\n\ snippet llScriptProfiler\n\ llScriptProfiler(${1:integer flags});\n\ snippet llSendRemoteData\n\ llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})\n\ snippet llSensor\n\ llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc});\n\ snippet llSensorRepeat\n\ llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate});\n\ snippet llSetAlpha\n\ llSetAlpha(${1:float alpha}, ${2:integer face});\n\ snippet llSetAngularVelocity\n\ llSetAngularVelocity(${1:vector force}, ${2:integer local});\n\ snippet llSetAnimationOverride\n\ llSetAnimationOverride(${1:string anim_state}, ${2:string anim})\n\ snippet llSetBuoyancy\n\ llSetBuoyancy(${1:float buoyancy});\n\ snippet llSetCameraAtOffset\n\ llSetCameraAtOffset(${1:vector offset});\n\ snippet llSetCameraEyeOffset\n\ llSetCameraEyeOffset(${1:vector offset});\n\ snippet llSetCameraParams\n\ llSetCameraParams(${1:list rules});\n\ snippet llSetClickAction\n\ llSetClickAction(${1:integer action});\n\ snippet llSetColor\n\ llSetColor(${1:vector color}, ${2:integer face});\n\ snippet llSetContentType\n\ llSetContentType(${1:key request_id}, ${2:integer content_type});\n\ snippet llSetDamage\n\ llSetDamage(${1:float damage});\n\ snippet llSetForce\n\ llSetForce(${1:vector force}, ${2:integer local});\n\ snippet llSetForceAndTorque\n\ llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local});\n\ snippet llSetHoverHeight\n\ llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau});\n\ snippet llSetKeyframedMotion\n\ llSetKeyframedMotion(${1:list keyframes}, ${2:list options});\n\ snippet llSetLinkAlpha\n\ llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face});\n\ snippet llSetLinkCamera\n\ llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at});\n\ snippet llSetLinkColor\n\ llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face});\n\ snippet llSetLinkMedia\n\ llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params});\n\ snippet llSetLinkPrimitiveParams\n\ llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules});\n\ snippet llSetLinkPrimitiveParamsFast\n\ llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules});\n\ snippet llSetLinkTexture\n\ llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face});\n\ snippet llSetLinkTextureAnim\n\ llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate});\n\ snippet llSetLocalRot\n\ llSetLocalRot(${1:rotation rot});\n\ snippet llSetMemoryLimit\n\ llSetMemoryLimit(${1:integer limit})\n\ snippet llSetObjectDesc\n\ llSetObjectDesc(${1:string description});\n\ snippet llSetObjectName\n\ llSetObjectName(${1:string name});\n\ snippet llSetParcelMusicURL\n\ llSetParcelMusicURL(${1:string url});\n\ snippet llSetPayPrice\n\ llSetPayPrice(${1:integer price}, [${2:integer price_button_a}, ${3:integer price_button_b}, ${4:integer price_button_c}, ${5:integer price_button_d}]);\n\ snippet llSetPhysicsMaterial\n\ llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density});\n\ snippet llSetPos\n\ llSetPos(${1:vector pos});\n\ snippet llSetPrimitiveParams\n\ llSetPrimitiveParams(${1:list rules});\n\ snippet llSetPrimMediaParams\n\ llSetPrimMediaParams(${1:integer face}, ${2:list params});\n\ snippet llSetRegionPos\n\ llSetRegionPos(${1:vector position})\n\ snippet llSetRemoteScriptAccessPin\n\ llSetRemoteScriptAccessPin(${1:integer pin});\n\ snippet llSetRot\n\ llSetRot(${1:rotation rot});\n\ snippet llSetScale\n\ llSetScale(${1:vector size});\n\ snippet llSetScriptState\n\ llSetScriptState(${1:string name}, ${2:integer run});\n\ snippet llSetSitText\n\ llSetSitText(${1:string text});\n\ snippet llSetSoundQueueing\n\ llSetSoundQueueing(${1:integer queue});\n\ snippet llSetSoundRadius\n\ llSetSoundRadius(${1:float radius});\n\ snippet llSetStatus\n\ llSetStatus(${1:integer status}, ${2:integer value});\n\ snippet llSetText\n\ llSetText(${1:string text}, ${2:vector color}, ${3:float alpha});\n\ snippet llSetTexture\n\ llSetTexture(${1:string texture}, ${2:integer face});\n\ snippet llSetTextureAnim\n\ llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate});\n\ snippet llSetTimerEvent\n\ llSetTimerEvent(${1:float sec});\n\ snippet llSetTorque\n\ llSetTorque(${1:vector torque}, ${2:integer local});\n\ snippet llSetTouchText\n\ llSetTouchText(${1:string text});\n\ snippet llSetVehicleFlags\n\ llSetVehicleFlags(${1:integer flags});\n\ snippet llSetVehicleFloatParam\n\ llSetVehicleFloatParam(${1:integer param}, ${2:float value});\n\ snippet llSetVehicleRotationParam\n\ llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot});\n\ snippet llSetVehicleType\n\ llSetVehicleType(${1:integer type});\n\ snippet llSetVehicleVectorParam\n\ llSetVehicleVectorParam(${1:integer param}, ${2:vector vec});\n\ snippet llSetVelocity\n\ llSetVelocity(${1:vector force}, ${2:integer local});\n\ snippet llSHA1String\n\ llSHA1String(${1:string src})\n\ snippet llShout\n\ llShout(${1:integer channel}, ${2:string msg});\n\ snippet llSin\n\ llSin(${1:float theta})\n\ snippet llSitTarget\n\ llSitTarget(${1:vector offset}, ${2:rotation rot});\n\ snippet llSleep\n\ llSleep(${1:float sec});\n\ snippet llSqrt\n\ llSqrt(${1:float val})\n\ snippet llStartAnimation\n\ llStartAnimation(${1:string anim});\n\ snippet llStopAnimation\n\ llStopAnimation(${1:string anim});\n\ snippet llStopHover\n\ llStopHover();\n\ snippet llStopLookAt\n\ llStopLookAt();\n\ snippet llStopMoveToTarget\n\ llStopMoveToTarget();\n\ snippet llStopSound\n\ llStopSound();\n\ snippet llStringLength\n\ llStringLength(${1:string str})\n\ snippet llStringToBase64\n\ llStringToBase64(${1:string str})\n\ snippet llStringTrim\n\ llStringTrim(${1:string src}, ${2:integer type})\n\ snippet llSubStringIndex\n\ llSubStringIndex(${1:string source}, ${2:string pattern})\n\ snippet llTakeControls\n\ llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on});\n\ snippet llTan\n\ llTan(${1:float theta})\n\ snippet llTarget\n\ llTarget(${1:vector position}, ${2:float range})\n\ snippet llTargetOmega\n\ llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain});\n\ snippet llTargetRemove\n\ llTargetRemove(${1:integer handle});\n\ snippet llTeleportAgent\n\ llTeleportAgent(${1:key agent}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at});\n\ snippet llTeleportAgentGlobalCoords\n\ llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at});\n\ snippet llTeleportAgentHome\n\ llTeleportAgentHome(${1:key agent});\n\ snippet llTextBox\n\ llTextBox(${1:key agent}, ${2:string message}, ${3:integer channel});\n\ snippet llToLower\n\ llToLower(${1:string src})\n\ snippet llToUpper\n\ llToUpper(${1:string src})\n\ snippet llTransferLindenDollars\n\ llTransferLindenDollars(${1:key destination}, ${2:integer amount})\n\ snippet llTriggerSound\n\ llTriggerSound(${1:string sound}, ${2:float volume});\n\ snippet llTriggerSoundLimited\n\ llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west});\n\ snippet llUnescapeURL\n\ llUnescapeURL(${1:string url})\n\ snippet llUnSit\n\ llUnSit(${1:key id});\n\ snippet llUpdateCharacter\n\ llUpdateCharacter(${1:list options})\n\ snippet llUpdateKeyValue\n\ llUpdateKeyValue(${1:string k}, ${2:string v}, ${3:integer checked}, ${4:string ov})\n\ snippet llVecDist\n\ llVecDist(${1:vector vec_a}, ${2:vector vec_b})\n\ snippet llVecMag\n\ llVecMag(${1:vector vec})\n\ snippet llVecNorm\n\ llVecNorm(${1:vector vec})\n\ snippet llVolumeDetect\n\ llVolumeDetect(${1:integer detect});\n\ snippet llWanderWithin\n\ llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options});\n\ snippet llWater\n\ llWater(${1:vector offset});\n\ snippet llWhisper\n\ llWhisper(${1:integer channel}, ${2:string msg});\n\ snippet llWind\n\ llWind(${1:vector offset});\n\ snippet llXorBase64\n\ llXorBase64(${1:string str1}, ${2:string str2})\n\ snippet money\n\ money(${1:key id}, ${2:integer amount})\n\ {\n\ $0\n\ }\n\ snippet object_rez\n\ object_rez(${1:key id})\n\ {\n\ $0\n\ }\n\ snippet on_rez\n\ on_rez(${1:integer start_param})\n\ {\n\ $0\n\ }\n\ snippet path_update\n\ path_update(${1:integer type}, ${2:list reserved})\n\ {\n\ $0\n\ }\n\ snippet remote_data\n\ remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})\n\ {\n\ $0\n\ }\n\ snippet run_time_permissions\n\ run_time_permissions(${1:integer perm})\n\ {\n\ $0\n\ }\n\ snippet sensor\n\ sensor(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet state\n\ state ${1:name}\n\ snippet touch\n\ touch(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet touch_end\n\ touch_end(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet touch_start\n\ touch_start(${1:integer index})\n\ {\n\ $0\n\ }\n\ snippet transaction_result\n\ transaction_result(${1:key id}, ${2:integer success}, ${3:string data})\n\ {\n\ $0\n\ }\n\ snippet while\n\ while (${1:condition})\n\ {\n\ $0\n\ }\n\ "; exports.scope = "lsl"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/xml.js0000644000076400007640000000025212554155240023674 0ustar pravipravidefine("ace/snippets/xml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "xml"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/ejs.js0000644000076400007640000000025212554155240023655 0ustar pravipravidefine("ace/snippets/ejs",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "ejs"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/ada.js0000644000076400007640000000025212554155240023621 0ustar pravipravidefine("ace/snippets/ada",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "ada"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/haml.js0000644000076400007640000000102212554155240024011 0ustar pravipravidefine("ace/snippets/haml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet t\n\ %table\n\ %tr\n\ %th\n\ ${1:headers}\n\ %tr\n\ %td\n\ ${2:headers}\n\ snippet ul\n\ %ul\n\ %li\n\ ${1:item}\n\ %li\n\ snippet =rp\n\ = render :partial => '${1:partial}'\n\ snippet =rpl\n\ = render :partial => '${1:partial}', :locals => {}\n\ snippet =rpc\n\ = render :partial => '${1:partial}', :collection => @$1\n\ \n\ "; exports.scope = "haml"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/c_cpp.js0000644000076400007640000000562712554155240024173 0ustar pravipravidefine("ace/snippets/c_cpp",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "## STL Collections\n\ # std::array\n\ snippet array\n\ std::array<${1:T}, ${2:N}> ${3};${4}\n\ # std::vector\n\ snippet vector\n\ std::vector<${1:T}> ${2};${3}\n\ # std::deque\n\ snippet deque\n\ std::deque<${1:T}> ${2};${3}\n\ # std::forward_list\n\ snippet flist\n\ std::forward_list<${1:T}> ${2};${3}\n\ # std::list\n\ snippet list\n\ std::list<${1:T}> ${2};${3}\n\ # std::set\n\ snippet set\n\ std::set<${1:T}> ${2};${3}\n\ # std::map\n\ snippet map\n\ std::map<${1:Key}, ${2:T}> ${3};${4}\n\ # std::multiset\n\ snippet mset\n\ std::multiset<${1:T}> ${2};${3}\n\ # std::multimap\n\ snippet mmap\n\ std::multimap<${1:Key}, ${2:T}> ${3};${4}\n\ # std::unordered_set\n\ snippet uset\n\ std::unordered_set<${1:T}> ${2};${3}\n\ # std::unordered_map\n\ snippet umap\n\ std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n\ # std::unordered_multiset\n\ snippet umset\n\ std::unordered_multiset<${1:T}> ${2};${3}\n\ # std::unordered_multimap\n\ snippet ummap\n\ std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n\ # std::stack\n\ snippet stack\n\ std::stack<${1:T}> ${2};${3}\n\ # std::queue\n\ snippet queue\n\ std::queue<${1:T}> ${2};${3}\n\ # std::priority_queue\n\ snippet pqueue\n\ std::priority_queue<${1:T}> ${2};${3}\n\ ##\n\ ## Access Modifiers\n\ # private\n\ snippet pri\n\ private\n\ # protected\n\ snippet pro\n\ protected\n\ # public\n\ snippet pub\n\ public\n\ # friend\n\ snippet fr\n\ friend\n\ # mutable\n\ snippet mu\n\ mutable\n\ ## \n\ ## Class\n\ # class\n\ snippet cl\n\ class ${1:`Filename('$1', 'name')`} \n\ {\n\ public:\n\ $1(${2});\n\ ~$1();\n\ \n\ private:\n\ ${3:/* data */}\n\ };\n\ # member function implementation\n\ snippet mfun\n\ ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n\ ${5:/* code */}\n\ }\n\ # namespace\n\ snippet ns\n\ namespace ${1:`Filename('', 'my')`} {\n\ ${2}\n\ } /* namespace $1 */\n\ ##\n\ ## Input/Output\n\ # std::cout\n\ snippet cout\n\ std::cout << ${1} << std::endl;${2}\n\ # std::cin\n\ snippet cin\n\ std::cin >> ${1};${2}\n\ ##\n\ ## Iteration\n\ # for i \n\ snippet fori\n\ for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n\ ${4:/* code */}\n\ }${5}\n\ \n\ # foreach\n\ snippet fore\n\ for (${1:auto} ${2:i} : ${3:container}) {\n\ ${4:/* code */}\n\ }${5}\n\ # iterator\n\ snippet iter\n\ for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n\ ${6}\n\ }${7}\n\ \n\ # auto iterator\n\ snippet itera\n\ for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n\ ${2:std::cout << *$1 << std::endl;}\n\ }${3}\n\ ##\n\ ## Lambdas\n\ # lamda (one line)\n\ snippet ld\n\ [${1}](${2}){${3:/* code */}}${4}\n\ # lambda (multi-line)\n\ snippet lld\n\ [${1}](${2}){\n\ ${3:/* code */}\n\ }${4}\n\ "; exports.scope = "c_cpp"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/perl.js0000644000076400007640000001415112554155240024041 0ustar pravipravidefine("ace/snippets/perl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# #!/usr/bin/perl\n\ snippet #!\n\ #!/usr/bin/env perl\n\ \n\ # Hash Pointer\n\ snippet .\n\ =>\n\ # Function\n\ snippet sub\n\ sub ${1:function_name} {\n\ ${2:#body ...}\n\ }\n\ # Conditional\n\ snippet if\n\ if (${1}) {\n\ ${2:# body...}\n\ }\n\ # Conditional if..else\n\ snippet ife\n\ if (${1}) {\n\ ${2:# body...}\n\ }\n\ else {\n\ ${3:# else...}\n\ }\n\ # Conditional if..elsif..else\n\ snippet ifee\n\ if (${1}) {\n\ ${2:# body...}\n\ }\n\ elsif (${3}) {\n\ ${4:# elsif...}\n\ }\n\ else {\n\ ${5:# else...}\n\ }\n\ # Conditional One-line\n\ snippet xif\n\ ${1:expression} if ${2:condition};${3}\n\ # Unless conditional\n\ snippet unless\n\ unless (${1}) {\n\ ${2:# body...}\n\ }\n\ # Unless conditional One-line\n\ snippet xunless\n\ ${1:expression} unless ${2:condition};${3}\n\ # Try/Except\n\ snippet eval\n\ local $@;\n\ eval {\n\ ${1:# do something risky...}\n\ };\n\ if (my $e = $@) {\n\ ${2:# handle failure...}\n\ }\n\ # While Loop\n\ snippet wh\n\ while (${1}) {\n\ ${2:# body...}\n\ }\n\ # While Loop One-line\n\ snippet xwh\n\ ${1:expression} while ${2:condition};${3}\n\ # C-style For Loop\n\ snippet cfor\n\ for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\ ${4:# body...}\n\ }\n\ # For loop one-line\n\ snippet xfor\n\ ${1:expression} for @${2:array};${3}\n\ # Foreach Loop\n\ snippet for\n\ foreach my $${1:x} (@${2:array}) {\n\ ${3:# body...}\n\ }\n\ # Foreach Loop One-line\n\ snippet fore\n\ ${1:expression} foreach @${2:array};${3}\n\ # Package\n\ snippet package\n\ package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`};\n\ \n\ ${2}\n\ \n\ 1;\n\ \n\ __END__\n\ # Package syntax perl >= 5.14\n\ snippet packagev514\n\ package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`} ${2:0.99};\n\ \n\ ${3}\n\ \n\ 1;\n\ \n\ __END__\n\ #moose\n\ snippet moose\n\ use Moose;\n\ use namespace::autoclean;\n\ ${1:#}BEGIN {extends '${2:ParentClass}'};\n\ \n\ ${3}\n\ # parent\n\ snippet parent\n\ use parent qw(${1:Parent Class});\n\ # Read File\n\ snippet slurp\n\ my $${1:var} = do { local $/; open my $file, '<', \"${2:file}\"; <$file> };\n\ ${3}\n\ # strict warnings\n\ snippet strwar\n\ use strict;\n\ use warnings;\n\ # older versioning with perlcritic bypass\n\ snippet vers\n\ ## no critic\n\ our $VERSION = '${1:version}';\n\ eval $VERSION;\n\ ## use critic\n\ # new 'switch' like feature\n\ snippet switch\n\ use feature 'switch';\n\ \n\ # Anonymous subroutine\n\ snippet asub\n\ sub {\n\ ${1:# body }\n\ }\n\ \n\ \n\ \n\ # Begin block\n\ snippet begin\n\ BEGIN {\n\ ${1:# begin body}\n\ }\n\ \n\ # call package function with some parameter\n\ snippet pkgmv\n\ __PACKAGE__->${1:package_method}(${2:var})\n\ \n\ # call package function without a parameter\n\ snippet pkgm\n\ __PACKAGE__->${1:package_method}()\n\ \n\ # call package \"get_\" function without a parameter\n\ snippet pkget\n\ __PACKAGE__->get_${1:package_method}()\n\ \n\ # call package function with a parameter\n\ snippet pkgetv\n\ __PACKAGE__->get_${1:package_method}(${2:var})\n\ \n\ # complex regex\n\ snippet qrx\n\ qr/\n\ ${1:regex}\n\ /xms\n\ \n\ #simpler regex\n\ snippet qr/\n\ qr/${1:regex}/x\n\ \n\ #given\n\ snippet given\n\ given ($${1:var}) {\n\ ${2:# cases}\n\ ${3:# default}\n\ }\n\ \n\ # switch-like case\n\ snippet when\n\ when (${1:case}) {\n\ ${2:# body}\n\ }\n\ \n\ # hash slice\n\ snippet hslice\n\ @{ ${1:hash} }{ ${2:array} }\n\ \n\ \n\ # map\n\ snippet map\n\ map { ${2: body } } ${1: @array } ;\n\ \n\ \n\ \n\ # Pod stub\n\ snippet ppod\n\ =head1 NAME\n\ \n\ ${1:ClassName} - ${2:ShortDesc}\n\ \n\ =head1 SYNOPSIS\n\ \n\ use $1;\n\ \n\ ${3:# synopsis...}\n\ \n\ =head1 DESCRIPTION\n\ \n\ ${4:# longer description...}\n\ \n\ \n\ =head1 INTERFACE\n\ \n\ \n\ =head1 DEPENDENCIES\n\ \n\ \n\ =head1 SEE ALSO\n\ \n\ \n\ # Heading for a subroutine stub\n\ snippet psub\n\ =head2 ${1:MethodName}\n\ \n\ ${2:Summary....}\n\ \n\ # Heading for inline subroutine pod\n\ snippet psubi\n\ =head2 ${1:MethodName}\n\ \n\ ${2:Summary...}\n\ \n\ \n\ =cut\n\ # inline documented subroutine\n\ snippet subpod\n\ =head2 $1\n\ \n\ Summary of $1\n\ \n\ =cut\n\ \n\ sub ${1:subroutine_name} {\n\ ${2:# body...}\n\ }\n\ # Subroutine signature\n\ snippet parg\n\ =over 2\n\ \n\ =item\n\ Arguments\n\ \n\ \n\ =over 3\n\ \n\ =item\n\ C<${1:DataStructure}>\n\ \n\ ${2:Sample}\n\ \n\ \n\ =back\n\ \n\ \n\ =item\n\ Return\n\ \n\ =over 3\n\ \n\ \n\ =item\n\ C<${3:...return data}>\n\ \n\ \n\ =back\n\ \n\ \n\ =back\n\ \n\ \n\ \n\ # Moose has\n\ snippet has\n\ has ${1:attribute} => (\n\ is => '${2:ro|rw}',\n\ isa => '${3:Str|Int|HashRef|ArrayRef|etc}',\n\ default => sub {\n\ ${4:defaultvalue}\n\ },\n\ ${5:# other attributes}\n\ );\n\ \n\ \n\ # override\n\ snippet override\n\ override ${1:attribute} => sub {\n\ ${2:# my $self = shift;};\n\ ${3:# my ($self, $args) = @_;};\n\ };\n\ \n\ \n\ # use test classes\n\ snippet tuse\n\ use Test::More;\n\ use Test::Deep; # (); # uncomment to stop prototype errors\n\ use Test::Exception;\n\ \n\ # local test lib\n\ snippet tlib\n\ use lib qw{ ./t/lib };\n\ \n\ #test methods\n\ snippet tmeths\n\ $ENV{TEST_METHOD} = '${1:regex}';\n\ \n\ # runtestclass\n\ snippet trunner\n\ use ${1:test_class};\n\ $1->runtests();\n\ \n\ # Test::Class-style test\n\ snippet tsub\n\ sub t${1:number}_${2:test_case} :Test(${3:num_of_tests}) {\n\ my $self = shift;\n\ ${4:# body}\n\ \n\ }\n\ \n\ # Test::Routine-style test\n\ snippet trsub\n\ test ${1:test_name} => { description => '${2:Description of test.}'} => sub {\n\ my ($self) = @_;\n\ ${3:# test code}\n\ };\n\ \n\ #prep test method\n\ snippet tprep\n\ sub prep${1:number}_${2:test_case} :Test(startup) {\n\ my $self = shift;\n\ ${4:# body}\n\ }\n\ \n\ # cause failures to print stack trace\n\ snippet debug_trace\n\ use Carp; # 'verbose';\n\ # cloak \"die\"\n\ # warn \"warning\"\n\ $SIG{'__DIE__'} = sub {\n\ require Carp; Carp::confess\n\ };\n\ \n\ "; exports.scope = "perl"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/mask.js0000644000076400007640000000025412554155240024031 0ustar pravipravidefine("ace/snippets/mask",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "mask"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/luapage.js0000644000076400007640000000026212554155240024513 0ustar pravipravidefine("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "luapage"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/pgsql.js0000644000076400007640000000025612554155240024226 0ustar pravipravidefine("ace/snippets/pgsql",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "pgsql"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/lucene.js0000644000076400007640000000026012554155240024346 0ustar pravipravidefine("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "lucene"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/rdoc.js0000644000076400007640000000025412554155240024025 0ustar pravipravidefine("ace/snippets/rdoc",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "rdoc"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/space.js0000644000076400007640000000025612554155240024173 0ustar pravipravidefine("ace/snippets/space",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "space"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/jack.js0000644000076400007640000000025412554155240024006 0ustar pravipravidefine("ace/snippets/jack",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "jack"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/actionscript.js0000644000076400007640000000622112554155240025600 0ustar pravipravidefine("ace/snippets/actionscript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet main\n\ package {\n\ import flash.display.*;\n\ import flash.Events.*;\n\ \n\ public class Main extends Sprite {\n\ public function Main ( ) {\n\ trace(\"start\");\n\ stage.scaleMode = StageScaleMode.NO_SCALE;\n\ stage.addEventListener(Event.RESIZE, resizeListener);\n\ }\n\ \n\ private function resizeListener (e:Event):void {\n\ trace(\"The application window changed size!\");\n\ trace(\"New width: \" + stage.stageWidth);\n\ trace(\"New height: \" + stage.stageHeight);\n\ }\n\ \n\ }\n\ \n\ }\n\ snippet class\n\ ${1:public|internal} class ${2:name} ${3:extends } {\n\ public function $2 ( ) {\n\ (\"start\");\n\ }\n\ }\n\ snippet all\n\ package name {\n\ \n\ ${1:public|internal|final} class ${2:name} ${3:extends } {\n\ private|public| static const FOO = \"abc\";\n\ private|public| static var BAR = \"abc\";\n\ if Cababilities.os == \"Linux|MacOS\" {\n\ FOO = \"other\";\n\ }\n\ public function $2 ( ){\n\ super2();\n\ trace(\"start\");\n\ }\n\ public function name (a, b...){\n\ super.name(..);\n\ lable:break\n\ }\n\ }\n\ }\n\ \n\ function A(){\n\ }\n\ snippet switch\n\ switch(${1}){\n\ case ${2}:\n\ ${3}\n\ break;\n\ default:\n\ }\n\ snippet case\n\ case ${1}:\n\ ${2}\n\ break;\n\ snippet package\n\ package ${1:package}{\n\ ${2}\n\ }\n\ snippet wh\n\ while ${1:cond}{\n\ ${2}\n\ }\n\ snippet do\n\ do {\n\ ${2}\n\ } while (${1:cond})\n\ snippet while\n\ while ${1:cond}{\n\ ${2}\n\ }\n\ snippet for enumerate names\n\ for (${1:var} in ${2:object}){\n\ ${3}\n\ }\n\ snippet for enumerate values\n\ for each (${1:var} in ${2:object}){\n\ ${3}\n\ }\n\ snippet get_set\n\ function get ${1:name} {\n\ return ${2}\n\ }\n\ function set $1 (newValue) {\n\ ${3}\n\ }\n\ snippet interface\n\ interface name {\n\ function method(${1}):${2:returntype};\n\ }\n\ snippet try\n\ try {\n\ ${1}\n\ } catch (error:ErrorType) {\n\ ${2}\n\ } finally {\n\ ${3}\n\ }\n\ # For Loop (same as c.snippet)\n\ snippet for for (..) {..}\n\ for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n\ ${4:/* code */}\n\ }\n\ # Custom For Loop\n\ snippet forr\n\ for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {\n\ ${5:/* code */}\n\ }\n\ # If Condition\n\ snippet if\n\ if (${1:/* condition */}) {\n\ ${2:/* code */}\n\ }\n\ snippet el\n\ else {\n\ ${1}\n\ }\n\ # Ternary conditional\n\ snippet t\n\ ${1:/* condition */} ? ${2:a} : ${3:b}\n\ snippet fun\n\ function ${1:function_name}(${2})${3}\n\ {\n\ ${4:/* code */}\n\ }\n\ # FlxSprite (usefull when using the flixel library)\n\ snippet FlxSprite\n\ package\n\ {\n\ import org.flixel.*\n\ \n\ public class ${1:ClassName} extends ${2:FlxSprite}\n\ {\n\ public function $1(${3: X:Number, Y:Number}):void\n\ {\n\ super(X,Y);\n\ ${4: //code...}\n\ }\n\ \n\ override public function update():void\n\ {\n\ super.update();\n\ ${5: //code...}\n\ }\n\ }\n\ }\n\ \n\ "; exports.scope = "actionscript"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/sql.js0000644000076400007640000000201412554155240023671 0ustar pravipravidefine("ace/snippets/sql",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet tbl\n\ create table ${1:table} (\n\ ${2:columns}\n\ );\n\ snippet col\n\ ${1:name} ${2:type} ${3:default ''} ${4:not null}\n\ snippet ccol\n\ ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\n\ snippet ncol\n\ ${1:name} number ${3:default 0} ${4:not null}\n\ snippet dcol\n\ ${1:name} date ${3:default sysdate} ${4:not null}\n\ snippet ind\n\ create index ${3:$1_$2} on ${1:table}(${2:column});\n\ snippet uind\n\ create unique index ${1:name} on ${2:table}(${3:column});\n\ snippet tblcom\n\ comment on table ${1:table} is '${2:comment}';\n\ snippet colcom\n\ comment on column ${1:table}.${2:column} is '${3:comment}';\n\ snippet addcol\n\ alter table ${1:table} add (${2:column} ${3:type});\n\ snippet seq\n\ create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\n\ snippet s*\n\ select * from ${1:table}\n\ "; exports.scope = "sql"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/mipsassembler.js0000644000076400007640000000026112554155240025742 0ustar pravipravidefine("ace/snippets/mipsassembler",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = ""; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/rust.js0000644000076400007640000000025412554155240024073 0ustar pravipravidefine("ace/snippets/rust",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "rust"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/javascript.js0000644000076400007640000000771612554155240025256 0ustar pravipravidefine("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Prototype\n\ snippet proto\n\ ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\ ${4:// body...}\n\ };\n\ # Function\n\ snippet fun\n\ function ${1?:function_name}(${2:argument}) {\n\ ${3:// body...}\n\ }\n\ # Anonymous Function\n\ regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\n\ snippet f\n\ function${M1?: ${1:functionName}}($2) {\n\ ${0:$TM_SELECTED_TEXT}\n\ }${M2?;}${M3?,}${M4?)}\n\ # Immediate function\n\ trigger \\(?f\\(\n\ endTrigger \\)?\n\ snippet f(\n\ (function(${1}) {\n\ ${0:${TM_SELECTED_TEXT:/* code */}}\n\ }(${1}));\n\ # if\n\ snippet if\n\ if (${1:true}) {\n\ ${0}\n\ }\n\ # if ... else\n\ snippet ife\n\ if (${1:true}) {\n\ ${2}\n\ } else {\n\ ${0}\n\ }\n\ # tertiary conditional\n\ snippet ter\n\ ${1:/* condition */} ? ${2:a} : ${3:b}\n\ # switch\n\ snippet switch\n\ switch (${1:expression}) {\n\ case '${3:case}':\n\ ${4:// code}\n\ break;\n\ ${5}\n\ default:\n\ ${2:// code}\n\ }\n\ # case\n\ snippet case\n\ case '${1:case}':\n\ ${2:// code}\n\ break;\n\ ${3}\n\ \n\ # while (...) {...}\n\ snippet wh\n\ while (${1:/* condition */}) {\n\ ${0:/* code */}\n\ }\n\ # try\n\ snippet try\n\ try {\n\ ${0:/* code */}\n\ } catch (e) {}\n\ # do...while\n\ snippet do\n\ do {\n\ ${2:/* code */}\n\ } while (${1:/* condition */});\n\ # Object Method\n\ snippet :f\n\ regex /([,{[])|^\\s*/:f/\n\ ${1:method_name}: function(${2:attribute}) {\n\ ${0}\n\ }${3:,}\n\ # setTimeout function\n\ snippet setTimeout\n\ regex /\\b/st|timeout|setTimeo?u?t?/\n\ setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n\ # Get Elements\n\ snippet gett\n\ getElementsBy${1:TagName}('${2}')${3}\n\ # Get Element\n\ snippet get\n\ getElementBy${1:Id}('${2}')${3}\n\ # console.log (Firebug)\n\ snippet cl\n\ console.log(${1});\n\ # return\n\ snippet ret\n\ return ${1:result}\n\ # for (property in object ) { ... }\n\ snippet fori\n\ for (var ${1:prop} in ${2:Things}) {\n\ ${0:$2[$1]}\n\ }\n\ # hasOwnProperty\n\ snippet has\n\ hasOwnProperty(${1})\n\ # docstring\n\ snippet /**\n\ snippet @par\n\ regex /^\\s*\\*\\s*/@(para?m?)?/\n\ @param {${1:type}} ${2:name} ${3:description}\n\ snippet @ret\n\ @return {${1:type}} ${2:description}\n\ # JSON.parse\n\ snippet jsonp\n\ JSON.parse(${1:jstr});\n\ # JSON.stringify\n\ snippet jsons\n\ JSON.stringify(${1:object});\n\ # self-defining function\n\ snippet sdf\n\ var ${1:function_name} = function(${2:argument}) {\n\ ${3:// initial code ...}\n\ \n\ $1 = function($2) {\n\ ${4:// main code}\n\ };\n\ }\n\ # singleton\n\ snippet sing\n\ function ${1:Singleton} (${2:argument}) {\n\ var instance;\n\ $1 = function $1($2) {\n\ return instance;\n\ };\n\ $1.prototype = this;\n\ instance = new $1();\n\ instance.constructor = $1;\n\ \n\ ${3:// code ...}\n\ \n\ return instance;\n\ }\n\ # class\n\ snippet class\n\ regex /^\\s*/clas{0,2}/\n\ var ${1:class} = function(${20}) {\n\ $40$0\n\ };\n\ \n\ (function() {\n\ ${60:this.prop = \"\"}\n\ }).call(${1:class}.prototype);\n\ \n\ exports.${1:class} = ${1:class};\n\ # \n\ snippet for-\n\ for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n\ ${0:${2:Things}[${1:i}];}\n\ }\n\ # for (...) {...}\n\ snippet for\n\ for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n\ ${3:$2[$1]}$0\n\ }\n\ # for (...) {...} (Improved Native For-Loop)\n\ snippet forr\n\ for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n\ ${3:$2[$1]}$0\n\ }\n\ \n\ \n\ #modules\n\ snippet def\n\ define(function(require, exports, module) {\n\ \"use strict\";\n\ var ${1/.*\\///} = require(\"${1}\");\n\ \n\ $TM_SELECTED_TEXT\n\ });\n\ snippet req\n\ guard ^\\s*\n\ var ${1/.*\\///} = require(\"${1}\");\n\ $0\n\ snippet requ\n\ guard ^\\s*\n\ var ${1/.*\\/(.)/\\u$1/} = require(\"${1}\").${1/.*\\/(.)/\\u$1/};\n\ $0\n\ "; exports.scope = "javascript"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/batchfile.js0000644000076400007640000000026612554155240025022 0ustar pravipravidefine("ace/snippets/batchfile",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "batchfile"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/soy_template.js0000644000076400007640000000027412554155240025605 0ustar pravipravidefine("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "soy_template"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/logiql.js0000644000076400007640000000026012554155240024362 0ustar pravipravidefine("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "logiql"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/vala.js0000644000076400007640000001163212554155240024023 0ustar pravipravidefine("ace/snippets/vala",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippets = [ { "content": "case ${1:condition}:\n\t$0\n\tbreak;\n", "name": "case", "scope": "vala", "tabTrigger": "case" }, { "content": "/**\n * ${6}\n */\n${1:public} class ${2:MethodName}${3: : GLib.Object} {\n\n\t/**\n\t * ${7}\n\t */\n\tpublic ${2}(${4}) {\n\t\t${5}\n\t}\n\n\t$0\n}", "name": "class", "scope": "vala", "tabTrigger": "class" }, { "content": "(${1}) => {\n\t${0}\n}\n", "name": "closure", "scope": "vala", "tabTrigger": "=>" }, { "content": "/*\n * $0\n */", "name": "Comment (multiline)", "scope": "vala", "tabTrigger": "/*" }, { "content": "Console.WriteLine($1);\n$0", "name": "Console.WriteLine (writeline)", "scope": "vala", "tabTrigger": "writeline" }, { "content": "[DBus(name = \"$0\")]", "name": "DBus annotation", "scope": "vala", "tabTrigger": "[DBus" }, { "content": "delegate ${1:void} ${2:DelegateName}($0);", "name": "delegate", "scope": "vala", "tabTrigger": "delegate" }, { "content": "do {\n\t$0\n} while ($1);\n", "name": "do while", "scope": "vala", "tabTrigger": "dowhile" }, { "content": "/**\n * $0\n */", "name": "DocBlock", "scope": "vala", "tabTrigger": "/**" }, { "content": "else if ($1) {\n\t$0\n}\n", "name": "else if (elseif)", "scope": "vala", "tabTrigger": "elseif" }, { "content": "else {\n\t$0\n}", "name": "else", "scope": "vala", "tabTrigger": "else" }, { "content": "enum {$1:EnumName} {\n\t$0\n}", "name": "enum", "scope": "vala", "tabTrigger": "enum" }, { "content": "public errordomain ${1:Error} {\n\t$0\n}", "name": "error domain", "scope": "vala", "tabTrigger": "errordomain" }, { "content": "for ($1;$2;$3) {\n\t$0\n}", "name": "for", "scope": "vala", "tabTrigger": "for" }, { "content": "foreach ($1 in $2) {\n\t$0\n}", "name": "foreach", "scope": "vala", "tabTrigger": "foreach" }, { "content": "Gee.ArrayList<${1:G}>($0);", "name": "Gee.ArrayList", "scope": "vala", "tabTrigger": "ArrayList" }, { "content": "Gee.HashMap<${1:K},${2:V}>($0);", "name": "Gee.HashMap", "scope": "vala", "tabTrigger": "HashMap" }, { "content": "Gee.HashSet<${1:G}>($0);", "name": "Gee.HashSet", "scope": "vala", "tabTrigger": "HashSet" }, { "content": "if ($1) {\n\t$0\n}", "name": "if", "scope": "vala", "tabTrigger": "if" }, { "content": "interface ${1:InterfaceName}{$2: : SuperInterface} {\n\t$0\n}", "name": "interface", "scope": "vala", "tabTrigger": "interface" }, { "content": "public static int main(string [] argv) {\n\t${0}\n\treturn 0;\n}", "name": "Main function", "scope": "vala", "tabTrigger": "main" }, { "content": "namespace $1 {\n\t$0\n}\n", "name": "namespace (ns)", "scope": "vala", "tabTrigger": "ns" }, { "content": "stdout.printf($0);", "name": "printf", "scope": "vala", "tabTrigger": "printf" }, { "content": "${1:public} ${2:Type} ${3:Name} {\n\tset {\n\t\t$0\n\t}\n\tget {\n\n\t}\n}", "name": "property (prop)", "scope": "vala", "tabTrigger": "prop" }, { "content": "${1:public} ${2:Type} ${3:Name} {\n\tget {\n\t\t$0\n\t}\n}", "name": "read-only property (roprop)", "scope": "vala", "tabTrigger": "roprop" }, { "content": "@\"${1:\\$var}\"", "name": "String template (@)", "scope": "vala", "tabTrigger": "@" }, { "content": "struct ${1:StructName} {\n\t$0\n}", "name": "struct", "scope": "vala", "tabTrigger": "struct" }, { "content": "switch ($1) {\n\t$0\n}", "name": "switch", "scope": "vala", "tabTrigger": "switch" }, { "content": "try {\n\t$2\n} catch (${1:Error} e) {\n\t$0\n}", "name": "try/catch", "scope": "vala", "tabTrigger": "try" }, { "content": "\"\"\"$0\"\"\";", "name": "Verbatim string (\"\"\")", "scope": "vala", "tabTrigger": "verbatim" }, { "content": "while ($1) {\n\t$0\n}", "name": "while", "scope": "vala", "tabTrigger": "while" } ]; exports.scope = ""; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/praat.js0000644000076400007640000000025612554155240024207 0ustar pravipravidefine("ace/snippets/praat",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "praat"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/dockerfile.js0000644000076400007640000000027012554155240025203 0ustar pravipravidefine("ace/snippets/dockerfile",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "dockerfile"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/elixir.js0000644000076400007640000000025212554155240024370 0ustar pravipravidefine("ace/snippets/elixir",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = ""; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/django.js0000644000076400007640000001024212554155240024336 0ustar pravipravidefine("ace/snippets/django",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Model Fields\n\ \n\ # Note: Optional arguments are using defaults that match what Django will use\n\ # as a default, e.g. with max_length fields. Doing this as a form of self\n\ # documentation and to make it easy to know whether you should override the\n\ # default or not.\n\ \n\ # Note: Optional arguments that are booleans will use the opposite since you\n\ # can either not specify them, or override them, e.g. auto_now_add=False.\n\ \n\ snippet auto\n\ ${1:FIELDNAME} = models.AutoField(${2})\n\ snippet bool\n\ ${1:FIELDNAME} = models.BooleanField(${2:default=True})\n\ snippet char\n\ ${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True})\n\ snippet comma\n\ ${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True})\n\ snippet date\n\ ${1:FIELDNAME} = models.DateField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\ snippet datetime\n\ ${1:FIELDNAME} = models.DateTimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\ snippet decimal\n\ ${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3})\n\ snippet email\n\ ${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True})\n\ snippet file\n\ ${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100})\n\ snippet filepath\n\ ${1:FIELDNAME} = models.FilePathField(path=${2:\"/abs/path/to/dir\"}${3:, max_length=100}${4:, match=\"*.ext\"}${5:, recursive=True}${6:, blank=True, })\n\ snippet float\n\ ${1:FIELDNAME} = models.FloatField(${2})\n\ snippet image\n\ ${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})\n\ snippet int\n\ ${1:FIELDNAME} = models.IntegerField(${2})\n\ snippet ip\n\ ${1:FIELDNAME} = models.IPAddressField(${2})\n\ snippet nullbool\n\ ${1:FIELDNAME} = models.NullBooleanField(${2})\n\ snippet posint\n\ ${1:FIELDNAME} = models.PositiveIntegerField(${2})\n\ snippet possmallint\n\ ${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})\n\ snippet slug\n\ ${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})\n\ snippet smallint\n\ ${1:FIELDNAME} = models.SmallIntegerField(${2})\n\ snippet text\n\ ${1:FIELDNAME} = models.TextField(${2:blank=True})\n\ snippet time\n\ ${1:FIELDNAME} = models.TimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\ snippet url\n\ ${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True})\n\ snippet xml\n\ ${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True})\n\ # Relational Fields\n\ snippet fk\n\ ${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, to_field=''})\n\ snippet m2m\n\ ${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, symmetrical=False}${6:, through=''}${7:, db_table=''})\n\ snippet o2o\n\ ${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''})\n\ \n\ # Code Skeletons\n\ \n\ snippet form\n\ class ${1:FormName}(forms.Form):\n\ \"\"\"${2:docstring}\"\"\"\n\ ${3}\n\ \n\ snippet model\n\ class ${1:ModelName}(models.Model):\n\ \"\"\"${2:docstring}\"\"\"\n\ ${3}\n\ \n\ class Meta:\n\ ${4}\n\ \n\ def __unicode__(self):\n\ ${5}\n\ \n\ def save(self, force_insert=False, force_update=False):\n\ ${6}\n\ \n\ @models.permalink\n\ def get_absolute_url(self):\n\ return ('${7:view_or_url_name}' ${8})\n\ \n\ snippet modeladmin\n\ class ${1:ModelName}Admin(admin.ModelAdmin):\n\ ${2}\n\ \n\ admin.site.register($1, $1Admin)\n\ \n\ snippet tabularinline\n\ class ${1:ModelName}Inline(admin.TabularInline):\n\ model = $1\n\ \n\ snippet stackedinline\n\ class ${1:ModelName}Inline(admin.StackedInline):\n\ model = $1\n\ \n\ snippet r2r\n\ return render_to_response('${1:template.html}', {\n\ ${2}\n\ }${3:, context_instance=RequestContext(request)}\n\ )\n\ "; exports.scope = "django"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/c9search.js0000644000076400007640000000026412554155240024600 0ustar pravipravidefine("ace/snippets/c9search",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "c9search"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/html.js0000644000076400007640000005025712554155240024052 0ustar pravipravidefine("ace/snippets/html",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Some useful Unicode entities\n\ # Non-Breaking Space\n\ snippet nbs\n\  \n\ # ←\n\ snippet left\n\ ←\n\ # →\n\ snippet right\n\ →\n\ # ↑\n\ snippet up\n\ ↑\n\ # ↓\n\ snippet down\n\ ↓\n\ # ↩\n\ snippet return\n\ ↩\n\ # ⇤\n\ snippet backtab\n\ ⇤\n\ # ⇥\n\ snippet tab\n\ ⇥\n\ # ⇧\n\ snippet shift\n\ ⇧\n\ # ⌃\n\ snippet ctrl\n\ ⌃\n\ # ⌅\n\ snippet enter\n\ ⌅\n\ # ⌘\n\ snippet cmd\n\ ⌘\n\ # ⌥\n\ snippet option\n\ ⌥\n\ # ⌦\n\ snippet delete\n\ ⌦\n\ # ⌫\n\ snippet backspace\n\ ⌫\n\ # ⎋\n\ snippet esc\n\ ⎋\n\ # Generic Doctype\n\ snippet doctype HTML 4.01 Strict\n\ \n\ snippet doctype HTML 4.01 Transitional\n\ \n\ snippet doctype HTML 5\n\ \n\ snippet doctype XHTML 1.0 Frameset\n\ \n\ snippet doctype XHTML 1.0 Strict\n\ \n\ snippet doctype XHTML 1.0 Transitional\n\ \n\ snippet doctype XHTML 1.1\n\ \n\ # HTML Doctype 4.01 Strict\n\ snippet docts\n\ \n\ # HTML Doctype 4.01 Transitional\n\ snippet doct\n\ \n\ # HTML Doctype 5\n\ snippet doct5\n\ \n\ # XHTML Doctype 1.0 Frameset\n\ snippet docxf\n\ \n\ # XHTML Doctype 1.0 Strict\n\ snippet docxs\n\ \n\ # XHTML Doctype 1.0 Transitional\n\ snippet docxt\n\ \n\ # XHTML Doctype 1.1\n\ snippet docx\n\ \n\ # Attributes\n\ snippet attr\n\ ${1:attribute}=\"${2:property}\"\n\ snippet attr+\n\ ${1:attribute}=\"${2:property}\" attr+${3}\n\ snippet .\n\ class=\"${1}\"${2}\n\ snippet #\n\ id=\"${1}\"${2}\n\ snippet alt\n\ alt=\"${1}\"${2}\n\ snippet charset\n\ charset=\"${1:utf-8}\"${2}\n\ snippet data\n\ data-${1}=\"${2:$1}\"${3}\n\ snippet for\n\ for=\"${1}\"${2}\n\ snippet height\n\ height=\"${1}\"${2}\n\ snippet href\n\ href=\"${1:#}\"${2}\n\ snippet lang\n\ lang=\"${1:en}\"${2}\n\ snippet media\n\ media=\"${1}\"${2}\n\ snippet name\n\ name=\"${1}\"${2}\n\ snippet rel\n\ rel=\"${1}\"${2}\n\ snippet scope\n\ scope=\"${1:row}\"${2}\n\ snippet src\n\ src=\"${1}\"${2}\n\ snippet title=\n\ title=\"${1}\"${2}\n\ snippet type\n\ type=\"${1}\"${2}\n\ snippet value\n\ value=\"${1}\"${2}\n\ snippet width\n\ width=\"${1}\"${2}\n\ # Elements\n\ snippet a\n\ ${2:$1}\n\ snippet a.\n\ ${3:$1}\n\ snippet a#\n\ ${3:$1}\n\ snippet a:ext\n\ ${2:$1}\n\ snippet a:mail\n\ ${3:email me}\n\ snippet abbr\n\ ${2}\n\ snippet address\n\
\n\ ${1}\n\
\n\ snippet area\n\ \"${4}\"\n\ snippet area+\n\ \"${4}\"\n\ area+${5}\n\ snippet area:c\n\ \"${3}\"\n\ snippet area:d\n\ \"${3}\"\n\ snippet area:p\n\ \"${3}\"\n\ snippet area:r\n\ \"${3}\"\n\ snippet article\n\
\n\ ${1}\n\
\n\ snippet article.\n\
\n\ ${2}\n\
\n\ snippet article#\n\
\n\ ${2}\n\
\n\ snippet aside\n\ \n\ snippet aside.\n\ \n\ snippet aside#\n\ \n\ snippet audio\n\ \n\ snippet b\n\ ${1}\n\ snippet base\n\ \n\ snippet bdi\n\ ${1}\n\ snippet bdo\n\ ${2}\n\ snippet bdo:l\n\ ${1}\n\ snippet bdo:r\n\ ${1}\n\ snippet blockquote\n\
\n\ ${1}\n\
\n\ snippet body\n\ \n\ ${1}\n\ \n\ snippet br\n\
${1}\n\ snippet button\n\ \n\ snippet button.\n\ \n\ snippet button#\n\ \n\ snippet button:s\n\ \n\ snippet button:r\n\ \n\ snippet canvas\n\ \n\ ${1}\n\ \n\ snippet caption\n\ ${1}\n\ snippet cite\n\ ${1}\n\ snippet code\n\ ${1}\n\ snippet col\n\ ${1}\n\ snippet col+\n\ \n\ col+${1}\n\ snippet colgroup\n\ \n\ ${1}\n\ \n\ snippet colgroup+\n\ \n\ \n\ col+${1}\n\ \n\ snippet command\n\ \n\ snippet command:c\n\ \n\ snippet command:r\n\ \n\ snippet datagrid\n\ \n\ ${1}\n\ \n\ snippet datalist\n\ \n\ ${1}\n\ \n\ snippet datatemplate\n\ \n\ ${1}\n\ \n\ snippet dd\n\
${1}
\n\ snippet dd.\n\
${2}
\n\ snippet dd#\n\
${2}
\n\ snippet del\n\ ${1}\n\ snippet details\n\
${1}
\n\ snippet dfn\n\ ${1}\n\ snippet dialog\n\ \n\ ${1}\n\ \n\ snippet div\n\
\n\ ${1}\n\
\n\ snippet div.\n\
\n\ ${2}\n\
\n\ snippet div#\n\
\n\ ${2}\n\
\n\ snippet dl\n\
\n\ ${1}\n\
\n\ snippet dl.\n\
\n\ ${2}\n\
\n\ snippet dl#\n\
\n\ ${2}\n\
\n\ snippet dl+\n\
\n\
${1}
\n\
${2}
\n\ dt+${3}\n\
\n\ snippet dt\n\
${1}
\n\ snippet dt.\n\
${2}
\n\ snippet dt#\n\
${2}
\n\ snippet dt+\n\
${1}
\n\
${2}
\n\ dt+${3}\n\ snippet em\n\ ${1}\n\ snippet embed\n\ \n\ snippet fieldset\n\
\n\ ${1}\n\
\n\ snippet fieldset.\n\
\n\ ${2}\n\
\n\ snippet fieldset#\n\
\n\ ${2}\n\
\n\ snippet fieldset+\n\
\n\ ${1}\n\ ${2}\n\
\n\ fieldset+${3}\n\ snippet figcaption\n\
${1}
\n\ snippet figure\n\
${1}
\n\ snippet footer\n\
\n\ ${1}\n\
\n\ snippet footer.\n\
\n\ ${2}\n\
\n\ snippet footer#\n\
\n\ ${2}\n\
\n\ snippet form\n\
\n\ ${3}\n\
\n\ snippet form.\n\
\n\ ${4}\n\
\n\ snippet form#\n\
\n\ ${4}\n\
\n\ snippet h1\n\

${1}

\n\ snippet h1.\n\

${2}

\n\ snippet h1#\n\

${2}

\n\ snippet h2\n\

${1}

\n\ snippet h2.\n\

${2}

\n\ snippet h2#\n\

${2}

\n\ snippet h3\n\

${1}

\n\ snippet h3.\n\

${2}

\n\ snippet h3#\n\

${2}

\n\ snippet h4\n\

${1}

\n\ snippet h4.\n\

${2}

\n\ snippet h4#\n\

${2}

\n\ snippet h5\n\
${1}
\n\ snippet h5.\n\
${2}
\n\ snippet h5#\n\
${2}
\n\ snippet h6\n\
${1}
\n\ snippet h6.\n\
${2}
\n\ snippet h6#\n\
${2}
\n\ snippet head\n\ \n\ \n\ \n\ ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ ${2}\n\ \n\ snippet header\n\
\n\ ${1}\n\
\n\ snippet header.\n\
\n\ ${2}\n\
\n\ snippet header#\n\
\n\ ${2}\n\
\n\ snippet hgroup\n\
\n\ ${1}\n\
\n\ snippet hgroup.\n\
\n\ ${2}\n\
\n\ snippet hr\n\
${1}\n\ snippet html\n\ \n\ ${1}\n\ \n\ snippet xhtml\n\ \n\ ${1}\n\ \n\ snippet html5\n\ \n\ \n\ \n\ \n\ ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ ${2:meta}\n\ \n\ \n\ ${3:body}\n\ \n\ \n\ snippet i\n\ ${1}\n\ snippet iframe\n\ ${2}\n\ snippet iframe.\n\ ${3}\n\ snippet iframe#\n\ ${3}\n\ snippet img\n\ \"${2}\"${3}\n\ snippet img.\n\ \"${3}\"${4}\n\ snippet img#\n\ \"${3}\"${4}\n\ snippet input\n\ ${5}\n\ snippet input.\n\ ${6}\n\ snippet input:text\n\ ${4}\n\ snippet input:submit\n\ ${4}\n\ snippet input:hidden\n\ ${4}\n\ snippet input:button\n\ ${4}\n\ snippet input:image\n\ ${5}\n\ snippet input:checkbox\n\ ${3}\n\ snippet input:radio\n\ ${3}\n\ snippet input:color\n\ ${4}\n\ snippet input:date\n\ ${4}\n\ snippet input:datetime\n\ ${4}\n\ snippet input:datetime-local\n\ ${4}\n\ snippet input:email\n\ ${4}\n\ snippet input:file\n\ ${4}\n\ snippet input:month\n\ ${4}\n\ snippet input:number\n\ ${4}\n\ snippet input:password\n\ ${4}\n\ snippet input:range\n\ ${4}\n\ snippet input:reset\n\ ${4}\n\ snippet input:search\n\ ${4}\n\ snippet input:time\n\ ${4}\n\ snippet input:url\n\ ${4}\n\ snippet input:week\n\ ${4}\n\ snippet ins\n\ ${1}\n\ snippet kbd\n\ ${1}\n\ snippet keygen\n\ ${1}\n\ snippet label\n\ \n\ snippet label:i\n\ \n\ ${7}\n\ snippet label:s\n\ \n\ \n\ snippet legend\n\ ${1}\n\ snippet legend+\n\ ${1}\n\ snippet li\n\
  • ${1}
  • \n\ snippet li.\n\
  • ${2}
  • \n\ snippet li+\n\
  • ${1}
  • \n\ li+${2}\n\ snippet lia\n\
  • ${1}
  • \n\ snippet lia+\n\
  • ${1}
  • \n\ lia+${3}\n\ snippet link\n\ ${5}\n\ snippet link:atom\n\ ${2}\n\ snippet link:css\n\ ${4}\n\ snippet link:favicon\n\ ${2}\n\ snippet link:rss\n\ ${2}\n\ snippet link:touch\n\ ${2}\n\ snippet map\n\ \n\ ${2}\n\ \n\ snippet map.\n\ \n\ ${3}\n\ \n\ snippet map#\n\ \n\ ${3}\n\ \n\ snippet map+\n\ \n\ \"${5}\"${6}\n\ ${7}\n\ snippet mark\n\ ${1}\n\ snippet menu\n\ \n\ ${1}\n\ \n\ snippet menu:c\n\ \n\ ${1}\n\ \n\ snippet menu:t\n\ \n\ ${1}\n\ \n\ snippet meta\n\ ${3}\n\ snippet meta:compat\n\ ${3}\n\ snippet meta:refresh\n\ ${3}\n\ snippet meta:utf\n\ ${3}\n\ snippet meter\n\ ${1}\n\ snippet nav\n\ \n\ snippet nav.\n\ \n\ snippet nav#\n\ \n\ snippet noscript\n\ \n\ snippet object\n\ \n\ ${3}\n\ ${4}\n\ # Embed QT Movie\n\ snippet movie\n\ \n\ \n\ \n\ \n\ \n\ ${6}\n\ snippet ol\n\
      \n\ ${1}\n\
    \n\ snippet ol.\n\
      \n\ ${2}\n\
    \n\ snippet ol#\n\
      \n\ ${2}\n\
    \n\ snippet ol+\n\
      \n\
    1. ${1}
    2. \n\ li+${2}\n\
    \n\ snippet opt\n\ \n\ snippet opt+\n\ \n\ opt+${3}\n\ snippet optt\n\ \n\ snippet optgroup\n\ \n\ \n\ opt+${3}\n\ \n\ snippet output\n\ ${1}\n\ snippet p\n\

    ${1}

    \n\ snippet param\n\ ${3}\n\ snippet pre\n\
    \n\
    		${1}\n\
    	
    \n\ snippet progress\n\ ${1}\n\ snippet q\n\ ${1}\n\ snippet rp\n\ ${1}\n\ snippet rt\n\ ${1}\n\ snippet ruby\n\ \n\ ${1}\n\ \n\ snippet s\n\ ${1}\n\ snippet samp\n\ \n\ ${1}\n\ \n\ snippet script\n\ \n\ snippet scriptsrc\n\ \n\ snippet section\n\
    \n\ ${1}\n\
    \n\ snippet section.\n\
    \n\ ${2}\n\
    \n\ snippet section#\n\
    \n\ ${2}\n\
    \n\ snippet select\n\ \n\ snippet select.\n\ \n\ snippet select+\n\ \n\ snippet small\n\ ${1}\n\ snippet source\n\ \n\ snippet span\n\ ${1}\n\ snippet strong\n\ ${1}\n\ snippet style\n\ \n\ snippet sub\n\ ${1}\n\ snippet summary\n\ \n\ ${1}\n\ \n\ snippet sup\n\ ${1}\n\ snippet table\n\ \n\ ${2}\n\
    \n\ snippet table.\n\ \n\ ${3}\n\
    \n\ snippet table#\n\ \n\ ${3}\n\
    \n\ snippet tbody\n\ \n\ ${1}\n\ \n\ snippet td\n\ ${1}\n\ snippet td.\n\ ${2}\n\ snippet td#\n\ ${2}\n\ snippet td+\n\ ${1}\n\ td+${2}\n\ snippet textarea\n\ ${6}\n\ snippet tfoot\n\ \n\ ${1}\n\ \n\ snippet th\n\ ${1}\n\ snippet th.\n\ ${2}\n\ snippet th#\n\ ${2}\n\ snippet th+\n\ ${1}\n\ th+${2}\n\ snippet thead\n\ \n\ ${1}\n\ \n\ snippet time\n\ \n\ snippet title\n\ ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ snippet tr\n\ \n\ ${1}\n\ \n\ snippet tr+\n\ \n\ ${1}\n\ td+${2}\n\ \n\ snippet track\n\ ${5}${6}\n\ snippet ul\n\
      \n\ ${1}\n\
    \n\ snippet ul.\n\
      \n\ ${2}\n\
    \n\ snippet ul#\n\
      \n\ ${2}\n\
    \n\ snippet ul+\n\
      \n\
    • ${1}
    • \n\ li+${2}\n\
    \n\ snippet var\n\ ${1}\n\ snippet video\n\ ${8}\n\ snippet wbr\n\ ${1}\n\ "; exports.scope = "html"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/coffee.js0000644000076400007640000000464112554155240024331 0ustar pravipravidefine("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Closure loop\n\ snippet forindo\n\ for ${1:name} in ${2:array}\n\ do ($1) ->\n\ ${3:// body}\n\ # Array comprehension\n\ snippet fora\n\ for ${1:name} in ${2:array}\n\ ${3:// body...}\n\ # Object comprehension\n\ snippet foro\n\ for ${1:key}, ${2:value} of ${3:object}\n\ ${4:// body...}\n\ # Range comprehension (inclusive)\n\ snippet forr\n\ for ${1:name} in [${2:start}..${3:finish}]\n\ ${4:// body...}\n\ snippet forrb\n\ for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n\ ${5:// body...}\n\ # Range comprehension (exclusive)\n\ snippet forrex\n\ for ${1:name} in [${2:start}...${3:finish}]\n\ ${4:// body...}\n\ snippet forrexb\n\ for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n\ ${5:// body...}\n\ # Function\n\ snippet fun\n\ (${1:args}) ->\n\ ${2:// body...}\n\ # Function (bound)\n\ snippet bfun\n\ (${1:args}) =>\n\ ${2:// body...}\n\ # Class\n\ snippet cla class ..\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ ${2}\n\ snippet cla class .. constructor: ..\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ constructor: (${2:args}) ->\n\ ${3}\n\ \n\ ${4}\n\ snippet cla class .. extends ..\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\ ${3}\n\ snippet cla class .. extends .. constructor: ..\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\ constructor: (${3:args}) ->\n\ ${4}\n\ \n\ ${5}\n\ # If\n\ snippet if\n\ if ${1:condition}\n\ ${2:// body...}\n\ # If __ Else\n\ snippet ife\n\ if ${1:condition}\n\ ${2:// body...}\n\ else\n\ ${3:// body...}\n\ # Else if\n\ snippet elif\n\ else if ${1:condition}\n\ ${2:// body...}\n\ # Ternary If\n\ snippet ifte\n\ if ${1:condition} then ${2:value} else ${3:other}\n\ # Unless\n\ snippet unl\n\ ${1:action} unless ${2:condition}\n\ # Switch\n\ snippet swi\n\ switch ${1:object}\n\ when ${2:value}\n\ ${3:// body...}\n\ \n\ # Log\n\ snippet log\n\ console.log ${1}\n\ # Try __ Catch\n\ snippet try\n\ try\n\ ${1}\n\ catch ${2:error}\n\ ${3}\n\ # Require\n\ snippet req\n\ ${2:$1} = require '${1:sys}'${3}\n\ # Export\n\ snippet exp\n\ ${1:root} = exports ? this\n\ "; exports.scope = "coffee"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/scad.js0000644000076400007640000000025412554155240024010 0ustar pravipravidefine("ace/snippets/scad",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "scad"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/eiffel.js0000644000076400007640000000026012554155240024325 0ustar pravipravidefine("ace/snippets/eiffel",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "eiffel"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/abap.js0000644000076400007640000000025412554155240024001 0ustar pravipravidefine("ace/snippets/abap",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "abap"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/lua.js0000644000076400007640000000112012554155240023650 0ustar pravipravidefine("ace/snippets/lua",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet #!\n\ #!/usr/bin/env lua\n\ $1\n\ snippet local\n\ local ${1:x} = ${2:1}\n\ snippet fun\n\ function ${1:fname}(${2:...})\n\ ${3:-- body}\n\ end\n\ snippet for\n\ for ${1:i}=${2:1},${3:10} do\n\ ${4:print(i)}\n\ end\n\ snippet forp\n\ for ${1:i},${2:v} in pairs(${3:table_name}) do\n\ ${4:-- body}\n\ end\n\ snippet fori\n\ for ${1:i},${2:v} in ipairs(${3:table_name}) do\n\ ${4:-- body}\n\ end\n\ "; exports.scope = "lua"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/golang.js0000644000076400007640000000026012554155240024342 0ustar pravipravidefine("ace/snippets/golang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "golang"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/properties.js0000644000076400007640000000027012554155240025270 0ustar pravipravidefine("ace/snippets/properties",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "properties"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/ruby.js0000644000076400007640000005534212554155240024067 0ustar pravipravidefine("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "########################################\n\ # Ruby snippets - for Rails, see below #\n\ ########################################\n\ \n\ # encoding for Ruby 1.9\n\ snippet enc\n\ # encoding: utf-8\n\ \n\ # #!/usr/bin/env ruby\n\ snippet #!\n\ #!/usr/bin/env ruby\n\ # encoding: utf-8\n\ \n\ # New Block\n\ snippet =b\n\ =begin rdoc\n\ ${1}\n\ =end\n\ snippet y\n\ :yields: ${1:arguments}\n\ snippet rb\n\ #!/usr/bin/env ruby -wKU\n\ snippet beg\n\ begin\n\ ${3}\n\ rescue ${1:Exception} => ${2:e}\n\ end\n\ \n\ snippet req require\n\ require \"${1}\"${2}\n\ snippet #\n\ # =>\n\ snippet end\n\ __END__\n\ snippet case\n\ case ${1:object}\n\ when ${2:condition}\n\ ${3}\n\ end\n\ snippet when\n\ when ${1:condition}\n\ ${2}\n\ snippet def\n\ def ${1:method_name}\n\ ${2}\n\ end\n\ snippet deft\n\ def test_${1:case_name}\n\ ${2}\n\ end\n\ snippet if\n\ if ${1:condition}\n\ ${2}\n\ end\n\ snippet ife\n\ if ${1:condition}\n\ ${2}\n\ else\n\ ${3}\n\ end\n\ snippet elsif\n\ elsif ${1:condition}\n\ ${2}\n\ snippet unless\n\ unless ${1:condition}\n\ ${2}\n\ end\n\ snippet while\n\ while ${1:condition}\n\ ${2}\n\ end\n\ snippet for\n\ for ${1:e} in ${2:c}\n\ ${3}\n\ end\n\ snippet until\n\ until ${1:condition}\n\ ${2}\n\ end\n\ snippet cla class .. end\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ ${2}\n\ end\n\ snippet cla class .. initialize .. end\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ def initialize(${2:args})\n\ ${3}\n\ end\n\ end\n\ snippet cla class .. < ParentClass .. initialize .. end\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < ${2:ParentClass}\n\ def initialize(${3:args})\n\ ${4}\n\ end\n\ end\n\ snippet cla ClassName = Struct .. do .. end\n\ ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} = Struct.new(:${2:attr_names}) do\n\ def ${3:method_name}\n\ ${4}\n\ end\n\ end\n\ snippet cla class BlankSlate .. initialize .. end\n\ class ${1:BlankSlate}\n\ instance_methods.each { |meth| undef_method(meth) unless meth =~ /\\A__/ }\n\ end\n\ snippet cla class << self .. end\n\ class << ${1:self}\n\ ${2}\n\ end\n\ # class .. < DelegateClass .. initialize .. end\n\ snippet cla-\n\ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < DelegateClass(${2:ParentClass})\n\ def initialize(${3:args})\n\ super(${4:del_obj})\n\ \n\ ${5}\n\ end\n\ end\n\ snippet mod module .. end\n\ module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ ${2}\n\ end\n\ snippet mod module .. module_function .. end\n\ module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ module_function\n\ \n\ ${2}\n\ end\n\ snippet mod module .. ClassMethods .. end\n\ module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ module ClassMethods\n\ ${2}\n\ end\n\ \n\ module InstanceMethods\n\ \n\ end\n\ \n\ def self.included(receiver)\n\ receiver.extend ClassMethods\n\ receiver.send :include, InstanceMethods\n\ end\n\ end\n\ # attr_reader\n\ snippet r\n\ attr_reader :${1:attr_names}\n\ # attr_writer\n\ snippet w\n\ attr_writer :${1:attr_names}\n\ # attr_accessor\n\ snippet rw\n\ attr_accessor :${1:attr_names}\n\ snippet atp\n\ attr_protected :${1:attr_names}\n\ snippet ata\n\ attr_accessible :${1:attr_names}\n\ # include Enumerable\n\ snippet Enum\n\ include Enumerable\n\ \n\ def each(&block)\n\ ${1}\n\ end\n\ # include Comparable\n\ snippet Comp\n\ include Comparable\n\ \n\ def <=>(other)\n\ ${1}\n\ end\n\ # extend Forwardable\n\ snippet Forw-\n\ extend Forwardable\n\ # def self\n\ snippet defs\n\ def self.${1:class_method_name}\n\ ${2}\n\ end\n\ # def method_missing\n\ snippet defmm\n\ def method_missing(meth, *args, &blk)\n\ ${1}\n\ end\n\ snippet defd\n\ def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}\n\ snippet defds\n\ def_delegators :${1:@del_obj}, :${2:del_methods}\n\ snippet am\n\ alias_method :${1:new_name}, :${2:old_name}\n\ snippet app\n\ if __FILE__ == $PROGRAM_NAME\n\ ${1}\n\ end\n\ # usage_if()\n\ snippet usai\n\ if ARGV.${1}\n\ abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\ end\n\ # usage_unless()\n\ snippet usau\n\ unless ARGV.${1}\n\ abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\ end\n\ snippet array\n\ Array.new(${1:10}) { |${2:i}| ${3} }\n\ snippet hash\n\ Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} }\n\ snippet file File.foreach() { |line| .. }\n\ File.foreach(${1:\"path/to/file\"}) { |${2:line}| ${3} }\n\ snippet file File.read()\n\ File.read(${1:\"path/to/file\"})${2}\n\ snippet Dir Dir.global() { |file| .. }\n\ Dir.glob(${1:\"dir/glob/*\"}) { |${2:file}| ${3} }\n\ snippet Dir Dir[\"..\"]\n\ Dir[${1:\"glob/**/*.rb\"}]${2}\n\ snippet dir\n\ Filename.dirname(__FILE__)\n\ snippet deli\n\ delete_if { |${1:e}| ${2} }\n\ snippet fil\n\ fill(${1:range}) { |${2:i}| ${3} }\n\ # flatten_once()\n\ snippet flao\n\ inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3}\n\ snippet zip\n\ zip(${1:enums}) { |${2:row}| ${3} }\n\ # downto(0) { |n| .. }\n\ snippet dow\n\ downto(${1:0}) { |${2:n}| ${3} }\n\ snippet ste\n\ step(${1:2}) { |${2:n}| ${3} }\n\ snippet tim\n\ times { |${1:n}| ${2} }\n\ snippet upt\n\ upto(${1:1.0/0.0}) { |${2:n}| ${3} }\n\ snippet loo\n\ loop { ${1} }\n\ snippet ea\n\ each { |${1:e}| ${2} }\n\ snippet ead\n\ each do |${1:e}|\n\ ${2}\n\ end\n\ snippet eab\n\ each_byte { |${1:byte}| ${2} }\n\ snippet eac- each_char { |chr| .. }\n\ each_char { |${1:chr}| ${2} }\n\ snippet eac- each_cons(..) { |group| .. }\n\ each_cons(${1:2}) { |${2:group}| ${3} }\n\ snippet eai\n\ each_index { |${1:i}| ${2} }\n\ snippet eaid\n\ each_index do |${1:i}|\n\ ${2}\n\ end\n\ snippet eak\n\ each_key { |${1:key}| ${2} }\n\ snippet eakd\n\ each_key do |${1:key}|\n\ ${2}\n\ end\n\ snippet eal\n\ each_line { |${1:line}| ${2} }\n\ snippet eald\n\ each_line do |${1:line}|\n\ ${2}\n\ end\n\ snippet eap\n\ each_pair { |${1:name}, ${2:val}| ${3} }\n\ snippet eapd\n\ each_pair do |${1:name}, ${2:val}|\n\ ${3}\n\ end\n\ snippet eas-\n\ each_slice(${1:2}) { |${2:group}| ${3} }\n\ snippet easd-\n\ each_slice(${1:2}) do |${2:group}|\n\ ${3}\n\ end\n\ snippet eav\n\ each_value { |${1:val}| ${2} }\n\ snippet eavd\n\ each_value do |${1:val}|\n\ ${2}\n\ end\n\ snippet eawi\n\ each_with_index { |${1:e}, ${2:i}| ${3} }\n\ snippet eawid\n\ each_with_index do |${1:e},${2:i}|\n\ ${3}\n\ end\n\ snippet reve\n\ reverse_each { |${1:e}| ${2} }\n\ snippet reved\n\ reverse_each do |${1:e}|\n\ ${2}\n\ end\n\ snippet inj\n\ inject(${1:init}) { |${2:mem}, ${3:var}| ${4} }\n\ snippet injd\n\ inject(${1:init}) do |${2:mem}, ${3:var}|\n\ ${4}\n\ end\n\ snippet map\n\ map { |${1:e}| ${2} }\n\ snippet mapd\n\ map do |${1:e}|\n\ ${2}\n\ end\n\ snippet mapwi-\n\ enum_with_index.map { |${1:e}, ${2:i}| ${3} }\n\ snippet sor\n\ sort { |a, b| ${1} }\n\ snippet sorb\n\ sort_by { |${1:e}| ${2} }\n\ snippet ran\n\ sort_by { rand }\n\ snippet all\n\ all? { |${1:e}| ${2} }\n\ snippet any\n\ any? { |${1:e}| ${2} }\n\ snippet cl\n\ classify { |${1:e}| ${2} }\n\ snippet col\n\ collect { |${1:e}| ${2} }\n\ snippet cold\n\ collect do |${1:e}|\n\ ${2}\n\ end\n\ snippet det\n\ detect { |${1:e}| ${2} }\n\ snippet detd\n\ detect do |${1:e}|\n\ ${2}\n\ end\n\ snippet fet\n\ fetch(${1:name}) { |${2:key}| ${3} }\n\ snippet fin\n\ find { |${1:e}| ${2} }\n\ snippet find\n\ find do |${1:e}|\n\ ${2}\n\ end\n\ snippet fina\n\ find_all { |${1:e}| ${2} }\n\ snippet finad\n\ find_all do |${1:e}|\n\ ${2}\n\ end\n\ snippet gre\n\ grep(${1:/pattern/}) { |${2:match}| ${3} }\n\ snippet sub\n\ ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} }\n\ snippet sca\n\ scan(${1:/pattern/}) { |${2:match}| ${3} }\n\ snippet scad\n\ scan(${1:/pattern/}) do |${2:match}|\n\ ${3}\n\ end\n\ snippet max\n\ max { |a, b| ${1} }\n\ snippet min\n\ min { |a, b| ${1} }\n\ snippet par\n\ partition { |${1:e}| ${2} }\n\ snippet pard\n\ partition do |${1:e}|\n\ ${2}\n\ end\n\ snippet rej\n\ reject { |${1:e}| ${2} }\n\ snippet rejd\n\ reject do |${1:e}|\n\ ${2}\n\ end\n\ snippet sel\n\ select { |${1:e}| ${2} }\n\ snippet seld\n\ select do |${1:e}|\n\ ${2}\n\ end\n\ snippet lam\n\ lambda { |${1:args}| ${2} }\n\ snippet doo\n\ do\n\ ${1}\n\ end\n\ snippet dov\n\ do |${1:variable}|\n\ ${2}\n\ end\n\ snippet :\n\ :${1:key} => ${2:\"value\"}${3}\n\ snippet ope\n\ open(${1:\"path/or/url/or/pipe\"}, \"${2:w}\") { |${3:io}| ${4} }\n\ # path_from_here()\n\ snippet fpath\n\ File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2}\n\ # unix_filter {}\n\ snippet unif\n\ ARGF.each_line${1} do |${2:line}|\n\ ${3}\n\ end\n\ # option_parse {}\n\ snippet optp\n\ require \"optparse\"\n\ \n\ options = {${1:default => \"args\"}}\n\ \n\ ARGV.options do |opts|\n\ opts.banner = \"Usage: #{File.basename($PROGRAM_NAME)}\n\ snippet opt\n\ opts.on( \"-${1:o}\", \"--${2:long-option-name}\", ${3:String},\n\ \"${4:Option description.}\") do |${5:opt}|\n\ ${6}\n\ end\n\ snippet tc\n\ require \"test/unit\"\n\ \n\ require \"${1:library_file_name}\"\n\ \n\ class Test${2:$1} < Test::Unit::TestCase\n\ def test_${3:case_name}\n\ ${4}\n\ end\n\ end\n\ snippet ts\n\ require \"test/unit\"\n\ \n\ require \"tc_${1:test_case_file}\"\n\ require \"tc_${2:test_case_file}\"${3}\n\ snippet as\n\ assert ${1:test}, \"${2:Failure message.}\"${3}\n\ snippet ase\n\ assert_equal ${1:expected}, ${2:actual}${3}\n\ snippet asne\n\ assert_not_equal ${1:unexpected}, ${2:actual}${3}\n\ snippet asid\n\ assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2 ** -20}${4}\n\ snippet asio\n\ assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}${3}\n\ snippet asko\n\ assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}${3}\n\ snippet asn\n\ assert_nil ${1:instance}${2}\n\ snippet asnn\n\ assert_not_nil ${1:instance}${2}\n\ snippet asm\n\ assert_match /${1:expected_pattern}/, ${2:actual_string}${3}\n\ snippet asnm\n\ assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}${3}\n\ snippet aso\n\ assert_operator ${1:left}, :${2:operator}, ${3:right}${4}\n\ snippet asr\n\ assert_raise ${1:Exception} { ${2} }\n\ snippet asrd\n\ assert_raise ${1:Exception} do\n\ ${2}\n\ end\n\ snippet asnr\n\ assert_nothing_raised ${1:Exception} { ${2} }\n\ snippet asnrd\n\ assert_nothing_raised ${1:Exception} do\n\ ${2}\n\ end\n\ snippet asrt\n\ assert_respond_to ${1:object}, :${2:method}${3}\n\ snippet ass assert_same(..)\n\ assert_same ${1:expected}, ${2:actual}${3}\n\ snippet ass assert_send(..)\n\ assert_send [${1:object}, :${2:message}, ${3:args}]${4}\n\ snippet asns\n\ assert_not_same ${1:unexpected}, ${2:actual}${3}\n\ snippet ast\n\ assert_throws :${1:expected} { ${2} }\n\ snippet astd\n\ assert_throws :${1:expected} do\n\ ${2}\n\ end\n\ snippet asnt\n\ assert_nothing_thrown { ${1} }\n\ snippet asntd\n\ assert_nothing_thrown do\n\ ${1}\n\ end\n\ snippet fl\n\ flunk \"${1:Failure message.}\"${2}\n\ # Benchmark.bmbm do .. end\n\ snippet bm-\n\ TESTS = ${1:10_000}\n\ Benchmark.bmbm do |results|\n\ ${2}\n\ end\n\ snippet rep\n\ results.report(\"${1:name}:\") { TESTS.times { ${2} }}\n\ # Marshal.dump(.., file)\n\ snippet Md\n\ File.open(${1:\"path/to/file.dump\"}, \"wb\") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4}\n\ # Mashal.load(obj)\n\ snippet Ml\n\ File.open(${1:\"path/to/file.dump\"}, \"rb\") { |${2:file}| Marshal.load($2) }${3}\n\ # deep_copy(..)\n\ snippet deec\n\ Marshal.load(Marshal.dump(${1:obj_to_copy}))${2}\n\ snippet Pn-\n\ PStore.new(${1:\"file_name.pstore\"})${2}\n\ snippet tra\n\ transaction(${1:true}) { ${2} }\n\ # xmlread(..)\n\ snippet xml-\n\ REXML::Document.new(File.read(${1:\"path/to/file\"}))${2}\n\ # xpath(..) { .. }\n\ snippet xpa\n\ elements.each(${1:\"//Xpath\"}) do |${2:node}|\n\ ${3}\n\ end\n\ # class_from_name()\n\ snippet clafn\n\ split(\"::\").inject(Object) { |par, const| par.const_get(const) }\n\ # singleton_class()\n\ snippet sinc\n\ class << self; self end\n\ snippet nam\n\ namespace :${1:`Filename()`} do\n\ ${2}\n\ end\n\ snippet tas\n\ desc \"${1:Task description}\"\n\ task :${2:task_name => [:dependent, :tasks]} do\n\ ${3}\n\ end\n\ # block\n\ snippet b\n\ { |${1:var}| ${2} }\n\ snippet begin\n\ begin\n\ raise 'A test exception.'\n\ rescue Exception => e\n\ puts e.message\n\ puts e.backtrace.inspect\n\ else\n\ # other exception\n\ ensure\n\ # always executed\n\ end\n\ \n\ #debugging\n\ snippet debug\n\ require 'ruby-debug'; debugger; true;\n\ snippet pry\n\ require 'pry'; binding.pry\n\ \n\ #############################################\n\ # Rails snippets - for pure Ruby, see above #\n\ #############################################\n\ snippet art\n\ assert_redirected_to ${1::action => \"${2:index}\"}\n\ snippet artnp\n\ assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${4:@$2})\n\ snippet artnpp\n\ assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1})\n\ snippet artp\n\ assert_redirected_to ${1:model}_path(${2:@$1})\n\ snippet artpp\n\ assert_redirected_to ${1:model}s_path\n\ snippet asd\n\ assert_difference \"${1:Model}.${2:count}\", $1 do\n\ ${3}\n\ end\n\ snippet asnd\n\ assert_no_difference \"${1:Model}.${2:count}\" do\n\ ${3}\n\ end\n\ snippet asre\n\ assert_response :${1:success}, @response.body${2}\n\ snippet asrj\n\ assert_rjs :${1:replace}, \"${2:dom id}\"\n\ snippet ass assert_select(..)\n\ assert_select '${1:path}', :${2:text} => '${3:inner_html' ${4:do}\n\ snippet bf\n\ before_filter :${1:method}\n\ snippet bt\n\ belongs_to :${1:association}\n\ snippet crw\n\ cattr_accessor :${1:attr_names}\n\ snippet defcreate\n\ def create\n\ @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])\n\ \n\ respond_to do |wants|\n\ if @$1.save\n\ flash[:notice] = '$2 was successfully created.'\n\ wants.html { redirect_to(@$1) }\n\ wants.xml { render :xml => @$1, :status => :created, :location => @$1 }\n\ else\n\ wants.html { render :action => \"new\" }\n\ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\ end\n\ end\n\ end${3}\n\ snippet defdestroy\n\ def destroy\n\ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ @$1.destroy\n\ \n\ respond_to do |wants|\n\ wants.html { redirect_to($1s_url) }\n\ wants.xml { head :ok }\n\ end\n\ end${3}\n\ snippet defedit\n\ def edit\n\ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ end\n\ snippet defindex\n\ def index\n\ @${1:model_class_name} = ${2:ModelClassName}.all\n\ \n\ respond_to do |wants|\n\ wants.html # index.html.erb\n\ wants.xml { render :xml => @$1s }\n\ end\n\ end${3}\n\ snippet defnew\n\ def new\n\ @${1:model_class_name} = ${2:ModelClassName}.new\n\ \n\ respond_to do |wants|\n\ wants.html # new.html.erb\n\ wants.xml { render :xml => @$1 }\n\ end\n\ end${3}\n\ snippet defshow\n\ def show\n\ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ \n\ respond_to do |wants|\n\ wants.html # show.html.erb\n\ wants.xml { render :xml => @$1 }\n\ end\n\ end${3}\n\ snippet defupdate\n\ def update\n\ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ \n\ respond_to do |wants|\n\ if @$1.update_attributes(params[:$1])\n\ flash[:notice] = '$2 was successfully updated.'\n\ wants.html { redirect_to(@$1) }\n\ wants.xml { head :ok }\n\ else\n\ wants.html { render :action => \"edit\" }\n\ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\ end\n\ end\n\ end${3}\n\ snippet flash\n\ flash[:${1:notice}] = \"${2}\"\n\ snippet habtm\n\ has_and_belongs_to_many :${1:object}, :join_table => \"${2:table_name}\", :foreign_key => \"${3}_id\"${4}\n\ snippet hm\n\ has_many :${1:object}\n\ snippet hmd\n\ has_many :${1:other}s, :class_name => \"${2:$1}\", :foreign_key => \"${3:$1}_id\", :dependent => :destroy${4}\n\ snippet hmt\n\ has_many :${1:object}, :through => :${2:object}\n\ snippet ho\n\ has_one :${1:object}\n\ snippet i18\n\ I18n.t('${1:type.key}')${2}\n\ snippet ist\n\ <%= image_submit_tag(\"${1:agree.png}\", :id => \"${2:id}\"${3} %>\n\ snippet log\n\ Rails.logger.${1:debug} ${2}\n\ snippet log2\n\ RAILS_DEFAULT_LOGGER.${1:debug} ${2}\n\ snippet logd\n\ logger.debug { \"${1:message}\" }${2}\n\ snippet loge\n\ logger.error { \"${1:message}\" }${2}\n\ snippet logf\n\ logger.fatal { \"${1:message}\" }${2}\n\ snippet logi\n\ logger.info { \"${1:message}\" }${2}\n\ snippet logw\n\ logger.warn { \"${1:message}\" }${2}\n\ snippet mapc\n\ ${1:map}.${2:connect} '${3:controller/:action/:id}'\n\ snippet mapca\n\ ${1:map}.catch_all \"*${2:anything}\", :controller => \"${3:default}\", :action => \"${4:error}\"${5}\n\ snippet mapr\n\ ${1:map}.resource :${2:resource}\n\ snippet maprs\n\ ${1:map}.resources :${2:resource}\n\ snippet mapwo\n\ ${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|\n\ ${4}\n\ end\n\ snippet mbs\n\ before_save :${1:method}\n\ snippet mcht\n\ change_table :${1:table_name} do |t|\n\ ${2}\n\ end\n\ snippet mp\n\ map(&:${1:id})\n\ snippet mrw\n\ mattr_accessor :${1:attr_names}\n\ snippet oa\n\ order(\"${1:field}\")\n\ snippet od\n\ order(\"${1:field} DESC\")\n\ snippet pa\n\ params[:${1:id}]${2}\n\ snippet ra\n\ render :action => \"${1:action}\"\n\ snippet ral\n\ render :action => \"${1:action}\", :layout => \"${2:layoutname}\"\n\ snippet rest\n\ respond_to do |wants|\n\ wants.${1:html} { ${2} }\n\ end\n\ snippet rf\n\ render :file => \"${1:filepath}\"\n\ snippet rfu\n\ render :file => \"${1:filepath}\", :use_full_path => ${2:false}\n\ snippet ri\n\ render :inline => \"${1:<%= 'hello' %>}\"\n\ snippet ril\n\ render :inline => \"${1:<%= 'hello' %>}\", :locals => { ${2::name} => \"${3:value}\"${4} }\n\ snippet rit\n\ render :inline => \"${1:<%= 'hello' %>}\", :type => ${2::rxml}\n\ snippet rjson\n\ render :json => ${1:text to render}\n\ snippet rl\n\ render :layout => \"${1:layoutname}\"\n\ snippet rn\n\ render :nothing => ${1:true}\n\ snippet rns\n\ render :nothing => ${1:true}, :status => ${2:401}\n\ snippet rp\n\ render :partial => \"${1:item}\"\n\ snippet rpc\n\ render :partial => \"${1:item}\", :collection => ${2:@$1s}\n\ snippet rpl\n\ render :partial => \"${1:item}\", :locals => { :${2:$1} => ${3:@$1}\n\ snippet rpo\n\ render :partial => \"${1:item}\", :object => ${2:@$1}\n\ snippet rps\n\ render :partial => \"${1:item}\", :status => ${2:500}\n\ snippet rt\n\ render :text => \"${1:text to render}\"\n\ snippet rtl\n\ render :text => \"${1:text to render}\", :layout => \"${2:layoutname}\"\n\ snippet rtlt\n\ render :text => \"${1:text to render}\", :layout => ${2:true}\n\ snippet rts\n\ render :text => \"${1:text to render}\", :status => ${2:401}\n\ snippet ru\n\ render :update do |${1:page}|\n\ $1.${2}\n\ end\n\ snippet rxml\n\ render :xml => ${1:text to render}\n\ snippet sc\n\ scope :${1:name}, :where(:@${2:field} => ${3:value})\n\ snippet sl\n\ scope :${1:name}, lambda do |${2:value}|\n\ where(\"${3:field = ?}\", ${4:bind var})\n\ end\n\ snippet sha1\n\ Digest::SHA1.hexdigest(${1:string})\n\ snippet sweeper\n\ class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper\n\ observe $1\n\ \n\ def after_save(${2:model_class_name})\n\ expire_cache($2)\n\ end\n\ \n\ def after_destroy($2)\n\ expire_cache($2)\n\ end\n\ \n\ def expire_cache($2)\n\ expire_page\n\ end\n\ end\n\ snippet tcb\n\ t.boolean :${1:title}\n\ ${2}\n\ snippet tcbi\n\ t.binary :${1:title}, :limit => ${2:2}.megabytes\n\ ${3}\n\ snippet tcd\n\ t.decimal :${1:title}, :precision => ${2:10}, :scale => ${3:2}\n\ ${4}\n\ snippet tcda\n\ t.date :${1:title}\n\ ${2}\n\ snippet tcdt\n\ t.datetime :${1:title}\n\ ${2}\n\ snippet tcf\n\ t.float :${1:title}\n\ ${2}\n\ snippet tch\n\ t.change :${1:name}, :${2:string}, :${3:limit} => ${4:80}\n\ ${5}\n\ snippet tci\n\ t.integer :${1:title}\n\ ${2}\n\ snippet tcl\n\ t.integer :lock_version, :null => false, :default => 0\n\ ${1}\n\ snippet tcr\n\ t.references :${1:taggable}, :polymorphic => { :default => '${2:Photo}' }\n\ ${3}\n\ snippet tcs\n\ t.string :${1:title}\n\ ${2}\n\ snippet tct\n\ t.text :${1:title}\n\ ${2}\n\ snippet tcti\n\ t.time :${1:title}\n\ ${2}\n\ snippet tcts\n\ t.timestamp :${1:title}\n\ ${2}\n\ snippet tctss\n\ t.timestamps\n\ ${1}\n\ snippet va\n\ validates_associated :${1:attribute}\n\ snippet vao\n\ validates_acceptance_of :${1:terms}\n\ snippet vc\n\ validates_confirmation_of :${1:attribute}\n\ snippet ve\n\ validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )}\n\ snippet vf\n\ validates_format_of :${1:attribute}, :with => /${2:regex}/\n\ snippet vi\n\ validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi })\n\ snippet vl\n\ validates_length_of :${1:attribute}, :within => ${2:3}..${3:20}\n\ snippet vn\n\ validates_numericality_of :${1:attribute}\n\ snippet vpo\n\ validates_presence_of :${1:attribute}\n\ snippet vu\n\ validates_uniqueness_of :${1:attribute}\n\ snippet wants\n\ wants.${1:js|xml|html} { ${2} }\n\ snippet wc\n\ where(${1:\"conditions\"}${2:, bind_var})\n\ snippet wh\n\ where(${1:field} => ${2:value})\n\ snippet xdelete\n\ xhr :delete, :${1:destroy}, :id => ${2:1}${3}\n\ snippet xget\n\ xhr :get, :${1:show}, :id => ${2:1}${3}\n\ snippet xpost\n\ xhr :post, :${1:create}, :${2:object} => { ${3} }\n\ snippet xput\n\ xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5}\n\ snippet test\n\ test \"should ${1:do something}\" do\n\ ${2}\n\ end\n\ #migrations\n\ snippet mac\n\ add_column :${1:table_name}, :${2:column_name}, :${3:data_type}\n\ snippet mrc\n\ remove_column :${1:table_name}, :${2:column_name}\n\ snippet mrnc\n\ rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}\n\ snippet mcc\n\ change_column :${1:table}, :${2:column}, :${3:type}\n\ snippet mccc\n\ t.column :${1:title}, :${2:string}\n\ snippet mct\n\ create_table :${1:table_name} do |t|\n\ t.column :${2:name}, :${3:type}\n\ end\n\ snippet migration\n\ class ${1:class_name} < ActiveRecord::Migration\n\ def self.up\n\ ${2}\n\ end\n\ \n\ def self.down\n\ end\n\ end\n\ \n\ snippet trc\n\ t.remove :${1:column}\n\ snippet tre\n\ t.rename :${1:old_column_name}, :${2:new_column_name}\n\ ${3}\n\ snippet tref\n\ t.references :${1:model}\n\ \n\ #rspec\n\ snippet it\n\ it \"${1:spec_name}\" do\n\ ${2}\n\ end\n\ snippet itp\n\ it \"${1:spec_name}\"\n\ ${2}\n\ snippet desc\n\ describe ${1:class_name} do\n\ ${2}\n\ end\n\ snippet cont\n\ context \"${1:message}\" do\n\ ${2}\n\ end\n\ snippet bef\n\ before :${1:each} do\n\ ${2}\n\ end\n\ snippet aft\n\ after :${1:each} do\n\ ${2}\n\ end\n\ "; exports.scope = "ruby"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/yaml.js0000644000076400007640000000025412554155240024040 0ustar pravipravidefine("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "yaml"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/ini.js0000644000076400007640000000025212554155240023653 0ustar pravipravidefine("ace/snippets/ini",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "ini"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/python.js0000644000076400007640000000771512554155240024430 0ustar pravipravidefine("ace/snippets/python",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet #!\n\ #!/usr/bin/env python\n\ snippet imp\n\ import ${1:module}\n\ snippet from\n\ from ${1:package} import ${2:module}\n\ # Module Docstring\n\ snippet docs\n\ '''\n\ File: ${1:FILENAME:file_name}\n\ Author: ${2:author}\n\ Description: ${3}\n\ '''\n\ snippet wh\n\ while ${1:condition}:\n\ ${2:# TODO: write code...}\n\ # dowh - does the same as do...while in other languages\n\ snippet dowh\n\ while True:\n\ ${1:# TODO: write code...}\n\ if ${2:condition}:\n\ break\n\ snippet with\n\ with ${1:expr} as ${2:var}:\n\ ${3:# TODO: write code...}\n\ # New Class\n\ snippet cl\n\ class ${1:ClassName}(${2:object}):\n\ \"\"\"${3:docstring for $1}\"\"\"\n\ def __init__(self, ${4:arg}):\n\ ${5:super($1, self).__init__()}\n\ self.$4 = $4\n\ ${6}\n\ # New Function\n\ snippet def\n\ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\ \"\"\"${3:docstring for $1}\"\"\"\n\ ${4:# TODO: write code...}\n\ snippet deff\n\ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\ ${3:# TODO: write code...}\n\ # New Method\n\ snippet defs\n\ def ${1:mname}(self, ${2:arg}):\n\ ${3:# TODO: write code...}\n\ # New Property\n\ snippet property\n\ def ${1:foo}():\n\ doc = \"${2:The $1 property.}\"\n\ def fget(self):\n\ ${3:return self._$1}\n\ def fset(self, value):\n\ ${4:self._$1 = value}\n\ # Ifs\n\ snippet if\n\ if ${1:condition}:\n\ ${2:# TODO: write code...}\n\ snippet el\n\ else:\n\ ${1:# TODO: write code...}\n\ snippet ei\n\ elif ${1:condition}:\n\ ${2:# TODO: write code...}\n\ # For\n\ snippet for\n\ for ${1:item} in ${2:items}:\n\ ${3:# TODO: write code...}\n\ # Encodes\n\ snippet cutf8\n\ # -*- coding: utf-8 -*-\n\ snippet clatin1\n\ # -*- coding: latin-1 -*-\n\ snippet cascii\n\ # -*- coding: ascii -*-\n\ # Lambda\n\ snippet ld\n\ ${1:var} = lambda ${2:vars} : ${3:action}\n\ snippet .\n\ self.\n\ snippet try Try/Except\n\ try:\n\ ${1:# TODO: write code...}\n\ except ${2:Exception}, ${3:e}:\n\ ${4:raise $3}\n\ snippet try Try/Except/Else\n\ try:\n\ ${1:# TODO: write code...}\n\ except ${2:Exception}, ${3:e}:\n\ ${4:raise $3}\n\ else:\n\ ${5:# TODO: write code...}\n\ snippet try Try/Except/Finally\n\ try:\n\ ${1:# TODO: write code...}\n\ except ${2:Exception}, ${3:e}:\n\ ${4:raise $3}\n\ finally:\n\ ${5:# TODO: write code...}\n\ snippet try Try/Except/Else/Finally\n\ try:\n\ ${1:# TODO: write code...}\n\ except ${2:Exception}, ${3:e}:\n\ ${4:raise $3}\n\ else:\n\ ${5:# TODO: write code...}\n\ finally:\n\ ${6:# TODO: write code...}\n\ # if __name__ == '__main__':\n\ snippet ifmain\n\ if __name__ == '__main__':\n\ ${1:main()}\n\ # __magic__\n\ snippet _\n\ __${1:init}__${2}\n\ # python debugger (pdb)\n\ snippet pdb\n\ import pdb; pdb.set_trace()\n\ # ipython debugger (ipdb)\n\ snippet ipdb\n\ import ipdb; ipdb.set_trace()\n\ # ipython debugger (pdbbb)\n\ snippet pdbbb\n\ import pdbpp; pdbpp.set_trace()\n\ snippet pprint\n\ import pprint; pprint.pprint(${1})${2}\n\ snippet \"\n\ \"\"\"\n\ ${1:doc}\n\ \"\"\"\n\ # test function/method\n\ snippet test\n\ def test_${1:description}(${2:self}):\n\ ${3:# TODO: write code...}\n\ # test case\n\ snippet testcase\n\ class ${1:ExampleCase}(unittest.TestCase):\n\ \n\ def test_${2:description}(self):\n\ ${3:# TODO: write code...}\n\ snippet fut\n\ from __future__ import ${1}\n\ #getopt\n\ snippet getopt\n\ try:\n\ # Short option syntax: \"hv:\"\n\ # Long option syntax: \"help\" or \"verbose=\"\n\ opts, args = getopt.getopt(sys.argv[1:], \"${1:short_options}\", [${2:long_options}])\n\ \n\ except getopt.GetoptError, err:\n\ # Print debug info\n\ print str(err)\n\ ${3:error_action}\n\ \n\ for option, argument in opts:\n\ if option in (\"-h\", \"--help\"):\n\ ${4}\n\ elif option in (\"-v\", \"--verbose\"):\n\ verbose = argument\n\ "; exports.scope = "python"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/snippets.js0000644000076400007640000000054512554155240024746 0ustar pravipravidefine("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# snippets for making snippets :)\n\ snippet snip\n\ snippet ${1:trigger}\n\ ${2}\n\ snippet msnip\n\ snippet ${1:trigger} ${2:description}\n\ ${3}\n\ snippet v\n\ {VISUAL}\n\ "; exports.scope = "snippets"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/svg.js0000644000076400007640000000025212554155240023673 0ustar pravipravidefine("ace/snippets/svg",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "svg"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/php.js0000644000076400007640000001316712554155240023674 0ustar pravipravidefine("ace/snippets/php",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet \n\ # this one is for php5.4\n\ snippet \n\ snippet ns\n\ namespace ${1:Foo\\Bar\\Baz};\n\ ${2}\n\ snippet use\n\ use ${1:Foo\\Bar\\Baz};\n\ ${2}\n\ snippet c\n\ ${1:abstract }class ${2:$FILENAME}\n\ {\n\ ${3}\n\ }\n\ snippet i\n\ interface ${1:$FILENAME}\n\ {\n\ ${2}\n\ }\n\ snippet t.\n\ $this->${1}\n\ snippet f\n\ function ${1:foo}(${2:array }${3:$bar})\n\ {\n\ ${4}\n\ }\n\ # method\n\ snippet m\n\ ${1:abstract }${2:protected}${3: static} function ${4:foo}(${5:array }${6:$bar})\n\ {\n\ ${7}\n\ }\n\ # setter method\n\ snippet sm \n\ ${5:public} function set${6:$2}(${7:$2 }$$1)\n\ {\n\ $this->${8:$1} = $$1;\n\ return $this;\n\ }${9}\n\ # getter method\n\ snippet gm\n\ ${3:public} function get${4:$2}()\n\ {\n\ return $this->${5:$1};\n\ }${6}\n\ #setter\n\ snippet $s\n\ ${1:$foo}->set${2:Bar}(${3});\n\ #getter\n\ snippet $g\n\ ${1:$foo}->get${2:Bar}();\n\ \n\ # Tertiary conditional\n\ snippet =?:\n\ $${1:foo} = ${2:true} ? ${3:a} : ${4};\n\ snippet ?:\n\ ${1:true} ? ${2:a} : ${3}\n\ \n\ snippet C\n\ $_COOKIE['${1:variable}']${2}\n\ snippet E\n\ $_ENV['${1:variable}']${2}\n\ snippet F\n\ $_FILES['${1:variable}']${2}\n\ snippet G\n\ $_GET['${1:variable}']${2}\n\ snippet P\n\ $_POST['${1:variable}']${2}\n\ snippet R\n\ $_REQUEST['${1:variable}']${2}\n\ snippet S\n\ $_SERVER['${1:variable}']${2}\n\ snippet SS\n\ $_SESSION['${1:variable}']${2}\n\ \n\ # the following are old ones\n\ snippet inc\n\ include '${1:file}';${2}\n\ snippet inc1\n\ include_once '${1:file}';${2}\n\ snippet req\n\ require '${1:file}';${2}\n\ snippet req1\n\ require_once '${1:file}';${2}\n\ # Start Docblock\n\ snippet /*\n\ # Class - post doc\n\ snippet doc_cp${5}\n\ # Class Variable - post doc\n\ snippet doc_vp${3}\n\ # Class Variable\n\ snippet doc_v\n\ ${1:var} $${2};${5}\n\ # Class\n\ snippet doc_c\n\ ${1:}class ${2:}\n\ {\n\ ${7}\n\ } // END $1class $2\n\ # Constant Definition - post doc\n\ snippet doc_dp${2}\n\ # Constant Definition\n\ snippet doc_d\n\ define(${1}, ${2});${4}\n\ # Function - post doc\n\ snippet doc_fp${4}\n\ # Function signature\n\ snippet doc_s\n\ ${1}function ${2}(${3});${7}\n\ # Function\n\ snippet doc_f\n\ ${1}function ${2}(${3})\n\ {${7}\n\ }\n\ # Header\n\ snippet doc_h\n\ \n\ # Interface\n\ snippet interface\n\ interface ${1:$FILENAME}\n\ {\n\ ${5}\n\ }\n\ # class ...\n\ snippet class\n\ class ${2:$FILENAME}\n\ {\n\ ${3}\n\ ${5:public} function ${6:__construct}(${7:argument})\n\ {\n\ ${8:// code...}\n\ }\n\ }\n\ # define(...)\n\ snippet def\n\ define('${1}'${2});${3}\n\ # defined(...)\n\ snippet def?\n\ ${1}defined('${2}')${3}\n\ snippet wh\n\ while (${1:/* condition */}) {\n\ ${2:// code...}\n\ }\n\ # do ... while\n\ snippet do\n\ do {\n\ ${2:// code... }\n\ } while (${1:/* condition */});\n\ snippet if\n\ if (${1:/* condition */}) {\n\ ${2:// code...}\n\ }\n\ snippet ifil\n\ \n\ ${2:}\n\ \n\ snippet ife\n\ if (${1:/* condition */}) {\n\ ${2:// code...}\n\ } else {\n\ ${3:// code...}\n\ }\n\ ${4}\n\ snippet ifeil\n\ \n\ ${2:}\n\ \n\ ${3:}\n\ \n\ ${4}\n\ snippet else\n\ else {\n\ ${1:// code...}\n\ }\n\ snippet elseif\n\ elseif (${1:/* condition */}) {\n\ ${2:// code...}\n\ }\n\ snippet switch\n\ switch ($${1:variable}) {\n\ case '${2:value}':\n\ ${3:// code...}\n\ break;\n\ ${5}\n\ default:\n\ ${4:// code...}\n\ break;\n\ }\n\ snippet case\n\ case '${1:value}':\n\ ${2:// code...}\n\ break;${3}\n\ snippet for\n\ for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\ ${4: // code...}\n\ }\n\ snippet foreach\n\ foreach ($${1:variable} as $${2:value}) {\n\ ${3:// code...}\n\ }\n\ snippet foreachil\n\ \n\ ${3:}\n\ \n\ snippet foreachk\n\ foreach ($${1:variable} as $${2:key} => $${3:value}) {\n\ ${4:// code...}\n\ }\n\ snippet foreachkil\n\ $${3:value}): ?>\n\ ${4:}\n\ \n\ # $... = array (...)\n\ snippet array\n\ $${1:arrayName} = array('${2}' => ${3});${4}\n\ snippet try\n\ try {\n\ ${2}\n\ } catch (${1:Exception} $e) {\n\ }\n\ # lambda with closure\n\ snippet lambda\n\ ${1:static }function (${2:args}) use (${3:&$x, $y /*put vars in scope (closure) */}) {\n\ ${4}\n\ };\n\ # pre_dump();\n\ snippet pd\n\ echo '
    '; var_dump(${1}); echo '
    ';\n\ # pre_dump(); die();\n\ snippet pdd\n\ echo '
    '; var_dump(${1}); echo '
    '; die(${2:});\n\ snippet vd\n\ var_dump(${1});\n\ snippet vdd\n\ var_dump(${1}); die(${2:});\n\ snippet http_redirect\n\ header (\"HTTP/1.1 301 Moved Permanently\"); \n\ header (\"Location: \".URL); \n\ exit();\n\ # Getters & Setters\n\ snippet gs\n\ public function get${3:$2}()\n\ {\n\ return $this->${4:$1};\n\ }\n\ public function set$3(${7:$2 }$$1)\n\ {\n\ $this->$4 = $$1;\n\ return $this;\n\ }${8}\n\ # anotation, get, and set, useful for doctrine\n\ snippet ags\n\ ${2:protected} $${3:foo};\n\ \n\ public function get${4:$3}()\n\ {\n\ return $this->$3;\n\ }\n\ \n\ public function set$4(${5:$4 }$${6:$3})\n\ {\n\ $this->$3 = $$6;\n\ return $this;\n\ }\n\ snippet rett\n\ return true;\n\ snippet retf\n\ return false;\n\ "; exports.scope = "php"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/makefile.js0000644000076400007640000000037012554155240024652 0ustar pravipravidefine("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet ifeq\n\ ifeq (${1:cond0},${2:cond1})\n\ ${3:code}\n\ endif\n\ "; exports.scope = "makefile"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/glsl.js0000644000076400007640000000025412554155240024037 0ustar pravipravidefine("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "glsl"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/jsp.js0000644000076400007640000000604412554155240023675 0ustar pravipravidefine("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet @page\n\ <%@page contentType=\"text/html\" pageEncoding=\"UTF-8\"%>\n\ snippet jstl\n\ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\ snippet jstl:c\n\ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\ snippet jstl:fn\n\ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\ snippet cpath\n\ ${pageContext.request.contextPath}\n\ snippet cout\n\ \n\ snippet cset\n\ \n\ snippet cremove\n\ \n\ snippet ccatch\n\ \n\ snippet cif\n\ \n\ ${2}\n\ \n\ snippet cchoose\n\ \n\ ${1}\n\ \n\ snippet cwhen\n\ \n\ ${2}\n\ \n\ snippet cother\n\ \n\ ${1}\n\ \n\ snippet cfore\n\ \n\ ${4:}\n\ \n\ snippet cfort\n\ ${2:item1,item2,item3}\n\ \n\ ${5:}\n\ \n\ snippet cparam\n\ \n\ snippet cparam+\n\ \n\ cparam+${3}\n\ snippet cimport\n\ \n\ snippet cimport+\n\ \n\ \n\ cparam+${4}\n\ \n\ snippet curl\n\ \n\ ${3}\n\ snippet curl+\n\ \n\ \n\ cparam+${6}\n\ \n\ ${3}\n\ snippet credirect\n\ \n\ snippet contains\n\ ${fn:contains(${1:string}, ${2:substr})}\n\ snippet contains:i\n\ ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\n\ snippet endswith\n\ ${fn:endsWith(${1:string}, ${2:suffix})}\n\ snippet escape\n\ ${fn:escapeXml(${1:string})}\n\ snippet indexof\n\ ${fn:indexOf(${1:string}, ${2:substr})}\n\ snippet join\n\ ${fn:join(${1:collection}, ${2:delims})}\n\ snippet length\n\ ${fn:length(${1:collection_or_string})}\n\ snippet replace\n\ ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\n\ snippet split\n\ ${fn:split(${1:string}, ${2:delims})}\n\ snippet startswith\n\ ${fn:startsWith(${1:string}, ${2:prefix})}\n\ snippet substr\n\ ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\n\ snippet substr:a\n\ ${fn:substringAfter(${1:string}, ${2:substr})}\n\ snippet substr:b\n\ ${fn:substringBefore(${1:string}, ${2:substr})}\n\ snippet lc\n\ ${fn:toLowerCase(${1:string})}\n\ snippet uc\n\ ${fn:toUpperCase(${1:string})}\n\ snippet trim\n\ ${fn:trim(${1:string})}\n\ "; exports.scope = "jsp"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/diff.js0000644000076400007640000000115112554155240024003 0ustar pravipravidefine("ace/snippets/diff",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\n\ snippet header DEP-3 style header\n\ Description: ${1}\n\ Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n\ Bug: ${4:url in upstream bugtracker}\n\ Forwarded: ${5:no|not-needed|url}\n\ Author: ${6:`g:snips_author`}\n\ Reviewed-by: ${7:name and email}\n\ Last-Update: ${8:`strftime(\"%Y-%m-%d\")`}\n\ Applied-Upstream: ${9:upstream version|url|commit}\n\ \n\ "; exports.scope = "diff"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/handlebars.js0000644000076400007640000000027012554155240025177 0ustar pravipravidefine("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "handlebars"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/matlab.js0000644000076400007640000000026012554155240024333 0ustar pravipravidefine("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "matlab"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/markdown.js0000644000076400007640000000424112554155240024720 0ustar pravipravidefine("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Markdown\n\ \n\ # Includes octopress (http://octopress.org/) snippets\n\ \n\ snippet [\n\ [${1:text}](http://${2:address} \"${3:title}\")\n\ snippet [*\n\ [${1:link}](${2:`@*`} \"${3:title}\")${4}\n\ \n\ snippet [:\n\ [${1:id}]: http://${2:url} \"${3:title}\"\n\ snippet [:*\n\ [${1:id}]: ${2:`@*`} \"${3:title}\"\n\ \n\ snippet ![\n\ ![${1:alttext}](${2:/images/image.jpg} \"${3:title}\")\n\ snippet ![*\n\ ![${1:alt}](${2:`@*`} \"${3:title}\")${4}\n\ \n\ snippet ![:\n\ ![${1:id}]: ${2:url} \"${3:title}\"\n\ snippet ![:*\n\ ![${1:id}]: ${2:`@*`} \"${3:title}\"\n\ \n\ snippet ===\n\ regex /^/=+/=*//\n\ ${PREV_LINE/./=/g}\n\ \n\ ${0}\n\ snippet ---\n\ regex /^/-+/-*//\n\ ${PREV_LINE/./-/g}\n\ \n\ ${0}\n\ snippet blockquote\n\ {% blockquote %}\n\ ${1:quote}\n\ {% endblockquote %}\n\ \n\ snippet blockquote-author\n\ {% blockquote ${1:author}, ${2:title} %}\n\ ${3:quote}\n\ {% endblockquote %}\n\ \n\ snippet blockquote-link\n\ {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n\ ${4:quote}\n\ {% endblockquote %}\n\ \n\ snippet bt-codeblock-short\n\ ```\n\ ${1:code_snippet}\n\ ```\n\ \n\ snippet bt-codeblock-full\n\ ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n\ ${5:code_snippet}\n\ ```\n\ \n\ snippet codeblock-short\n\ {% codeblock %}\n\ ${1:code_snippet}\n\ {% endcodeblock %}\n\ \n\ snippet codeblock-full\n\ {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n\ ${5:code_snippet}\n\ {% endcodeblock %}\n\ \n\ snippet gist-full\n\ {% gist ${1:gist_id} ${2:filename} %}\n\ \n\ snippet gist-short\n\ {% gist ${1:gist_id} %}\n\ \n\ snippet img\n\ {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\ \n\ snippet youtube\n\ {% youtube ${1:video_id} %}\n\ \n\ # The quote should appear only once in the text. It is inherently part of it.\n\ # See http://octopress.org/docs/plugins/pullquote/ for more info.\n\ \n\ snippet pullquote\n\ {% pullquote %}\n\ ${1:text} {\" ${2:quote} \"} ${3:text}\n\ {% endpullquote %}\n\ "; exports.scope = "markdown"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/d.js0000644000076400007640000000024612554155240023322 0ustar pravipravidefine("ace/snippets/d",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "d"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/twig.js0000644000076400007640000000025412554155240024050 0ustar pravipravidefine("ace/snippets/twig",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "twig"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/vhdl.js0000644000076400007640000000025412554155240024033 0ustar pravipravidefine("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "vhdl"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/stylus.js0000644000076400007640000000026012554155240024436 0ustar pravipravidefine("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "stylus"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/dot.js0000644000076400007640000000025212554155240023662 0ustar pravipravidefine("ace/snippets/dot",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "dot"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/scheme.js0000644000076400007640000000026012554155240024337 0ustar pravipravidefine("ace/snippets/scheme",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "scheme"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/ocaml.js0000644000076400007640000000025612554155240024173 0ustar pravipravidefine("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "ocaml"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/erlang.js0000644000076400007640000000754012554155240024353 0ustar pravipravidefine("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# module and export all\n\ snippet mod\n\ -module(${1:`Filename('', 'my')`}).\n\ \n\ -compile([export_all]).\n\ \n\ start() ->\n\ ${2}\n\ \n\ stop() ->\n\ ok.\n\ # define directive\n\ snippet def\n\ -define(${1:macro}, ${2:body}).${3}\n\ # export directive\n\ snippet exp\n\ -export([${1:function}/${2:arity}]).\n\ # include directive\n\ snippet inc\n\ -include(\"${1:file}\").${2}\n\ # behavior directive\n\ snippet beh\n\ -behaviour(${1:behaviour}).${2}\n\ # if expression\n\ snippet if\n\ if\n\ ${1:guard} ->\n\ ${2:body}\n\ end\n\ # case expression\n\ snippet case\n\ case ${1:expression} of\n\ ${2:pattern} ->\n\ ${3:body};\n\ end\n\ # anonymous function\n\ snippet fun\n\ fun (${1:Parameters}) -> ${2:body} end${3}\n\ # try...catch\n\ snippet try\n\ try\n\ ${1}\n\ catch\n\ ${2:_:_} -> ${3:got_some_exception}\n\ end\n\ # record directive\n\ snippet rec\n\ -record(${1:record}, {\n\ ${2:field}=${3:value}}).${4}\n\ # todo comment\n\ snippet todo\n\ %% TODO: ${1}\n\ ## Snippets below (starting with '%') are in EDoc format.\n\ ## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details\n\ # doc comment\n\ snippet %d\n\ %% @doc ${1}\n\ # end of doc comment\n\ snippet %e\n\ %% @end\n\ # specification comment\n\ snippet %s\n\ %% @spec ${1}\n\ # private function marker\n\ snippet %p\n\ %% @private\n\ # OTP application\n\ snippet application\n\ -module(${1:`Filename('', 'my')`}).\n\ \n\ -behaviour(application).\n\ \n\ -export([start/2, stop/1]).\n\ \n\ start(_Type, _StartArgs) ->\n\ case ${2:root_supervisor}:start_link() of\n\ {ok, Pid} ->\n\ {ok, Pid};\n\ Other ->\n\ {error, Other}\n\ end.\n\ \n\ stop(_State) ->\n\ ok. \n\ # OTP supervisor\n\ snippet supervisor\n\ -module(${1:`Filename('', 'my')`}).\n\ \n\ -behaviour(supervisor).\n\ \n\ %% API\n\ -export([start_link/0]).\n\ \n\ %% Supervisor callbacks\n\ -export([init/1]).\n\ \n\ -define(SERVER, ?MODULE).\n\ \n\ start_link() ->\n\ supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\ \n\ init([]) ->\n\ Server = {${2:my_server}, {$2, start_link, []},\n\ permanent, 2000, worker, [$2]},\n\ Children = [Server],\n\ RestartStrategy = {one_for_one, 0, 1},\n\ {ok, {RestartStrategy, Children}}.\n\ # OTP gen_server\n\ snippet gen_server\n\ -module(${1:`Filename('', 'my')`}).\n\ \n\ -behaviour(gen_server).\n\ \n\ %% API\n\ -export([\n\ start_link/0\n\ ]).\n\ \n\ %% gen_server callbacks\n\ -export([init/1, handle_call/3, handle_cast/2, handle_info/2,\n\ terminate/2, code_change/3]).\n\ \n\ -define(SERVER, ?MODULE).\n\ \n\ -record(state, {}).\n\ \n\ %%%===================================================================\n\ %%% API\n\ %%%===================================================================\n\ \n\ start_link() ->\n\ gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\ \n\ %%%===================================================================\n\ %%% gen_server callbacks\n\ %%%===================================================================\n\ \n\ init([]) ->\n\ {ok, #state{}}.\n\ \n\ handle_call(_Request, _From, State) ->\n\ Reply = ok,\n\ {reply, Reply, State}.\n\ \n\ handle_cast(_Msg, State) ->\n\ {noreply, State}.\n\ \n\ handle_info(_Info, State) ->\n\ {noreply, State}.\n\ \n\ terminate(_Reason, _State) ->\n\ ok.\n\ \n\ code_change(_OldVsn, State, _Extra) ->\n\ {ok, State}.\n\ \n\ %%%===================================================================\n\ %%% Internal functions\n\ %%%===================================================================\n\ \n\ "; exports.scope = "erlang"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/asciidoc.js0000644000076400007640000000026412554155240024655 0ustar pravipravidefine("ace/snippets/asciidoc",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "asciidoc"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/clojure.js0000644000076400007640000000433612554155240024546 0ustar pravipravidefine("ace/snippets/clojure",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet comm\n\ (comment\n\ ${1}\n\ )\n\ snippet condp\n\ (condp ${1:pred} ${2:expr}\n\ ${3})\n\ snippet def\n\ (def ${1})\n\ snippet defm\n\ (defmethod ${1:multifn} \"${2:doc-string}\" ${3:dispatch-val} [${4:args}]\n\ ${5})\n\ snippet defmm\n\ (defmulti ${1:name} \"${2:doc-string}\" ${3:dispatch-fn})\n\ snippet defma\n\ (defmacro ${1:name} \"${2:doc-string}\" ${3:dispatch-fn})\n\ snippet defn\n\ (defn ${1:name} \"${2:doc-string}\" [${3:arg-list}]\n\ ${4})\n\ snippet defp\n\ (defprotocol ${1:name}\n\ ${2})\n\ snippet defr\n\ (defrecord ${1:name} [${2:fields}]\n\ ${3:protocol}\n\ ${4})\n\ snippet deft\n\ (deftest ${1:name}\n\ (is (= ${2:assertion})))\n\ ${3})\n\ snippet is\n\ (is (= ${1} ${2}))\n\ snippet defty\n\ (deftype ${1:Name} [${2:fields}]\n\ ${3:Protocol}\n\ ${4})\n\ snippet doseq\n\ (doseq [${1:elem} ${2:coll}]\n\ ${3})\n\ snippet fn\n\ (fn [${1:arg-list}] ${2})\n\ snippet if\n\ (if ${1:test-expr}\n\ ${2:then-expr}\n\ ${3:else-expr})\n\ snippet if-let \n\ (if-let [${1:result} ${2:test-expr}]\n\ (${3:then-expr} $1)\n\ (${4:else-expr}))\n\ snippet imp\n\ (:import [${1:package}])\n\ & {:keys [${1:keys}] :or {${2:defaults}}}\n\ snippet let\n\ (let [${1:name} ${2:expr}]\n\ ${3})\n\ snippet letfn\n\ (letfn [(${1:name) [${2:args}]\n\ ${3})])\n\ snippet map\n\ (map ${1:func} ${2:coll})\n\ snippet mapl\n\ (map #(${1:lambda}) ${2:coll})\n\ snippet met\n\ (${1:name} [${2:this} ${3:args}]\n\ ${4})\n\ snippet ns\n\ (ns ${1:name}\n\ ${2})\n\ snippet dotimes\n\ (dotimes [_ 10]\n\ (time\n\ (dotimes [_ ${1:times}]\n\ ${2})))\n\ snippet pmethod\n\ (${1:name} [${2:this} ${3:args}])\n\ snippet refer\n\ (:refer-clojure :exclude [${1}])\n\ snippet require\n\ (:require [${1:namespace} :as [${2}]])\n\ snippet use\n\ (:use [${1:namespace} :only [${2}]])\n\ snippet print\n\ (println ${1})\n\ snippet reduce\n\ (reduce ${1:(fn [p n] ${3})} ${2})\n\ snippet when\n\ (when ${1:test} ${2:body})\n\ snippet when-let\n\ (when-let [${1:result} ${2:test}]\n\ ${3:body})\n\ "; exports.scope = "clojure"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/live_script.js0000644000076400007640000000025712554155240025424 0ustar pravipravidefine("ace/snippets/live_script",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = ""; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/snippets/prolog.js0000644000076400007640000000026012554155240024375 0ustar pravipravidefine("ace/snippets/prolog",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText =undefined; exports.scope = "prolog"; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-whitespace.js0000644000076400007640000001212012554155240024156 0ustar pravipravidefine("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); exports.$detectIndentation = function(lines, fallback) { var stats = []; var changes = []; var tabIndents = 0; var prevSpaces = 0; var max = Math.min(lines.length, 1000); for (var i = 0; i < max; i++) { var line = lines[i]; if (!/^\s*[^*+\-\s]/.test(line)) continue; if (line[0] == "\t") tabIndents++; var spaces = line.match(/^ */)[0].length; if (spaces && line[spaces] != "\t") { var diff = spaces - prevSpaces; if (diff > 0 && !(prevSpaces%diff) && !(spaces%diff)) changes[diff] = (changes[diff] || 0) + 1; stats[spaces] = (stats[spaces] || 0) + 1; } prevSpaces = spaces; while (i < max && line[line.length - 1] == "\\") line = lines[i++]; } function getScore(indent) { var score = 0; for (var i = indent; i < stats.length; i += indent) score += stats[i] || 0; return score; } var changesTotal = changes.reduce(function(a,b){return a+b}, 0); var first = {score: 0, length: 0}; var spaceIndents = 0; for (var i = 1; i < 12; i++) { var score = getScore(i); if (i == 1) { spaceIndents = score; score = stats[1] ? 0.9 : 0.8; if (!stats.length) score = 0 } else score /= spaceIndents; if (changes[i]) score += changes[i] / changesTotal; if (score > first.score) first = {score: score, length: i}; } if (first.score && first.score > 1.4) var tabLength = first.length; if (tabIndents > spaceIndents + 1) return {ch: "\t", length: tabLength}; if (spaceIndents > tabIndents + 1) return {ch: " ", length: tabLength}; }; exports.detectIndentation = function(session) { var lines = session.getLines(0, 1000); var indent = exports.$detectIndentation(lines) || {}; if (indent.ch) session.setUseSoftTabs(indent.ch == " "); if (indent.length) session.setTabSize(indent.length); return indent; }; exports.trimTrailingSpace = function(session, trimEmpty) { var doc = session.getDocument(); var lines = doc.getAllLines(); var min = trimEmpty ? -1 : 0; for (var i = 0, l=lines.length; i < l; i++) { var line = lines[i]; var index = line.search(/\s+$/); if (index > min) doc.removeInLine(i, index, line.length); } }; exports.convertIndentation = function(session, ch, len) { var oldCh = session.getTabString()[0]; var oldLen = session.getTabSize(); if (!len) len = oldLen; if (!ch) ch = oldCh; var tab = ch == "\t" ? ch: lang.stringRepeat(ch, len); var doc = session.doc; var lines = doc.getAllLines(); var cache = {}; var spaceCache = {}; for (var i = 0, l=lines.length; i < l; i++) { var line = lines[i]; var match = line.match(/^\s*/)[0]; if (match) { var w = session.$getStringScreenWidth(match)[0]; var tabCount = Math.floor(w/oldLen); var reminder = w%oldLen; var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount)); toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder)); if (toInsert != match) { doc.removeInLine(i, 0, match.length); doc.insertInLine({row: i, column: 0}, toInsert); } } } session.setTabSize(len); session.setUseSoftTabs(ch == " "); }; exports.$parseStringArg = function(text) { var indent = {}; if (/t/.test(text)) indent.ch = "\t"; else if (/s/.test(text)) indent.ch = " "; var m = text.match(/\d+/); if (m) indent.length = parseInt(m[0], 10); return indent; }; exports.$parseArg = function(arg) { if (!arg) return {}; if (typeof arg == "string") return exports.$parseStringArg(arg); if (typeof arg.text == "string") return exports.$parseStringArg(arg.text); return arg; }; exports.commands = [{ name: "detectIndentation", exec: function(editor) { exports.detectIndentation(editor.session); } }, { name: "trimTrailingSpace", exec: function(editor) { exports.trimTrailingSpace(editor.session); } }, { name: "convertIndentation", exec: function(editor, arg) { var indent = exports.$parseArg(arg); exports.convertIndentation(editor.session, indent.ch, indent.length); } }, { name: "setIndentation", exec: function(editor, arg) { var indent = exports.$parseArg(arg); indent.length && editor.session.setTabSize(indent.length); indent.ch && editor.session.setUseSoftTabs(indent.ch == " "); } }]; }); (function() { window.require(["ace/ext/whitespace"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-glsl.js0000644000076400007640000010715712554155240023126 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" var c_cppHighlightRules = function() { var keywordControls = ( "break|case|continue|default|do|else|for|goto|if|_Pragma|" + "return|switch|while|catch|operator|try|throw|using" ); var storageType = ( "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + "class|wchar_t|template|char16_t|char32_t" ); var storageModifiers = ( "const|extern|register|restrict|static|volatile|inline|private|" + "protected|public|friend|explicit|virtual|export|mutable|typename|" + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local" ); var keywordOperators = ( "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); var builtinConstants = ( "NULL|true|false|TRUE|FALSE|nullptr" ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword.control" : keywordControls, "storage.type" : storageType, "storage.modifier" : storageModifiers, "keyword.operator" : keywordOperators, "variable.language": "this", "constant.language": builtinConstants }, "identifier"); var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; this.$rules = { "start" : [ { token : "comment", regex : "//", next : "singleLineComment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start regex : '["].*\\\\$', next : "qqstring" }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start regex : "['].*\\\\$", next : "qstring" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "keyword", // pre-compiler directives regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b", next : "directive" }, { token : "keyword", // special case pre-compiler directive regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" }, { token : "support.function.C99.c", regex : cFunctions }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "singleLineComment" : [ { token : "comment", regex : /\\$/, next : "singleLineComment" }, { token : "comment", regex : /$/, next : "start" }, { defaultToken: "comment" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { defaultToken : "string" } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { defaultToken : "string" } ], "directive" : [ { token : "constant.other.multiline", regex : /\\/ }, { token : "constant.other.multiline", regex : /.*\\/ }, { token : "constant.other", regex : "\\s*<.+?>", next : "start" }, { token : "constant.other", // single line regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next : "start" }, { token : "constant.other", // single line regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next : "start" }, { token : "constant.other", regex : /[^\\\/]+/, next : "start" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = c_cppHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/c_cpp"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; var glslHighlightRules = function() { var keywords = ( "attribute|const|uniform|varying|break|continue|do|for|while|" + "if|else|in|out|inout|float|int|void|bool|true|false|" + "lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|" + "mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|" + "samplerCube|struct" ); var buildinConstants = ( "radians|degrees|sin|cos|tan|asin|acos|atan|pow|" + "exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|" + "min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|" + "normalize|faceforward|reflect|refract|matrixCompMult|lessThan|" + "lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|" + "not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|" + "texture2DProjLod|textureCube|textureCubeLod|" + "gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|" + "gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|" + "gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|" + "gl_DepthRangeParameters|gl_DepthRange|" + "gl_Position|gl_PointSize|" + "gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData" ); var keywordMapper = this.createKeywordMapper({ "variable.language": "this", "keyword": keywords, "constant.language": buildinConstants }, "identifier"); this.$rules = new c_cppHighlightRules().$rules; this.$rules.start.forEach(function(rule) { if (typeof rule.token == "function") rule.token = keywordMapper; }) }; oop.inherits(glslHighlightRules, c_cppHighlightRules); exports.glslHighlightRules = glslHighlightRules; }); define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = glslHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, CMode); (function() { this.$id = "ace/mode/glsl"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-lua.js0000644000076400007640000030666112554155240023334 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i= length) return { type : EOF , value: '' , line: line , lineStart: lineStart , range: [index, index] }; var charCode = input.charCodeAt(index) , next = input.charCodeAt(index + 1); tokenStart = index; if (isIdentifierStart(charCode)) return scanIdentifierOrKeyword(); switch (charCode) { case 39: case 34: // '" return scanStringLiteral(); case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: return scanNumericLiteral(); case 46: // . if (isDecDigit(next)) return scanNumericLiteral(); if (46 === next) { if (46 === input.charCodeAt(index + 2)) return scanVarargLiteral(); return scanPunctuator('..'); } return scanPunctuator('.'); case 61: // = if (61 === next) return scanPunctuator('=='); return scanPunctuator('='); case 62: // > if (61 === next) return scanPunctuator('>='); return scanPunctuator('>'); case 60: // < if (61 === next) return scanPunctuator('<='); return scanPunctuator('<'); case 126: // ~ if (61 === next) return scanPunctuator('~='); return raise({}, errors.expected, '=', '~'); case 58: // : if (58 === next) return scanPunctuator('::'); return scanPunctuator(':'); case 91: // [ if (91 === next || 61 === next) return scanLongStringLiteral(); return scanPunctuator('['); case 42: case 47: case 94: case 37: case 44: case 123: case 125: case 93: case 40: case 41: case 59: case 35: case 45: case 43: return scanPunctuator(input.charAt(index)); } return unexpected(input.charAt(index)); } function skipWhiteSpace() { while (index < length) { var charCode = input.charCodeAt(index); if (isWhiteSpace(charCode)) { index++; } else if (isLineTerminator(charCode)) { line++; lineStart = ++index; } else { break; } } } function scanIdentifierOrKeyword() { var value, type; while (isIdentifierPart(input.charCodeAt(++index))); value = input.slice(tokenStart, index); if (isKeyword(value)) { type = Keyword; } else if ('true' === value || 'false' === value) { type = BooleanLiteral; value = ('true' === value); } else if ('nil' === value) { type = NilLiteral; value = null; } else { type = Identifier; } return { type: type , value: value , line: line , lineStart: lineStart , range: [tokenStart, index] }; } function scanPunctuator(value) { index += value.length; return { type: Punctuator , value: value , line: line , lineStart: lineStart , range: [tokenStart, index] }; } function scanVarargLiteral() { index += 3; return { type: VarargLiteral , value: '...' , line: line , lineStart: lineStart , range: [tokenStart, index] }; } function scanStringLiteral() { var delimiter = input.charCodeAt(index++) , stringStart = index , string = '' , charCode; while (index < length) { charCode = input.charCodeAt(index++); if (delimiter === charCode) break; if (92 === charCode) { // \ string += input.slice(stringStart, index - 1) + readEscapeSequence(); stringStart = index; } else if (index >= length || isLineTerminator(charCode)) { string += input.slice(stringStart, index - 1); raise({}, errors.unfinishedString, string + String.fromCharCode(charCode)); } } string += input.slice(stringStart, index - 1); return { type: StringLiteral , value: string , line: line , lineStart: lineStart , range: [tokenStart, index] }; } function scanLongStringLiteral() { var string = readLongString(); if (false === string) raise(token, errors.expected, '[', token.value); return { type: StringLiteral , value: string , line: line , lineStart: lineStart , range: [tokenStart, index] }; } function scanNumericLiteral() { var character = input.charAt(index) , next = input.charAt(index + 1); var value = ('0' === character && 'xX'.indexOf(next || null) >= 0) ? readHexLiteral() : readDecLiteral(); return { type: NumericLiteral , value: value , line: line , lineStart: lineStart , range: [tokenStart, index] }; } function readHexLiteral() { var fraction = 0 // defaults to 0 as it gets summed , binaryExponent = 1 // defaults to 1 as it gets multiplied , binarySign = 1 // positive , digit, fractionStart, exponentStart, digitStart; digitStart = index += 2; // Skip 0x part if (!isHexDigit(input.charCodeAt(index))) raise({}, errors.malformedNumber, input.slice(tokenStart, index)); while (isHexDigit(input.charCodeAt(index))) index++; digit = parseInt(input.slice(digitStart, index), 16); if ('.' === input.charAt(index)) { fractionStart = ++index; while (isHexDigit(input.charCodeAt(index))) index++; fraction = input.slice(fractionStart, index); fraction = (fractionStart === index) ? 0 : parseInt(fraction, 16) / Math.pow(16, index - fractionStart); } if ('pP'.indexOf(input.charAt(index) || null) >= 0) { index++; if ('+-'.indexOf(input.charAt(index) || null) >= 0) binarySign = ('+' === input.charAt(index++)) ? 1 : -1; exponentStart = index; if (!isDecDigit(input.charCodeAt(index))) raise({}, errors.malformedNumber, input.slice(tokenStart, index)); while (isDecDigit(input.charCodeAt(index))) index++; binaryExponent = input.slice(exponentStart, index); binaryExponent = Math.pow(2, binaryExponent * binarySign); } return (digit + fraction) * binaryExponent; } function readDecLiteral() { while (isDecDigit(input.charCodeAt(index))) index++; if ('.' === input.charAt(index)) { index++; while (isDecDigit(input.charCodeAt(index))) index++; } if ('eE'.indexOf(input.charAt(index) || null) >= 0) { index++; if ('+-'.indexOf(input.charAt(index) || null) >= 0) index++; if (!isDecDigit(input.charCodeAt(index))) raise({}, errors.malformedNumber, input.slice(tokenStart, index)); while (isDecDigit(input.charCodeAt(index))) index++; } return parseFloat(input.slice(tokenStart, index)); } function readEscapeSequence() { var sequenceStart = index; switch (input.charAt(index)) { case 'n': index++; return '\n'; case 'r': index++; return '\r'; case 't': index++; return '\t'; case 'v': index++; return '\x0B'; case 'b': index++; return '\b'; case 'f': index++; return '\f'; case 'z': index++; skipWhiteSpace(); return ''; case 'x': if (isHexDigit(input.charCodeAt(index + 1)) && isHexDigit(input.charCodeAt(index + 2))) { index += 3; return '\\' + input.slice(sequenceStart, index); } return '\\' + input.charAt(index++); default: if (isDecDigit(input.charCodeAt(index))) { while (isDecDigit(input.charCodeAt(++index))); return '\\' + input.slice(sequenceStart, index); } return input.charAt(index++); } } function scanComment() { tokenStart = index; index += 2; // -- var character = input.charAt(index) , content = '' , isLong = false , commentStart = index , lineStartComment = lineStart , lineComment = line; if ('[' === character) { content = readLongString(); if (false === content) content = character; else isLong = true; } if (!isLong) { while (index < length) { if (isLineTerminator(input.charCodeAt(index))) break; index++; } if (options.comments) content = input.slice(commentStart, index); } if (options.comments) { var node = ast.comment(content, input.slice(tokenStart, index)); if (options.locations) { node.loc = { start: { line: lineComment, column: tokenStart - lineStartComment } , end: { line: line, column: index - lineStart } }; } if (options.ranges) { node.range = [tokenStart, index]; } comments.push(node); } } function readLongString() { var level = 0 , content = '' , terminator = false , character, stringStart; index++; // [ while ('=' === input.charAt(index + level)) level++; if ('[' !== input.charAt(index + level)) return false; index += level + 1; if (isLineTerminator(input.charCodeAt(index))) { line++; lineStart = index++; } stringStart = index; while (index < length) { character = input.charAt(index++); if (isLineTerminator(character.charCodeAt(0))) { line++; lineStart = index; } if (']' === character) { terminator = true; for (var i = 0; i < level; i++) { if ('=' !== input.charAt(index + i)) terminator = false; } if (']' !== input.charAt(index + level)) terminator = false; } if (terminator) break; } content += input.slice(stringStart, index - 1); index += level + 1; return content; } function next() { previousToken = token; token = lookahead; lookahead = lex(); } function consume(value) { if (value === token.value) { next(); return true; } return false; } function expect(value) { if (value === token.value) next(); else raise(token, errors.expected, value, token.value); } function isWhiteSpace(charCode) { return 9 === charCode || 32 === charCode || 0xB === charCode || 0xC === charCode; } function isLineTerminator(charCode) { return 10 === charCode || 13 === charCode; } function isDecDigit(charCode) { return charCode >= 48 && charCode <= 57; } function isHexDigit(charCode) { return (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 102) || (charCode >= 65 && charCode <= 70); } function isIdentifierStart(charCode) { return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode; } function isIdentifierPart(charCode) { return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57); } function isKeyword(id) { switch (id.length) { case 2: return 'do' === id || 'if' === id || 'in' === id || 'or' === id; case 3: return 'and' === id || 'end' === id || 'for' === id || 'not' === id; case 4: return 'else' === id || 'goto' === id || 'then' === id; case 5: return 'break' === id || 'local' === id || 'until' === id || 'while' === id; case 6: return 'elseif' === id || 'repeat' === id || 'return' === id; case 8: return 'function' === id; } return false; } function isUnary(token) { if (Punctuator === token.type) return '#-'.indexOf(token.value) >= 0; if (Keyword === token.type) return 'not' === token.value; return false; } function isCallExpression(expression) { switch (expression.type) { case 'CallExpression': case 'TableCallExpression': case 'StringCallExpression': return true; } return false; } function isBlockFollow(token) { if (EOF === token.type) return true; if (Keyword !== token.type) return false; switch (token.value) { case 'else': case 'elseif': case 'end': case 'until': return true; default: return false; } } var scopes , scopeDepth , globals; function createScope() { scopes.push(Array.apply(null, scopes[scopeDepth++])); } function exitScope() { scopes.pop(); scopeDepth--; } function scopeIdentifierName(name) { if (-1 !== indexOf(scopes[scopeDepth], name)) return; scopes[scopeDepth].push(name); } function scopeIdentifier(node) { scopeIdentifierName(node.name); attachScope(node, true); } function attachScope(node, isLocal) { if (!isLocal && -1 === indexOfObject(globals, 'name', node.name)) globals.push(node); node.isLocal = isLocal; } function scopeHasName(name) { return (-1 !== indexOf(scopes[scopeDepth], name)); } var locations = [] , trackLocations; function createLocationMarker() { return new Marker(token); } function Marker(token) { if (options.locations) { this.loc = { start: { line: token.line , column: token.range[0] - token.lineStart } , end: { line: 0 , column: 0 } }; } if (options.ranges) this.range = [token.range[0], 0]; } Marker.prototype.complete = function() { if (options.locations) { this.loc.end.line = previousToken.line; this.loc.end.column = previousToken.range[1] - previousToken.lineStart; } if (options.ranges) { this.range[1] = previousToken.range[1]; } }; function markLocation() { if (trackLocations) locations.push(createLocationMarker()); } function pushLocation(marker) { if (trackLocations) locations.push(marker); } function parseChunk() { next(); markLocation(); var body = parseBlock(); if (EOF !== token.type) unexpected(token); if (trackLocations && !body.length) previousToken = token; return finishNode(ast.chunk(body)); } function parseBlock(terminator) { var block = [] , statement; if (options.scope) createScope(); while (!isBlockFollow(token)) { if ('return' === token.value) { block.push(parseStatement()); break; } statement = parseStatement(); if (statement) block.push(statement); } if (options.scope) exitScope(); return block; } function parseStatement() { markLocation(); if (Keyword === token.type) { switch (token.value) { case 'local': next(); return parseLocalStatement(); case 'if': next(); return parseIfStatement(); case 'return': next(); return parseReturnStatement(); case 'function': next(); var name = parseFunctionName(); return parseFunctionDeclaration(name); case 'while': next(); return parseWhileStatement(); case 'for': next(); return parseForStatement(); case 'repeat': next(); return parseRepeatStatement(); case 'break': next(); return parseBreakStatement(); case 'do': next(); return parseDoStatement(); case 'goto': next(); return parseGotoStatement(); } } if (Punctuator === token.type) { if (consume('::')) return parseLabelStatement(); } if (trackLocations) locations.pop(); if (consume(';')) return; return parseAssignmentOrCallStatement(); } function parseLabelStatement() { var name = token.value , label = parseIdentifier(); if (options.scope) { scopeIdentifierName('::' + name + '::'); attachScope(label, true); } expect('::'); return finishNode(ast.labelStatement(label)); } function parseBreakStatement() { return finishNode(ast.breakStatement()); } function parseGotoStatement() { var name = token.value , label = parseIdentifier(); if (options.scope) label.isLabel = scopeHasName('::' + name + '::'); return finishNode(ast.gotoStatement(label)); } function parseDoStatement() { var body = parseBlock(); expect('end'); return finishNode(ast.doStatement(body)); } function parseWhileStatement() { var condition = parseExpectedExpression(); expect('do'); var body = parseBlock(); expect('end'); return finishNode(ast.whileStatement(condition, body)); } function parseRepeatStatement() { var body = parseBlock(); expect('until'); var condition = parseExpectedExpression(); return finishNode(ast.repeatStatement(condition, body)); } function parseReturnStatement() { var expressions = []; if ('end' !== token.value) { var expression = parseExpression(); if (null != expression) expressions.push(expression); while (consume(',')) { expression = parseExpectedExpression(); expressions.push(expression); } consume(';'); // grammar tells us ; is optional here. } return finishNode(ast.returnStatement(expressions)); } function parseIfStatement() { var clauses = [] , condition , body , marker; if (trackLocations) { marker = locations[locations.length - 1]; locations.push(marker); } condition = parseExpectedExpression(); expect('then'); body = parseBlock(); clauses.push(finishNode(ast.ifClause(condition, body))); if (trackLocations) marker = createLocationMarker(); while (consume('elseif')) { pushLocation(marker); condition = parseExpectedExpression(); expect('then'); body = parseBlock(); clauses.push(finishNode(ast.elseifClause(condition, body))); if (trackLocations) marker = createLocationMarker(); } if (consume('else')) { if (trackLocations) { marker = new Marker(previousToken); locations.push(marker); } body = parseBlock(); clauses.push(finishNode(ast.elseClause(body))); } expect('end'); return finishNode(ast.ifStatement(clauses)); } function parseForStatement() { var variable = parseIdentifier() , body; if (options.scope) scopeIdentifier(variable); if (consume('=')) { var start = parseExpectedExpression(); expect(','); var end = parseExpectedExpression(); var step = consume(',') ? parseExpectedExpression() : null; expect('do'); body = parseBlock(); expect('end'); return finishNode(ast.forNumericStatement(variable, start, end, step, body)); } else { var variables = [variable]; while (consume(',')) { variable = parseIdentifier(); if (options.scope) scopeIdentifier(variable); variables.push(variable); } expect('in'); var iterators = []; do { var expression = parseExpectedExpression(); iterators.push(expression); } while (consume(',')); expect('do'); body = parseBlock(); expect('end'); return finishNode(ast.forGenericStatement(variables, iterators, body)); } } function parseLocalStatement() { var name; if (Identifier === token.type) { var variables = [] , init = []; do { name = parseIdentifier(); variables.push(name); } while (consume(',')); if (consume('=')) { do { var expression = parseExpectedExpression(); init.push(expression); } while (consume(',')); } if (options.scope) { for (var i = 0, l = variables.length; i < l; i++) { scopeIdentifier(variables[i]); } } return finishNode(ast.localStatement(variables, init)); } if (consume('function')) { name = parseIdentifier(); if (options.scope) scopeIdentifier(name); return parseFunctionDeclaration(name, true); } else { raiseUnexpectedToken('', token); } } function parseAssignmentOrCallStatement() { var previous = token , expression, marker; if (trackLocations) marker = createLocationMarker(); expression = parsePrefixExpression(); if (null == expression) return unexpected(token); if (',='.indexOf(token.value) >= 0) { var variables = [expression] , init = [] , exp; while (consume(',')) { exp = parsePrefixExpression(); if (null == exp) raiseUnexpectedToken('', token); variables.push(exp); } expect('='); do { exp = parseExpectedExpression(); init.push(exp); } while (consume(',')); pushLocation(marker); return finishNode(ast.assignmentStatement(variables, init)); } if (isCallExpression(expression)) { pushLocation(marker); return finishNode(ast.callStatement(expression)); } return unexpected(previous); } function parseIdentifier() { markLocation(); var identifier = token.value; if (Identifier !== token.type) raiseUnexpectedToken('', token); next(); return finishNode(ast.identifier(identifier)); } function parseFunctionDeclaration(name, isLocal) { var parameters = []; expect('('); if (!consume(')')) { while (true) { if (Identifier === token.type) { var parameter = parseIdentifier(); if (options.scope) scopeIdentifier(parameter); parameters.push(parameter); if (consume(',')) continue; else if (consume(')')) break; } else if (VarargLiteral === token.type) { parameters.push(parsePrimaryExpression()); expect(')'); break; } else { raiseUnexpectedToken(' or \'...\'', token); } } } var body = parseBlock(); expect('end'); isLocal = isLocal || false; return finishNode(ast.functionStatement(name, parameters, isLocal, body)); } function parseFunctionName() { var base, name, marker; if (trackLocations) marker = createLocationMarker(); base = parseIdentifier(); if (options.scope) attachScope(base, false); while (consume('.')) { pushLocation(marker); name = parseIdentifier(); if (options.scope) attachScope(name, false); base = finishNode(ast.memberExpression(base, '.', name)); } if (consume(':')) { pushLocation(marker); name = parseIdentifier(); if (options.scope) attachScope(name, false); base = finishNode(ast.memberExpression(base, ':', name)); } return base; } function parseTableConstructor() { var fields = [] , key, value; while (true) { markLocation(); if (Punctuator === token.type && consume('[')) { key = parseExpectedExpression(); expect(']'); expect('='); value = parseExpectedExpression(); fields.push(finishNode(ast.tableKey(key, value))); } else if (Identifier === token.type) { key = parseExpectedExpression(); if (consume('=')) { value = parseExpectedExpression(); fields.push(finishNode(ast.tableKeyString(key, value))); } else { fields.push(finishNode(ast.tableValue(key))); } } else { if (null == (value = parseExpression())) { locations.pop(); break; } fields.push(finishNode(ast.tableValue(value))); } if (',;'.indexOf(token.value) >= 0) { next(); continue; } if ('}' === token.value) break; } expect('}'); return finishNode(ast.tableConstructorExpression(fields)); } function parseExpression() { var expression = parseSubExpression(0); return expression; } function parseExpectedExpression() { var expression = parseExpression(); if (null == expression) raiseUnexpectedToken('', token); else return expression; } function binaryPrecedence(operator) { var charCode = operator.charCodeAt(0) , length = operator.length; if (1 === length) { switch (charCode) { case 94: return 10; // ^ case 42: case 47: case 37: return 7; // * / % case 43: case 45: return 6; // + - case 60: case 62: return 3; // < > } } else if (2 === length) { switch (charCode) { case 46: return 5; // .. case 60: case 62: case 61: case 126: return 3; // <= >= == ~= case 111: return 1; // or } } else if (97 === charCode && 'and' === operator) return 2; return 0; } function parseSubExpression(minPrecedence) { var operator = token.value , expression, marker; if (trackLocations) marker = createLocationMarker(); if (isUnary(token)) { markLocation(); next(); var argument = parseSubExpression(8); if (argument == null) raiseUnexpectedToken('', token); expression = finishNode(ast.unaryExpression(operator, argument)); } if (null == expression) { expression = parsePrimaryExpression(); if (null == expression) { expression = parsePrefixExpression(); } } if (null == expression) return null; var precedence; while (true) { operator = token.value; precedence = (Punctuator === token.type || Keyword === token.type) ? binaryPrecedence(operator) : 0; if (precedence === 0 || precedence <= minPrecedence) break; if ('^' === operator || '..' === operator) precedence--; next(); var right = parseSubExpression(precedence); if (null == right) raiseUnexpectedToken('', token); if (trackLocations) locations.push(marker); expression = finishNode(ast.binaryExpression(operator, expression, right)); } return expression; } function parsePrefixExpression() { var base, name, marker , isLocal; if (trackLocations) marker = createLocationMarker(); if (Identifier === token.type) { name = token.value; base = parseIdentifier(); if (options.scope) attachScope(base, isLocal = scopeHasName(name)); } else if (consume('(')) { base = parseExpectedExpression(); expect(')'); if (options.scope) isLocal = base.isLocal; } else { return null; } var expression, identifier; while (true) { if (Punctuator === token.type) { switch (token.value) { case '[': pushLocation(marker); next(); expression = parseExpectedExpression(); base = finishNode(ast.indexExpression(base, expression)); expect(']'); break; case '.': pushLocation(marker); next(); identifier = parseIdentifier(); if (options.scope) attachScope(identifier, isLocal); base = finishNode(ast.memberExpression(base, '.', identifier)); break; case ':': pushLocation(marker); next(); identifier = parseIdentifier(); if (options.scope) attachScope(identifier, isLocal); base = finishNode(ast.memberExpression(base, ':', identifier)); pushLocation(marker); base = parseCallExpression(base); break; case '(': case '{': // args pushLocation(marker); base = parseCallExpression(base); break; default: return base; } } else if (StringLiteral === token.type) { pushLocation(marker); base = parseCallExpression(base); } else { break; } } return base; } function parseCallExpression(base) { if (Punctuator === token.type) { switch (token.value) { case '(': next(); var expressions = []; var expression = parseExpression(); if (null != expression) expressions.push(expression); while (consume(',')) { expression = parseExpectedExpression(); expressions.push(expression); } expect(')'); return finishNode(ast.callExpression(base, expressions)); case '{': markLocation(); next(); var table = parseTableConstructor(); return finishNode(ast.tableCallExpression(base, table)); } } else if (StringLiteral === token.type) { return finishNode(ast.stringCallExpression(base, parsePrimaryExpression())); } raiseUnexpectedToken('function arguments', token); } function parsePrimaryExpression() { var literals = StringLiteral | NumericLiteral | BooleanLiteral | NilLiteral | VarargLiteral , value = token.value , type = token.type , marker; if (trackLocations) marker = createLocationMarker(); if (type & literals) { pushLocation(marker); var raw = input.slice(token.range[0], token.range[1]); next(); return finishNode(ast.literal(type, value, raw)); } else if (Keyword === type && 'function' === value) { pushLocation(marker); next(); return parseFunctionDeclaration(null); } else if (consume('{')) { pushLocation(marker); return parseTableConstructor(); } } exports.parse = parse; function parse(_input, _options) { if ('undefined' === typeof _options && 'object' === typeof _input) { _options = _input; _input = undefined; } if (!_options) _options = {}; input = _input || ''; options = extend(defaultOptions, _options); index = 0; line = 1; lineStart = 0; length = input.length; scopes = [[]]; scopeDepth = 0; globals = []; locations = []; if (options.comments) comments = []; if (!options.wait) return end(); return exports; } exports.write = write; function write(_input) { input += String(_input); length = input.length; return exports; } exports.end = end; function end(_input) { if ('undefined' !== typeof _input) write(_input); length = input.length; trackLocations = options.locations || options.ranges; lookahead = lex(); var chunk = parseChunk(); if (options.comments) chunk.comments = comments; if (options.scope) chunk.globals = globals; if (locations.length > 0) throw new Error('Location tracking failed. This is most likely a bug in luaparse'); return chunk; } })); }); define("ace/mode/lua_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/lua/luaparse"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var Mirror = require("../worker/mirror").Mirror; var luaparse = require("../mode/lua/luaparse"); var Worker = exports.Worker = function(sender) { Mirror.call(this, sender); this.setTimeout(500); }; oop.inherits(Worker, Mirror); (function() { this.onUpdate = function() { var value = this.doc.getValue(); var errors = []; try { luaparse.parse(value); } catch(e) { if (e instanceof SyntaxError) { errors.push({ row: e.line - 1, column: e.column, text: e.message, type: "error" }); } } this.sender.emit("annotate", errors); }; }).call(Worker.prototype); }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-autohotkey.js0000644000076400007640000020316212554155240024352 0ustar pravipravidefine("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var AutoHotKeyHighlightRules = function() { var autoItKeywords = 'And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|' + 'Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|' + 'ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|' + 'ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|' + 'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters' var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR' this.$rules = { start: [ { token: 'comment.line.ahk', regex: '(?:^| );.*$' }, { token: 'comment.block.ahk', regex: '/\\*', push: [ { token: 'comment.block.ahk', regex: '\\*/', next: 'pop' }, { defaultToken: 'comment.block.ahk' } ] }, { token: 'doc.comment.ahk', regex: '#cs', push: [ { token: 'doc.comment.ahk', regex: '#ce', next: 'pop' }, { defaultToken: 'doc.comment.ahk' } ] }, { token: 'keyword.command.ahk', regex: '(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b', caseInsensitive: true }, { token: 'keyword.control.ahk', regex: '(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b', caseInsensitive: true }, { token: 'support.function.ahk', regex: '(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b', caseInsensitive: true }, { token: 'variable.predefined.ahk', regex: '(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\\b', caseInsensitive: true }, { token: 'support.constant.ahk', regex: '(?:\\b|^)(?:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\\b', caseInsensitive: true }, { token: 'variable.parameter', regex: '(?:\\b|^)(?:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian)\\b', caseInsensitive: true }, { keywordMap: {"constant.language": autoItKeywords}, regex: '\\w+\\b'}, { keywordMap: {"variable.function": atKeywords}, regex: '@\\w+\\b'}, { token : "constant.numeric", regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, { token: 'keyword.operator.ahk', regex: '=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' }, { token: 'punctuation.ahk', regex: '#|`|::|,|\\{|\\}|\\(|\\)|\\%' }, { token: [ 'punctuation.quote.double', 'string.quoted.ahk', 'punctuation.quote.double' ], regex: '(")((?:[^"]|"")*)(")' }, { token: [ 'label.ahk', 'punctuation.definition.label.ahk' ], regex: '^([^: ]+)(:)(?!:)' } ] } this.normalizeRules(); }; AutoHotKeyHighlightRules.metaData = { name: 'AutoHotKey', scopeName: 'source.ahk', fileTypes: [ 'ahk' ], foldingStartMarker: '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))', foldingStopMarker: '^\\s*\\*/|^\\s*\\}' } oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules); exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = AutoHotKeyHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ";"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/autohotkey"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-handlebars.js0000644000076400007640000030144012554155240024257 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; function pop2(currentState, stack) { stack.splice(0, 3); return stack.shift() || "start"; } var HandlebarsHighlightRules = function() { HtmlHighlightRules.call(this); var hbs = { regex : "(?={{)", push : "handlebars" }; for (var key in this.$rules) { this.$rules[key].unshift(hbs); } this.$rules.handlebars = [{ token : "comment.start", regex : "{{!--", push : [{ token : "comment.end", regex : "--}}", next : pop2 }, { defaultToken : "comment" }] }, { token : "comment.start", regex : "{{!", push : [{ token : "comment.end", regex : "}}", next : pop2 }, { defaultToken : "comment" }] }, { token : "support.function", // unescaped variable regex : "{{{", push : [{ token : "support.function", regex : "}}}", next : pop2 }, { token : "variable.parameter", regex : "[a-zA-Z_$][a-zA-Z0-9_$]*" }] }, { token : "storage.type.start", // begin section regex : "{{[#\\^/&]?", push : [{ token : "storage.type.end", regex : "}}", next : pop2 }, { token : "variable.parameter", regex : "[a-zA-Z_$][a-zA-Z0-9_$]*" }] }]; this.normalizeRules(); }; oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules); exports.HandlebarsHighlightRules = HandlebarsHighlightRules; }); define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var XmlBehaviour = require("../behaviour/xml").XmlBehaviour; var HtmlBehaviour = function () { XmlBehaviour.call(this); }; oop.inherits(HtmlBehaviour, XmlBehaviour); exports.HtmlBehaviour = HtmlBehaviour; }); define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules; var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var Mode = function() { HtmlMode.call(this); this.HighlightRules = HandlebarsHighlightRules; this.$behaviour = new HtmlBehaviour(); this.foldingRules = new HtmlFoldMode(); }; oop.inherits(Mode, HtmlMode); (function() { this.blockComment = {start: "{!--", end: "--}"}; this.$id = "ace/mode/handlebars"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-monokai.js0000644000076400007640000000515212554155240023770 0ustar pravipravidefine("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-monokai"; exports.cssText = ".ace-monokai .ace_gutter {\ background: #2F3129;\ color: #8F908A\ }\ .ace-monokai .ace_print-margin {\ width: 1px;\ background: #555651\ }\ .ace-monokai {\ background-color: #272822;\ color: #F8F8F2\ }\ .ace-monokai .ace_cursor {\ color: #F8F8F0\ }\ .ace-monokai .ace_marker-layer .ace_selection {\ background: #49483E\ }\ .ace-monokai.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #272822;\ border-radius: 2px\ }\ .ace-monokai .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-monokai .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #49483E\ }\ .ace-monokai .ace_marker-layer .ace_active-line {\ background: #202020\ }\ .ace-monokai .ace_gutter-active-line {\ background-color: #272727\ }\ .ace-monokai .ace_marker-layer .ace_selected-word {\ border: 1px solid #49483E\ }\ .ace-monokai .ace_invisible {\ color: #52524d\ }\ .ace-monokai .ace_entity.ace_name.ace_tag,\ .ace-monokai .ace_keyword,\ .ace-monokai .ace_meta.ace_tag,\ .ace-monokai .ace_storage {\ color: #F92672\ }\ .ace-monokai .ace_punctuation,\ .ace-monokai .ace_punctuation.ace_tag {\ color: #fff\ }\ .ace-monokai .ace_constant.ace_character,\ .ace-monokai .ace_constant.ace_language,\ .ace-monokai .ace_constant.ace_numeric,\ .ace-monokai .ace_constant.ace_other {\ color: #AE81FF\ }\ .ace-monokai .ace_invalid {\ color: #F8F8F0;\ background-color: #F92672\ }\ .ace-monokai .ace_invalid.ace_deprecated {\ color: #F8F8F0;\ background-color: #AE81FF\ }\ .ace-monokai .ace_support.ace_constant,\ .ace-monokai .ace_support.ace_function {\ color: #66D9EF\ }\ .ace-monokai .ace_fold {\ background-color: #A6E22E;\ border-color: #F8F8F2\ }\ .ace-monokai .ace_storage.ace_type,\ .ace-monokai .ace_support.ace_class,\ .ace-monokai .ace_support.ace_type {\ font-style: italic;\ color: #66D9EF\ }\ .ace-monokai .ace_entity.ace_name.ace_function,\ .ace-monokai .ace_entity.ace_other,\ .ace-monokai .ace_entity.ace_other.ace_attribute-name,\ .ace-monokai .ace_variable {\ color: #A6E22E\ }\ .ace-monokai .ace_variable.ace_parameter {\ font-style: italic;\ color: #FD971F\ }\ .ace-monokai .ace_string {\ color: #E6DB74\ }\ .ace-monokai .ace_comment {\ color: #75715E\ }\ .ace-monokai .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-vala.js0000644000076400007640000012243512554155240023104 0ustar pravipravidefine("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ValaHighlightRules = function() { this.$rules = { start: [ { token: [ 'meta.using.vala', 'keyword.other.using.vala', 'meta.using.vala', 'storage.modifier.using.vala', 'meta.using.vala', 'punctuation.terminator.vala' ], regex: '^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?' }, { include: '#code' } ], '#all-types': [ { include: '#primitive-arrays' }, { include: '#primitive-types' }, { include: '#object-types' } ], '#annotations': [ { token: [ 'storage.type.annotation.vala', 'punctuation.definition.annotation-arguments.begin.vala' ], regex: '(@[^ (]+)(\\()', push: [ { token: 'punctuation.definition.annotation-arguments.end.vala', regex: '\\)', next: 'pop' }, { token: [ 'constant.other.key.vala', 'text', 'keyword.operator.assignment.vala' ], regex: '(\\w*)(\\s*)(=)' }, { include: '#code' }, { token: 'punctuation.seperator.property.vala', regex: ',' }, { defaultToken: 'meta.declaration.annotation.vala' } ] }, { token: 'storage.type.annotation.vala', regex: '@\\w*' } ], '#anonymous-classes-and-new': [ { token: 'keyword.control.new.vala', regex: '\\bnew\\b', push_disabled: [ { token: 'text', regex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)', next: 'pop' }, { token: [ 'storage.type.vala', 'text' ], regex: '(\\w+)(\\s*)(?=\\[)', push: [ { token: 'text', regex: '}|(?=;|\\))', next: 'pop' }, { token: 'text', regex: '\\[', push: [ { token: 'text', regex: '\\]', next: 'pop' }, { include: '#code' } ] }, { token: 'text', regex: '{', push: [ { token: 'text', regex: '(?=})', next: 'pop' }, { include: '#code' } ] } ] }, { token: 'text', regex: '(?=\\w.*\\()', push: [ { token: 'text', regex: '(?<=\\))', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?<=\\))', next: 'pop' }, { include: '#object-types' }, { token: 'text', regex: '\\(', push: [ { token: 'text', regex: '\\)', next: 'pop' }, { include: '#code' } ] } ] }, { token: 'meta.inner-class.vala', regex: '{', push: [ { token: 'meta.inner-class.vala', regex: '}', next: 'pop' }, { include: '#class-body' }, { defaultToken: 'meta.inner-class.vala' } ] } ] } ], '#assertions': [ { token: [ 'keyword.control.assert.vala', 'meta.declaration.assertion.vala' ], regex: '\\b(assert|requires|ensures)(\\s)', push: [ { token: 'meta.declaration.assertion.vala', regex: '$', next: 'pop' }, { token: 'keyword.operator.assert.expression-seperator.vala', regex: ':' }, { include: '#code' }, { defaultToken: 'meta.declaration.assertion.vala' } ] } ], '#class': [ { token: 'meta.class.vala', regex: '(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)', push: [ { token: 'paren.vala', regex: '}', next: 'pop' }, { include: '#storage-modifiers' }, { include: '#comments' }, { token: [ 'storage.modifier.vala', 'meta.class.identifier.vala', 'entity.name.type.class.vala' ], regex: '(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)' }, { token: 'storage.modifier.extends.vala', regex: ':', push: [ { token: 'meta.definition.class.inherited.classes.vala', regex: '(?={|,)', next: 'pop' }, { include: '#object-types-inherited' }, { include: '#comments' }, { defaultToken: 'meta.definition.class.inherited.classes.vala' } ] }, { token: [ 'storage.modifier.implements.vala', 'meta.definition.class.implemented.interfaces.vala' ], regex: '(,)(\\s)', push: [ { token: 'meta.definition.class.implemented.interfaces.vala', regex: '(?=\\{)', next: 'pop' }, { include: '#object-types-inherited' }, { include: '#comments' }, { defaultToken: 'meta.definition.class.implemented.interfaces.vala' } ] }, { token: 'paren.vala', regex: '{', push: [ { token: 'paren.vala', regex: '(?=})', next: 'pop' }, { include: '#class-body' }, { defaultToken: 'meta.class.body.vala' } ] }, { defaultToken: 'meta.class.vala' } ], comment: 'attempting to put namespace in here.' } ], '#class-body': [ { include: '#comments' }, { include: '#class' }, { include: '#enums' }, { include: '#methods' }, { include: '#annotations' }, { include: '#storage-modifiers' }, { include: '#code' } ], '#code': [ { include: '#comments' }, { include: '#class' }, { token: 'text', regex: '{', push: [ { token: 'text', regex: '}', next: 'pop' }, { include: '#code' } ] }, { include: '#assertions' }, { include: '#parens' }, { include: '#constants-and-special-vars' }, { include: '#anonymous-classes-and-new' }, { include: '#keywords' }, { include: '#storage-modifiers' }, { include: '#strings' }, { include: '#all-types' } ], '#comments': [ { token: 'punctuation.definition.comment.vala', regex: '/\\*\\*/' }, { include: 'text.html.javadoc' }, { include: '#comments-inline' } ], '#comments-inline': [ { token: 'punctuation.definition.comment.vala', regex: '/\\*', push: [ { token: 'punctuation.definition.comment.vala', regex: '\\*/', next: 'pop' }, { defaultToken: 'comment.block.vala' } ] }, { token: [ 'text', 'punctuation.definition.comment.vala', 'comment.line.double-slash.vala' ], regex: '(\\s*)(//)(.*$)' } ], '#constants-and-special-vars': [ { token: 'constant.language.vala', regex: '\\b(?:true|false|null)\\b' }, { token: 'variable.language.vala', regex: '\\b(?:this|base)\\b' }, { token: 'constant.numeric.vala', regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' }, { token: [ 'keyword.operator.dereference.vala', 'constant.other.vala' ], regex: '((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b' } ], '#enums': [ { token: 'text', regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))', push: [ { token: 'text', regex: '(?=;|})', next: 'pop' }, { token: 'constant.other.enum.vala', regex: '\\w+', push: [ { token: 'meta.enum.vala', regex: '(?=,|;|})', next: 'pop' }, { include: '#parens' }, { token: 'text', regex: '{', push: [ { token: 'text', regex: '}', next: 'pop' }, { include: '#class-body' } ] }, { defaultToken: 'meta.enum.vala' } ] } ] } ], '#keywords': [ { token: 'keyword.control.catch-exception.vala', regex: '\\b(?:try|catch|finally|throw)\\b' }, { token: 'keyword.control.vala', regex: '\\?|:|\\?\\?' }, { token: 'keyword.control.vala', regex: '\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b' }, { token: 'keyword.operator.vala', regex: '\\b(?:typeof|is|as)\\b' }, { token: 'keyword.operator.comparison.vala', regex: '==|!=|<=|>=|<>|<|>' }, { token: 'keyword.operator.assignment.vala', regex: '=' }, { token: 'keyword.operator.increment-decrement.vala', regex: '\\-\\-|\\+\\+' }, { token: 'keyword.operator.arithmetic.vala', regex: '\\-|\\+|\\*|\\/|%' }, { token: 'keyword.operator.logical.vala', regex: '!|&&|\\|\\|' }, { token: 'keyword.operator.dereference.vala', regex: '\\.(?=\\S)', originalRegex: '(?<=\\S)\\.(?=\\S)' }, { token: 'punctuation.terminator.vala', regex: ';' }, { token: 'keyword.operator.ownership', regex: 'owned|unowned' } ], '#methods': [ { token: 'meta.method.vala', regex: '(?!new)(?=\\w.*\\s+)(?=[^=]+\\()', push: [ { token: 'paren.vala', regex: '}|(?=;)', next: 'pop' }, { include: '#storage-modifiers' }, { token: [ 'entity.name.function.vala', 'meta.method.identifier.vala' ], regex: '([\\~\\w\\.]+)(\\s*\\()', push: [ { token: 'meta.method.identifier.vala', regex: '\\)', next: 'pop' }, { include: '#parameters' }, { defaultToken: 'meta.method.identifier.vala' } ] }, { token: 'meta.method.return-type.vala', regex: '(?=\\w.*\\s+\\w+\\s*\\()', push: [ { token: 'meta.method.return-type.vala', regex: '(?=\\w+\\s*\\()', next: 'pop' }, { include: '#all-types' }, { defaultToken: 'meta.method.return-type.vala' } ] }, { include: '#throws' }, { token: 'paren.vala', regex: '{', push: [ { token: 'paren.vala', regex: '(?=})', next: 'pop' }, { include: '#code' }, { defaultToken: 'meta.method.body.vala' } ] }, { defaultToken: 'meta.method.vala' } ] } ], '#namespace': [ { token: 'text', regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))', push: [ { token: 'text', regex: '(?=;|})', next: 'pop' }, { token: 'constant.other.namespace.vala', regex: '\\w+', push: [ { token: 'meta.namespace.vala', regex: '(?=,|;|})', next: 'pop' }, { include: '#parens' }, { token: 'text', regex: '{', push: [ { token: 'text', regex: '}', next: 'pop' }, { include: '#code' } ] }, { defaultToken: 'meta.namespace.vala' } ] } ], comment: 'This is not quite right. See the class grammar right now' } ], '#object-types': [ { token: 'storage.type.generic.vala', regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<', push: [ { token: 'storage.type.generic.vala', regex: '>|[^\\w\\s,\\?<\\[()\\]]', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '>|[^\\w\\s,\\?<\\[(?:[,]+)\\]]', next: 'pop' }, { include: '#object-types' }, { token: 'storage.type.generic.vala', regex: '<', push: [ { token: 'storage.type.generic.vala', regex: '>|[^\\w\\s,\\[\\]<]', next: 'pop' }, { defaultToken: 'storage.type.generic.vala' } ], comment: 'This is just to support <>\'s with no actual type prefix' }, { defaultToken: 'storage.type.generic.vala' } ] }, { token: 'storage.type.object.array.vala', regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)', push: [ { token: 'storage.type.object.array.vala', regex: '(?=[^\\]\\s])', next: 'pop' }, { token: 'text', regex: '\\[', push: [ { token: 'text', regex: '\\]', next: 'pop' }, { include: '#code' } ] }, { defaultToken: 'storage.type.object.array.vala' } ] }, { token: [ 'storage.type.vala', 'keyword.operator.dereference.vala', 'storage.type.vala' ], regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)' } ], '#object-types-inherited': [ { token: 'entity.other.inherited-class.vala', regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<', push: [ { token: 'entity.other.inherited-class.vala', regex: '>|[^\\w\\s,<]', next: 'pop' }, { include: '#object-types' }, { token: 'storage.type.generic.vala', regex: '<', push: [ { token: 'storage.type.generic.vala', regex: '>|[^\\w\\s,<]', next: 'pop' }, { defaultToken: 'storage.type.generic.vala' } ], comment: 'This is just to support <>\'s with no actual type prefix' }, { defaultToken: 'entity.other.inherited-class.vala' } ] }, { token: [ 'entity.other.inherited-class.vala', 'keyword.operator.dereference.vala', 'entity.other.inherited-class.vala' ], regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)' } ], '#parameters': [ { token: 'storage.modifier.vala', regex: 'final' }, { include: '#primitive-arrays' }, { include: '#primitive-types' }, { include: '#object-types' }, { token: 'variable.parameter.vala', regex: '\\w+' } ], '#parens': [ { token: 'text', regex: '\\(', push: [ { token: 'text', regex: '\\)', next: 'pop' }, { include: '#code' } ] } ], '#primitive-arrays': [ { token: 'storage.type.primitive.array.vala', regex: '\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b' } ], '#primitive-types': [ { token: 'storage.type.primitive.vala', regex: '\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b', comment: 'var is not really a primitive, but acts like one in most cases' } ], '#storage-modifiers': [ { token: 'storage.modifier.vala', regex: '\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b', comment: 'Not sure about unsafe and readonly' } ], '#strings': [ { token: 'punctuation.definition.string.begin.vala', regex: '@"', push: [ { token: 'punctuation.definition.string.end.vala', regex: '"', next: 'pop' }, { token: 'constant.character.escape.vala', regex: '\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))' }, { defaultToken: 'string.quoted.interpolated.vala' } ] }, { token: 'punctuation.definition.string.begin.vala', regex: '"', push: [ { token: 'punctuation.definition.string.end.vala', regex: '"', next: 'pop' }, { token: 'constant.character.escape.vala', regex: '\\\\.' }, { token: 'constant.character.escape.vala', regex: '%[\\w\\.\\-]+' }, { defaultToken: 'string.quoted.double.vala' } ] }, { token: 'punctuation.definition.string.begin.vala', regex: '\'', push: [ { token: 'punctuation.definition.string.end.vala', regex: '\'', next: 'pop' }, { token: 'constant.character.escape.vala', regex: '\\\\.' }, { defaultToken: 'string.quoted.single.vala' } ] }, { token: 'punctuation.definition.string.begin.vala', regex: '"""', push: [ { token: 'punctuation.definition.string.end.vala', regex: '"""', next: 'pop' }, { token: 'constant.character.escape.vala', regex: '%[\\w\\.\\-]+' }, { defaultToken: 'string.quoted.triple.vala' } ] } ], '#throws': [ { token: 'storage.modifier.vala', regex: 'throws', push: [ { token: 'meta.throwables.vala', regex: '(?={|;)', next: 'pop' }, { include: '#object-types' }, { defaultToken: 'meta.throwables.vala' } ] } ], '#values': [ { include: '#strings' }, { include: '#object-types' }, { include: '#constants-and-special-vars' } ] } this.normalizeRules(); }; ValaHighlightRules.metaData = { comment: 'Based heavily on the Java bundle\'s language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n', fileTypes: [ 'vala' ], foldingStartMarker: '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)', foldingStopMarker: '^\\s*(\\}|// \\}\\}\\}$)', name: 'Vala', scopeName: 'source.vala' } oop.inherits(ValaHighlightRules, TextHighlightRules); exports.ValaHighlightRules = ValaHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var Tokenizer = require("../tokenizer").Tokenizer; var ValaHighlightRules = require("./vala_highlight_rules").ValaHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Mode = function() { this.HighlightRules = ValaHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/vala" }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/keybinding-vim.js0000644000076400007640000060643012554155240024155 0ustar pravipravidefine("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"], function(require, exports, module) { 'use strict'; function log() { var d = ""; function format(p) { if (typeof p != "object") return p + ""; if ("line" in p) { return p.line + ":" + p.ch; } if ("anchor" in p) { return format(p.anchor) + "->" + format(p.head); } if (Array.isArray(p)) return "[" + p.map(function(x) { return format(x); }) + "]"; return JSON.stringify(p); } for (var i = 0; i < arguments.length; i++) { var p = arguments[i]; var f = format(p); d += f + " "; } console.log(d); } var Range = require("../range").Range; var EventEmitter = require("../lib/event_emitter").EventEmitter; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var KEYS = require("../lib/keys"); var event = require("../lib/event"); var Search = require("../search").Search; var useragent = require("../lib/useragent"); var SearchHighlight = require("../search_highlight").SearchHighlight; var multiSelectCommands = require("../commands/multi_select_commands"); var TextModeTokenRe = require("../mode/text").Mode.prototype.tokenRe; require("../multi_select"); var CodeMirror = function(ace) { this.ace = ace; this.state = {}; this.marks = {}; this.$uid = 0; this.onChange = this.onChange.bind(this); this.onSelectionChange = this.onSelectionChange.bind(this); this.onBeforeEndOperation = this.onBeforeEndOperation.bind(this); this.ace.on('change', this.onChange); this.ace.on('changeSelection', this.onSelectionChange); this.ace.on('beforeEndOperation', this.onBeforeEndOperation); }; CodeMirror.Pos = function(line, ch) { if (!(this instanceof Pos)) return new Pos(line, ch); this.line = line; this.ch = ch; }; CodeMirror.defineOption = function(name, val, setter) {}; CodeMirror.commands = { redo: function(cm) { cm.ace.redo(); }, undo: function(cm) { cm.ace.undo(); }, newlineAndIndent: function(cm) { cm.ace.insert("\n"); }, }; CodeMirror.keyMap = {}; CodeMirror.addClass = CodeMirror.rmClass = CodeMirror.e_stop = function() {}; CodeMirror.keyName = function(e) { if (e.key) return e.key; var key = (KEYS[e.keyCode] || ""); if (key.length == 1) key = key.toUpperCase(); key = event.getModifierString(e).replace(/(^|-)\w/g, function(m) { return m.toUpperCase(); }) + key; return key; }; CodeMirror.keyMap['default'] = function(key) { return function(cm) { var cmd = cm.ace.commands.commandKeyBinding[key.toLowerCase()]; return cmd && cm.ace.execCommand(cmd) !== false; }; }; CodeMirror.lookupKey = function lookupKey(key, map, handle) { if (typeof map == "string") map = CodeMirror.keyMap[map]; var found = typeof map == "function" ? map(key) : map[key]; if (found === false) return "nothing"; if (found === "...") return "multi"; if (found != null && handle(found)) return "handled"; if (map.fallthrough) { if (!Array.isArray(map.fallthrough)) return lookupKey(key, map.fallthrough, handle); for (var i = 0; i < map.fallthrough.length; i++) { var result = lookupKey(key, map.fallthrough[i], handle); if (result) return result; } } }; CodeMirror.signal = function(o, name, e) { return o._signal(name, e) }; CodeMirror.on = event.addListener; CodeMirror.off = event.removeListener; CodeMirror.isWordChar = function(ch) { TextModeTokenRe.lastIndex = 0; return TextModeTokenRe.test(ch); }; (function() { oop.implement(CodeMirror.prototype, EventEmitter); this.destroy = function() { this.ace.off('change', this.onChange); this.ace.off('changeSelection', this.onSelectionChange); this.ace.off('beforeEndOperation', this.onBeforeEndOperation); this.removeOverlay(); }; this.virtualSelectionMode = function() { return this.ace.inVirtualSelectionMode && this.ace.selection.index; }; this.onChange = function(delta) { var oldDelta = delta.data; delta = { start: oldDelta.range.start, end: oldDelta.range.end, action: oldDelta.action, lines: oldDelta.lines || [oldDelta.text] };// v1.2 api compatibility if (delta.action[0] == 'i') { var change = { text: delta.lines }; var curOp = this.curOp = this.curOp || {}; if (!curOp.changeHandlers) curOp.changeHandlers = this._eventRegistry["change"] && this._eventRegistry["change"].slice(); if (this.virtualSelectionMode()) return; if (!curOp.lastChange) { curOp.lastChange = curOp.change = change; } else { curOp.lastChange.next = curOp.lastChange = change; } } this.$updateMarkers(delta); }; this.onSelectionChange = function() { var curOp = this.curOp = this.curOp || {}; if (!curOp.cursorActivityHandlers) curOp.cursorActivityHandlers = this._eventRegistry["cursorActivity"] && this._eventRegistry["cursorActivity"].slice(); this.curOp.cursorActivity = true; if (this.ace.inMultiSelectMode) { this.ace.keyBinding.removeKeyboardHandler(multiSelectCommands.keyboardHandler); } }; this.operation = function(fn, force) { if (!force && this.curOp || force && this.curOp && this.curOp.force) { return fn(); } if (force || !this.ace.curOp) { if (this.curOp) this.onBeforeEndOperation(); } if (!this.ace.curOp) { var prevOp = this.ace.prevOp; this.ace.startOperation({ command: { name: "vim", scrollIntoView: "cursor" } }); } var curOp = this.curOp = this.curOp || {}; this.curOp.force = force; var result = fn(); if (this.ace.curOp && this.ace.curOp.command.name == "vim") { this.ace.endOperation(); if (!curOp.cursorActivity && !curOp.lastChange && prevOp) this.ace.prevOp = prevOp; } if (force || !this.ace.curOp) { if (this.curOp) this.onBeforeEndOperation(); } return result; }; this.onBeforeEndOperation = function() { var op = this.curOp; if (op) { if (op.change) { this.signal("change", op.change, op); } if (op && op.cursorActivity) { this.signal("cursorActivity", null, op); } this.curOp = null; } }; this.signal = function(eventName, e, handlers) { var listeners = handlers ? handlers[eventName + "Handlers"] : (this._eventRegistry || {})[eventName]; if (!listeners) return; listeners = listeners.slice(); for (var i=0; i 0) { point.row += rowShift; point.column += point.row == end.row ? colShift : 0; continue; } if (!isInsert && cmp2 <= 0) { point.row = start.row; point.column = start.column; if (cmp2 === 0) point.bias = 1; } } }; var Marker = function(cm, id, row, column) { this.cm = cm; this.id = id; this.row = row; this.column = column; cm.marks[this.id] = this; }; Marker.prototype.clear = function() { delete this.cm.marks[this.id] }; Marker.prototype.find = function() { return toCmPos(this) }; this.setBookmark = function(cursor, options) { var bm = new Marker(this, this.$uid++, cursor.line, cursor.ch); if (!options || !options.insertLeft) bm.$insertRight = true; this.marks[bm.id] = bm; return bm; }; this.moveH = function(increment, unit) { if (unit == 'char') { var sel = this.ace.selection; sel.clearSelection(); sel.moveCursorBy(0, increment); } }; this.findPosV = function(start, amount, unit, goalColumn) { if (unit == 'page') { var renderer = this.ace.renderer; var config = renderer.layerConfig; amount = amount * Math.floor(config.height / config.lineHeight); unit = 'line'; } if (unit == 'line') { var screenPos = this.ace.session.documentToScreenPosition(start.line, start.ch); if (goalColumn != null) screenPos.column = goalColumn; screenPos.row += amount; screenPos.row = Math.min(Math.max(0, screenPos.row), this.ace.session.getScreenLength() - 1); var pos = this.ace.session.screenToDocumentPosition(screenPos.row, screenPos.column); return toCmPos(pos); } else { debugger; } }; this.charCoords = function(pos, mode) { if (mode == 'div' || !mode) { var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch); return {left: sc.column, top: sc.row}; }if (mode == 'local') { var renderer = this.ace.renderer; var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch); var lh = renderer.layerConfig.lineHeight; var cw = renderer.layerConfig.characterWidth; var top = lh * sc.row; return {left: sc.column * cw, top: top, bottom: top + lh}; } }; this.coordsChar = function(pos, mode) { var renderer = this.ace.renderer; if (mode == 'local') { var row = Math.max(0, Math.floor(pos.top / renderer.lineHeight)); var col = Math.max(0, Math.floor(pos.left / renderer.characterWidth)); var ch = renderer.session.screenToDocumentPosition(row, col); return toCmPos(ch); } else if (mode == 'div') { throw "not implemented"; } }; this.getSearchCursor = function(query, pos, caseFold) { var caseSensitive = false; var isRegexp = false; if (query instanceof RegExp && !query.global) { caseSensitive = !query.ignoreCase; query = query.source; isRegexp = true; } var search = new Search(); if (pos.ch == undefined) pos.ch = Number.MAX_VALUE; var acePos = {row: pos.line, column: pos.ch}; var cm = this; var last = null; return { findNext: function() { return this.find(false) }, findPrevious: function() {return this.find(true) }, find: function(back) { search.setOptions({ needle: query, caseSensitive: caseSensitive, wrap: false, backwards: back, regExp: isRegexp, start: last || acePos }); var range = search.find(cm.ace.session); if (range && range.isEmpty()) { if (cm.getLine(range.start.row).length == range.start.column) { search.$options.start = range; range = search.find(cm.ace.session); } } last = range; return last; }, from: function() { return last && toCmPos(last.start) }, to: function() { return last && toCmPos(last.end) }, replace: function(text) { if (last) { last.end = cm.ace.session.doc.replace(last, text); } } }; }; this.scrollTo = function(x, y) { var renderer = this.ace.renderer; var config = renderer.layerConfig; var maxHeight = config.maxHeight; maxHeight -= (renderer.$size.scrollerHeight - renderer.lineHeight) * renderer.$scrollPastEnd; if (y != null) this.ace.session.setScrollTop(Math.max(0, Math.min(y, maxHeight))); if (x != null) this.ace.session.setScrollLeft(Math.max(0, Math.min(x, config.width))); }; this.scrollInfo = function() { return 0; }; this.scrollIntoView = function(pos, margin) { if (pos) { var renderer = this.ace.renderer; var viewMargin = { "top": 0, "bottom": margin }; renderer.scrollCursorIntoView(toAcePos(pos), (renderer.lineHeight * 2) / renderer.$size.scrollerHeight, viewMargin); } }; this.getLine = function(row) { return this.ace.session.getLine(row) }; this.getRange = function(s, e) { return this.ace.session.getTextRange(new Range(s.line, s.ch, e.line, e.ch)); }; this.replaceRange = function(text, s, e) { if (!e) e = s; return this.ace.session.replace(new Range(s.line, s.ch, e.line, e.ch), text); }; this.replaceSelections = function(p) { var sel = this.ace.selection; if (this.ace.inVirtualSelectionMode) { this.ace.session.replace(sel.getRange(), p[0] || ""); return; } sel.inVirtualSelectionMode = true; var ranges = sel.rangeList.ranges; if (!ranges.length) ranges = [this.ace.multiSelect.getRange()]; for (var i = ranges.length; i--;) this.ace.session.replace(ranges[i], p[i] || ""); sel.inVirtualSelectionMode = false; }; this.getSelection = function() { return this.ace.getSelectedText(); }; this.getSelections = function() { return this.listSelections().map(function(x) { return this.getRange(x.anchor, x.head); }, this); }; this.getInputField = function() { return this.ace.textInput.getElement(); }; this.getWrapperElement = function() { return this.ace.containter; }; var optMap = { indentWithTabs: "useSoftTabs", indentUnit: "tabSize", firstLineNumber: "firstLineNumber" }; this.setOption = function(name, val) { this.state[name] = val; switch (name) { case 'indentWithTabs': name = optMap[name]; val = !val; break; default: name = optMap[name]; } if (name) this.ace.setOption(name, val); }; this.getOption = function(name, val) { var aceOpt = optMap[name]; if (aceOpt) val = this.ace.getOption(aceOpt); switch (name) { case 'indentWithTabs': name = optMap[name]; return !val; } return aceOpt ? val : this.state[name]; }; this.toggleOverwrite = function(on) { this.state.overwrite = on; return this.ace.setOverwrite(on); }; this.addOverlay = function(o) { if (!this.$searchHighlight || !this.$searchHighlight.session) { var highlight = new SearchHighlight(null, "ace_highlight-marker", "text"); var marker = this.ace.session.addDynamicMarker(highlight); highlight.id = marker.id; highlight.session = this.ace.session; highlight.destroy = function(o) { highlight.session.off("change", highlight.updateOnChange); highlight.session.off("changeEditor", highlight.destroy); highlight.session.removeMarker(highlight.id); highlight.session = null; }; highlight.updateOnChange = function(delta) { delta = delta.data.range;// v1.2 api compatibility var row = delta.start.row; if (row == delta.end.row) highlight.cache[row] = undefined; else highlight.cache.splice(row, highlight.cache.length); }; highlight.session.on("changeEditor", highlight.destroy); highlight.session.on("change", highlight.updateOnChange); } var re = new RegExp(o.query.source, "gmi"); this.$searchHighlight = o.highlight = highlight; this.$searchHighlight.setRegexp(re); this.ace.renderer.updateBackMarkers(); }; this.removeOverlay = function(o) { if (this.$searchHighlight && this.$searchHighlight.session) { this.$searchHighlight.destroy(); } }; this.getScrollInfo = function() { var renderer = this.ace.renderer; var config = renderer.layerConfig; return { left: renderer.scrollLeft, top: renderer.scrollTop, height: config.maxHeight, width: config.width, clientHeight: config.height, clientWidth: config.width }; }; this.getValue = function() { return this.ace.getValue(); }; this.setValue = function(v) { return this.ace.setValue(v); }; this.getTokenTypeAt = function(pos) { var token = this.ace.session.getTokenAt(pos.line, pos.ch); return token && /comment|string/.test(token.type) ? "string" : ""; }; this.findMatchingBracket = function(pos) { var m = this.ace.session.findMatchingBracket(toAcePos(pos)); return {to: m && toCmPos(m)}; }; this.indentLine = function(line, method) { if (method === true) this.ace.session.indentRows(line, line, "\t"); else if (method === false) this.ace.session.outdentRows(new Range(line, 0, line, 0)); }; this.indexFromPos = function(pos) { return this.ace.session.doc.positionToIndex(toAcePos(pos)); }; this.posFromIndex = function(index) { return toCmPos(this.ace.session.doc.indexToPosition(index)); }; this.focus = function(index) { return this.ace.focus(); }; this.blur = function(index) { return this.ace.blur(); }; this.defaultTextHeight = function(index) { return this.ace.renderer.layerConfig.lineHeight; }; this.scanForBracket = function(pos, dir, _, options) { var re = options.bracketRegex.source; if (dir == 1) { var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), /paren|text/); } else { var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), {row: pos.line, column: pos.ch + 1}, /paren|text/); } return m && {pos: toCmPos(m)}; }; this.refresh = function() { return this.ace.resize(true); }; }).call(CodeMirror.prototype); function toAcePos(cmPos) { return {row: cmPos.line, column: cmPos.ch}; } function toCmPos(acePos) { return new Pos(acePos.row, acePos.column); } var StringStream = CodeMirror.StringStream = function(string, tabSize) { this.pos = this.start = 0; this.string = string; this.tabSize = tabSize || 8; this.lastColumnPos = this.lastColumnValue = 0; this.lineStart = 0; }; StringStream.prototype = { eol: function() {return this.pos >= this.string.length;}, sol: function() {return this.pos == this.lineStart;}, peek: function() {return this.string.charAt(this.pos) || undefined;}, next: function() { if (this.pos < this.string.length) return this.string.charAt(this.pos++); }, eat: function(match) { var ch = this.string.charAt(this.pos); if (typeof match == "string") var ok = ch == match; else var ok = ch && (match.test ? match.test(ch) : match(ch)); if (ok) {++this.pos; return ch;} }, eatWhile: function(match) { var start = this.pos; while (this.eat(match)){} return this.pos > start; }, eatSpace: function() { var start = this.pos; while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; return this.pos > start; }, skipToEnd: function() {this.pos = this.string.length;}, skipTo: function(ch) { var found = this.string.indexOf(ch, this.pos); if (found > -1) {this.pos = found; return true;} }, backUp: function(n) {this.pos -= n;}, column: function() { throw "not implemented"; }, indentation: function() { throw "not implemented"; }, match: function(pattern, consume, caseInsensitive) { if (typeof pattern == "string") { var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; var substr = this.string.substr(this.pos, pattern.length); if (cased(substr) == cased(pattern)) { if (consume !== false) this.pos += pattern.length; return true; } } else { var match = this.string.slice(this.pos).match(pattern); if (match && match.index > 0) return null; if (match && consume !== false) this.pos += match[0].length; return match; } }, current: function(){return this.string.slice(this.start, this.pos);}, hideFirstChars: function(n, inner) { this.lineStart += n; try { return inner(); } finally { this.lineStart -= n; } } }; CodeMirror.defineExtension = function(name, fn) { CodeMirror.prototype[name] = fn; }; dom.importCssString(".normal-mode .ace_cursor{\ border: 0!important;\ background-color: red;\ opacity: 0.5;\ }.ace_dialog {\ position: absolute;\ left: 0; right: 0;\ background: white;\ z-index: 15;\ padding: .1em .8em;\ overflow: hidden;\ color: #333;\ }\ .ace_dialog-top {\ border-bottom: 1px solid #eee;\ top: 0;\ }\ .ace_dialog-bottom {\ border-top: 1px solid #eee;\ bottom: 0;\ }\ .ace_dialog input {\ border: none;\ outline: none;\ background: transparent;\ width: 20em;\ color: inherit;\ font-family: monospace;\ }", "vimMode"); (function() { function dialogDiv(cm, template, bottom) { var wrap = cm.ace.container; var dialog; dialog = wrap.appendChild(document.createElement("div")); if (bottom) dialog.className = "ace_dialog ace_dialog-bottom"; else dialog.className = "ace_dialog ace_dialog-top"; if (typeof template == "string") { dialog.innerHTML = template; } else { // Assuming it's a detached DOM element. dialog.appendChild(template); } return dialog; } function closeNotification(cm, newVal) { if (cm.state.currentNotificationClose) cm.state.currentNotificationClose(); cm.state.currentNotificationClose = newVal; } CodeMirror.defineExtension("openDialog", function(template, callback, options) { if (this.virtualSelectionMode()) return; if (!options) options = {}; closeNotification(this, null); var dialog = dialogDiv(this, template, options.bottom); var closed = false, me = this; function close(newVal) { if (typeof newVal == 'string') { inp.value = newVal; } else { if (closed) return; closed = true; dialog.parentNode.removeChild(dialog); me.focus(); if (options.onClose) options.onClose(dialog); } } var inp = dialog.getElementsByTagName("input")[0], button; if (inp) { if (options.value) { inp.value = options.value; if (options.select !== false) inp.select(); } if (options.onInput) CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);}); if (options.onKeyUp) CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);}); CodeMirror.on(inp, "keydown", function(e) { if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; } if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) { inp.blur(); CodeMirror.e_stop(e); close(); } if (e.keyCode == 13) callback(inp.value); }); if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close); inp.focus(); } else if (button = dialog.getElementsByTagName("button")[0]) { CodeMirror.on(button, "click", function() { close(); me.focus(); }); if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close); button.focus(); } return close; }); CodeMirror.defineExtension("openNotification", function(template, options) { if (this.virtualSelectionMode()) return; closeNotification(this, close); var dialog = dialogDiv(this, template, options && options.bottom); var closed = false, doneTimer; var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000; function close() { if (closed) return; closed = true; clearTimeout(doneTimer); dialog.parentNode.removeChild(dialog); } CodeMirror.on(dialog, 'click', function(e) { CodeMirror.e_preventDefault(e); close(); }); if (duration) doneTimer = setTimeout(close, duration); return close; }); })(); var defaultKeymap = [ { keys: '', type: 'keyToKey', toKeys: 'h' }, { keys: '', type: 'keyToKey', toKeys: 'l' }, { keys: '', type: 'keyToKey', toKeys: 'k' }, { keys: '', type: 'keyToKey', toKeys: 'j' }, { keys: '', type: 'keyToKey', toKeys: 'l' }, { keys: '', type: 'keyToKey', toKeys: 'h', context: 'normal'}, { keys: '', type: 'keyToKey', toKeys: 'W' }, { keys: '', type: 'keyToKey', toKeys: 'B', context: 'normal' }, { keys: '', type: 'keyToKey', toKeys: 'w' }, { keys: '', type: 'keyToKey', toKeys: 'b', context: 'normal' }, { keys: '', type: 'keyToKey', toKeys: 'j' }, { keys: '', type: 'keyToKey', toKeys: 'k' }, { keys: '', type: 'keyToKey', toKeys: '' }, { keys: '', type: 'keyToKey', toKeys: '' }, { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' }, { keys: 's', type: 'keyToKey', toKeys: 'xi', context: 'visual'}, { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' }, { keys: 'S', type: 'keyToKey', toKeys: 'dcc', context: 'visual' }, { keys: '', type: 'keyToKey', toKeys: '0' }, { keys: '', type: 'keyToKey', toKeys: '$' }, { keys: '', type: 'keyToKey', toKeys: '' }, { keys: '', type: 'keyToKey', toKeys: '' }, { keys: '', type: 'keyToKey', toKeys: 'j^', context: 'normal' }, { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }}, { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }}, { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }}, { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }}, { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }}, { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }}, { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }}, { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }}, { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }}, { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }}, { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }}, { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }}, { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }}, { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }}, { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }}, { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }}, { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }}, { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }}, { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }}, { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }}, { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }}, { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }}, { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }}, { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }}, { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }}, { keys: '0', type: 'motion', motion: 'moveToStartOfLine' }, { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' }, { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }}, { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }}, { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }}, { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }}, { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }}, { keys: 'f', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }}, { keys: 'F', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }}, { keys: 't', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }}, { keys: 'T', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }}, { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }}, { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }}, { keys: '\'', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}}, { keys: '`', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}}, { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } }, { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } }, { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } }, { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } }, { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}}, { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}}, { keys: ']', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}}, { keys: '[', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}}, { keys: '|', type: 'motion', motion: 'moveToColumn'}, { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'}, { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'}, { keys: 'd', type: 'operator', operator: 'delete' }, { keys: 'y', type: 'operator', operator: 'yank' }, { keys: 'c', type: 'operator', operator: 'change' }, { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }}, { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }}, { keys: 'g~', type: 'operator', operator: 'changeCase' }, { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true }, { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true }, { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }}, { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }}, { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }}, { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }}, { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'}, { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'}, { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'}, { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'}, { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'}, { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' }, { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }}, { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }}, { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }}, { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }}, { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' }, { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' }, { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' }, { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' }, { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' }, { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' }, { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' }, { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' }, { keys: 'v', type: 'action', action: 'toggleVisualMode' }, { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }}, { keys: '', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }}, { keys: 'gv', type: 'action', action: 'reselectLastSelection' }, { keys: 'J', type: 'action', action: 'joinLines', isEdit: true }, { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }}, { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }}, { keys: 'r', type: 'action', action: 'replace', isEdit: true }, { keys: '@', type: 'action', action: 'replayMacro' }, { keys: 'q', type: 'action', action: 'enterMacroRecordMode' }, { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }}, { keys: 'u', type: 'action', action: 'undo', context: 'normal' }, { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true }, { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true }, { keys: '', type: 'action', action: 'redo' }, { keys: 'm', type: 'action', action: 'setMark' }, { keys: '"', type: 'action', action: 'setRegister' }, { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }}, { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }}, { keys: 'z', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }}, { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, { keys: '.', type: 'action', action: 'repeatLastEdit' }, { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}}, { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}}, { keys: 'a', type: 'motion', motion: 'textObjectManipulation' }, { keys: 'i', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }}, { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }}, { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }}, { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }}, { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }}, { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }}, { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }}, { keys: ':', type: 'ex' } ]; var Pos = CodeMirror.Pos; var Vim = function() { return vimApi; } //{ function enterVimMode(cm) { cm.setOption('disableInput', true); cm.setOption('showCursorWhenSelecting', false); CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); cm.on('cursorActivity', onCursorActivity); maybeInitVimState(cm); CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm)); } function leaveVimMode(cm) { cm.setOption('disableInput', false); cm.off('cursorActivity', onCursorActivity); CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm)); cm.state.vim = null; } function detachVimMap(cm, next) { if (this == CodeMirror.keyMap.vim) CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor"); if (!next || next.attach != attachVimMap) leaveVimMode(cm, false); } function attachVimMap(cm, prev) { if (this == CodeMirror.keyMap.vim) CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor"); if (!prev || prev.attach != attachVimMap) enterVimMode(cm); } CodeMirror.defineOption('vimMode', false, function(cm, val, prev) { if (val && cm.getOption("keyMap") != "vim") cm.setOption("keyMap", "vim"); else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap"))) cm.setOption("keyMap", "default"); }); function cmKey(key, cm) { if (!cm) { return undefined; } var vimKey = cmKeyToVimKey(key); if (!vimKey) { return false; } var cmd = CodeMirror.Vim.findKey(cm, vimKey); if (typeof cmd == 'function') { CodeMirror.signal(cm, 'vim-keypress', vimKey); } return cmd; } var modifiers = {'Shift': 'S', 'Ctrl': 'C', 'Alt': 'A', 'Cmd': 'D', 'Mod': 'A'}; var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del'}; function cmKeyToVimKey(key) { if (key.charAt(0) == '\'') { return key.charAt(1); } var pieces = key.split('-'); if (/-$/.test(key)) { pieces.splice(-2, 2, '-'); } var lastPiece = pieces[pieces.length - 1]; if (pieces.length == 1 && pieces[0].length == 1) { return false; } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) { return false; } var hasCharacter = false; for (var i = 0; i < pieces.length; i++) { var piece = pieces[i]; if (piece in modifiers) { pieces[i] = modifiers[piece]; } else { hasCharacter = true; } if (piece in specialKeys) { pieces[i] = specialKeys[piece]; } } if (!hasCharacter) { return false; } if (isUpperCase(lastPiece)) { pieces[pieces.length - 1] = lastPiece.toLowerCase(); } return '<' + pieces.join('-') + '>'; } function getOnPasteFn(cm) { var vim = cm.state.vim; if (!vim.onPasteFn) { vim.onPasteFn = function() { if (!vim.insertMode) { cm.setCursor(offsetCursor(cm.getCursor(), 0, 1)); actions.enterInsertMode(cm, {}, vim); } }; } return vim.onPasteFn; } var numberRegex = /[\d]/; var wordCharTest = [CodeMirror.isWordChar, function(ch) { return ch && !CodeMirror.isWordChar(ch) && !/\s/.test(ch); }], bigWordCharTest = [function(ch) { return /\S/.test(ch); }]; function makeKeyRange(start, size) { var keys = []; for (var i = start; i < start + size; i++) { keys.push(String.fromCharCode(i)); } return keys; } var upperCaseAlphabet = makeKeyRange(65, 26); var lowerCaseAlphabet = makeKeyRange(97, 26); var numbers = makeKeyRange(48, 10); var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']); var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '/']); function isLine(cm, line) { return line >= cm.firstLine() && line <= cm.lastLine(); } function isLowerCase(k) { return (/^[a-z]$/).test(k); } function isMatchableSymbol(k) { return '()[]{}'.indexOf(k) != -1; } function isNumber(k) { return numberRegex.test(k); } function isUpperCase(k) { return (/^[A-Z]$/).test(k); } function isWhiteSpaceString(k) { return (/^\s*$/).test(k); } function inArray(val, arr) { for (var i = 0; i < arr.length; i++) { if (arr[i] == val) { return true; } } return false; } var options = {}; function defineOption(name, defaultValue, type) { if (defaultValue === undefined) { throw Error('defaultValue is required'); } if (!type) { type = 'string'; } options[name] = { type: type, defaultValue: defaultValue }; setOption(name, defaultValue); } function setOption(name, value, cm) { var option = options[name]; if (!option) { throw Error('Unknown option: ' + name); } if (option.type == 'boolean') { if (value && value !== true) { throw Error('Invalid argument: ' + name + '=' + value); } else if (value !== false) { value = true; } } option.value = option.type == 'boolean' ? !!value : value; } function getOption(name) { var option = options[name]; if (!option) { throw Error('Unknown option: ' + name); } return option.value; } var createCircularJumpList = function() { var size = 100; var pointer = -1; var head = 0; var tail = 0; var buffer = new Array(size); function add(cm, oldCur, newCur) { var current = pointer % size; var curMark = buffer[current]; function useNextSlot(cursor) { var next = ++pointer % size; var trashMark = buffer[next]; if (trashMark) { trashMark.clear(); } buffer[next] = cm.setBookmark(cursor); } if (curMark) { var markPos = curMark.find(); if (markPos && !cursorEqual(markPos, oldCur)) { useNextSlot(oldCur); } } else { useNextSlot(oldCur); } useNextSlot(newCur); head = pointer; tail = pointer - size + 1; if (tail < 0) { tail = 0; } } function move(cm, offset) { pointer += offset; if (pointer > head) { pointer = head; } else if (pointer < tail) { pointer = tail; } var mark = buffer[(size + pointer) % size]; if (mark && !mark.find()) { var inc = offset > 0 ? 1 : -1; var newCur; var oldCur = cm.getCursor(); do { pointer += inc; mark = buffer[(size + pointer) % size]; if (mark && (newCur = mark.find()) && !cursorEqual(oldCur, newCur)) { break; } } while (pointer < head && pointer > tail); } return mark; } return { cachedCursor: undefined, //used for # and * jumps add: add, move: move }; }; var createInsertModeChanges = function(c) { if (c) { return { changes: c.changes, expectCursorActivityForChange: c.expectCursorActivityForChange }; } return { changes: [], expectCursorActivityForChange: false }; }; function MacroModeState() { this.latestRegister = undefined; this.isPlaying = false; this.isRecording = false; this.replaySearchQueries = []; this.onRecordingDone = undefined; this.lastInsertModeChanges = createInsertModeChanges(); } MacroModeState.prototype = { exitMacroRecordMode: function() { var macroModeState = vimGlobalState.macroModeState; if (macroModeState.onRecordingDone) { macroModeState.onRecordingDone(); // close dialog } macroModeState.onRecordingDone = undefined; macroModeState.isRecording = false; }, enterMacroRecordMode: function(cm, registerName) { var register = vimGlobalState.registerController.getRegister(registerName); if (register) { register.clear(); this.latestRegister = registerName; if (cm.openDialog) { this.onRecordingDone = cm.openDialog( '(recording)['+registerName+']', null, {bottom:true}); } this.isRecording = true; } } }; function maybeInitVimState(cm) { if (!cm.state.vim) { cm.state.vim = { inputState: new InputState(), lastEditInputState: undefined, lastEditActionCommand: undefined, lastHPos: -1, lastHSPos: -1, lastMotion: null, marks: {}, fakeCursor: null, insertMode: false, insertModeRepeat: undefined, visualMode: false, visualLine: false, visualBlock: false, lastSelection: null, lastPastedText: null, sel: { } }; } return cm.state.vim; } var vimGlobalState; function resetVimGlobalState() { vimGlobalState = { searchQuery: null, searchIsReversed: false, lastSubstituteReplacePart: undefined, jumpList: createCircularJumpList(), macroModeState: new MacroModeState, lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''}, registerController: new RegisterController({}), searchHistoryController: new HistoryController({}), exCommandHistoryController : new HistoryController({}) }; for (var optionName in options) { var option = options[optionName]; option.value = option.defaultValue; } } var lastInsertModeKeyTimer; var vimApi= { buildKeyMap: function() { }, getRegisterController: function() { return vimGlobalState.registerController; }, resetVimGlobalState_: resetVimGlobalState, getVimGlobalState_: function() { return vimGlobalState; }, maybeInitVimState_: maybeInitVimState, suppressErrorLogging: false, InsertModeKey: InsertModeKey, map: function(lhs, rhs, ctx) { exCommandDispatcher.map(lhs, rhs, ctx); }, unmap: function(lhs, ctx) { exCommandDispatcher.unmap(lhs, ctx); }, setOption: setOption, getOption: getOption, defineOption: defineOption, defineEx: function(name, prefix, func){ if (name.indexOf(prefix) !== 0) { throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered'); } exCommands[name]=func; exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'}; }, handleKey: function (cm, key, origin) { var command = this.findKey(cm, key, origin); if (typeof command === 'function') { return command(); } }, findKey: function(cm, key, origin) { var vim = maybeInitVimState(cm); function handleMacroRecording() { var macroModeState = vimGlobalState.macroModeState; if (macroModeState.isRecording) { if (key == 'q') { macroModeState.exitMacroRecordMode(); clearInputState(cm); return true; } if (origin != 'mapping') { logKey(macroModeState, key); } } } function handleEsc() { if (key == '') { clearInputState(cm); if (vim.visualMode) { exitVisualMode(cm); } else if (vim.insertMode) { exitInsertMode(cm); } return true; } } function doKeyToKey(keys) { var match; while (keys) { match = (/<\w+-.+?>|<\w+>|./).exec(keys); key = match[0]; keys = keys.substring(match.index + key.length); CodeMirror.Vim.handleKey(cm, key, 'mapping'); } } function handleKeyInsertMode() { if (handleEsc()) { return true; } var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; var keysAreChars = key.length == 1; var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); while (keys.length > 1 && match.type != 'full') { var keys = vim.inputState.keyBuffer = keys.slice(1); var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); if (thisMatch.type != 'none') { match = thisMatch; } } if (match.type == 'none') { clearInputState(cm); return false; } else if (match.type == 'partial') { if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } lastInsertModeKeyTimer = window.setTimeout( function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } }, getOption('insertModeEscKeysTimeout')); return !keysAreChars; } if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } if (keysAreChars) { var here = cm.getCursor(); cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input'); } clearInputState(cm); return match.command; } function handleKeyNonInsertMode() { if (handleMacroRecording() || handleEsc()) { return true; }; var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; if (/^[1-9]\d*$/.test(keys)) { return true; } var keysMatcher = /^(\d*)(.*)$/.exec(keys); if (!keysMatcher) { clearInputState(cm); return false; } var context = vim.visualMode ? 'visual' : 'normal'; var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context); if (match.type == 'none') { clearInputState(cm); return false; } else if (match.type == 'partial') { return true; } vim.inputState.keyBuffer = ''; var keysMatcher = /^(\d*)(.*)$/.exec(keys); if (keysMatcher[1] && keysMatcher[1] != '0') { vim.inputState.pushRepeatDigit(keysMatcher[1]); } return match.command; } var command; if (vim.insertMode) { command = handleKeyInsertMode(); } else { command = handleKeyNonInsertMode(); } if (command === false) { return undefined; } else if (command === true) { return function() {}; } else { return function() { return cm.operation(function() { cm.curOp.isVimOp = true; try { if (command.type == 'keyToKey') { doKeyToKey(command.toKeys); } else { commandDispatcher.processCommand(cm, vim, command); } } catch (e) { cm.state.vim = undefined; maybeInitVimState(cm); if (!CodeMirror.Vim.suppressErrorLogging) { console['log'](e); } throw e; } return true; }); }; } }, handleEx: function(cm, input) { exCommandDispatcher.processCommand(cm, input); }, defineMotion: defineMotion, defineAction: defineAction, defineOperator: defineOperator, mapCommand: mapCommand, _mapCommand: _mapCommand, exitVisualMode: exitVisualMode, exitInsertMode: exitInsertMode }; function InputState() { this.prefixRepeat = []; this.motionRepeat = []; this.operator = null; this.operatorArgs = null; this.motion = null; this.motionArgs = null; this.keyBuffer = []; // For matching multi-key commands. this.registerName = null; // Defaults to the unnamed register. } InputState.prototype.pushRepeatDigit = function(n) { if (!this.operator) { this.prefixRepeat = this.prefixRepeat.concat(n); } else { this.motionRepeat = this.motionRepeat.concat(n); } }; InputState.prototype.getRepeat = function() { var repeat = 0; if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) { repeat = 1; if (this.prefixRepeat.length > 0) { repeat *= parseInt(this.prefixRepeat.join(''), 10); } if (this.motionRepeat.length > 0) { repeat *= parseInt(this.motionRepeat.join(''), 10); } } return repeat; }; function clearInputState(cm, reason) { cm.state.vim.inputState = new InputState(); CodeMirror.signal(cm, 'vim-command-done', reason); } function Register(text, linewise, blockwise) { this.clear(); this.keyBuffer = [text || '']; this.insertModeChanges = []; this.searchQueries = []; this.linewise = !!linewise; this.blockwise = !!blockwise; } Register.prototype = { setText: function(text, linewise, blockwise) { this.keyBuffer = [text || '']; this.linewise = !!linewise; this.blockwise = !!blockwise; }, pushText: function(text, linewise) { if (linewise) { if (!this.linewise) { this.keyBuffer.push('\n'); } this.linewise = true; } this.keyBuffer.push(text); }, pushInsertModeChanges: function(changes) { this.insertModeChanges.push(createInsertModeChanges(changes)); }, pushSearchQuery: function(query) { this.searchQueries.push(query); }, clear: function() { this.keyBuffer = []; this.insertModeChanges = []; this.searchQueries = []; this.linewise = false; }, toString: function() { return this.keyBuffer.join(''); } }; function RegisterController(registers) { this.registers = registers; this.unnamedRegister = registers['"'] = new Register(); registers['.'] = new Register(); registers[':'] = new Register(); registers['/'] = new Register(); } RegisterController.prototype = { pushText: function(registerName, operator, text, linewise, blockwise) { if (linewise && text.charAt(0) == '\n') { text = text.slice(1) + '\n'; } if (linewise && text.charAt(text.length - 1) !== '\n'){ text += '\n'; } var register = this.isValidRegister(registerName) ? this.getRegister(registerName) : null; if (!register) { switch (operator) { case 'yank': this.registers['0'] = new Register(text, linewise, blockwise); break; case 'delete': case 'change': if (text.indexOf('\n') == -1) { this.registers['-'] = new Register(text, linewise); } else { this.shiftNumericRegisters_(); this.registers['1'] = new Register(text, linewise); } break; } this.unnamedRegister.setText(text, linewise, blockwise); return; } var append = isUpperCase(registerName); if (append) { register.pushText(text, linewise); } else { register.setText(text, linewise, blockwise); } this.unnamedRegister.setText(register.toString(), linewise); }, getRegister: function(name) { if (!this.isValidRegister(name)) { return this.unnamedRegister; } name = name.toLowerCase(); if (!this.registers[name]) { this.registers[name] = new Register(); } return this.registers[name]; }, isValidRegister: function(name) { return name && inArray(name, validRegisters); }, shiftNumericRegisters_: function() { for (var i = 9; i >= 2; i--) { this.registers[i] = this.getRegister('' + (i - 1)); } } }; function HistoryController() { this.historyBuffer = []; this.iterator; this.initialPrefix = null; } HistoryController.prototype = { nextMatch: function (input, up) { var historyBuffer = this.historyBuffer; var dir = up ? -1 : 1; if (this.initialPrefix === null) this.initialPrefix = input; for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) { var element = historyBuffer[i]; for (var j = 0; j <= element.length; j++) { if (this.initialPrefix == element.substring(0, j)) { this.iterator = i; return element; } } } if (i >= historyBuffer.length) { this.iterator = historyBuffer.length; return this.initialPrefix; } if (i < 0 ) return input; }, pushInput: function(input) { var index = this.historyBuffer.indexOf(input); if (index > -1) this.historyBuffer.splice(index, 1); if (input.length) this.historyBuffer.push(input); }, reset: function() { this.initialPrefix = null; this.iterator = this.historyBuffer.length; } }; var commandDispatcher = { matchCommand: function(keys, keyMap, inputState, context) { var matches = commandMatches(keys, keyMap, context, inputState); if (!matches.full && !matches.partial) { return {type: 'none'}; } else if (!matches.full && matches.partial) { return {type: 'partial'}; } var bestMatch; for (var i = 0; i < matches.full.length; i++) { var match = matches.full[i]; if (!bestMatch) { bestMatch = match; } } if (bestMatch.keys.slice(-11) == '') { inputState.selectedCharacter = lastChar(keys); } return {type: 'full', command: bestMatch}; }, processCommand: function(cm, vim, command) { vim.inputState.repeatOverride = command.repeatOverride; switch (command.type) { case 'motion': this.processMotion(cm, vim, command); break; case 'operator': this.processOperator(cm, vim, command); break; case 'operatorMotion': this.processOperatorMotion(cm, vim, command); break; case 'action': this.processAction(cm, vim, command); break; case 'search': this.processSearch(cm, vim, command); break; case 'ex': case 'keyToEx': this.processEx(cm, vim, command); break; default: break; } }, processMotion: function(cm, vim, command) { vim.inputState.motion = command.motion; vim.inputState.motionArgs = copyArgs(command.motionArgs); this.evalInput(cm, vim); }, processOperator: function(cm, vim, command) { var inputState = vim.inputState; if (inputState.operator) { if (inputState.operator == command.operator) { inputState.motion = 'expandToLine'; inputState.motionArgs = { linewise: true }; this.evalInput(cm, vim); return; } else { clearInputState(cm); } } inputState.operator = command.operator; inputState.operatorArgs = copyArgs(command.operatorArgs); if (vim.visualMode) { this.evalInput(cm, vim); } }, processOperatorMotion: function(cm, vim, command) { var visualMode = vim.visualMode; var operatorMotionArgs = copyArgs(command.operatorMotionArgs); if (operatorMotionArgs) { if (visualMode && operatorMotionArgs.visualLine) { vim.visualLine = true; } } this.processOperator(cm, vim, command); if (!visualMode) { this.processMotion(cm, vim, command); } }, processAction: function(cm, vim, command) { var inputState = vim.inputState; var repeat = inputState.getRepeat(); var repeatIsExplicit = !!repeat; var actionArgs = copyArgs(command.actionArgs) || {}; if (inputState.selectedCharacter) { actionArgs.selectedCharacter = inputState.selectedCharacter; } if (command.operator) { this.processOperator(cm, vim, command); } if (command.motion) { this.processMotion(cm, vim, command); } if (command.motion || command.operator) { this.evalInput(cm, vim); } actionArgs.repeat = repeat || 1; actionArgs.repeatIsExplicit = repeatIsExplicit; actionArgs.registerName = inputState.registerName; clearInputState(cm); vim.lastMotion = null; if (command.isEdit) { this.recordLastEdit(vim, inputState, command); } actions[command.action](cm, actionArgs, vim); }, processSearch: function(cm, vim, command) { if (!cm.getSearchCursor) { return; } var forward = command.searchArgs.forward; var wholeWordOnly = command.searchArgs.wholeWordOnly; getSearchState(cm).setReversed(!forward); var promptPrefix = (forward) ? '/' : '?'; var originalQuery = getSearchState(cm).getQuery(); var originalScrollPos = cm.getScrollInfo(); function handleQuery(query, ignoreCase, smartCase) { vimGlobalState.searchHistoryController.pushInput(query); vimGlobalState.searchHistoryController.reset(); try { updateSearchQuery(cm, query, ignoreCase, smartCase); } catch (e) { showConfirm(cm, 'Invalid regex: ' + query); clearInputState(cm); return; } commandDispatcher.processMotion(cm, vim, { type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist } }); } function onPromptClose(query) { cm.scrollTo(originalScrollPos.left, originalScrollPos.top); handleQuery(query, true /** ignoreCase */, true /** smartCase */); var macroModeState = vimGlobalState.macroModeState; if (macroModeState.isRecording) { logSearchQuery(macroModeState, query); } } function onPromptKeyUp(e, query, close) { var keyName = CodeMirror.keyName(e), up; if (keyName == 'Up' || keyName == 'Down') { up = keyName == 'Up' ? true : false; query = vimGlobalState.searchHistoryController.nextMatch(query, up) || ''; close(query); } else { if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') vimGlobalState.searchHistoryController.reset(); } var parsedQuery; try { parsedQuery = updateSearchQuery(cm, query, true /** ignoreCase */, true /** smartCase */); } catch (e) { } if (parsedQuery) { cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30); } else { clearSearchHighlight(cm); cm.scrollTo(originalScrollPos.left, originalScrollPos.top); } } function onPromptKeyDown(e, query, close) { var keyName = CodeMirror.keyName(e); if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { vimGlobalState.searchHistoryController.pushInput(query); vimGlobalState.searchHistoryController.reset(); updateSearchQuery(cm, originalQuery); clearSearchHighlight(cm); cm.scrollTo(originalScrollPos.left, originalScrollPos.top); CodeMirror.e_stop(e); clearInputState(cm); close(); cm.focus(); } } switch (command.searchArgs.querySrc) { case 'prompt': var macroModeState = vimGlobalState.macroModeState; if (macroModeState.isPlaying) { var query = macroModeState.replaySearchQueries.shift(); handleQuery(query, true /** ignoreCase */, false /** smartCase */); } else { showPrompt(cm, { onClose: onPromptClose, prefix: promptPrefix, desc: searchPromptDesc, onKeyUp: onPromptKeyUp, onKeyDown: onPromptKeyDown }); } break; case 'wordUnderCursor': var word = expandWordUnderCursor(cm, false /** inclusive */, true /** forward */, false /** bigWord */, true /** noSymbol */); var isKeyword = true; if (!word) { word = expandWordUnderCursor(cm, false /** inclusive */, true /** forward */, false /** bigWord */, false /** noSymbol */); isKeyword = false; } if (!word) { return; } var query = cm.getLine(word.start.line).substring(word.start.ch, word.end.ch); if (isKeyword && wholeWordOnly) { query = '\\b' + query + '\\b'; } else { query = escapeRegex(query); } vimGlobalState.jumpList.cachedCursor = cm.getCursor(); cm.setCursor(word.start); handleQuery(query, true /** ignoreCase */, false /** smartCase */); break; } }, processEx: function(cm, vim, command) { function onPromptClose(input) { vimGlobalState.exCommandHistoryController.pushInput(input); vimGlobalState.exCommandHistoryController.reset(); exCommandDispatcher.processCommand(cm, input); } function onPromptKeyDown(e, input, close) { var keyName = CodeMirror.keyName(e), up; if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { vimGlobalState.exCommandHistoryController.pushInput(input); vimGlobalState.exCommandHistoryController.reset(); CodeMirror.e_stop(e); clearInputState(cm); close(); cm.focus(); } if (keyName == 'Up' || keyName == 'Down') { up = keyName == 'Up' ? true : false; input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || ''; close(input); } else { if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') vimGlobalState.exCommandHistoryController.reset(); } } if (command.type == 'keyToEx') { exCommandDispatcher.processCommand(cm, command.exArgs.input); } else { if (vim.visualMode) { showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', onKeyDown: onPromptKeyDown, select: false}); } else { showPrompt(cm, { onClose: onPromptClose, prefix: ':', onKeyDown: onPromptKeyDown}); } } }, evalInput: function(cm, vim) { var inputState = vim.inputState; var motion = inputState.motion; var motionArgs = inputState.motionArgs || {}; var operator = inputState.operator; var operatorArgs = inputState.operatorArgs || {}; var registerName = inputState.registerName; var sel = vim.sel; var origHead = copyCursor(vim.visualMode ? sel.head: cm.getCursor('head')); var origAnchor = copyCursor(vim.visualMode ? sel.anchor : cm.getCursor('anchor')); var oldHead = copyCursor(origHead); var oldAnchor = copyCursor(origAnchor); var newHead, newAnchor; var repeat; if (operator) { this.recordLastEdit(vim, inputState); } if (inputState.repeatOverride !== undefined) { repeat = inputState.repeatOverride; } else { repeat = inputState.getRepeat(); } if (repeat > 0 && motionArgs.explicitRepeat) { motionArgs.repeatIsExplicit = true; } else if (motionArgs.noRepeat || (!motionArgs.explicitRepeat && repeat === 0)) { repeat = 1; motionArgs.repeatIsExplicit = false; } if (inputState.selectedCharacter) { motionArgs.selectedCharacter = operatorArgs.selectedCharacter = inputState.selectedCharacter; } motionArgs.repeat = repeat; clearInputState(cm); if (motion) { var motionResult = motions[motion](cm, origHead, motionArgs, vim); vim.lastMotion = motions[motion]; if (!motionResult) { return; } if (motionArgs.toJumplist) { var jumpList = vimGlobalState.jumpList; var cachedCursor = jumpList.cachedCursor; if (cachedCursor) { recordJumpPosition(cm, cachedCursor, motionResult); delete jumpList.cachedCursor; } else { recordJumpPosition(cm, origHead, motionResult); } } if (motionResult instanceof Array) { newAnchor = motionResult[0]; newHead = motionResult[1]; } else { newHead = motionResult; } if (!newHead) { newHead = copyCursor(origHead); } if (vim.visualMode) { if (!(vim.visualBlock && newHead.ch === Infinity)) { newHead = clipCursorToContent(cm, newHead, vim.visualBlock); } if (newAnchor) { newAnchor = clipCursorToContent(cm, newAnchor, true); } newAnchor = newAnchor || oldAnchor; sel.anchor = newAnchor; sel.head = newHead; updateCmSelection(cm); updateMark(cm, vim, '<', cursorIsBefore(newAnchor, newHead) ? newAnchor : newHead); updateMark(cm, vim, '>', cursorIsBefore(newAnchor, newHead) ? newHead : newAnchor); } else if (!operator) { newHead = clipCursorToContent(cm, newHead); cm.setCursor(newHead.line, newHead.ch); } } if (operator) { if (operatorArgs.lastSel) { newAnchor = oldAnchor; var lastSel = operatorArgs.lastSel; var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line); var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch); if (lastSel.visualLine) { newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch); } else if (lastSel.visualBlock) { newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset); } else if (lastSel.head.line == lastSel.anchor.line) { newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset); } else { newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch); } vim.visualMode = true; vim.visualLine = lastSel.visualLine; vim.visualBlock = lastSel.visualBlock; sel = vim.sel = { anchor: newAnchor, head: newHead }; updateCmSelection(cm); } else if (vim.visualMode) { operatorArgs.lastSel = { anchor: copyCursor(sel.anchor), head: copyCursor(sel.head), visualBlock: vim.visualBlock, visualLine: vim.visualLine }; } var curStart, curEnd, linewise, mode; var cmSel; if (vim.visualMode) { curStart = cursorMin(sel.head, sel.anchor); curEnd = cursorMax(sel.head, sel.anchor); linewise = vim.visualLine || operatorArgs.linewise; mode = vim.visualBlock ? 'block' : linewise ? 'line' : 'char'; cmSel = makeCmSelection(cm, { anchor: curStart, head: curEnd }, mode); if (linewise) { var ranges = cmSel.ranges; if (mode == 'block') { for (var i = 0; i < ranges.length; i++) { ranges[i].head.ch = lineLength(cm, ranges[i].head.line); } } else if (mode == 'line') { ranges[0].head = Pos(ranges[0].head.line + 1, 0); } } } else { curStart = copyCursor(newAnchor || oldAnchor); curEnd = copyCursor(newHead || oldHead); if (cursorIsBefore(curEnd, curStart)) { var tmp = curStart; curStart = curEnd; curEnd = tmp; } linewise = motionArgs.linewise || operatorArgs.linewise; if (linewise) { expandSelectionToLine(cm, curStart, curEnd); } else if (motionArgs.forward) { clipToLine(cm, curStart, curEnd); } mode = 'char'; var exclusive = !motionArgs.inclusive || linewise; cmSel = makeCmSelection(cm, { anchor: curStart, head: curEnd }, mode, exclusive); } cm.setSelections(cmSel.ranges, cmSel.primary); vim.lastMotion = null; operatorArgs.repeat = repeat; // For indent in visual mode. operatorArgs.registerName = registerName; operatorArgs.linewise = linewise; var operatorMoveTo = operators[operator]( cm, operatorArgs, cmSel.ranges, oldAnchor, newHead); if (vim.visualMode) { exitVisualMode(cm, operatorMoveTo != null); } if (operatorMoveTo) { cm.setCursor(operatorMoveTo); } } }, recordLastEdit: function(vim, inputState, actionCommand) { var macroModeState = vimGlobalState.macroModeState; if (macroModeState.isPlaying) { return; } vim.lastEditInputState = inputState; vim.lastEditActionCommand = actionCommand; macroModeState.lastInsertModeChanges.changes = []; macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; } }; var motions = { moveToTopLine: function(cm, _head, motionArgs) { var line = getUserVisibleLines(cm).top + motionArgs.repeat -1; return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); }, moveToMiddleLine: function(cm) { var range = getUserVisibleLines(cm); var line = Math.floor((range.top + range.bottom) * 0.5); return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); }, moveToBottomLine: function(cm, _head, motionArgs) { var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1; return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); }, expandToLine: function(_cm, head, motionArgs) { var cur = head; return Pos(cur.line + motionArgs.repeat - 1, Infinity); }, findNext: function(cm, _head, motionArgs) { var state = getSearchState(cm); var query = state.getQuery(); if (!query) { return; } var prev = !motionArgs.forward; prev = (state.isReversed()) ? !prev : prev; highlightSearchMatches(cm, query); return findNext(cm, prev/** prev */, query, motionArgs.repeat); }, goToMark: function(cm, _head, motionArgs, vim) { var mark = vim.marks[motionArgs.selectedCharacter]; if (mark) { var pos = mark.find(); return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos; } return null; }, moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) { if (vim.visualBlock && motionArgs.sameLine) { var sel = vim.sel; return [ clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)), clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch)) ]; } else { return ([vim.sel.head, vim.sel.anchor]); } }, jumpToMark: function(cm, head, motionArgs, vim) { var best = head; for (var i = 0; i < motionArgs.repeat; i++) { var cursor = best; for (var key in vim.marks) { if (!isLowerCase(key)) { continue; } var mark = vim.marks[key].find(); var isWrongDirection = (motionArgs.forward) ? cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark); if (isWrongDirection) { continue; } if (motionArgs.linewise && (mark.line == cursor.line)) { continue; } var equal = cursorEqual(cursor, best); var between = (motionArgs.forward) ? cursorIsBetween(cursor, mark, best) : cursorIsBetween(best, mark, cursor); if (equal || between) { best = mark; } } } if (motionArgs.linewise) { best = Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line))); } return best; }, moveByCharacters: function(_cm, head, motionArgs) { var cur = head; var repeat = motionArgs.repeat; var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat; return Pos(cur.line, ch); }, moveByLines: function(cm, head, motionArgs, vim) { var cur = head; var endCh = cur.ch; switch (vim.lastMotion) { case this.moveByLines: case this.moveByDisplayLines: case this.moveByScroll: case this.moveToColumn: case this.moveToEol: endCh = vim.lastHPos; break; default: vim.lastHPos = endCh; } var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0); var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; var first = cm.firstLine(); var last = cm.lastLine(); if ((line < first && cur.line == first) || (line > last && cur.line == last)) { return; } var fold = cm.ace.session.getFoldAt(line, endCh); if (fold) { if (motionArgs.forward) line = fold.end.row + 1; else line = fold.start.row - 1; } if (motionArgs.toFirstChar){ endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line)); vim.lastHPos = endCh; } vim.lastHSPos = cm.charCoords(Pos(line, endCh),'div').left; return Pos(line, endCh); }, moveByDisplayLines: function(cm, head, motionArgs, vim) { var cur = head; switch (vim.lastMotion) { case this.moveByDisplayLines: case this.moveByScroll: case this.moveByLines: case this.moveToColumn: case this.moveToEol: break; default: vim.lastHSPos = cm.charCoords(cur,'div').left; } var repeat = motionArgs.repeat; var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos); if (res.hitSide) { if (motionArgs.forward) { var lastCharCoords = cm.charCoords(res, 'div'); var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos }; var res = cm.coordsChar(goalCoords, 'div'); } else { var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div'); resCoords.left = vim.lastHSPos; res = cm.coordsChar(resCoords, 'div'); } } vim.lastHPos = res.ch; return res; }, moveByPage: function(cm, head, motionArgs) { var curStart = head; var repeat = motionArgs.repeat; return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page'); }, moveByParagraph: function(cm, head, motionArgs) { var dir = motionArgs.forward ? 1 : -1; return findParagraph(cm, head, motionArgs.repeat, dir); }, moveByScroll: function(cm, head, motionArgs, vim) { var scrollbox = cm.getScrollInfo(); var curEnd = null; var repeat = motionArgs.repeat; if (!repeat) { repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight()); } var orig = cm.charCoords(head, 'local'); motionArgs.repeat = repeat; var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim); if (!curEnd) { return null; } var dest = cm.charCoords(curEnd, 'local'); cm.scrollTo(null, scrollbox.top + dest.top - orig.top); return curEnd; }, moveByWords: function(cm, head, motionArgs) { return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward, !!motionArgs.wordEnd, !!motionArgs.bigWord); }, moveTillCharacter: function(cm, _head, motionArgs) { var repeat = motionArgs.repeat; var curEnd = moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter); var increment = motionArgs.forward ? -1 : 1; recordLastCharacterSearch(increment, motionArgs); if (!curEnd) return null; curEnd.ch += increment; return curEnd; }, moveToCharacter: function(cm, head, motionArgs) { var repeat = motionArgs.repeat; recordLastCharacterSearch(0, motionArgs); return moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head; }, moveToSymbol: function(cm, head, motionArgs) { var repeat = motionArgs.repeat; return findSymbol(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head; }, moveToColumn: function(cm, head, motionArgs, vim) { var repeat = motionArgs.repeat; vim.lastHPos = repeat - 1; vim.lastHSPos = cm.charCoords(head,'div').left; return moveToColumn(cm, repeat); }, moveToEol: function(cm, head, motionArgs, vim) { var cur = head; vim.lastHPos = Infinity; var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity); var end=cm.clipPos(retval); end.ch--; vim.lastHSPos = cm.charCoords(end,'div').left; return retval; }, moveToFirstNonWhiteSpaceCharacter: function(cm, head) { var cursor = head; return Pos(cursor.line, findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line))); }, moveToMatchedSymbol: function(cm, head) { var cursor = head; var line = cursor.line; var ch = cursor.ch; var lineText = cm.getLine(line); var symbol; do { symbol = lineText.charAt(ch++); if (symbol && isMatchableSymbol(symbol)) { var style = cm.getTokenTypeAt(Pos(line, ch)); if (style !== "string" && style !== "comment") { break; } } } while (symbol); if (symbol) { var matched = cm.findMatchingBracket(Pos(line, ch)); return matched.to; } else { return cursor; } }, moveToStartOfLine: function(_cm, head) { return Pos(head.line, 0); }, moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) { var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine(); if (motionArgs.repeatIsExplicit) { lineNum = motionArgs.repeat - cm.getOption('firstLineNumber'); } return Pos(lineNum, findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum))); }, textObjectManipulation: function(cm, head, motionArgs, vim) { var mirroredPairs = {'(': ')', ')': '(', '{': '}', '}': '{', '[': ']', ']': '['}; var selfPaired = {'\'': true, '"': true}; var character = motionArgs.selectedCharacter; if (character == 'b') { character = '('; } else if (character == 'B') { character = '{'; } var inclusive = !motionArgs.textObjectInner; var tmp; if (mirroredPairs[character]) { tmp = selectCompanionObject(cm, head, character, inclusive); } else if (selfPaired[character]) { tmp = findBeginningAndEnd(cm, head, character, inclusive); } else if (character === 'W') { tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, true /** bigWord */); } else if (character === 'w') { tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, false /** bigWord */); } else if (character === 'p') { tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive); motionArgs.linewise = true; if (vim.visualMode) { if (!vim.visualLine) { vim.visualLine = true; } } else { var operatorArgs = vim.inputState.operatorArgs; if (operatorArgs) { operatorArgs.linewise = true; } tmp.end.line--; } } else { return null; } if (!cm.state.vim.visualMode) { return [tmp.start, tmp.end]; } else { return expandSelection(cm, tmp.start, tmp.end); } }, repeatLastCharacterSearch: function(cm, head, motionArgs) { var lastSearch = vimGlobalState.lastChararacterSearch; var repeat = motionArgs.repeat; var forward = motionArgs.forward === lastSearch.forward; var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); cm.moveH(-increment, 'char'); motionArgs.inclusive = forward ? true : false; var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter); if (!curEnd) { cm.moveH(increment, 'char'); return head; } curEnd.ch += increment; return curEnd; } }; function defineMotion(name, fn) { motions[name] = fn; } function fillArray(val, times) { var arr = []; for (var i = 0; i < times; i++) { arr.push(val); } return arr; } var operators = { change: function(cm, args, ranges) { var finalHead, text; var vim = cm.state.vim; vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock; if (!vim.visualMode) { var anchor = ranges[0].anchor, head = ranges[0].head; text = cm.getRange(anchor, head); if (!isWhiteSpaceString(text)) { var match = (/\s+$/).exec(text); if (match) { head = offsetCursor(head, 0, - match[0].length); text = text.slice(0, - match[0].length); } } var wasLastLine = head.line - 1 == cm.lastLine(); cm.replaceRange('', anchor, head); if (args.linewise && !wasLastLine) { CodeMirror.commands.newlineAndIndent(cm); anchor.ch = null; } finalHead = anchor; } else { text = cm.getSelection(); var replacement = fillArray('', ranges.length); cm.replaceSelections(replacement); finalHead = cursorMin(ranges[0].head, ranges[0].anchor); } vimGlobalState.registerController.pushText( args.registerName, 'change', text, args.linewise, ranges.length > 1); actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim); }, 'delete': function(cm, args, ranges) { var finalHead, text; var vim = cm.state.vim; if (!vim.visualBlock) { var anchor = ranges[0].anchor, head = ranges[0].head; if (args.linewise && head.line != cm.firstLine() && anchor.line == cm.lastLine() && anchor.line == head.line - 1) { if (anchor.line == cm.firstLine()) { anchor.ch = 0; } else { anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1)); } } text = cm.getRange(anchor, head); cm.replaceRange('', anchor, head); finalHead = anchor; if (args.linewise) { finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor); } } else { text = cm.getSelection(); var replacement = fillArray('', ranges.length); cm.replaceSelections(replacement); finalHead = ranges[0].anchor; } vimGlobalState.registerController.pushText( args.registerName, 'delete', text, args.linewise, vim.visualBlock); return clipCursorToContent(cm, finalHead); }, indent: function(cm, args, ranges) { var vim = cm.state.vim; var startLine = ranges[0].anchor.line; var endLine = vim.visualBlock ? ranges[ranges.length - 1].anchor.line : ranges[0].head.line; var repeat = (vim.visualMode) ? args.repeat : 1; if (args.linewise) { endLine--; } for (var i = startLine; i <= endLine; i++) { for (var j = 0; j < repeat; j++) { cm.indentLine(i, args.indentRight); } } return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); }, changeCase: function(cm, args, ranges, oldAnchor, newHead) { var selections = cm.getSelections(); var swapped = []; var toLower = args.toLower; for (var j = 0; j < selections.length; j++) { var toSwap = selections[j]; var text = ''; if (toLower === true) { text = toSwap.toLowerCase(); } else if (toLower === false) { text = toSwap.toUpperCase(); } else { for (var i = 0; i < toSwap.length; i++) { var character = toSwap.charAt(i); text += isUpperCase(character) ? character.toLowerCase() : character.toUpperCase(); } } swapped.push(text); } cm.replaceSelections(swapped); if (args.shouldMoveCursor){ return newHead; } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) { return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor); } else if (args.linewise){ return oldAnchor; } else { return cursorMin(ranges[0].anchor, ranges[0].head); } }, yank: function(cm, args, ranges, oldAnchor) { var vim = cm.state.vim; var text = cm.getSelection(); var endPos = vim.visualMode ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor) : oldAnchor; vimGlobalState.registerController.pushText( args.registerName, 'yank', text, args.linewise, vim.visualBlock); return endPos; } }; function defineOperator(name, fn) { operators[name] = fn; } var actions = { jumpListWalk: function(cm, actionArgs, vim) { if (vim.visualMode) { return; } var repeat = actionArgs.repeat; var forward = actionArgs.forward; var jumpList = vimGlobalState.jumpList; var mark = jumpList.move(cm, forward ? repeat : -repeat); var markPos = mark ? mark.find() : undefined; markPos = markPos ? markPos : cm.getCursor(); cm.setCursor(markPos); }, scroll: function(cm, actionArgs, vim) { if (vim.visualMode) { return; } var repeat = actionArgs.repeat || 1; var lineHeight = cm.defaultTextHeight(); var top = cm.getScrollInfo().top; var delta = lineHeight * repeat; var newPos = actionArgs.forward ? top + delta : top - delta; var cursor = copyCursor(cm.getCursor()); var cursorCoords = cm.charCoords(cursor, 'local'); if (actionArgs.forward) { if (newPos > cursorCoords.top) { cursor.line += (newPos - cursorCoords.top) / lineHeight; cursor.line = Math.ceil(cursor.line); cm.setCursor(cursor); cursorCoords = cm.charCoords(cursor, 'local'); cm.scrollTo(null, cursorCoords.top); } else { cm.scrollTo(null, newPos); } } else { var newBottom = newPos + cm.getScrollInfo().clientHeight; if (newBottom < cursorCoords.bottom) { cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight; cursor.line = Math.floor(cursor.line); cm.setCursor(cursor); cursorCoords = cm.charCoords(cursor, 'local'); cm.scrollTo( null, cursorCoords.bottom - cm.getScrollInfo().clientHeight); } else { cm.scrollTo(null, newPos); } } }, scrollToCursor: function(cm, actionArgs) { var lineNum = cm.getCursor().line; var charCoords = cm.charCoords(Pos(lineNum, 0), 'local'); var height = cm.getScrollInfo().clientHeight; var y = charCoords.top; var lineHeight = charCoords.bottom - y; switch (actionArgs.position) { case 'center': y = y - (height / 2) + lineHeight; break; case 'bottom': y = y - height + lineHeight*1.4; break; case 'top': y = y + lineHeight*0.4; break; } cm.scrollTo(null, y); }, replayMacro: function(cm, actionArgs, vim) { var registerName = actionArgs.selectedCharacter; var repeat = actionArgs.repeat; var macroModeState = vimGlobalState.macroModeState; if (registerName == '@') { registerName = macroModeState.latestRegister; } while(repeat--){ executeMacroRegister(cm, vim, macroModeState, registerName); } }, enterMacroRecordMode: function(cm, actionArgs) { var macroModeState = vimGlobalState.macroModeState; var registerName = actionArgs.selectedCharacter; macroModeState.enterMacroRecordMode(cm, registerName); }, enterInsertMode: function(cm, actionArgs, vim) { if (cm.getOption('readOnly')) { return; } vim.insertMode = true; vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1; var insertAt = (actionArgs) ? actionArgs.insertAt : null; var sel = vim.sel; var head = actionArgs.head || cm.getCursor('head'); var height = cm.listSelections().length; if (insertAt == 'eol') { head = Pos(head.line, lineLength(cm, head.line)); } else if (insertAt == 'charAfter') { head = offsetCursor(head, 0, 1); } else if (insertAt == 'firstNonBlank') { head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head); } else if (insertAt == 'startOfSelectedArea') { if (!vim.visualBlock) { if (sel.head.line < sel.anchor.line) { head = sel.head; } else { head = Pos(sel.anchor.line, 0); } } else { head = Pos( Math.min(sel.head.line, sel.anchor.line), Math.min(sel.head.ch, sel.anchor.ch)); height = Math.abs(sel.head.line - sel.anchor.line) + 1; } } else if (insertAt == 'endOfSelectedArea') { if (!vim.visualBlock) { if (sel.head.line >= sel.anchor.line) { head = offsetCursor(sel.head, 0, 1); } else { head = Pos(sel.anchor.line, 0); } } else { head = Pos( Math.min(sel.head.line, sel.anchor.line), Math.max(sel.head.ch + 1, sel.anchor.ch)); height = Math.abs(sel.head.line - sel.anchor.line) + 1; } } else if (insertAt == 'inplace') { if (vim.visualMode){ return; } } cm.setOption('keyMap', 'vim-insert'); cm.setOption('disableInput', false); if (actionArgs && actionArgs.replace) { cm.toggleOverwrite(true); cm.setOption('keyMap', 'vim-replace'); CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); } else { cm.setOption('keyMap', 'vim-insert'); CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); } if (!vimGlobalState.macroModeState.isPlaying) { cm.on('change', onChange); CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); } if (vim.visualMode) { exitVisualMode(cm); } selectForInsert(cm, head, height); }, toggleVisualMode: function(cm, actionArgs, vim) { var repeat = actionArgs.repeat; var anchor = cm.getCursor(); var head; if (!vim.visualMode) { vim.visualMode = true; vim.visualLine = !!actionArgs.linewise; vim.visualBlock = !!actionArgs.blockwise; head = clipCursorToContent( cm, Pos(anchor.line, anchor.ch + repeat - 1), true /** includeLineBreak */); vim.sel = { anchor: anchor, head: head }; CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""}); updateCmSelection(cm); updateMark(cm, vim, '<', cursorMin(anchor, head)); updateMark(cm, vim, '>', cursorMax(anchor, head)); } else if (vim.visualLine ^ actionArgs.linewise || vim.visualBlock ^ actionArgs.blockwise) { vim.visualLine = !!actionArgs.linewise; vim.visualBlock = !!actionArgs.blockwise; CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""}); updateCmSelection(cm); } else { exitVisualMode(cm); } }, reselectLastSelection: function(cm, _actionArgs, vim) { var lastSelection = vim.lastSelection; if (vim.visualMode) { updateLastSelection(cm, vim); } if (lastSelection) { var anchor = lastSelection.anchorMark.find(); var head = lastSelection.headMark.find(); if (!anchor || !head) { return; } vim.sel = { anchor: anchor, head: head }; vim.visualMode = true; vim.visualLine = lastSelection.visualLine; vim.visualBlock = lastSelection.visualBlock; updateCmSelection(cm); updateMark(cm, vim, '<', cursorMin(anchor, head)); updateMark(cm, vim, '>', cursorMax(anchor, head)); CodeMirror.signal(cm, 'vim-mode-change', { mode: 'visual', subMode: vim.visualLine ? 'linewise' : vim.visualBlock ? 'blockwise' : ''}); } }, joinLines: function(cm, actionArgs, vim) { var curStart, curEnd; if (vim.visualMode) { curStart = cm.getCursor('anchor'); curEnd = cm.getCursor('head'); if (cursorIsBefore(curEnd, curStart)) { var tmp = curEnd; curEnd = curStart; curStart = tmp; } curEnd.ch = lineLength(cm, curEnd.line) - 1; } else { var repeat = Math.max(actionArgs.repeat, 2); curStart = cm.getCursor(); curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1, Infinity)); } var finalCh = 0; for (var i = curStart.line; i < curEnd.line; i++) { finalCh = lineLength(cm, curStart.line); var tmp = Pos(curStart.line + 1, lineLength(cm, curStart.line + 1)); var text = cm.getRange(curStart, tmp); text = text.replace(/\n\s*/g, ' '); cm.replaceRange(text, curStart, tmp); } var curFinalPos = Pos(curStart.line, finalCh); if (vim.visualMode) { exitVisualMode(cm, false); } cm.setCursor(curFinalPos); }, newLineAndEnterInsertMode: function(cm, actionArgs, vim) { vim.insertMode = true; var insertAt = copyCursor(cm.getCursor()); if (insertAt.line === cm.firstLine() && !actionArgs.after) { cm.replaceRange('\n', Pos(cm.firstLine(), 0)); cm.setCursor(cm.firstLine(), 0); } else { insertAt.line = (actionArgs.after) ? insertAt.line : insertAt.line - 1; insertAt.ch = lineLength(cm, insertAt.line); cm.setCursor(insertAt); var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent; newlineFn(cm); } this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim); }, paste: function(cm, actionArgs, vim) { var cur = copyCursor(cm.getCursor()); var register = vimGlobalState.registerController.getRegister( actionArgs.registerName); var text = register.toString(); if (!text) { return; } if (actionArgs.matchIndent) { var tabSize = cm.getOption("tabSize"); var whitespaceLength = function(str) { var tabs = (str.split("\t").length - 1); var spaces = (str.split(" ").length - 1); return tabs * tabSize + spaces * 1; }; var currentLine = cm.getLine(cm.getCursor().line); var indent = whitespaceLength(currentLine.match(/^\s*/)[0]); var chompedText = text.replace(/\n$/, ''); var wasChomped = text !== chompedText; var firstIndent = whitespaceLength(text.match(/^\s*/)[0]); var text = chompedText.replace(/^\s*/gm, function(wspace) { var newIndent = indent + (whitespaceLength(wspace) - firstIndent); if (newIndent < 0) { return ""; } else if (cm.getOption("indentWithTabs")) { var quotient = Math.floor(newIndent / tabSize); return Array(quotient + 1).join('\t'); } else { return Array(newIndent + 1).join(' '); } }); text += wasChomped ? "\n" : ""; } if (actionArgs.repeat > 1) { var text = Array(actionArgs.repeat + 1).join(text); } var linewise = register.linewise; var blockwise = register.blockwise; if (linewise) { if(vim.visualMode) { text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n'; } else if (actionArgs.after) { text = '\n' + text.slice(0, text.length - 1); cur.ch = lineLength(cm, cur.line); } else { cur.ch = 0; } } else { if (blockwise) { text = text.split('\n'); for (var i = 0; i < text.length; i++) { text[i] = (text[i] == '') ? ' ' : text[i]; } } cur.ch += actionArgs.after ? 1 : 0; } var curPosFinal; var idx; if (vim.visualMode) { vim.lastPastedText = text; var lastSelectionCurEnd; var selectedArea = getSelectedAreaRange(cm, vim); var selectionStart = selectedArea[0]; var selectionEnd = selectedArea[1]; var selectedText = cm.getSelection(); var selections = cm.listSelections(); var emptyStrings = new Array(selections.length).join('1').split('1'); if (vim.lastSelection) { lastSelectionCurEnd = vim.lastSelection.headMark.find(); } vimGlobalState.registerController.unnamedRegister.setText(selectedText); if (blockwise) { cm.replaceSelections(emptyStrings); selectionEnd = Pos(selectionStart.line + text.length-1, selectionStart.ch); cm.setCursor(selectionStart); selectBlock(cm, selectionEnd); cm.replaceSelections(text); curPosFinal = selectionStart; } else if (vim.visualBlock) { cm.replaceSelections(emptyStrings); cm.setCursor(selectionStart); cm.replaceRange(text, selectionStart, selectionStart); curPosFinal = selectionStart; } else { cm.replaceRange(text, selectionStart, selectionEnd); curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1); } if(lastSelectionCurEnd) { vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd); } if (linewise) { curPosFinal.ch=0; } } else { if (blockwise) { cm.setCursor(cur); for (var i = 0; i < text.length; i++) { var line = cur.line+i; if (line > cm.lastLine()) { cm.replaceRange('\n', Pos(line, 0)); } var lastCh = lineLength(cm, line); if (lastCh < cur.ch) { extendLineToColumn(cm, line, cur.ch); } } cm.setCursor(cur); selectBlock(cm, Pos(cur.line + text.length-1, cur.ch)); cm.replaceSelections(text); curPosFinal = cur; } else { cm.replaceRange(text, cur); if (linewise && actionArgs.after) { curPosFinal = Pos( cur.line + 1, findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1))); } else if (linewise && !actionArgs.after) { curPosFinal = Pos( cur.line, findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line))); } else if (!linewise && actionArgs.after) { idx = cm.indexFromPos(cur); curPosFinal = cm.posFromIndex(idx + text.length - 1); } else { idx = cm.indexFromPos(cur); curPosFinal = cm.posFromIndex(idx + text.length); } } } if (vim.visualMode) { exitVisualMode(cm, false); } cm.setCursor(curPosFinal); }, undo: function(cm, actionArgs) { cm.operation(function() { repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)(); cm.setCursor(cm.getCursor('anchor')); }); }, redo: function(cm, actionArgs) { repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); }, setRegister: function(_cm, actionArgs, vim) { vim.inputState.registerName = actionArgs.selectedCharacter; }, setMark: function(cm, actionArgs, vim) { var markName = actionArgs.selectedCharacter; updateMark(cm, vim, markName, cm.getCursor()); }, replace: function(cm, actionArgs, vim) { var replaceWith = actionArgs.selectedCharacter; var curStart = cm.getCursor(); var replaceTo; var curEnd; var selections = cm.listSelections(); if (vim.visualMode) { curStart = cm.getCursor('start'); curEnd = cm.getCursor('end'); } else { var line = cm.getLine(curStart.line); replaceTo = curStart.ch + actionArgs.repeat; if (replaceTo > line.length) { replaceTo=line.length; } curEnd = Pos(curStart.line, replaceTo); } if (replaceWith=='\n') { if (!vim.visualMode) cm.replaceRange('', curStart, curEnd); (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm); } else { var replaceWithStr = cm.getRange(curStart, curEnd); replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith); if (vim.visualBlock) { var spaces = new Array(cm.getOption("tabSize")+1).join(' '); replaceWithStr = cm.getSelection(); replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n'); cm.replaceSelections(replaceWithStr); } else { cm.replaceRange(replaceWithStr, curStart, curEnd); } if (vim.visualMode) { curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ? selections[0].anchor : selections[0].head; cm.setCursor(curStart); exitVisualMode(cm, false); } else { cm.setCursor(offsetCursor(curEnd, 0, -1)); } } }, incrementNumberToken: function(cm, actionArgs) { var cur = cm.getCursor(); var lineStr = cm.getLine(cur.line); var re = /-?\d+/g; var match; var start; var end; var numberStr; var token; while ((match = re.exec(lineStr)) !== null) { token = match[0]; start = match.index; end = start + token.length; if (cur.ch < end)break; } if (!actionArgs.backtrack && (end <= cur.ch))return; if (token) { var increment = actionArgs.increase ? 1 : -1; var number = parseInt(token) + (increment * actionArgs.repeat); var from = Pos(cur.line, start); var to = Pos(cur.line, end); numberStr = number.toString(); cm.replaceRange(numberStr, from, to); } else { return; } cm.setCursor(Pos(cur.line, start + numberStr.length - 1)); }, repeatLastEdit: function(cm, actionArgs, vim) { var lastEditInputState = vim.lastEditInputState; if (!lastEditInputState) { return; } var repeat = actionArgs.repeat; if (repeat && actionArgs.repeatIsExplicit) { vim.lastEditInputState.repeatOverride = repeat; } else { repeat = vim.lastEditInputState.repeatOverride || repeat; } repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); }, exitInsertMode: exitInsertMode }; function defineAction(name, fn) { actions[name] = fn; } function clipCursorToContent(cm, cur, includeLineBreak) { var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); var maxCh = lineLength(cm, line) - 1; maxCh = (includeLineBreak) ? maxCh + 1 : maxCh; var ch = Math.min(Math.max(0, cur.ch), maxCh); return Pos(line, ch); } function copyArgs(args) { var ret = {}; for (var prop in args) { if (args.hasOwnProperty(prop)) { ret[prop] = args[prop]; } } return ret; } function offsetCursor(cur, offsetLine, offsetCh) { if (typeof offsetLine === 'object') { offsetCh = offsetLine.ch; offsetLine = offsetLine.line; } return Pos(cur.line + offsetLine, cur.ch + offsetCh); } function getOffset(anchor, head) { return { line: head.line - anchor.line, ch: head.line - anchor.line }; } function commandMatches(keys, keyMap, context, inputState) { var match, partial = [], full = []; for (var i = 0; i < keyMap.length; i++) { var command = keyMap[i]; if (context == 'insert' && command.context != 'insert' || command.context && command.context != context || inputState.operator && command.type == 'action' || !(match = commandMatch(keys, command.keys))) { continue; } if (match == 'partial') { partial.push(command); } if (match == 'full') { full.push(command); } } return { partial: partial.length && partial, full: full.length && full }; } function commandMatch(pressed, mapped) { if (mapped.slice(-11) == '') { var prefixLen = mapped.length - 11; var pressedPrefix = pressed.slice(0, prefixLen); var mappedPrefix = mapped.slice(0, prefixLen); return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' : mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false; } else { return pressed == mapped ? 'full' : mapped.indexOf(pressed) == 0 ? 'partial' : false; } } function lastChar(keys) { var match = /^.*(<[\w\-]+>)$/.exec(keys); var selectedCharacter = match ? match[1] : keys.slice(-1); if (selectedCharacter.length > 1){ switch(selectedCharacter){ case '': selectedCharacter='\n'; break; case '': selectedCharacter=' '; break; default: break; } } return selectedCharacter; } function repeatFn(cm, fn, repeat) { return function() { for (var i = 0; i < repeat; i++) { fn(cm); } }; } function copyCursor(cur) { return Pos(cur.line, cur.ch); } function cursorEqual(cur1, cur2) { return cur1.ch == cur2.ch && cur1.line == cur2.line; } function cursorIsBefore(cur1, cur2) { if (cur1.line < cur2.line) { return true; } if (cur1.line == cur2.line && cur1.ch < cur2.ch) { return true; } return false; } function cursorMin(cur1, cur2) { if (arguments.length > 2) { cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1)); } return cursorIsBefore(cur1, cur2) ? cur1 : cur2; } function cursorMax(cur1, cur2) { if (arguments.length > 2) { cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1)); } return cursorIsBefore(cur1, cur2) ? cur2 : cur1; } function cursorIsBetween(cur1, cur2, cur3) { var cur1before2 = cursorIsBefore(cur1, cur2); var cur2before3 = cursorIsBefore(cur2, cur3); return cur1before2 && cur2before3; } function lineLength(cm, lineNum) { return cm.getLine(lineNum).length; } function trim(s) { if (s.trim) { return s.trim(); } return s.replace(/^\s+|\s+$/g, ''); } function escapeRegex(s) { return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1'); } function extendLineToColumn(cm, lineNum, column) { var endCh = lineLength(cm, lineNum); var spaces = new Array(column-endCh+1).join(' '); cm.setCursor(Pos(lineNum, endCh)); cm.replaceRange(spaces, cm.getCursor()); } function selectBlock(cm, selectionEnd) { var selections = [], ranges = cm.listSelections(); var head = copyCursor(cm.clipPos(selectionEnd)); var isClipped = !cursorEqual(selectionEnd, head); var curHead = cm.getCursor('head'); var primIndex = getIndex(ranges, curHead); var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor); var max = ranges.length - 1; var index = max - primIndex > primIndex ? max : 0; var base = ranges[index].anchor; var firstLine = Math.min(base.line, head.line); var lastLine = Math.max(base.line, head.line); var baseCh = base.ch, headCh = head.ch; var dir = ranges[index].head.ch - baseCh; var newDir = headCh - baseCh; if (dir > 0 && newDir <= 0) { baseCh++; if (!isClipped) { headCh--; } } else if (dir < 0 && newDir >= 0) { baseCh--; if (!wasClipped) { headCh++; } } else if (dir < 0 && newDir == -1) { baseCh--; headCh++; } for (var line = firstLine; line <= lastLine; line++) { var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)}; selections.push(range); } primIndex = head.line == lastLine ? selections.length - 1 : 0; cm.setSelections(selections); selectionEnd.ch = headCh; base.ch = baseCh; return base; } function selectForInsert(cm, head, height) { var sel = []; for (var i = 0; i < height; i++) { var lineHead = offsetCursor(head, i, 0); sel.push({anchor: lineHead, head: lineHead}); } cm.setSelections(sel, 0); } function getIndex(ranges, cursor, end) { for (var i = 0; i < ranges.length; i++) { var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor); var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor); if (atAnchor || atHead) { return i; } } return -1; } function getSelectedAreaRange(cm, vim) { var lastSelection = vim.lastSelection; var getCurrentSelectedAreaRange = function() { var selections = cm.listSelections(); var start = selections[0]; var end = selections[selections.length-1]; var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head; var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor; return [selectionStart, selectionEnd]; }; var getLastSelectedAreaRange = function() { var selectionStart = cm.getCursor(); var selectionEnd = cm.getCursor(); var block = lastSelection.visualBlock; if (block) { var width = block.width; var height = block.height; selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width); var selections = []; for (var i = selectionStart.line; i < selectionEnd.line; i++) { var anchor = Pos(i, selectionStart.ch); var head = Pos(i, selectionEnd.ch); var range = {anchor: anchor, head: head}; selections.push(range); } cm.setSelections(selections); } else { var start = lastSelection.anchorMark.find(); var end = lastSelection.headMark.find(); var line = end.line - start.line; var ch = end.ch - start.ch; selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch}; if (lastSelection.visualLine) { selectionStart = Pos(selectionStart.line, 0); selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line)); } cm.setSelection(selectionStart, selectionEnd); } return [selectionStart, selectionEnd]; }; if (!vim.visualMode) { return getLastSelectedAreaRange(); } else { return getCurrentSelectedAreaRange(); } } function updateLastSelection(cm, vim) { var anchor = vim.sel.anchor; var head = vim.sel.head; if (vim.lastPastedText) { head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length); vim.lastPastedText = null; } vim.lastSelection = {'anchorMark': cm.setBookmark(anchor), 'headMark': cm.setBookmark(head), 'anchor': copyCursor(anchor), 'head': copyCursor(head), 'visualMode': vim.visualMode, 'visualLine': vim.visualLine, 'visualBlock': vim.visualBlock}; } function expandSelection(cm, start, end) { var sel = cm.state.vim.sel; var head = sel.head; var anchor = sel.anchor; var tmp; if (cursorIsBefore(end, start)) { tmp = end; end = start; start = tmp; } if (cursorIsBefore(head, anchor)) { head = cursorMin(start, head); anchor = cursorMax(anchor, end); } else { anchor = cursorMin(start, anchor); head = cursorMax(head, end); head = offsetCursor(head, 0, -1); if (head.ch == -1 && head.line != cm.firstLine()) { head = Pos(head.line - 1, lineLength(cm, head.line - 1)); } } return [anchor, head]; } function updateCmSelection(cm, sel, mode) { var vim = cm.state.vim; sel = sel || vim.sel; var mode = mode || vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char'; var cmSel = makeCmSelection(cm, sel, mode); cm.setSelections(cmSel.ranges, cmSel.primary); updateFakeCursor(cm); } function makeCmSelection(cm, sel, mode, exclusive) { var head = copyCursor(sel.head); var anchor = copyCursor(sel.anchor); if (mode == 'char') { var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; head = offsetCursor(sel.head, 0, headOffset); anchor = offsetCursor(sel.anchor, 0, anchorOffset); return { ranges: [{anchor: anchor, head: head}], primary: 0 }; } else if (mode == 'line') { if (!cursorIsBefore(sel.head, sel.anchor)) { anchor.ch = 0; var lastLine = cm.lastLine(); if (head.line > lastLine) { head.line = lastLine; } head.ch = lineLength(cm, head.line); } else { head.ch = 0; anchor.ch = lineLength(cm, anchor.line); } return { ranges: [{anchor: anchor, head: head}], primary: 0 }; } else if (mode == 'block') { var top = Math.min(anchor.line, head.line), left = Math.min(anchor.ch, head.ch), bottom = Math.max(anchor.line, head.line), right = Math.max(anchor.ch, head.ch) + 1; var height = bottom - top + 1; var primary = head.line == top ? 0 : height - 1; var ranges = []; for (var i = 0; i < height; i++) { ranges.push({ anchor: Pos(top + i, left), head: Pos(top + i, right) }); } return { ranges: ranges, primary: primary }; } } function getHead(cm) { var cur = cm.getCursor('head'); if (cm.getSelection().length == 1) { cur = cursorMin(cur, cm.getCursor('anchor')); } return cur; } function exitVisualMode(cm, moveHead) { var vim = cm.state.vim; if (moveHead !== false) { cm.setCursor(clipCursorToContent(cm, vim.sel.head)); } updateLastSelection(cm, vim); vim.visualMode = false; vim.visualLine = false; vim.visualBlock = false; CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); if (vim.fakeCursor) { vim.fakeCursor.clear(); } } function clipToLine(cm, curStart, curEnd) { var selection = cm.getRange(curStart, curEnd); if (/\n\s*$/.test(selection)) { var lines = selection.split('\n'); lines.pop(); var line; for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) { curEnd.line--; curEnd.ch = 0; } if (line) { curEnd.line--; curEnd.ch = lineLength(cm, curEnd.line); } else { curEnd.ch = 0; } } } function expandSelectionToLine(_cm, curStart, curEnd) { curStart.ch = 0; curEnd.ch = 0; curEnd.line++; } function findFirstNonWhiteSpaceCharacter(text) { if (!text) { return 0; } var firstNonWS = text.search(/\S/); return firstNonWS == -1 ? text.length : firstNonWS; } function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) { var cur = getHead(cm); var line = cm.getLine(cur.line); var idx = cur.ch; var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0]; while (!test(line.charAt(idx))) { idx++; if (idx >= line.length) { return null; } } if (bigWord) { test = bigWordCharTest[0]; } else { test = wordCharTest[0]; if (!test(line.charAt(idx))) { test = wordCharTest[1]; } } var end = idx, start = idx; while (test(line.charAt(end)) && end < line.length) { end++; } while (test(line.charAt(start)) && start >= 0) { start--; } start++; if (inclusive) { var wordEnd = end; while (/\s/.test(line.charAt(end)) && end < line.length) { end++; } if (wordEnd == end) { var wordStart = start; while (/\s/.test(line.charAt(start - 1)) && start > 0) { start--; } if (!start) { start = wordStart; } } } return { start: Pos(cur.line, start), end: Pos(cur.line, end) }; } function recordJumpPosition(cm, oldCur, newCur) { if (!cursorEqual(oldCur, newCur)) { vimGlobalState.jumpList.add(cm, oldCur, newCur); } } function recordLastCharacterSearch(increment, args) { vimGlobalState.lastChararacterSearch.increment = increment; vimGlobalState.lastChararacterSearch.forward = args.forward; vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter; } var symbolToMode = { '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket', '[': 'section', ']': 'section', '*': 'comment', '/': 'comment', 'm': 'method', 'M': 'method', '#': 'preprocess' }; var findSymbolModes = { bracket: { isComplete: function(state) { if (state.nextCh === state.symb) { state.depth++; if (state.depth >= 1)return true; } else if (state.nextCh === state.reverseSymb) { state.depth--; } return false; } }, section: { init: function(state) { state.curMoveThrough = true; state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}'; }, isComplete: function(state) { return state.index === 0 && state.nextCh === state.symb; } }, comment: { isComplete: function(state) { var found = state.lastCh === '*' && state.nextCh === '/'; state.lastCh = state.nextCh; return found; } }, method: { init: function(state) { state.symb = (state.symb === 'm' ? '{' : '}'); state.reverseSymb = state.symb === '{' ? '}' : '{'; }, isComplete: function(state) { if (state.nextCh === state.symb)return true; return false; } }, preprocess: { init: function(state) { state.index = 0; }, isComplete: function(state) { if (state.nextCh === '#') { var token = state.lineText.match(/#(\w+)/)[1]; if (token === 'endif') { if (state.forward && state.depth === 0) { return true; } state.depth++; } else if (token === 'if') { if (!state.forward && state.depth === 0) { return true; } state.depth--; } if (token === 'else' && state.depth === 0)return true; } return false; } } }; function findSymbol(cm, repeat, forward, symb) { var cur = copyCursor(cm.getCursor()); var increment = forward ? 1 : -1; var endLine = forward ? cm.lineCount() : -1; var curCh = cur.ch; var line = cur.line; var lineText = cm.getLine(line); var state = { lineText: lineText, nextCh: lineText.charAt(curCh), lastCh: null, index: curCh, symb: symb, reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb], forward: forward, depth: 0, curMoveThrough: false }; var mode = symbolToMode[symb]; if (!mode)return cur; var init = findSymbolModes[mode].init; var isComplete = findSymbolModes[mode].isComplete; if (init) { init(state); } while (line !== endLine && repeat) { state.index += increment; state.nextCh = state.lineText.charAt(state.index); if (!state.nextCh) { line += increment; state.lineText = cm.getLine(line) || ''; if (increment > 0) { state.index = 0; } else { var lineLen = state.lineText.length; state.index = (lineLen > 0) ? (lineLen-1) : 0; } state.nextCh = state.lineText.charAt(state.index); } if (isComplete(state)) { cur.line = line; cur.ch = state.index; repeat--; } } if (state.nextCh || state.curMoveThrough) { return Pos(line, state.index); } return cur; } function findWord(cm, cur, forward, bigWord, emptyLineIsWord) { var lineNum = cur.line; var pos = cur.ch; var line = cm.getLine(lineNum); var dir = forward ? 1 : -1; var charTests = bigWord ? bigWordCharTest: wordCharTest; if (emptyLineIsWord && line == '') { lineNum += dir; line = cm.getLine(lineNum); if (!isLine(cm, lineNum)) { return null; } pos = (forward) ? 0 : line.length; } while (true) { if (emptyLineIsWord && line == '') { return { from: 0, to: 0, line: lineNum }; } var stop = (dir > 0) ? line.length : -1; var wordStart = stop, wordEnd = stop; while (pos != stop) { var foundWord = false; for (var i = 0; i < charTests.length && !foundWord; ++i) { if (charTests[i](line.charAt(pos))) { wordStart = pos; while (pos != stop && charTests[i](line.charAt(pos))) { pos += dir; } wordEnd = pos; foundWord = wordStart != wordEnd; if (wordStart == cur.ch && lineNum == cur.line && wordEnd == wordStart + dir) { continue; } else { return { from: Math.min(wordStart, wordEnd + 1), to: Math.max(wordStart, wordEnd), line: lineNum }; } } } if (!foundWord) { pos += dir; } } lineNum += dir; if (!isLine(cm, lineNum)) { return null; } line = cm.getLine(lineNum); pos = (dir > 0) ? 0 : line.length; } throw new Error('The impossible happened.'); } function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) { var curStart = copyCursor(cur); var words = []; if (forward && !wordEnd || !forward && wordEnd) { repeat++; } var emptyLineIsWord = !(forward && wordEnd); for (var i = 0; i < repeat; i++) { var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord); if (!word) { var eodCh = lineLength(cm, cm.lastLine()); words.push(forward ? {line: cm.lastLine(), from: eodCh, to: eodCh} : {line: 0, from: 0, to: 0}); break; } words.push(word); cur = Pos(word.line, forward ? (word.to - 1) : word.from); } var shortCircuit = words.length != repeat; var firstWord = words[0]; var lastWord = words.pop(); if (forward && !wordEnd) { if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) { lastWord = words.pop(); } return Pos(lastWord.line, lastWord.from); } else if (forward && wordEnd) { return Pos(lastWord.line, lastWord.to - 1); } else if (!forward && wordEnd) { if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { lastWord = words.pop(); } return Pos(lastWord.line, lastWord.to); } else { return Pos(lastWord.line, lastWord.from); } } function moveToCharacter(cm, repeat, forward, character) { var cur = cm.getCursor(); var start = cur.ch; var idx; for (var i = 0; i < repeat; i ++) { var line = cm.getLine(cur.line); idx = charIdxInLine(start, line, character, forward, true); if (idx == -1) { return null; } start = idx; } return Pos(cm.getCursor().line, idx); } function moveToColumn(cm, repeat) { var line = cm.getCursor().line; return clipCursorToContent(cm, Pos(line, repeat - 1)); } function updateMark(cm, vim, markName, pos) { if (!inArray(markName, validMarks)) { return; } if (vim.marks[markName]) { vim.marks[markName].clear(); } vim.marks[markName] = cm.setBookmark(pos); } function charIdxInLine(start, line, character, forward, includeChar) { var idx; if (forward) { idx = line.indexOf(character, start + 1); if (idx != -1 && !includeChar) { idx -= 1; } } else { idx = line.lastIndexOf(character, start - 1); if (idx != -1 && !includeChar) { idx += 1; } } return idx; } function findParagraph(cm, head, repeat, dir, inclusive) { var line = head.line; var min = cm.firstLine(); var max = cm.lastLine(); var start, end, i = line; function isEmpty(i) { return !/\S/.test(cm.getLine(i)); } function isBoundary(i, dir, any) { if (any) { return isEmpty(i) != isEmpty(i + dir); } return !isEmpty(i) && isEmpty(i + dir); } if (dir) { while (min <= i && i <= max && repeat > 0) { if (isBoundary(i, dir)) { repeat--; } i += dir; } return new Pos(i, 0); } var vim = cm.state.vim; if (vim.visualLine && isBoundary(line, 1, true)) { var anchor = vim.sel.anchor; if (isBoundary(anchor.line, -1, true)) { if (!inclusive || anchor.line != line) { line += 1; } } } var startState = isEmpty(line); for (i = line; i <= max && repeat; i++) { if (isBoundary(i, 1, true)) { if (!inclusive || isEmpty(i) != startState) { repeat--; } } } end = new Pos(i, 0); if (i > max && !startState) { startState = true; } else { inclusive = false; } for (i = line; i > min; i--) { if (!inclusive || isEmpty(i) == startState || i == line) { if (isBoundary(i, -1, true)) { break; } } } start = new Pos(i, 0); return { start: start, end: end }; } function selectCompanionObject(cm, head, symb, inclusive) { var cur = head, start, end; var bracketRegexp = ({ '(': /[()]/, ')': /[()]/, '[': /[[\]]/, ']': /[[\]]/, '{': /[{}]/, '}': /[{}]/})[symb]; var openSym = ({ '(': '(', ')': '(', '[': '[', ']': '[', '{': '{', '}': '{'})[symb]; var curChar = cm.getLine(cur.line).charAt(cur.ch); var offset = curChar === openSym ? 1 : 0; start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp}); end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp}); if (!start || !end) { return { start: cur, end: cur }; } start = start.pos; end = end.pos; if ((start.line == end.line && start.ch > end.ch) || (start.line > end.line)) { var tmp = start; start = end; end = tmp; } if (inclusive) { end.ch += 1; } else { start.ch += 1; } return { start: start, end: end }; } function findBeginningAndEnd(cm, head, symb, inclusive) { var cur = copyCursor(head); var line = cm.getLine(cur.line); var chars = line.split(''); var start, end, i, len; var firstIndex = chars.indexOf(symb); if (cur.ch < firstIndex) { cur.ch = firstIndex; } else if (firstIndex < cur.ch && chars[cur.ch] == symb) { end = cur.ch; // assign end to the current cursor --cur.ch; // make sure to look backwards } if (chars[cur.ch] == symb && !end) { start = cur.ch + 1; // assign start to ahead of the cursor } else { for (i = cur.ch; i > -1 && !start; i--) { if (chars[i] == symb) { start = i + 1; } } } if (start && !end) { for (i = start, len = chars.length; i < len && !end; i++) { if (chars[i] == symb) { end = i; } } } if (!start || !end) { return { start: cur, end: cur }; } if (inclusive) { --start; ++end; } return { start: Pos(cur.line, start), end: Pos(cur.line, end) }; } defineOption('pcre', true, 'boolean'); function SearchState() {} SearchState.prototype = { getQuery: function() { return vimGlobalState.query; }, setQuery: function(query) { vimGlobalState.query = query; }, getOverlay: function() { return this.searchOverlay; }, setOverlay: function(overlay) { this.searchOverlay = overlay; }, isReversed: function() { return vimGlobalState.isReversed; }, setReversed: function(reversed) { vimGlobalState.isReversed = reversed; }, getScrollbarAnnotate: function() { return this.annotate; }, setScrollbarAnnotate: function(annotate) { this.annotate = annotate; } }; function getSearchState(cm) { var vim = cm.state.vim; return vim.searchState_ || (vim.searchState_ = new SearchState()); } function dialog(cm, template, shortText, onClose, options) { if (cm.openDialog) { cm.openDialog(template, onClose, { bottom: true, value: options.value, onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp, select: options.select }); } else { onClose(prompt(shortText, '')); } } function splitBySlash(argString) { var slashes = findUnescapedSlashes(argString) || []; if (!slashes.length) return []; var tokens = []; if (slashes[0] !== 0) return; for (var i = 0; i < slashes.length; i++) { if (typeof slashes[i] == 'number') tokens.push(argString.substring(slashes[i] + 1, slashes[i+1])); } return tokens; } function findUnescapedSlashes(str) { var escapeNextChar = false; var slashes = []; for (var i = 0; i < str.length; i++) { var c = str.charAt(i); if (!escapeNextChar && c == '/') { slashes.push(i); } escapeNextChar = !escapeNextChar && (c == '\\'); } return slashes; } function translateRegex(str) { var specials = '|(){'; var unescape = '}'; var escapeNextChar = false; var out = []; for (var i = -1; i < str.length; i++) { var c = str.charAt(i) || ''; var n = str.charAt(i+1) || ''; var specialComesNext = (n && specials.indexOf(n) != -1); if (escapeNextChar) { if (c !== '\\' || !specialComesNext) { out.push(c); } escapeNextChar = false; } else { if (c === '\\') { escapeNextChar = true; if (n && unescape.indexOf(n) != -1) { specialComesNext = true; } if (!specialComesNext || n === '\\') { out.push(c); } } else { out.push(c); if (specialComesNext && n !== '\\') { out.push('\\'); } } } } return out.join(''); } function translateRegexReplace(str) { var escapeNextChar = false; var out = []; for (var i = -1; i < str.length; i++) { var c = str.charAt(i) || ''; var n = str.charAt(i+1) || ''; if (escapeNextChar) { out.push(c); escapeNextChar = false; } else { if (c === '\\') { escapeNextChar = true; if ((isNumber(n) || n === '$')) { out.push('$'); } else if (n !== '/' && n !== '\\') { out.push('\\'); } } else { if (c === '$') { out.push('$'); } out.push(c); if (n === '/') { out.push('\\'); } } } } return out.join(''); } function unescapeRegexReplace(str) { var stream = new CodeMirror.StringStream(str); var output = []; while (!stream.eol()) { while (stream.peek() && stream.peek() != '\\') { output.push(stream.next()); } if (stream.match('\\/', true)) { output.push('/'); } else if (stream.match('\\\\', true)) { output.push('\\'); } else { output.push(stream.next()); } } return output.join(''); } function parseQuery(query, ignoreCase, smartCase) { var lastSearchRegister = vimGlobalState.registerController.getRegister('/'); lastSearchRegister.setText(query); if (query instanceof RegExp) { return query; } var slashes = findUnescapedSlashes(query); var regexPart; var forceIgnoreCase; if (!slashes.length) { regexPart = query; } else { regexPart = query.substring(0, slashes[0]); var flagsPart = query.substring(slashes[0]); forceIgnoreCase = (flagsPart.indexOf('i') != -1); } if (!regexPart) { return null; } if (!getOption('pcre')) { regexPart = translateRegex(regexPart); } if (smartCase) { ignoreCase = (/^[^A-Z]*$/).test(regexPart); } var regexp = new RegExp(regexPart, (ignoreCase || forceIgnoreCase) ? 'i' : undefined); return regexp; } function showConfirm(cm, text) { if (cm.openNotification) { cm.openNotification('' + text + '', {bottom: true, duration: 5000}); } else { alert(text); } } function makePrompt(prefix, desc) { var raw = ''; if (prefix) { raw += '' + prefix + ''; } raw += ' ' + ''; if (desc) { raw += ''; raw += desc; raw += ''; } return raw; } var searchPromptDesc = '(Javascript regexp)'; function showPrompt(cm, options) { var shortText = (options.prefix || '') + ' ' + (options.desc || ''); var prompt = makePrompt(options.prefix, options.desc); dialog(cm, prompt, shortText, options.onClose, options); } function regexEqual(r1, r2) { if (r1 instanceof RegExp && r2 instanceof RegExp) { var props = ['global', 'multiline', 'ignoreCase', 'source']; for (var i = 0; i < props.length; i++) { var prop = props[i]; if (r1[prop] !== r2[prop]) { return false; } } return true; } return false; } function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) { if (!rawQuery) { return; } var state = getSearchState(cm); var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase); if (!query) { return; } highlightSearchMatches(cm, query); if (regexEqual(query, state.getQuery())) { return query; } state.setQuery(query); return query; } function searchOverlay(query) { if (query.source.charAt(0) == '^') { var matchSol = true; } return { token: function(stream) { if (matchSol && !stream.sol()) { stream.skipToEnd(); return; } var match = stream.match(query, false); if (match) { if (match[0].length == 0) { stream.next(); return 'searching'; } if (!stream.sol()) { stream.backUp(1); if (!query.exec(stream.next() + match[0])) { stream.next(); return null; } } stream.match(query); return 'searching'; } while (!stream.eol()) { stream.next(); if (stream.match(query, false)) break; } }, query: query }; } function highlightSearchMatches(cm, query) { var searchState = getSearchState(cm); var overlay = searchState.getOverlay(); if (!overlay || query != overlay.query) { if (overlay) { cm.removeOverlay(overlay); } overlay = searchOverlay(query); cm.addOverlay(overlay); if (cm.showMatchesOnScrollbar) { if (searchState.getScrollbarAnnotate()) { searchState.getScrollbarAnnotate().clear(); } searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query)); } searchState.setOverlay(overlay); } } function findNext(cm, prev, query, repeat) { if (repeat === undefined) { repeat = 1; } return cm.operation(function() { var pos = cm.getCursor(); var cursor = cm.getSearchCursor(query, pos); for (var i = 0; i < repeat; i++) { var found = cursor.find(prev); if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); } if (!found) { cursor = cm.getSearchCursor(query, (prev) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) ); if (!cursor.find(prev)) { return; } } } return cursor.from(); }); } function clearSearchHighlight(cm) { var state = getSearchState(cm); cm.removeOverlay(getSearchState(cm).getOverlay()); state.setOverlay(null); if (state.getScrollbarAnnotate()) { state.getScrollbarAnnotate().clear(); state.setScrollbarAnnotate(null); } } function isInRange(pos, start, end) { if (typeof pos != 'number') { pos = pos.line; } if (start instanceof Array) { return inArray(pos, start); } else { if (end) { return (pos >= start && pos <= end); } else { return pos == start; } } } function getUserVisibleLines(cm) { var renderer = cm.ace.renderer; return { top: renderer.getFirstFullyVisibleRow(), bottom: renderer.getLastFullyVisibleRow() } } var defaultExCommandMap = [ { name: 'map' }, { name: 'imap', shortName: 'im' }, { name: 'nmap', shortName: 'nm' }, { name: 'vmap', shortName: 'vm' }, { name: 'unmap' }, { name: 'write', shortName: 'w' }, { name: 'undo', shortName: 'u' }, { name: 'redo', shortName: 'red' }, { name: 'set', shortName: 'set' }, { name: 'sort', shortName: 'sor' }, { name: 'substitute', shortName: 's', possiblyAsync: true }, { name: 'nohlsearch', shortName: 'noh' }, { name: 'delmarks', shortName: 'delm' }, { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, { name: 'global', shortName: 'g' } ]; var ExCommandDispatcher = function() { this.buildCommandMap_(); }; ExCommandDispatcher.prototype = { processCommand: function(cm, input, opt_params) { var vim = cm.state.vim; var commandHistoryRegister = vimGlobalState.registerController.getRegister(':'); var previousCommand = commandHistoryRegister.toString(); if (vim.visualMode) { exitVisualMode(cm); } var inputStream = new CodeMirror.StringStream(input); commandHistoryRegister.setText(input); var params = opt_params || {}; params.input = input; try { this.parseInput_(cm, inputStream, params); } catch(e) { showConfirm(cm, e); throw e; } var command; var commandName; if (!params.commandName) { if (params.line !== undefined) { commandName = 'move'; } } else { command = this.matchCommand_(params.commandName); if (command) { commandName = command.name; if (command.excludeFromCommandHistory) { commandHistoryRegister.setText(previousCommand); } this.parseCommandArgs_(inputStream, params, command); if (command.type == 'exToKey') { for (var i = 0; i < command.toKeys.length; i++) { CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping'); } return; } else if (command.type == 'exToEx') { this.processCommand(cm, command.toInput); return; } } } if (!commandName) { showConfirm(cm, 'Not an editor command ":' + input + '"'); return; } try { exCommands[commandName](cm, params); if ((!command || !command.possiblyAsync) && params.callback) { params.callback(); } } catch(e) { showConfirm(cm, e); throw e; } }, parseInput_: function(cm, inputStream, result) { inputStream.eatWhile(':'); if (inputStream.eat('%')) { result.line = cm.firstLine(); result.lineEnd = cm.lastLine(); } else { result.line = this.parseLineSpec_(cm, inputStream); if (result.line !== undefined && inputStream.eat(',')) { result.lineEnd = this.parseLineSpec_(cm, inputStream); } } var commandMatch = inputStream.match(/^(\w+)/); if (commandMatch) { result.commandName = commandMatch[1]; } else { result.commandName = inputStream.match(/.*/)[0]; } return result; }, parseLineSpec_: function(cm, inputStream) { var numberMatch = inputStream.match(/^(\d+)/); if (numberMatch) { return parseInt(numberMatch[1], 10) - 1; } switch (inputStream.next()) { case '.': return cm.getCursor().line; case '$': return cm.lastLine(); case '\'': var mark = cm.state.vim.marks[inputStream.next()]; if (mark && mark.find()) { return mark.find().line; } throw new Error('Mark not set'); default: inputStream.backUp(1); return undefined; } }, parseCommandArgs_: function(inputStream, params, command) { if (inputStream.eol()) { return; } params.argString = inputStream.match(/.*/)[0]; var delim = command.argDelimiter || /\s+/; var args = trim(params.argString).split(delim); if (args.length && args[0]) { params.args = args; } }, matchCommand_: function(commandName) { for (var i = commandName.length; i > 0; i--) { var prefix = commandName.substring(0, i); if (this.commandMap_[prefix]) { var command = this.commandMap_[prefix]; if (command.name.indexOf(commandName) === 0) { return command; } } } return null; }, buildCommandMap_: function() { this.commandMap_ = {}; for (var i = 0; i < defaultExCommandMap.length; i++) { var command = defaultExCommandMap[i]; var key = command.shortName || command.name; this.commandMap_[key] = command; } }, map: function(lhs, rhs, ctx) { if (lhs != ':' && lhs.charAt(0) == ':') { if (ctx) { throw Error('Mode not supported for ex mappings'); } var commandName = lhs.substring(1); if (rhs != ':' && rhs.charAt(0) == ':') { this.commandMap_[commandName] = { name: commandName, type: 'exToEx', toInput: rhs.substring(1), user: true }; } else { this.commandMap_[commandName] = { name: commandName, type: 'exToKey', toKeys: rhs, user: true }; } } else { if (rhs != ':' && rhs.charAt(0) == ':') { var mapping = { keys: lhs, type: 'keyToEx', exArgs: { input: rhs.substring(1) }, user: true}; if (ctx) { mapping.context = ctx; } defaultKeymap.unshift(mapping); } else { var mapping = { keys: lhs, type: 'keyToKey', toKeys: rhs, user: true }; if (ctx) { mapping.context = ctx; } defaultKeymap.unshift(mapping); } } }, unmap: function(lhs, ctx) { if (lhs != ':' && lhs.charAt(0) == ':') { if (ctx) { throw Error('Mode not supported for ex mappings'); } var commandName = lhs.substring(1); if (this.commandMap_[commandName] && this.commandMap_[commandName].user) { delete this.commandMap_[commandName]; return; } } else { var keys = lhs; for (var i = 0; i < defaultKeymap.length; i++) { if (keys == defaultKeymap[i].keys && defaultKeymap[i].context === ctx && defaultKeymap[i].user) { defaultKeymap.splice(i, 1); return; } } } throw Error('No such mapping.'); } }; var exCommands = { map: function(cm, params, ctx) { var mapArgs = params.args; if (!mapArgs || mapArgs.length < 2) { if (cm) { showConfirm(cm, 'Invalid mapping: ' + params.input); } return; } exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx); }, imap: function(cm, params) { this.map(cm, params, 'insert'); }, nmap: function(cm, params) { this.map(cm, params, 'normal'); }, vmap: function(cm, params) { this.map(cm, params, 'visual'); }, unmap: function(cm, params, ctx) { var mapArgs = params.args; if (!mapArgs || mapArgs.length < 1) { if (cm) { showConfirm(cm, 'No such mapping: ' + params.input); } return; } exCommandDispatcher.unmap(mapArgs[0], ctx); }, move: function(cm, params) { commandDispatcher.processCommand(cm, cm.state.vim, { type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true }, repeatOverride: params.line+1}); }, set: function(cm, params) { var setArgs = params.args; if (!setArgs || setArgs.length < 1) { if (cm) { showConfirm(cm, 'Invalid mapping: ' + params.input); } return; } var expr = setArgs[0].split('='); var optionName = expr[0]; var value = expr[1]; var forceGet = false; if (optionName.charAt(optionName.length - 1) == '?') { if (value) { throw Error('Trailing characters: ' + params.argString); } optionName = optionName.substring(0, optionName.length - 1); forceGet = true; } if (value === undefined && optionName.substring(0, 2) == 'no') { optionName = optionName.substring(2); value = false; } var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean'; if (optionIsBoolean && value == undefined) { value = true; } if (!optionIsBoolean && !value || forceGet) { var oldValue = getOption(optionName); if (oldValue === true || oldValue === false) { showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName); } else { showConfirm(cm, ' ' + optionName + '=' + oldValue); } } else { setOption(optionName, value, cm); } }, registers: function(cm,params) { var regArgs = params.args; var registers = vimGlobalState.registerController.registers; var regInfo = '----------Registers----------

    '; if (!regArgs) { for (var registerName in registers) { var text = registers[registerName].toString(); if (text.length) { regInfo += '"' + registerName + ' ' + text + '
    '; } } } else { var registerName; regArgs = regArgs.join(''); for (var i = 0; i < regArgs.length; i++) { registerName = regArgs.charAt(i); if (!vimGlobalState.registerController.isValidRegister(registerName)) { continue; } var register = registers[registerName] || new Register(); regInfo += '"' + registerName + ' ' + register.toString() + '
    '; } } showConfirm(cm, regInfo); }, sort: function(cm, params) { var reverse, ignoreCase, unique, number; function parseArgs() { if (params.argString) { var args = new CodeMirror.StringStream(params.argString); if (args.eat('!')) { reverse = true; } if (args.eol()) { return; } if (!args.eatSpace()) { return 'Invalid arguments'; } var opts = args.match(/[a-z]+/); if (opts) { opts = opts[0]; ignoreCase = opts.indexOf('i') != -1; unique = opts.indexOf('u') != -1; var decimal = opts.indexOf('d') != -1 && 1; var hex = opts.indexOf('x') != -1 && 1; var octal = opts.indexOf('o') != -1 && 1; if (decimal + hex + octal > 1) { return 'Invalid arguments'; } number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; } if (args.eatSpace() && args.match(/\/.*\//)) { 'patterns not supported'; } } } var err = parseArgs(); if (err) { showConfirm(cm, err + ': ' + params.argString); return; } var lineStart = params.line || cm.firstLine(); var lineEnd = params.lineEnd || params.line || cm.lastLine(); if (lineStart == lineEnd) { return; } var curStart = Pos(lineStart, 0); var curEnd = Pos(lineEnd, lineLength(cm, lineEnd)); var text = cm.getRange(curStart, curEnd).split('\n'); var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ : (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : (number == 'octal') ? /([0-7]+)/ : null; var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; var numPart = [], textPart = []; if (number) { for (var i = 0; i < text.length; i++) { if (numberRegex.exec(text[i])) { numPart.push(text[i]); } else { textPart.push(text[i]); } } } else { textPart = text; } function compareFn(a, b) { if (reverse) { var tmp; tmp = a; a = b; b = tmp; } if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); } var anum = number && numberRegex.exec(a); var bnum = number && numberRegex.exec(b); if (!anum) { return a < b ? -1 : 1; } anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix); bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); return anum - bnum; } numPart.sort(compareFn); textPart.sort(compareFn); text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); if (unique) { // Remove duplicate lines var textOld = text; var lastLine; text = []; for (var i = 0; i < textOld.length; i++) { if (textOld[i] != lastLine) { text.push(textOld[i]); } lastLine = textOld[i]; } } cm.replaceRange(text.join('\n'), curStart, curEnd); }, global: function(cm, params) { var argString = params.argString; if (!argString) { showConfirm(cm, 'Regular Expression missing from global'); return; } var lineStart = (params.line !== undefined) ? params.line : cm.firstLine(); var lineEnd = params.lineEnd || params.line || cm.lastLine(); var tokens = splitBySlash(argString); var regexPart = argString, cmd; if (tokens.length) { regexPart = tokens[0]; cmd = tokens.slice(1, tokens.length).join('/'); } if (regexPart) { try { updateSearchQuery(cm, regexPart, true /** ignoreCase */, true /** smartCase */); } catch (e) { showConfirm(cm, 'Invalid regex: ' + regexPart); return; } } var query = getSearchState(cm).getQuery(); var matchedLines = [], content = ''; for (var i = lineStart; i <= lineEnd; i++) { var matched = query.test(cm.getLine(i)); if (matched) { matchedLines.push(i+1); content+= cm.getLine(i) + '
    '; } } if (!cmd) { showConfirm(cm, content); return; } var index = 0; var nextCommand = function() { if (index < matchedLines.length) { var command = matchedLines[index] + cmd; exCommandDispatcher.processCommand(cm, command, { callback: nextCommand }); } index++; }; nextCommand(); }, substitute: function(cm, params) { if (!cm.getSearchCursor) { throw new Error('Search feature not available. Requires searchcursor.js or ' + 'any other getSearchCursor implementation.'); } var argString = params.argString; var tokens = argString ? splitBySlash(argString) : []; var regexPart, replacePart = '', trailing, flagsPart, count; var confirm = false; // Whether to confirm each replace. var global = false; // True to replace all instances on a line, false to replace only 1. if (tokens.length) { regexPart = tokens[0]; replacePart = tokens[1]; if (replacePart !== undefined) { if (getOption('pcre')) { replacePart = unescapeRegexReplace(replacePart); } else { replacePart = translateRegexReplace(replacePart); } vimGlobalState.lastSubstituteReplacePart = replacePart; } trailing = tokens[2] ? tokens[2].split(' ') : []; } else { if (argString && argString.length) { showConfirm(cm, 'Substitutions should be of the form ' + ':s/pattern/replace/'); return; } } if (trailing) { flagsPart = trailing[0]; count = parseInt(trailing[1]); if (flagsPart) { if (flagsPart.indexOf('c') != -1) { confirm = true; flagsPart.replace('c', ''); } if (flagsPart.indexOf('g') != -1) { global = true; flagsPart.replace('g', ''); } regexPart = regexPart + '/' + flagsPart; } } if (regexPart) { try { updateSearchQuery(cm, regexPart, true /** ignoreCase */, true /** smartCase */); } catch (e) { showConfirm(cm, 'Invalid regex: ' + regexPart); return; } } replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart; if (replacePart === undefined) { showConfirm(cm, 'No previous substitute regular expression'); return; } var state = getSearchState(cm); var query = state.getQuery(); var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line; var lineEnd = params.lineEnd || lineStart; if (count) { lineStart = lineEnd; lineEnd = lineStart + count - 1; } var startPos = clipCursorToContent(cm, Pos(lineStart, 0)); var cursor = cm.getSearchCursor(query, startPos); doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback); }, redo: CodeMirror.commands.redo, undo: CodeMirror.commands.undo, write: function(cm) { if (CodeMirror.commands.save) { CodeMirror.commands.save(cm); } else { cm.save(); } }, nohlsearch: function(cm) { clearSearchHighlight(cm); }, delmarks: function(cm, params) { if (!params.argString || !trim(params.argString)) { showConfirm(cm, 'Argument required'); return; } var state = cm.state.vim; var stream = new CodeMirror.StringStream(trim(params.argString)); while (!stream.eol()) { stream.eatSpace(); var count = stream.pos; if (!stream.match(/[a-zA-Z]/, false)) { showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); return; } var sym = stream.next(); if (stream.match('-', true)) { if (!stream.match(/[a-zA-Z]/, false)) { showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); return; } var startMark = sym; var finishMark = stream.next(); if (isLowerCase(startMark) && isLowerCase(finishMark) || isUpperCase(startMark) && isUpperCase(finishMark)) { var start = startMark.charCodeAt(0); var finish = finishMark.charCodeAt(0); if (start >= finish) { showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); return; } for (var j = 0; j <= finish - start; j++) { var mark = String.fromCharCode(start + j); delete state.marks[mark]; } } else { showConfirm(cm, 'Invalid argument: ' + startMark + '-'); return; } } else { delete state.marks[sym]; } } } }; var exCommandDispatcher = new ExCommandDispatcher(); function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, replaceWith, callback) { cm.state.vim.exMode = true; var done = false; var lastPos = searchCursor.from(); function replaceAll() { cm.operation(function() { while (!done) { replace(); next(); } stop(); }); } function replace() { var text = cm.getRange(searchCursor.from(), searchCursor.to()); var newText = text.replace(query, replaceWith); searchCursor.replace(newText); } function next() { var found; while(found = searchCursor.findNext() && isInRange(searchCursor.from(), lineStart, lineEnd)) { if (!global && lastPos && searchCursor.from().line == lastPos.line) { continue; } cm.scrollIntoView(searchCursor.from(), 30); cm.setSelection(searchCursor.from(), searchCursor.to()); lastPos = searchCursor.from(); done = false; return; } done = true; } function stop(close) { if (close) { close(); } cm.focus(); if (lastPos) { cm.setCursor(lastPos); var vim = cm.state.vim; vim.exMode = false; vim.lastHPos = vim.lastHSPos = lastPos.ch; } if (callback) { callback(); } } function onPromptKeyDown(e, _value, close) { CodeMirror.e_stop(e); var keyName = CodeMirror.keyName(e); switch (keyName) { case 'Y': replace(); next(); break; case 'N': next(); break; case 'A': var savedCallback = callback; callback = undefined; cm.operation(replaceAll); callback = savedCallback; break; case 'L': replace(); case 'Q': case 'Esc': case 'Ctrl-C': case 'Ctrl-[': stop(close); break; } if (done) { stop(close); } return true; } next(); if (done) { showConfirm(cm, 'No matches for ' + query.source); return; } if (!confirm) { replaceAll(); if (callback) { callback(); }; return; } showPrompt(cm, { prefix: 'replace with ' + replaceWith + ' (y/n/a/q/l)', onKeyDown: onPromptKeyDown }); } CodeMirror.keyMap.vim = { attach: attachVimMap, detach: detachVimMap, call: cmKey }; function exitInsertMode(cm) { var vim = cm.state.vim; var macroModeState = vimGlobalState.macroModeState; var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.'); var isPlaying = macroModeState.isPlaying; var lastChange = macroModeState.lastInsertModeChanges; var text = []; if (!isPlaying) { var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1; var changes = lastChange.changes; var text = []; var i = 0; while (i < changes.length) { text.push(changes[i]); if (changes[i] instanceof InsertModeKey) { i++; } else { i+= selLength; } } lastChange.changes = text; cm.off('change', onChange); CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); } if (!isPlaying && vim.insertModeRepeat > 1) { repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, true /** repeatForInsert */); vim.lastEditInputState.repeatOverride = vim.insertModeRepeat; } delete vim.insertModeRepeat; vim.insertMode = false; cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1); cm.setOption('keyMap', 'vim'); cm.setOption('disableInput', true); cm.toggleOverwrite(false); // exit replace mode if we were in it. insertModeChangeRegister.setText(lastChange.changes.join('')); CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); if (macroModeState.isRecording) { logInsertModeChange(macroModeState); } } function _mapCommand(command) { defaultKeymap.push(command); } function mapCommand(keys, type, name, args, extra) { var command = {keys: keys, type: type}; command[type] = name; command[type + "Args"] = args; for (var key in extra) command[key] = extra[key]; _mapCommand(command); } defineOption('insertModeEscKeysTimeout', 200, 'number'); CodeMirror.keyMap['vim-insert'] = { 'Ctrl-N': 'autocomplete', 'Ctrl-P': 'autocomplete', 'Enter': function(cm) { var fn = CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent; fn(cm); }, fallthrough: ['default'], attach: attachVimMap, detach: detachVimMap, call: cmKey }; CodeMirror.keyMap['vim-replace'] = { 'Backspace': 'goCharLeft', fallthrough: ['vim-insert'], attach: attachVimMap, detach: detachVimMap, call: cmKey }; function executeMacroRegister(cm, vim, macroModeState, registerName) { var register = vimGlobalState.registerController.getRegister(registerName); var keyBuffer = register.keyBuffer; var imc = 0; macroModeState.isPlaying = true; macroModeState.replaySearchQueries = register.searchQueries.slice(0); for (var i = 0; i < keyBuffer.length; i++) { var text = keyBuffer[i]; var match, key; while (text) { match = (/<\w+-.+?>|<\w+>|./).exec(text); key = match[0]; text = text.substring(match.index + key.length); CodeMirror.Vim.handleKey(cm, key, 'macro'); if (vim.insertMode) { var changes = register.insertModeChanges[imc++].changes; vimGlobalState.macroModeState.lastInsertModeChanges.changes = changes; repeatInsertModeChanges(cm, changes, 1); exitInsertMode(cm); } } }; macroModeState.isPlaying = false; } function logKey(macroModeState, key) { if (macroModeState.isPlaying) { return; } var registerName = macroModeState.latestRegister; var register = vimGlobalState.registerController.getRegister(registerName); if (register) { register.pushText(key); } } function logInsertModeChange(macroModeState) { if (macroModeState.isPlaying) { return; } var registerName = macroModeState.latestRegister; var register = vimGlobalState.registerController.getRegister(registerName); if (register) { register.pushInsertModeChanges(macroModeState.lastInsertModeChanges); } } function logSearchQuery(macroModeState, query) { if (macroModeState.isPlaying) { return; } var registerName = macroModeState.latestRegister; var register = vimGlobalState.registerController.getRegister(registerName); if (register) { register.pushSearchQuery(query); } } function onChange(_cm, changeObj) { var macroModeState = vimGlobalState.macroModeState; var lastChange = macroModeState.lastInsertModeChanges; if (!macroModeState.isPlaying) { while(changeObj) { lastChange.expectCursorActivityForChange = true; if (changeObj.origin == '+input' || changeObj.origin == 'paste' || changeObj.origin === undefined /* only in testing */) { var text = changeObj.text.join('\n'); lastChange.changes.push(text); } changeObj = changeObj.next; } } } function onCursorActivity(cm) { var vim = cm.state.vim; if (vim.insertMode) { var macroModeState = vimGlobalState.macroModeState; if (macroModeState.isPlaying) { return; } var lastChange = macroModeState.lastInsertModeChanges; if (lastChange.expectCursorActivityForChange) { lastChange.expectCursorActivityForChange = false; } else { lastChange.changes = []; } } else if (!cm.curOp.isVimOp) { handleExternalSelection(cm, vim); } if (vim.visualMode) { updateFakeCursor(cm); } } function updateFakeCursor(cm) { var vim = cm.state.vim; var from = copyCursor(vim.sel.head); var to = offsetCursor(from, 0, 1); if (vim.fakeCursor) { vim.fakeCursor.clear(); } vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'}); } function handleExternalSelection(cm, vim) { var anchor = cm.getCursor('anchor'); var head = cm.getCursor('head'); if (vim.visualMode && cursorEqual(head, anchor) && lineLength(cm, head.line) > head.ch) { exitVisualMode(cm, false); } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) { vim.visualMode = true; vim.visualLine = false; CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); } if (vim.visualMode) { var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; head = offsetCursor(head, 0, headOffset); anchor = offsetCursor(anchor, 0, anchorOffset); vim.sel = { anchor: anchor, head: head }; updateMark(cm, vim, '<', cursorMin(head, anchor)); updateMark(cm, vim, '>', cursorMax(head, anchor)); } else if (!vim.insertMode) { vim.lastHPos = cm.getCursor().ch; } } function InsertModeKey(keyName) { this.keyName = keyName; } function onKeyEventTargetKeyDown(e) { var macroModeState = vimGlobalState.macroModeState; var lastChange = macroModeState.lastInsertModeChanges; var keyName = CodeMirror.keyName(e); if (!keyName) { return; } function onKeyFound() { lastChange.changes.push(new InsertModeKey(keyName)); return true; } if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound); } } function repeatLastEdit(cm, vim, repeat, repeatForInsert) { var macroModeState = vimGlobalState.macroModeState; macroModeState.isPlaying = true; var isAction = !!vim.lastEditActionCommand; var cachedInputState = vim.inputState; function repeatCommand() { if (isAction) { commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand); } else { commandDispatcher.evalInput(cm, vim); } } function repeatInsert(repeat) { if (macroModeState.lastInsertModeChanges.changes.length > 0) { repeat = !vim.lastEditActionCommand ? 1 : repeat; var changeObject = macroModeState.lastInsertModeChanges; repeatInsertModeChanges(cm, changeObject.changes, repeat); } } vim.inputState = vim.lastEditInputState; if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) { for (var i = 0; i < repeat; i++) { repeatCommand(); repeatInsert(1); } } else { if (!repeatForInsert) { repeatCommand(); } repeatInsert(repeat); } vim.inputState = cachedInputState; if (vim.insertMode && !repeatForInsert) { exitInsertMode(cm); } macroModeState.isPlaying = false; }; function repeatInsertModeChanges(cm, changes, repeat) { function keyHandler(binding) { if (typeof binding == 'string') { CodeMirror.commands[binding](cm); } else { binding(cm); } return true; } var head = cm.getCursor('head'); var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock; if (inVisualBlock) { var vim = cm.state.vim; var lastSel = vim.lastSelection; var offset = getOffset(lastSel.anchor, lastSel.head); selectForInsert(cm, head, offset.line + 1); repeat = cm.listSelections().length; cm.setCursor(head); } for (var i = 0; i < repeat; i++) { if (inVisualBlock) { cm.setCursor(offsetCursor(head, i, 0)); } for (var j = 0; j < changes.length; j++) { var change = changes[j]; if (change instanceof InsertModeKey) { CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler); } else { var cur = cm.getCursor(); cm.replaceRange(change, cur, cur); } } } if (inVisualBlock) { cm.setCursor(offsetCursor(head, 0, 1)); } } resetVimGlobalState(); CodeMirror.Vim = Vim(); Vim = CodeMirror.Vim; var specialKey = {'return':'CR',backspace:'BS','delete':'Del',esc:'Esc', left:'Left',right:'Right',up:'Up',down:'Down',space: 'Space', home:'Home',end:'End',pageup:'PageUp',pagedown:'PageDown', enter: 'CR' }; function lookupKey(hashId, key, e) { if (key.length > 1 && key[0] == "n") { key = key.replace("numpad", ""); } key = specialKey[key] || key; var name = ''; if (e.ctrlKey) { name += 'C-'; } if (e.altKey) { name += 'A-'; } if (e.shiftKey) { name += 'S-'; } name += key; if (name.length > 1) { name = '<' + name + '>'; } return name; } var handleKey = Vim.handleKey.bind(Vim); Vim.handleKey = function(cm, key, origin) { return cm.operation(function() { return handleKey(cm, key, origin); }, true); } function cloneVimState(state) { var n = new state.constructor(); Object.keys(state).forEach(function(key) { var o = state[key]; if (Array.isArray(o)) o = o.slice(); else if (o && typeof o == "object" && o.constructor != Object) o = cloneVimState(o); n[key] = o; }); if (state.sel) { n.sel = { head: state.sel.head && copyCursor(state.sel.head), anchor: state.sel.anchor && copyCursor(state.sel.anchor) }; } return n; } function multiSelectHandleKey(cm, key, origin) { var isHandled = false; var vim = Vim.maybeInitVimState_(cm); var visualBlock = vim.visualBlock || vim.wasInVisualBlock; if (vim.wasInVisualBlock && !cm.ace.inMultiSelectMode) { vim.wasInVisualBlock = false; } else if (cm.ace.inMultiSelectMode && vim.visualBlock) { vim.wasInVisualBlock = true; } if (key == '' && !vim.insertMode && !vim.visualMode && cm.ace.inMultiSelectMode) { cm.ace.exitMultiSelectMode(); } else if (visualBlock || !cm.ace.inMultiSelectMode || cm.ace.inVirtualSelectionMode) { isHandled = Vim.handleKey(cm, key, origin); } else { var old = cloneVimState(vim); cm.operation(function() { cm.ace.forEachSelection(function() { var sel = cm.ace.selection; cm.state.vim.lastHPos = sel.$desiredColumn == null ? sel.lead.column : sel.$desiredColumn; var head = cm.getCursor("head"); var anchor = cm.getCursor("anchor"); var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; head = offsetCursor(head, 0, headOffset); anchor = offsetCursor(anchor, 0, anchorOffset); cm.state.vim.sel.head = head; cm.state.vim.sel.anchor = anchor; isHandled = handleKey(cm, key, origin); sel.$desiredColumn = cm.state.vim.lastHPos == -1 ? null : cm.state.vim.lastHPos; if (cm.virtualSelectionMode()) { cm.state.vim = cloneVimState(old); } }); if (cm.curOp.cursorActivity && !isHandled) cm.curOp.cursorActivity = false; }, true); } return isHandled; }; exports.CodeMirror = CodeMirror; var getVim = Vim.maybeInitVimState_; exports.handler = { $id: "ace/keyboard/vim", drawCursor: function(style, pixelPos, config, sel, session) { var vim = this.state.vim || {}; var w = config.characterWidth; var h = config.lineHeight; var top = pixelPos.top; var left = pixelPos.left; if (!vim.insertMode) { var isbackwards = !sel.cursor ? session.selection.isBackwards() || session.selection.isEmpty() : Range.comparePoints(sel.cursor, sel.start) <= 0 if (!isbackwards && left > w) left -= w } if (!vim.insertMode && vim.status) { h = h / 2; top += h; } style.left = left + "px"; style.top = top + "px"; style.width = w + "px"; style.height = h + "px"; }, handleKeyboard: function(data, hashId, key, keyCode, e) { var editor = data.editor; var cm = editor.state.cm; var vim = getVim(cm); if (keyCode == -1) return; if (key == "c" && hashId == 1) { // key == "ctrl-c" if (!useragent.isMac && editor.getCopyText()) { editor.once("copy", function() { editor.selection.clearSelection(); }); return {command: "null", passEvent: true}; } } else if (!vim.insertMode) { if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) { hashId = -1; key = data.inputChar; } } if (hashId == -1 || hashId & 1 || hashId === 0 && key.length > 1) { var insertMode = vim.insertMode; var name = lookupKey(hashId, key, e || {}); if (vim.status == null) vim.status = ""; var isHandled = multiSelectHandleKey(cm, name, 'user'); vim = getVim(cm); // may be changed by multiSelectHandleKey if (isHandled && vim.status != null) vim.status += name; else if (vim.status == null) vim.status = ""; cm._signal("changeStatus"); if (!isHandled && (hashId != -1 || insertMode)) return; return {command: "null", passEvent: !isHandled}; } }, attach: function(editor) { if (!editor.state) editor.state = {}; var cm = new CodeMirror(editor); editor.state.cm = cm; editor.$vimModeHandler = this; CodeMirror.keyMap.vim.attach(cm); getVim(cm).status = null; cm.on('vim-command-done', function() { if (cm.virtualSelectionMode()) return; getVim(cm).status = null; cm.ace._signal("changeStatus"); cm.ace.session.markUndoGroup(); }); cm.on("changeStatus", function() { cm.ace.renderer.updateCursor(); cm.ace._signal("changeStatus"); }); cm.on("vim-mode-change", function() { if (cm.virtualSelectionMode()) return; cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode); cm._signal("changeStatus"); }); cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode); editor.renderer.$cursorLayer.drawCursor = this.drawCursor.bind(cm); this.updateMacCompositionHandlers(editor, true); }, detach: function(editor) { var cm = editor.state.cm; CodeMirror.keyMap.vim.detach(cm); cm.destroy(); editor.state.cm = null; editor.$vimModeHandler = null; editor.renderer.$cursorLayer.drawCursor = null; editor.renderer.setStyle("normal-mode", false); this.updateMacCompositionHandlers(editor, false); }, getStatusText: function(editor) { var cm = editor.state.cm; var vim = getVim(cm); if (vim.insertMode) return "INSERT"; var status = ""; if (vim.visualMode) { status += "VISUAL"; if (vim.visualLine) status += " LINE"; if (vim.visualBlock) status += " BLOCK"; } if (vim.status) status += (status ? " " : "") + vim.status; return status; }, handleMacRepeat: function(data, hashId, key) { if (hashId == -1) { data.inputChar = key; data.lastEvent = "input"; } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) { if (data.lastEvent == "input") { data.lastEvent = "input1"; } else if (data.lastEvent == "input1") { return true; } } else { data.$lastHash = hashId; data.$lastKey = key; data.lastEvent = "keypress"; } }, updateMacCompositionHandlers: function(editor, enable) { var onCompositionUpdateOverride = function(text) { var cm = editor.state.cm; var vim = getVim(cm); if (!vim.insertMode) { var el = this.textInput.getElement(); el.blur(); el.focus(); el.value = text; } else { this.onCompositionUpdateOrig(text); } }; var onCompositionStartOverride = function(text) { var cm = editor.state.cm; var vim = getVim(cm); if (!vim.insertMode) { this.onCompositionStartOrig(text); } }; if (enable) { if (!editor.onCompositionUpdateOrig) { editor.onCompositionUpdateOrig = editor.onCompositionUpdate; editor.onCompositionUpdate = onCompositionUpdateOverride; editor.onCompositionStartOrig = editor.onCompositionStart; editor.onCompositionStart = onCompositionStartOverride; } } else { if (editor.onCompositionUpdateOrig) { editor.onCompositionUpdate = editor.onCompositionUpdateOrig; editor.onCompositionUpdateOrig = null; editor.onCompositionStart = editor.onCompositionStartOrig; editor.onCompositionStartOrig = null; } } } }; var renderVirtualNumbers = { getText: function(session, row) { return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + "" }, getWidth: function(session, lastLineNumber, config) { return session.getLength().toString().length * config.characterWidth; }, update: function(e, editor) { editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER) }, attach: function(editor) { editor.renderer.$gutterLayer.$renderer = this; editor.on("changeSelection", this.update); }, detach: function(editor) { editor.renderer.$gutterLayer.$renderer = null; editor.off("changeSelection", this.update); } }; Vim.defineOption({ name: "wrap", set: function(value, cm) { if (cm) {cm.ace.setOption("wrap", value)} }, type: "boolean" }, false); Vim.defineEx('write', 'w', function() { console.log(':write is not implemented') }); defaultKeymap.push( { keys: 'zc', type: 'action', action: 'fold', actionArgs: { open: false } }, { keys: 'zC', type: 'action', action: 'fold', actionArgs: { open: false, all: true } }, { keys: 'zo', type: 'action', action: 'fold', actionArgs: { open: true, } }, { keys: 'zO', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, { keys: 'za', type: 'action', action: 'fold', actionArgs: { toggle: true } }, { keys: 'zA', type: 'action', action: 'fold', actionArgs: { toggle: true, all: true } }, { keys: 'zf', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, { keys: 'zd', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAbove" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelow" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAboveSkipCurrent" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelowSkipCurrent" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreBefore" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreAfter" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextBefore" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextAfter" } } ); actions.aceCommand = function(cm, actionArgs, vim) { cm.vimCmd = actionArgs; if (cm.ace.inVirtualSelectionMode) cm.ace.on("beforeEndOperation", delayedExecAceCommand); else delayedExecAceCommand(null, cm.ace) }; function delayedExecAceCommand(op, ace) { ace.off("beforeEndOperation", delayedExecAceCommand); var cmd = ace.state.cm.vimCmd; if (cmd) { ace.execCommand(cmd.exec ? cmd : cmd.name, cmd.args); } ace.curOp = ace.prevOp; } actions.fold = function(cm, actionArgs, vim) { cm.ace.execCommand(['toggleFoldWidget', 'toggleFoldWidget', 'foldOther', 'unfoldall' ][(actionArgs.all ? 2 : 0) + (actionArgs.open ? 1 : 0)]); }, exports.handler.defaultKeymap = defaultKeymap; exports.handler.actions = actions; exports.Vim = Vim; Vim.map("Y", "yy"); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js0000644000076400007640000000667612554155240027311 0ustar pravipravidefine("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night-eighties"; exports.cssText = ".ace-tomorrow-night-eighties .ace_gutter {\ background: #272727;\ color: #CCC\ }\ .ace-tomorrow-night-eighties .ace_print-margin {\ width: 1px;\ background: #272727\ }\ .ace-tomorrow-night-eighties {\ background-color: #2D2D2D;\ color: #CCCCCC\ }\ .ace-tomorrow-night-eighties .ace_constant.ace_other,\ .ace-tomorrow-night-eighties .ace_cursor {\ color: #CCCCCC\ }\ .ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\ background: #515151\ }\ .ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #2D2D2D;\ border-radius: 2px\ }\ .ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #6A6A6A\ }\ .ace-tomorrow-night-bright .ace_stack {\ background: rgb(66, 90, 44)\ }\ .ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\ background: #393939\ }\ .ace-tomorrow-night-eighties .ace_gutter-active-line {\ background-color: #393939\ }\ .ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {\ border: 1px solid #515151\ }\ .ace-tomorrow-night-eighties .ace_invisible {\ color: #6A6A6A\ }\ .ace-tomorrow-night-eighties .ace_keyword,\ .ace-tomorrow-night-eighties .ace_meta,\ .ace-tomorrow-night-eighties .ace_storage,\ .ace-tomorrow-night-eighties .ace_storage.ace_type,\ .ace-tomorrow-night-eighties .ace_support.ace_type {\ color: #CC99CC\ }\ .ace-tomorrow-night-eighties .ace_keyword.ace_operator {\ color: #66CCCC\ }\ .ace-tomorrow-night-eighties .ace_constant.ace_character,\ .ace-tomorrow-night-eighties .ace_constant.ace_language,\ .ace-tomorrow-night-eighties .ace_constant.ace_numeric,\ .ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,\ .ace-tomorrow-night-eighties .ace_support.ace_constant,\ .ace-tomorrow-night-eighties .ace_variable.ace_parameter {\ color: #F99157\ }\ .ace-tomorrow-night-eighties .ace_invalid {\ color: #CDCDCD;\ background-color: #F2777A\ }\ .ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\ color: #CDCDCD;\ background-color: #CC99CC\ }\ .ace-tomorrow-night-eighties .ace_fold {\ background-color: #6699CC;\ border-color: #CCCCCC\ }\ .ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,\ .ace-tomorrow-night-eighties .ace_support.ace_function,\ .ace-tomorrow-night-eighties .ace_variable {\ color: #6699CC\ }\ .ace-tomorrow-night-eighties .ace_support.ace_class,\ .ace-tomorrow-night-eighties .ace_support.ace_type {\ color: #FFCC66\ }\ .ace-tomorrow-night-eighties .ace_heading,\ .ace-tomorrow-night-eighties .ace_markup.ace_heading,\ .ace-tomorrow-night-eighties .ace_string {\ color: #99CC99\ }\ .ace-tomorrow-night-eighties .ace_comment {\ color: #999999\ }\ .ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,\ .ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,\ .ace-tomorrow-night-eighties .ace_meta.ace_tag,\ .ace-tomorrow-night-eighties .ace_variable {\ color: #F2777A\ }\ .ace-tomorrow-night-eighties .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-beautify.js0000644000076400007640000002012112554155240023632 0ustar pravipravidefine("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("ace/token_iterator").TokenIterator; exports.newLines = [{ type: 'support.php_tag', value: '' }, { type: 'paren.lparen', value: '{', indent: true }, { type: 'paren.rparen', breakBefore: true, value: '}', indent: false }, { type: 'paren.rparen', breakBefore: true, value: '})', indent: false, dontBreak: true }, { type: 'comment' }, { type: 'text', value: ';' }, { type: 'text', value: ':', context: 'php' }, { type: 'keyword', value: 'case', indent: true, dontBreak: true }, { type: 'keyword', value: 'default', indent: true, dontBreak: true }, { type: 'keyword', value: 'break', indent: false, dontBreak: true }, { type: 'punctuation.doctype.end', value: '>' }, { type: 'meta.tag.punctuation.end', value: '>' }, { type: 'meta.tag.punctuation.begin', value: '<', blockTag: true, indent: true, dontBreak: true }, { type: 'meta.tag.punctuation.begin', value: '' ){ context = 'php'; } else if( token.type == 'support.php_tag' && token.value == '?>' ){ context = 'html'; } else if( token.type == 'meta.tag.name.style' && context != 'css' ){ context = 'css'; } else if( token.type == 'meta.tag.name.style' && context == 'css' ){ context = 'html'; } else if( token.type == 'meta.tag.name.script' && context != 'js' ){ context = 'js'; } else if( token.type == 'meta.tag.name.script' && context == 'js' ){ context = 'html'; } nextToken = iterator.stepForward(); if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) { nextTag = nextToken.value; } if ( lastToken.type == 'support.php_tag' && lastToken.value == '' ) { dontBreak = false; } lastTag = tag; lastToken = token; token = nextToken; if (token===null) { break; } } return code; }; }); define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) { "use strict"; var TokenIterator = require("ace/token_iterator").TokenIterator; var phpTransform = require("./beautify/php_rules").transform; exports.beautify = function(session) { var iterator = new TokenIterator(session, 0, 0); var token = iterator.getCurrentToken(); var context = session.$modeId.split("/").pop(); var code = phpTransform(iterator, context); session.doc.setValue(code); }; exports.commands = [{ name: "beautify", exec: function(editor) { exports.beautify(editor.session); }, bindKey: "Ctrl-Shift-B" }] }); (function() { window.require(["ace/ext/beautify"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-mips_assembler.js0000644000076400007640000002251112554155240025160 0ustar pravipravidefine("ace/mode/mips_assembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var MIPSAssemblerHighlightRules = function() { this.$rules = { start: [ { token: 'support.function.pseudo.mips', regex: '\\b(?:mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s)\\b', comment: 'ok actually this are instructions, but one also could call them funtions…' }, { token: 'support.function.mips', regex: '\\b(?:abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|ceil\\.w\\.d|ceil\\.w\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b' }, { token: 'storage.type.mips', regex: '\\.(?:ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\\s*(?:noat|at))\\b' }, { token: 'storage.modifier.mips', regex: '\\.(?:align|extern||globl)\\b' }, { token: [ 'entity.name.function.label.mips', 'meta.function.label.mips' ], regex: '\\b([A-Za-z0-9_]+)(:)' }, { token: [ 'punctuation.definition.variable.mips', 'variable.other.register.usable.by-number.mips' ], regex: '(\\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\\b' }, { token: [ 'punctuation.definition.variable.mips', 'variable.other.register.usable.by-name.mips' ], regex: '(\\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\\b' }, { token: [ 'punctuation.definition.variable.mips', 'variable.other.register.reserved.mips' ], regex: '(\\$)(at|k[01]|1|2[67])\\b' }, { token: [ 'punctuation.definition.variable.mips', 'variable.other.register.usable.floating-point.mips', 'variable.other.register.usable.floating-point.mips' ], regex: '(\\$)(f)([0-9]|1[0-9]|2[0-9]|3[0-1])\\b' }, { token: 'constant.numeric.float.mips', regex: '\\b\\d+\\.\\d+\\b' }, { token: 'constant.numeric.integer.mips', regex: '\\b(?:\\d+|0(?:x|X)[a-fA-F0-9]+)\\b' }, { token: 'punctuation.definition.string.begin.mips', regex: '"', push: [ { token: 'punctuation.definition.string.end.mips', regex: '"', next: 'pop' }, { token: 'constant.character.escape.mips', regex: '\\\\[rnt\\\\"]' }, { defaultToken: 'string.quoted.double.mips' } ] }, { token: 'punctuation.definition.comment.mips', regex: '#', push: [ { token: 'comment.line.number-sign.mips', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.number-sign.mips' } ] } ] } this.normalizeRules(); }; MIPSAssemblerHighlightRules.metaData = { fileTypes: [ 's', 'mips', 'spim', 'asm' ], keyEquivalent: '^~M', name: 'MIPS Assembler', scopeName: 'source.mips' } oop.inherits(MIPSAssemblerHighlightRules, TextHighlightRules); exports.MIPSAssemblerHighlightRules = MIPSAssemblerHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/mips_assembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_assembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var MIPSAssemblerHighlightRules = require("./mips_assembler_highlight_rules").MIPSAssemblerHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = MIPSAssemblerHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/mips_assembler" }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-scala.js0000644000076400007640000014032112554155240023236 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ScalaHighlightRules = function() { var keywords = ( "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" + "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" + "override|package|private|protected|sealed|super|this|trait|type|val|var|with" ); var buildinConstants = ("true|false"); var langClasses = ( "AbstractMethodError|AssertionError|ClassCircularityError|"+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ "ExceptionInInitializerError|IllegalAccessError|"+ "IllegalThreadStateException|InstantiationError|InternalError|"+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ "InstantiationException|IndexOutOfBoundsException|"+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ "ArrayStoreException|ClassCastException|LinkageError|"+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ "Cloneable|Class|CharSequence|Comparable|String|Object|" + "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" + "Option|Array|Char|Byte|Short|Int|Long|Nothing" ); var keywordMapper = this.createKeywordMapper({ "variable.language": "this", "keyword": keywords, "support.function": langClasses, "constant.language": buildinConstants }, "identifier"); this.$rules = { "start" : [ { token : "comment", regex : "\\/\\/.*$" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", regex : '"""', next : "tstring" }, { token : "string", regex : '"(?=.)', // " strings can't span multiple lines next : "string" }, { token : "symbol.constant", // single line regex : "'[\\w\\d_]+" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "string" : [ { token : "escape", regex : '\\\\"' }, { token : "string", regex : '"', next : "start" }, { token : "string.invalid", regex : '[^"\\\\]*$', next : "start" }, { token : "string", regex : '[^"\\\\]+' } ], "tstring" : [ { token : "string", // closing comment regex : '"{3,5}', next : "start" }, { token : "string", // comment spanning whole line regex : ".+?" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(ScalaHighlightRules, TextHighlightRules); exports.ScalaHighlightRules = ScalaHighlightRules; }); define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules; var Mode = function() { JavaScriptMode.call(this); this.HighlightRules = ScalaHighlightRules; }; oop.inherits(Mode, JavaScriptMode); (function() { this.createWorker = function(session) { return null; }; this.$id = "ace/mode/scala"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-xcode.js0000644000076400007640000000420012554155240023426 0ustar pravipravidefine("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-xcode"; exports.cssText = "\ .ace-xcode .ace_gutter {\ background: #e8e8e8;\ color: #333\ }\ .ace-xcode .ace_print-margin {\ width: 1px;\ background: #e8e8e8\ }\ .ace-xcode {\ background-color: #FFFFFF;\ color: #000000\ }\ .ace-xcode .ace_cursor {\ color: #000000\ }\ .ace-xcode .ace_marker-layer .ace_selection {\ background: #B5D5FF\ }\ .ace-xcode.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #FFFFFF;\ border-radius: 2px\ }\ .ace-xcode .ace_marker-layer .ace_step {\ background: rgb(198, 219, 174)\ }\ .ace-xcode .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #BFBFBF\ }\ .ace-xcode .ace_marker-layer .ace_active-line {\ background: rgba(0, 0, 0, 0.071)\ }\ .ace-xcode .ace_gutter-active-line {\ background-color: rgba(0, 0, 0, 0.071)\ }\ .ace-xcode .ace_marker-layer .ace_selected-word {\ border: 1px solid #B5D5FF\ }\ .ace-xcode .ace_constant.ace_language,\ .ace-xcode .ace_keyword,\ .ace-xcode .ace_meta,\ .ace-xcode .ace_variable.ace_language {\ color: #C800A4\ }\ .ace-xcode .ace_invisible {\ color: #BFBFBF\ }\ .ace-xcode .ace_constant.ace_character,\ .ace-xcode .ace_constant.ace_other {\ color: #275A5E\ }\ .ace-xcode .ace_constant.ace_numeric {\ color: #3A00DC\ }\ .ace-xcode .ace_entity.ace_other.ace_attribute-name,\ .ace-xcode .ace_support.ace_constant,\ .ace-xcode .ace_support.ace_function {\ color: #450084\ }\ .ace-xcode .ace_fold {\ background-color: #C800A4;\ border-color: #000000\ }\ .ace-xcode .ace_entity.ace_name.ace_tag,\ .ace-xcode .ace_support.ace_class,\ .ace-xcode .ace_support.ace_type {\ color: #790EAD\ }\ .ace-xcode .ace_storage {\ color: #C900A4\ }\ .ace-xcode .ace_string {\ color: #DF0002\ }\ .ace-xcode .ace_comment {\ color: #008E00\ }\ .ace-xcode .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-elixir.js0000644000076400007640000005531612554155240023460 0ustar pravipravidefine("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ElixirHighlightRules = function() { this.$rules = { start: [ { token: [ 'meta.module.elixir', 'keyword.control.module.elixir', 'meta.module.elixir', 'entity.name.type.module.elixir' ], regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' }, { token: 'comment.documentation.heredoc', regex: '@(?:module|type)?doc (?:~[a-z])?"""', push: [ { token: 'comment.documentation.heredoc', regex: '\\s*"""', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'comment.documentation.heredoc' } ], comment: '@doc with heredocs is treated as documentation' }, { token: 'comment.documentation.heredoc', regex: '@(?:module|type)?doc ~[A-Z]"""', push: [ { token: 'comment.documentation.heredoc', regex: '\\s*"""', next: 'pop' }, { defaultToken: 'comment.documentation.heredoc' } ], comment: '@doc with heredocs is treated as documentation' }, { token: 'comment.documentation.heredoc', regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'', push: [ { token: 'comment.documentation.heredoc', regex: '\\s*\'\'\'', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'comment.documentation.heredoc' } ], comment: '@doc with heredocs is treated as documentation' }, { token: 'comment.documentation.heredoc', regex: '@(?:module|type)?doc ~[A-Z]\'\'\'', push: [ { token: 'comment.documentation.heredoc', regex: '\\s*\'\'\'', next: 'pop' }, { defaultToken: 'comment.documentation.heredoc' } ], comment: '@doc with heredocs is treated as documentation' }, { token: 'comment.documentation.false', regex: '@(?:module|type)?doc false', comment: '@doc false is treated as documentation' }, { token: 'comment.documentation.string', regex: '@(?:module|type)?doc "', push: [ { token: 'comment.documentation.string', regex: '"', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'comment.documentation.string' } ], comment: '@doc with string is treated as documentation' }, { token: 'keyword.control.elixir', regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' }, { token: 'punctuation.definition.constant.elixir', regex: ':\'', push: [ { token: 'punctuation.definition.constant.elixir', regex: '\'', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] }, { token: 'punctuation.definition.constant.elixir', regex: ':"', push: [ { token: 'punctuation.definition.constant.elixir', regex: '"', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] }, { token: 'punctuation.definition.string.begin.elixir', regex: '(?:\'\'\')', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?>\'\'\')', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '^\\s*\'\'\'', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ], comment: 'Single-quoted heredocs' }, { token: 'punctuation.definition.string.begin.elixir', regex: '\'', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\'', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'support.function.variable.quoted.single.elixir' } ], comment: 'single quoted string (allows for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '(?:""")', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?>""")', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '^\\s*"""', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.quoted.double.heredoc.elixir' } ], comment: 'Double-quoted heredocs' }, { token: 'punctuation.definition.string.begin.elixir', regex: '"', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '"', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.quoted.double.elixir' } ], comment: 'double quoted string (allows for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[a-z](?:""")', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '~[a-z](?>""")', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '^\\s*"""', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.quoted.double.heredoc.elixir' } ], comment: 'Double-quoted heredocs sigils' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[a-z]\\{', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\}[a-z]*', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.interpolated.elixir' } ], comment: 'sigil (allow for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[a-z]\\[', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\][a-z]*', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.interpolated.elixir' } ], comment: 'sigil (allow for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[a-z]\\<', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\>[a-z]*', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.interpolated.elixir' } ], comment: 'sigil (allow for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[a-z]\\(', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\)[a-z]*', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { defaultToken: 'string.interpolated.elixir' } ], comment: 'sigil (allow for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[a-z][^\\w]', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '[^\\w][a-z]*', next: 'pop' }, { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { include: '#escaped_char' }, { defaultToken: 'string.interpolated.elixir' } ], comment: 'sigil (allow for interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[A-Z](?:""")', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '~[A-Z](?>""")', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '^\\s*"""', next: 'pop' }, { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], comment: 'Double-quoted heredocs sigils' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[A-Z]\\{', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\}[a-z]*', next: 'pop' }, { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], comment: 'sigil (without interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[A-Z]\\[', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\][a-z]*', next: 'pop' }, { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], comment: 'sigil (without interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[A-Z]\\<', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\>[a-z]*', next: 'pop' }, { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], comment: 'sigil (without interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[A-Z]\\(', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '\\)[a-z]*', next: 'pop' }, { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], comment: 'sigil (without interpolation)' }, { token: 'punctuation.definition.string.begin.elixir', regex: '~[A-Z][^\\w]', push: [ { token: 'punctuation.definition.string.end.elixir', regex: '[^\\w][a-z]*', next: 'pop' }, { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], comment: 'sigil (without interpolation)' }, { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'], regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)', comment: 'symbols' }, { token: 'punctuation.definition.constant.elixir', regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)', comment: 'symbols' }, { token: [ 'punctuation.definition.comment.elixir', 'comment.line.number-sign.elixir' ], regex: '(#)(.*)' }, { token: 'constant.numeric.elixir', regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?=?' }, { token: 'keyword.operator.bitwise.elixir', regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' }, { token: 'keyword.operator.logical.elixir', regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b', originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' }, { token: 'keyword.operator.arithmetic.elixir', regex: '\\*|\\+|\\-|/' }, { token: 'keyword.operator.other.elixir', regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' }, { token: 'keyword.operator.assignment.elixir', regex: '=' }, { token: 'punctuation.separator.other.elixir', regex: ':' }, { token: 'punctuation.separator.statement.elixir', regex: '\\;' }, { token: 'punctuation.separator.object.elixir', regex: ',' }, { token: 'punctuation.separator.method.elixir', regex: '\\.' }, { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' }, { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' }, { token: 'punctuation.section.function.elixir', regex: '\\(|\\)' } ], '#escaped_char': [ { token: 'constant.character.escape.elixir', regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' } ], '#interpolated_elixir': [ { token: [ 'source.elixir.embedded.source', 'source.elixir.embedded.source.empty' ], regex: '(#\\{)(\\})' }, { todo: { token: 'punctuation.section.embedded.elixir', regex: '#\\{', push: [ { token: 'punctuation.section.embedded.elixir', regex: '\\}', next: 'pop' }, { include: '#nest_curly_and_self' }, { include: '$self' }, { defaultToken: 'source.elixir.embedded.source' } ] } } ], '#nest_curly_and_self': [ { token: 'punctuation.section.scope.elixir', regex: '\\{', push: [ { token: 'punctuation.section.scope.elixir', regex: '\\}', next: 'pop' }, { include: '#nest_curly_and_self' } ] }, { include: '$self' } ], '#regex_sub': [ { include: '#interpolated_elixir' }, { include: '#escaped_char' }, { token: [ 'punctuation.definition.arbitrary-repitition.elixir', 'string.regexp.arbitrary-repitition.elixir', 'string.regexp.arbitrary-repitition.elixir', 'punctuation.definition.arbitrary-repitition.elixir' ], regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' }, { token: 'punctuation.definition.character-class.elixir', regex: '\\[(?:\\^?\\])?', push: [ { token: 'punctuation.definition.character-class.elixir', regex: '\\]', next: 'pop' }, { include: '#escaped_char' }, { defaultToken: 'string.regexp.character-class.elixir' } ] }, { token: 'punctuation.definition.group.elixir', regex: '\\(', push: [ { token: 'punctuation.definition.group.elixir', regex: '\\)', next: 'pop' }, { include: '#regex_sub' }, { defaultToken: 'string.regexp.group.elixir' } ] }, { token: [ 'punctuation.definition.comment.elixir', 'comment.line.number-sign.elixir' ], regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)', originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$', comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] } this.normalizeRules(); }; ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.', fileTypes: [ 'ex', 'exs' ], firstLineMatch: '^#!/.*\\belixir', foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$', foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)', keyEquivalent: '^~E', name: 'Elixir', scopeName: 'source.elixir' } oop.inherits(ElixirHighlightRules, TextHighlightRules); exports.ElixirHighlightRules = ElixirHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = ElixirHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.$id = "ace/mode/elixir" }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-error_marker.js0000644000076400007640000000022012554155240024512 0ustar pravipravi ; (function() { window.require(["ace/ext/error_marker"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-abap.js0000644000076400007640000002262612554155240023065 0ustar pravipravidefine("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var AbapHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "variable.language": "this", "keyword": "ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK" + " CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY" + " DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO" + " ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT" + " FETCH FIELDS FORM FORMAT FREE FROM FUNCTION" + " GENERATE GET" + " HIDE" + " IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION" + " LEAVE LIKE LINE LOAD LOCAL LOOP" + " MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY" + " ON OVERLAY OPTIONAL OTHERS" + " PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT" + " RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK" + " SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS" + " TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES" + " UNASSIGN ULINE UNPACK UPDATE" + " WHEN WHILE WINDOW WRITE" + " OCCURS STRUCTURE OBJECT PROPERTY" + " CASTING APPEND RAISING VALUE COLOR" + " CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT" + " ID NUMBER FOR TITLE OUTPUT" + " WITH EXIT USING" + " INTO WHERE GROUP BY HAVING ORDER BY SINGLE" + " APPENDING CORRESPONDING FIELDS OF TABLE" + " LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING" + " EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN", "constant.language": "TRUE FALSE NULL SPACE", "support.type": "c n i p f d t x string xstring decfloat16 decfloat34", "keyword.operator": "abs sign ceil floor trunc frac acos asin atan cos sin tan" + " abapOperator cosh sinh tanh exp log log10 sqrt" + " strlen xstrlen charlen numofchar dbmaxlen lines" }, "text", true, " "); var compoundKeywords = "WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|"+ "EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|"+ "END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|"+ "RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|"+ "WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|"+ "(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)"+ "(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|"+ "LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|"+ "CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|"+ "FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|"+ "NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|"+ "START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|"+ "TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|"+ "IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)"; this.$rules = { "start" : [ {token : "string", regex : "`", next : "string"}, {token : "string", regex : "'", next : "qstring"}, {token : "doc.comment", regex : /^\*.+/}, {token : "comment", regex : /".+$/}, {token : "invalid", regex: "\\.{2,}"}, {token : "keyword.operator", regex: /\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/}, {token : "paren.lparen", regex : "[\\[({]"}, {token : "paren.rparen", regex : "[\\])}]"}, {token : "constant.numeric", regex: "[+-]?\\d+\\b"}, {token : "variable.parameter", regex : /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/}, {token : "keyword", regex : compoundKeywords}, {token : "variable.parameter", regex : /\w+-\w+(?:-\w+)*/}, {token : keywordMapper, regex : "\\b\\w+\\b"}, {caseInsensitive: true} ], "qstring" : [ {token : "constant.language.escape", regex : "''"}, {token : "string", regex : "'", next : "start"}, {defaultToken : "string"} ], "string" : [ {token : "constant.language.escape", regex : "``"}, {token : "string", regex : "`", next : "start"}, {defaultToken : "string"} ] }; }; oop.inherits(AbapHighlightRules, TextHighlightRules); exports.AbapHighlightRules = AbapHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module) { "use strict"; var Rules = require("./abap_highlight_rules").AbapHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Range = require("../range").Range; var TextMode = require("./text").Mode; var oop = require("../lib/oop"); function Mode() { this.HighlightRules = Rules; this.foldingRules = new FoldMode(); } oop.inherits(Mode, TextMode); (function() { this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); return indent; }; this.toggleCommentLines = function(state, doc, startRow, endRow){ var range = new Range(0, 0, 0, 0); for (var i = startRow; i <= endRow; ++i) { var line = doc.getLine(i); if (hereComment.test(line)) continue; if (commentLine.test(line)) line = line.replace(commentLine, '$1'); else line = line.replace(indentation, '$&#'); range.end.row = range.start.row = i; range.end.column = line.length + 1; doc.replace(range, line); } }; this.$id = "ace/mode/abap"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-rdoc.js0000644000076400007640000001520712554155240023106 0ustar pravipravidefine("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LatexHighlightRules = function() { this.$rules = { "start" : [{ token : "comment", regex : "%.*$" }, { token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"], regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})" }, { token : ["keyword","lparen", "variable.parameter", "rparen"], regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?" }, { token : ["storage.type", "lparen", "variable.parameter", "rparen"], regex : "(\\\\(?:begin|end))({)(\\w*)(})" }, { token : "storage.type", regex : "\\\\[a-zA-Z]+" }, { token : "lparen", regex : "[[({]" }, { token : "rparen", regex : "[\\])}]" }, { token : "constant.character.escape", regex : "\\\\[^a-zA-Z]?" }, { token : "string", regex : "\\${1,2}", next : "equation" }], "equation" : [{ token : "comment", regex : "%.*$" }, { token : "string", regex : "\\${1,2}", next : "start" }, { token : "constant.character.escape", regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" }, { token : "error", regex : "^\\s*$", next : "start" }, { defaultToken : "string" }] }; }; oop.inherits(LatexHighlightRules, TextHighlightRules); exports.LatexHighlightRules = LatexHighlightRules; }); define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LaTeXHighlightRules = require("./latex_highlight_rules"); var RDocHighlightRules = function() { this.$rules = { "start" : [ { token : "comment", regex : "%.*$" }, { token : "text", // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b", next : "nospell" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "nospell" : [ { token : "comment", regex : "%.*$", next : "start" }, { token : "nospell.text", // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next : "start" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])]" }, { token : "paren.keyword.operator", regex : "}", next : "start" }, { token : "nospell.text", regex : "\\s+" }, { token : "nospell.text", regex : "\\w+" } ] }; }; oop.inherits(RDocHighlightRules, TextHighlightRules); exports.RDocHighlightRules = RDocHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Mode = function(suppressHighlighting) { this.HighlightRules = RDocHighlightRules; this.$outdent = new MatchingBraceOutdent(); }; oop.inherits(Mode, TextMode); (function() { this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.$id = "ace/mode/rdoc"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-ambiance.js0000644000076400007640000006704212554155240024100 0ustar pravipravidefine("ace/theme/ambiance",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-ambiance"; exports.cssText = ".ace-ambiance .ace_gutter {\ background-color: #3d3d3d;\ background-image: -moz-linear-gradient(left, #3D3D3D, #333);\ background-image: -ms-linear-gradient(left, #3D3D3D, #333);\ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));\ background-image: -webkit-linear-gradient(left, #3D3D3D, #333);\ background-image: -o-linear-gradient(left, #3D3D3D, #333);\ background-image: linear-gradient(left, #3D3D3D, #333);\ background-repeat: repeat-x;\ border-right: 1px solid #4d4d4d;\ text-shadow: 0px 1px 1px #4d4d4d;\ color: #222;\ }\ .ace-ambiance .ace_gutter-layer {\ background: repeat left top;\ }\ .ace-ambiance .ace_gutter-active-line {\ background-color: #3F3F3F;\ }\ .ace-ambiance .ace_fold-widget {\ text-align: center;\ }\ .ace-ambiance .ace_fold-widget:hover {\ color: #777;\ }\ .ace-ambiance .ace_fold-widget.ace_start,\ .ace-ambiance .ace_fold-widget.ace_end,\ .ace-ambiance .ace_fold-widget.ace_closed{\ background: none;\ border: none;\ box-shadow: none;\ }\ .ace-ambiance .ace_fold-widget.ace_start:after {\ content: '▾'\ }\ .ace-ambiance .ace_fold-widget.ace_end:after {\ content: '▴'\ }\ .ace-ambiance .ace_fold-widget.ace_closed:after {\ content: '‣'\ }\ .ace-ambiance .ace_print-margin {\ border-left: 1px dotted #2D2D2D;\ right: 0;\ background: #262626;\ }\ .ace-ambiance .ace_scroller {\ -webkit-box-shadow: inset 0 0 10px black;\ -moz-box-shadow: inset 0 0 10px black;\ -o-box-shadow: inset 0 0 10px black;\ box-shadow: inset 0 0 10px black;\ }\ .ace-ambiance {\ color: #E6E1DC;\ background-color: #202020;\ }\ .ace-ambiance .ace_cursor {\ border-left: 1px solid #7991E8;\ }\ .ace-ambiance .ace_overwrite-cursors .ace_cursor {\ border: 1px solid #FFE300;\ background: #766B13;\ }\ .ace-ambiance.normal-mode .ace_cursor-layer {\ z-index: 0;\ }\ .ace-ambiance .ace_marker-layer .ace_selection {\ background: rgba(221, 240, 255, 0.20);\ }\ .ace-ambiance .ace_marker-layer .ace_selected-word {\ border-radius: 4px;\ border: 8px solid #3f475d;\ box-shadow: 0 0 4px black;\ }\ .ace-ambiance .ace_marker-layer .ace_step {\ background: rgb(198, 219, 174);\ }\ .ace-ambiance .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgba(255, 255, 255, 0.25);\ }\ .ace-ambiance .ace_marker-layer .ace_active-line {\ background: rgba(255, 255, 255, 0.031);\ }\ .ace-ambiance .ace_invisible {\ color: #333;\ }\ .ace-ambiance .ace_paren {\ color: #24C2C7;\ }\ .ace-ambiance .ace_keyword {\ color: #cda869;\ }\ .ace-ambiance .ace_keyword.ace_operator {\ color: #fa8d6a;\ }\ .ace-ambiance .ace_punctuation.ace_operator {\ color: #fa8d6a;\ }\ .ace-ambiance .ace_identifier {\ }\ .ace-ambiance .ace-statement {\ color: #cda869;\ }\ .ace-ambiance .ace_constant {\ color: #CF7EA9;\ }\ .ace-ambiance .ace_constant.ace_language {\ color: #CF7EA9;\ }\ .ace-ambiance .ace_constant.ace_library {\ }\ .ace-ambiance .ace_constant.ace_numeric {\ color: #78CF8A;\ }\ .ace-ambiance .ace_invalid {\ text-decoration: underline;\ }\ .ace-ambiance .ace_invalid.ace_illegal {\ color:#F8F8F8;\ background-color: rgba(86, 45, 86, 0.75);\ }\ .ace-ambiance .ace_invalid,\ .ace-ambiance .ace_deprecated {\ text-decoration: underline;\ font-style: italic;\ color: #D2A8A1;\ }\ .ace-ambiance .ace_support {\ color: #9B859D;\ }\ .ace-ambiance .ace_support.ace_function {\ color: #DAD085;\ }\ .ace-ambiance .ace_function.ace_buildin {\ color: #9b859d;\ }\ .ace-ambiance .ace_string {\ color: #8f9d6a;\ }\ .ace-ambiance .ace_string.ace_regexp {\ color: #DAD085;\ }\ .ace-ambiance .ace_comment {\ font-style: italic;\ color: #555;\ }\ .ace-ambiance .ace_comment.ace_doc {\ }\ .ace-ambiance .ace_comment.ace_doc.ace_tag {\ color: #666;\ font-style: normal;\ }\ .ace-ambiance .ace_definition,\ .ace-ambiance .ace_type {\ color: #aac6e3;\ }\ .ace-ambiance .ace_variable {\ color: #9999cc;\ }\ .ace-ambiance .ace_variable.ace_language {\ color: #9b859d;\ }\ .ace-ambiance .ace_xml-pe {\ color: #494949;\ }\ .ace-ambiance .ace_gutter-layer,\ .ace-ambiance .ace_text-layer {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\ }\ .ace-ambiance .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-lsl.js0000644000076400007640000013231412554155240022750 0ustar pravipravidefine("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; oop.inherits(LSLHighlightRules, TextHighlightRules); function LSLHighlightRules() { var keywordMapper = this.createKeywordMapper({ "constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI", "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR", "constant.language.integer.boolean.lsl" : "FALSE|TRUE", "constant.language.quaternion.lsl" : "ZERO_ROTATION", "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED", "constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR", "invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH", "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect", "invalid.illegal.lsl": "event", "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera", "reserved.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask", "reserved.log.lsl" : "print", "keyword.control.lsl" : "do|else|for|if|jump|return|while", "storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector", "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64", "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result" }, "identifier"); this.$rules = { "start" : [ { token : "comment.line.double-slash.lsl", regex : "\\/\\/.*$" }, { token : "comment.block.begin.lsl", regex : "\\/\\*", next : "comment" }, { token : "string.quoted.double.lsl", start : '"', end : '"', next : [{ token : "constant.character.escape.lsl", regex : /\\[tn"\\]/ }] }, { token : "constant.numeric.lsl", regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b" }, { token : "entity.name.state.lsl", regex : "\\b((state)\\s+[A-Za-z_]\\w*|default)\\b" }, { token : keywordMapper, regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b" }, { token : "support.function.user-defined.lsl", regex : /\b([a-zA-Z_]\w*)(?=\(.*?\))/ }, { token : "keyword.operator.lsl", regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?" }, { token : "invalid.illegal.keyword.operator.lsl", regex : ":=?" }, { token : "punctuation.operator.lsl", regex : "\\,|\\;" }, { token : "paren.lparen.lsl", regex : "[\\[\\(\\{]" }, { token : "paren.rparen.lsl", regex : "[\\]\\)\\}]" }, { token : "text.lsl", regex : "\\s+" } ], "comment" : [ { token : "comment.block.end.lsl", regex : "\\*\\/", next : "start" }, { token : "comment.block.lsl", regex : ".+" } ] }; this.normalizeRules(); } exports.LSLHighlightRules = LSLHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module) { "use strict"; var Rules = require("./lsl_highlight_rules").LSLHighlightRules; var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var TextMode = require("./text").Mode; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var oop = require("../lib/oop"); var Mode = function() { this.HighlightRules = Rules; this.$outdent = new Outdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ["//"]; this.blockComment = { start: "/*", end: "*/" }; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") { return indent; } if (state === "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/lsl"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-dockerfile.js0000644000076400007640000007150112554155240024265 0ustar pravipravidefine("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var reservedKeywords = exports.reservedKeywords = ( '!|{|}|case|do|done|elif|else|'+ 'esac|fi|for|if|in|then|until|while|'+ '&|;|export|local|read|typeset|unset|'+ 'elif|select|set' ); var languageConstructs = exports.languageConstructs = ( '[|]|alias|bg|bind|break|builtin|'+ 'cd|command|compgen|complete|continue|'+ 'dirs|disown|echo|enable|eval|exec|'+ 'exit|fc|fg|getopts|hash|help|history|'+ 'jobs|kill|let|logout|popd|printf|pushd|'+ 'pwd|return|set|shift|shopt|source|'+ 'suspend|test|times|trap|type|ulimit|'+ 'umask|unalias|wait' ); var ShHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "keyword": reservedKeywords, "support.function.builtin": languageConstructs, "invalid.deprecated": "debugger" }, "identifier"); var integer = "(?:(?:[1-9]\\d*)|(?:0))"; var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)"; var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; var fileDescriptor = "(?:&" + intPart + ")"; var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; var func = "(?:" + variableName + "\\s*\\(\\))"; this.$rules = { "start" : [{ token : "constant", regex : /\\./ }, { token : ["text", "comment"], regex : /(^|\s)(#.*)$/ }, { token : "string", regex : '"', push : [{ token : "constant.language.escape", regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ }, { token : "constant", regex : /\$\w+/ }, { token : "string", regex : '"', next: "pop" }, { defaultToken: "string" }] }, { regex : "<<<", token : "keyword.operator" }, { stateName: "heredoc", regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", onMatch : function(value, currentState, stack) { var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; var tokens = value.split(this.splitRegex); stack.push(next, tokens[4]); return [ {type:"constant", value: tokens[1]}, {type:"text", value: tokens[2]}, {type:"string", value: tokens[3]}, {type:"support.class", value: tokens[4]}, {type:"string", value: tokens[5]} ]; }, rules: { heredoc: [{ onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }], indentedHeredoc: [{ token: "string", regex: "^\t+" }, { onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }] } }, { regex : "$", token : "empty", next : function(currentState, stack) { if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") return stack[0]; return currentState; } }, { token : "variable.language", regex : builtinVariable }, { token : "variable", regex : variable }, { token : "support.function", regex : func }, { token : "support.function", regex : fileDescriptor }, { token : "string", // ' string start : "'", end : "'" }, { token : "constant.numeric", // float regex : floatNumber }, { token : "constant.numeric", // integer regex : integer + "\\b" }, { token : keywordMapper, regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" }, { token : "paren.lparen", regex : "[\\[\\(\\{]" }, { token : "paren.rparen", regex : "[\\]\\)\\}]" } ] }; this.normalizeRules(); }; oop.inherits(ShHighlightRules, TextHighlightRules); exports.ShHighlightRules = ShHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; var Range = require("../range").Range; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var Mode = function() { this.HighlightRules = ShHighlightRules; this.foldingRules = new CStyleFoldMode(); this.$behaviour = new CstyleBehaviour(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[\:]\s*$/); if (match) { indent += tab; } } return indent; }; var outdents = { "pass": 1, "return": 1, "raise": 1, "break": 1, "continue": 1 }; this.checkOutdent = function(state, line, input) { if (input !== "\r\n" && input !== "\r" && input !== "\n") return false; var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; if (!tokens) return false; do { var last = tokens.pop(); } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); if (!last) return false; return (last.type == "keyword" && outdents[last.value]); }; this.autoOutdent = function(state, doc, row) { row += 1; var indent = this.$getIndent(doc.getLine(row)); var tab = doc.getTabString(); if (indent.slice(-tab.length) == tab) doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); }; this.$id = "ace/mode/sh"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; var DockerfileHighlightRules = function() { ShHighlightRules.call(this); var startRules = this.$rules.start; for (var i = 0; i < startRules.length; i++) { if (startRules[i].token == "variable.language") { startRules.splice(i, 0, { token: "constant.language", regex: "(?:^(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|COPY)\\b)", caseInsensitive: true }); break; } } }; oop.inherits(DockerfileHighlightRules, ShHighlightRules); exports.DockerfileHighlightRules = DockerfileHighlightRules; }); define("ace/mode/dockerfile",["require","exports","module","ace/lib/oop","ace/mode/sh","ace/mode/dockerfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var ShMode = require("./sh").Mode; var DockerfileHighlightRules = require("./dockerfile_highlight_rules").DockerfileHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { ShMode.call(this); this.HighlightRules = DockerfileHighlightRules; this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, ShMode); (function() { this.$id = "ace/mode/dockerfile"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-spellcheck.js0000644000076400007640000000455012554155240024147 0ustar pravipravidefine("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); exports.contextMenuHandler = function(e){ var host = e.target; var text = host.textInput.getElement(); if (!host.selection.isEmpty()) return; var c = host.getCursorPosition(); var r = host.session.getWordRange(c.row, c.column); var w = host.session.getTextRange(r); host.session.tokenRe.lastIndex = 0; if (!host.session.tokenRe.test(w)) return; var PLACEHOLDER = "\x01\x01"; var value = w + " " + PLACEHOLDER; text.value = value; text.setSelectionRange(w.length, w.length + 1); text.setSelectionRange(0, 0); text.setSelectionRange(0, w.length); var afterKeydown = false; event.addListener(text, "keydown", function onKeydown() { event.removeListener(text, "keydown", onKeydown); afterKeydown = true; }); host.textInput.setInputHandler(function(newVal) { console.log(newVal , value, text.selectionStart, text.selectionEnd) if (newVal == value) return ''; if (newVal.lastIndexOf(value, 0) === 0) return newVal.slice(value.length); if (newVal.substr(text.selectionEnd) == value) return newVal.slice(0, -value.length); if (newVal.slice(-2) == PLACEHOLDER) { var val = newVal.slice(0, -2); if (val.slice(-1) == " ") { if (afterKeydown) return val.substring(0, text.selectionEnd); val = val.slice(0, -1); host.session.replace(r, val); return ""; } } return newVal; }); }; var Editor = require("../editor").Editor; require("../config").defineOptions(Editor.prototype, "editor", { spellcheck: { set: function(val) { var text = this.textInput.getElement(); text.spellcheck = !!val; if (!val) this.removeListener("nativecontextmenu", exports.contextMenuHandler); else this.on("nativecontextmenu", exports.contextMenuHandler); }, value: true } }); }); (function() { window.require(["ace/ext/spellcheck"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-static_highlight.js0000644000076400007640000001164012554155240025346 0ustar pravipravidefine("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"], function(require, exports, module) { "use strict"; var EditSession = require("../edit_session").EditSession; var TextLayer = require("../layer/text").Text; var baseStyles = ".ace_static_highlight {\ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\ font-size: 12px;\ white-space: pre-wrap\ }\ .ace_static_highlight .ace_gutter {\ width: 2em;\ text-align: right;\ padding: 0 3px 0 0;\ margin-right: 3px;\ }\ .ace_static_highlight.ace_show_gutter .ace_line {\ padding-left: 2.6em;\ }\ .ace_static_highlight .ace_line { position: relative; }\ .ace_static_highlight .ace_gutter-cell {\ -moz-user-select: -moz-none;\ -khtml-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ top: 0;\ bottom: 0;\ left: 0;\ position: absolute;\ }\ .ace_static_highlight .ace_gutter-cell:before {\ content: counter(ace_line, decimal);\ counter-increment: ace_line;\ }\ .ace_static_highlight {\ counter-reset: ace_line;\ }\ "; var config = require("../config"); var dom = require("../lib/dom"); var highlight = function(el, opts, callback) { var m = el.className.match(/lang-(\w+)/); var mode = opts.mode || m && ("ace/mode/" + m[1]); if (!mode) return false; var theme = opts.theme || "ace/theme/textmate"; var data = ""; var nodes = []; if (el.firstElementChild) { var textLen = 0; for (var i = 0; i < el.childNodes.length; i++) { var ch = el.childNodes[i]; if (ch.nodeType == 3) { textLen += ch.data.length; data += ch.data; } else { nodes.push(textLen, ch); } } } else { data = dom.getInnerText(el); if (opts.trim) data = data.trim(); } highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) { dom.importCssString(highlighted.css, "ace_highlight"); el.innerHTML = highlighted.html; var container = el.firstChild.firstChild; for (var i = 0; i < nodes.length; i += 2) { var pos = highlighted.session.doc.indexToPosition(nodes[i]); var node = nodes[i + 1]; var lineEl = container.children[pos.row]; lineEl && lineEl.appendChild(node); } callback && callback(); }); }; highlight.render = function(input, mode, theme, lineStart, disableGutter, callback) { var waiting = 1; var modeCache = EditSession.prototype.$modes; if (typeof theme == "string") { waiting++; config.loadModule(['theme', theme], function(m) { theme = m; --waiting || done(); }); } var modeOptions; if (mode && typeof mode === "object" && !mode.getTokenizer) { modeOptions = mode; mode = modeOptions.path; } if (typeof mode == "string") { waiting++; config.loadModule(['mode', mode], function(m) { if (!modeCache[mode] || modeOptions) modeCache[mode] = new m.Mode(modeOptions); mode = modeCache[mode]; --waiting || done(); }); } function done() { var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter); return callback ? callback(result) : result; } return --waiting || done(); }; highlight.renderSync = function(input, mode, theme, lineStart, disableGutter) { lineStart = parseInt(lineStart || 1, 10); var session = new EditSession(""); session.setUseWorker(false); session.setMode(mode); var textLayer = new TextLayer(document.createElement("div")); textLayer.setSession(session); textLayer.config = { characterWidth: 10, lineHeight: 20 }; session.setValue(input); var stringBuilder = []; var length = session.getLength(); for(var ix = 0; ix < length; ix++) { stringBuilder.push("
    "); if (!disableGutter) stringBuilder.push("" + /*(ix + lineStart) + */ ""); textLayer.$renderLine(stringBuilder, ix, true, false); stringBuilder.push("\n
    "); } var html = "
    " + "
    " + stringBuilder.join("") + "
    " + "
    "; textLayer.destroy(); return { css: baseStyles + theme.cssText, html: html, session: session }; }; module.exports = highlight; module.exports.highlight =highlight; }); (function() { window.require(["ace/ext/static_highlight"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-apache_conf.js0000644000076400007640000004507112554155240024407 0ustar pravipravidefine("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ApacheConfHighlightRules = function() { this.$rules = { start: [ { token: [ 'punctuation.definition.comment.apacheconf', 'comment.line.hash.ini', 'comment.line.hash.ini' ], regex: '^((?:\\s)*)(#)(.*$)' }, { token: [ 'punctuation.definition.tag.apacheconf', 'entity.tag.apacheconf', 'text', 'string.value.apacheconf', 'punctuation.definition.tag.apacheconf' ], regex: '(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)' }, { token: [ 'punctuation.definition.tag.apacheconf', 'entity.tag.apacheconf', 'punctuation.definition.tag.apacheconf' ], regex: '()' }, { token: [ 'keyword.alias.apacheconf', 'text', 'string.regexp.apacheconf', 'text', 'string.replacement.apacheconf', 'text' ], regex: '(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)' }, { token: [ 'keyword.alias.apacheconf', 'text', 'entity.status.apacheconf', 'text', 'string.regexp.apacheconf', 'text', 'string.path.apacheconf', 'text' ], regex: '(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, { token: [ 'keyword.alias.apacheconf', 'text', 'entity.status.apacheconf', 'text', 'string.path.apacheconf', 'text', 'string.path.apacheconf', 'text' ], regex: '(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, { token: [ 'keyword.alias.apacheconf', 'text', 'string.regexp.apacheconf', 'text', 'string.path.apacheconf', 'text' ], regex: '(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?' }, { token: [ 'keyword.alias.apacheconf', 'text', 'string.path.apacheconf', 'text', 'string.path.apacheconf', 'text' ], regex: '(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, { token: 'keyword.core.apacheconf', regex: '\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b' }, { token: 'keyword.mpm.apacheconf', regex: '\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b' }, { token: 'keyword.access.apacheconf', regex: '\\b(?:Allow|Deny|Order)\\b' }, { token: 'keyword.actions.apacheconf', regex: '\\b(?:Action|Script)\\b' }, { token: 'keyword.alias.apacheconf', regex: '\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b' }, { token: 'keyword.auth.apacheconf', regex: '\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b' }, { token: 'keyword.auth_anon.apacheconf', regex: '\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b' }, { token: 'keyword.auth_dbm.apacheconf', regex: '\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b' }, { token: 'keyword.auth_digest.apacheconf', regex: '\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b' }, { token: 'keyword.auth_ldap.apacheconf', regex: '\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b' }, { token: 'keyword.autoindex.apacheconf', regex: '\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b' }, { token: 'keyword.cache.apacheconf', regex: '\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b' }, { token: 'keyword.cern_meta.apacheconf', regex: '\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b' }, { token: 'keyword.cgi.apacheconf', regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b' }, { token: 'keyword.cgid.apacheconf', regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b' }, { token: 'keyword.charset_lite.apacheconf', regex: '\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b' }, { token: 'keyword.dav.apacheconf', regex: '\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b' }, { token: 'keyword.deflate.apacheconf', regex: '\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b' }, { token: 'keyword.dir.apacheconf', regex: '\\b(?:DirectoryIndex|DirectorySlash)\\b' }, { token: 'keyword.disk_cache.apacheconf', regex: '\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b' }, { token: 'keyword.dumpio.apacheconf', regex: '\\b(?:DumpIOInput|DumpIOOutput)\\b' }, { token: 'keyword.env.apacheconf', regex: '\\b(?:PassEnv|SetEnv|UnsetEnv)\\b' }, { token: 'keyword.expires.apacheconf', regex: '\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b' }, { token: 'keyword.ext_filter.apacheconf', regex: '\\b(?:ExtFilterDefine|ExtFilterOptions)\\b' }, { token: 'keyword.file_cache.apacheconf', regex: '\\b(?:CacheFile|MMapFile)\\b' }, { token: 'keyword.headers.apacheconf', regex: '\\b(?:Header|RequestHeader)\\b' }, { token: 'keyword.imap.apacheconf', regex: '\\b(?:ImapBase|ImapDefault|ImapMenu)\\b' }, { token: 'keyword.include.apacheconf', regex: '\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b' }, { token: 'keyword.isapi.apacheconf', regex: '\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b' }, { token: 'keyword.ldap.apacheconf', regex: '\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b' }, { token: 'keyword.log.apacheconf', regex: '\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b' }, { token: 'keyword.mem_cache.apacheconf', regex: '\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b' }, { token: 'keyword.mime.apacheconf', regex: '\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b' }, { token: 'keyword.misc.apacheconf', regex: '\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b' }, { token: 'keyword.negotiation.apacheconf', regex: '\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b' }, { token: 'keyword.nw_ssl.apacheconf', regex: '\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b' }, { token: 'keyword.proxy.apacheconf', regex: '\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b' }, { token: 'keyword.rewrite.apacheconf', regex: '\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b' }, { token: 'keyword.setenvif.apacheconf', regex: '\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b' }, { token: 'keyword.so.apacheconf', regex: '\\b(?:LoadFile|LoadModule)\\b' }, { token: 'keyword.ssl.apacheconf', regex: '\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b' }, { token: 'keyword.usertrack.apacheconf', regex: '\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b' }, { token: 'keyword.vhost_alias.apacheconf', regex: '\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b' }, { token: [ 'keyword.php.apacheconf', 'text', 'entity.property.apacheconf', 'text', 'string.value.apacheconf', 'text' ], regex: '\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)' }, { token: [ 'punctuation.variable.apacheconf', 'variable.env.apacheconf', 'variable.misc.apacheconf', 'punctuation.variable.apacheconf' ], regex: '(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})' }, { token: [ 'entity.mime-type.apacheconf', 'text' ], regex: '\\b((?:text|image|application|video|audio)/.+?)(\\s)' }, { token: 'entity.helper.apacheconf', regex: '\\b(?:from|unset|set|on|off)\\b', caseInsensitive: true }, { token: 'constant.integer.apacheconf', regex: '\\b\\d+\\b' }, { token: [ 'text', 'punctuation.definition.flag.apacheconf', 'string.flag.apacheconf', 'punctuation.definition.flag.apacheconf', 'text' ], regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] } this.normalizeRules(); }; ApacheConfHighlightRules.metaData = { fileTypes: [ 'conf', 'CONF', 'htaccess', 'HTACCESS', 'htgroups', 'HTGROUPS', 'htpasswd', 'HTPASSWD', '.htaccess', '.HTACCESS', '.htgroups', '.HTGROUPS', '.htpasswd', '.HTPASSWD' ], name: 'Apache Conf', scopeName: 'source.apacheconf' } oop.inherits(ApacheConfHighlightRules, TextHighlightRules); exports.ApacheConfHighlightRules = ApacheConfHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = ApacheConfHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.$id = "ace/mode/apache_conf"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-yaml.js0000644000076400007640000001727312554155240023126 0ustar pravipravidefine("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var YamlHighlightRules = function() { this.$rules = { "start" : [ { token : "comment", regex : "#.*$" }, { token : "list.markup", regex : /^(?:-{3}|\.{3})\s*(?=#|$)/ }, { token : "list.markup", regex : /^\s*[\-?](?:$|\s)/ }, { token: "constant", regex: "!![\\w//]+" }, { token: "constant.language", regex: "[&\\*][a-zA-Z0-9-_]+" }, { token: ["meta.tag", "keyword"], regex: /^(\s*\w.*?)(\:(?:\s+|$))/ },{ token: ["meta.tag", "keyword"], regex: /(\w+?)(\s*\:(?:\s+|$))/ }, { token : "keyword.operator", regex : "<<\\w*:\\w*" }, { token : "keyword.operator", regex : "-\\s*(?=[{])" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start regex : '[|>][-+\\d\\s]*$', next : "qqstring" }, { token : "string", // single quoted string regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "constant.numeric", // float regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/ }, { token : "constant.numeric", // other number regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/ }, { token : "constant.language.boolean", regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" } ], "qqstring" : [ { token : "string", regex : '(?=(?:(?:\\\\.)|(?:[^:]))*?:)', next : "start" }, { token : "string", regex : '.+' } ]}; }; oop.inherits(YamlHighlightRules, TextHighlightRules); exports.YamlHighlightRules = YamlHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = YamlHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/yaml"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-livescript.js0000644000076400007640000002067012554155240024343 0ustar pravipravidefine("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/range","ace/mode/text"], function(require, exports, module){ var identifier, LiveScriptMode, keywordend, stringfill; identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; exports.Mode = LiveScriptMode = (function(superclass){ var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode; function LiveScriptMode(){ var that; this.$tokenizer = new (require('../tokenizer')).Tokenizer(LiveScriptMode.Rules); if (that = require('../mode/matching_brace_outdent')) { this.$outdent = new that.MatchingBraceOutdent; } this.$id = "ace/mode/livescript"; } indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); prototype.getNextLineIndent = function(state, line, tab){ var indent, tokens; indent = this.$getIndent(line); tokens = this.$tokenizer.getLineTokens(line, state).tokens; if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) { if (state === 'start' && indenter.test(line)) { indent += tab; } } return indent; }; prototype.toggleCommentLines = function(state, doc, startRow, endRow){ var comment, range, i$, i, out, line; comment = /^(\s*)#/; range = new (require('../range')).Range(0, 0, 0, 0); for (i$ = startRow; i$ <= endRow; ++i$) { i = i$; if (out = comment.test(line = doc.getLine(i))) { line = line.replace(comment, '$1'); } else { line = line.replace(/^\s*/, '$&#'); } range.end.row = range.start.row = i; range.end.column = line.length + 1; doc.replace(range, line); } return 1 - out * 2; }; prototype.checkOutdent = function(state, line, input){ var ref$; return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8; }; prototype.autoOutdent = function(state, doc, row){ var ref$; return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8; }; return LiveScriptMode; }(require('../mode/text').Mode)); keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; stringfill = { defaultToken: 'string' }; LiveScriptMode.Rules = { start: [ { token: 'keyword', regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend }, { token: 'constant.language', regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend }, { token: 'invalid.illegal', regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend }, { token: 'language.support.class', regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend }, { token: 'language.support.function', regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend }, { token: 'variable.language', regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend }, { token: 'identifier', regex: identifier + '\\s*:(?![:=])' }, { token: 'variable', regex: identifier }, { token: 'keyword.operator', regex: '(?:\\.{3}|\\s+\\?)' }, { token: 'keyword.variable', regex: '(?:@+|::|\\.\\.)', next: 'key' }, { token: 'keyword.operator', regex: '\\.\\s*', next: 'key' }, { token: 'string', regex: '\\\\\\S[^\\s,;)}\\]]*' }, { token: 'string.doc', regex: '\'\'\'', next: 'qdoc' }, { token: 'string.doc', regex: '"""', next: 'qqdoc' }, { token: 'string', regex: '\'', next: 'qstring' }, { token: 'string', regex: '"', next: 'qqstring' }, { token: 'string', regex: '`', next: 'js' }, { token: 'string', regex: '<\\[', next: 'words' }, { token: 'string.regex', regex: '//', next: 'heregex' }, { token: 'comment.doc', regex: '/\\*', next: 'comment' }, { token: 'comment', regex: '#.*' }, { token: 'string.regex', regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', next: 'key' }, { token: 'constant.numeric', regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' }, { token: 'lparen', regex: '[({[]' }, { token: 'rparen', regex: '[)}\\]]', next: 'key' }, { token: 'keyword.operator', regex: '[\\^!|&%+\\-]+' }, { token: 'text', regex: '\\s+' } ], heregex: [ { token: 'string.regex', regex: '.*?//[gimy$?]{0,4}', next: 'start' }, { token: 'string.regex', regex: '\\s*#{' }, { token: 'comment.regex', regex: '\\s+(?:#.*)?' }, { defaultToken: 'string.regex' } ], key: [ { token: 'keyword.operator', regex: '[.?@!]+' }, { token: 'identifier', regex: identifier, next: 'start' }, { token: 'text', regex: '', next: 'start' } ], comment: [ { token: 'comment.doc', regex: '.*?\\*/', next: 'start' }, { defaultToken: 'comment.doc' } ], qdoc: [ { token: 'string', regex: ".*?'''", next: 'key' }, stringfill ], qqdoc: [ { token: 'string', regex: '.*?"""', next: 'key' }, stringfill ], qstring: [ { token: 'string', regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', next: 'key' }, stringfill ], qqstring: [ { token: 'string', regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', next: 'key' }, stringfill ], js: [ { token: 'string', regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', next: 'key' }, stringfill ], words: [ { token: 'string', regex: '.*?\\]>', next: 'key' }, stringfill ] }; function extend$(sub, sup){ function fun(){} fun.prototype = (sub.superclass = sup).prototype; (sub.prototype = new fun).constructor = sub; if (typeof sup.extended == 'function') sup.extended(sub); return sub; } function import$(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-clojure.js0000644000076400007640000003067712554155240023632 0ustar pravipravidefine("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ClojureHighlightRules = function() { var builtinFunctions = ( '* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' + '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' + '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' + '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' + '*read-eval* *source-path* *use-context-classloader* ' + '*warn-on-reflection* + - -> ->> .. / < <= = ' + '== > > >= >= accessor aclone ' + 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' + 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' + 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' + 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' + 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' + 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' + 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' + 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' + 'char-escape-string char-name-string char? chars chunk chunk-append ' + 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' + 'class class? clear-agent-errors clojure-version coll? comment commute ' + 'comp comparator compare compare-and-set! compile complement concat cond ' + 'condp conj conj! cons constantly construct-proxy contains? count ' + 'counted? create-ns create-struct cycle dec decimal? declare definline ' + 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' + 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' + 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' + 'double-array doubles drop drop-last drop-while empty empty? ensure ' + 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' + 'find-doc find-ns find-var first float float-array float? floats flush ' + 'fn fn? fnext for force format future future-call future-cancel ' + 'future-cancelled? future-done? future? gen-class gen-interface gensym ' + 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' + 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' + 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' + 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' + 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' + 'list* list? load load-file load-reader load-string loaded-libs locking ' + 'long long-array longs loop macroexpand macroexpand-1 make-array ' + 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' + 'merge-with meta method-sig methods min min-key mod name namespace neg? ' + 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' + 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' + 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' + 'or parents partial partition pcalls peek persistent! pmap pop pop! ' + 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' + 'primitives-classnames print print-ctor print-doc print-dup print-method ' + 'print-namespace-doc print-simple print-special-doc print-str printf ' + 'println println-str prn prn-str promise proxy proxy-call-with-super ' + 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' + 'rand rand-int range ratio? rational? rationalize re-find re-groups ' + 're-matcher re-matches re-pattern re-seq read read-line read-string ' + 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' + 'refer refer-clojure release-pending-sends rem remove remove-method ' + 'remove-ns remove-watch repeat repeatedly replace replicate require ' + 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' + 'rsubseq second select-keys send send-off seq seq? seque sequence ' + 'sequential? set set-validator! set? short short-array shorts ' + 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' + 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' + 'split-at split-with str stream? string? struct struct-map subs subseq ' + 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' + 'take-last take-nth take-while test the-ns time to-array to-array-2d ' + 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' + 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' + 'unchecked-remainder unchecked-subtract underive unquote ' + 'unquote-splicing update-in update-proxy use val vals var-get var-set ' + 'var? vary-meta vec vector vector? when when-first when-let when-not ' + 'while with-bindings with-bindings* with-in-str with-loading-context ' + 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' + 'zero? zipmap' ); var keywords = ('throw try var ' + 'def do fn if let loop monitor-enter monitor-exit new quote recur set!' ); var buildinConstants = ("true false nil"); var keywordMapper = this.createKeywordMapper({ "keyword": keywords, "constant.language": buildinConstants, "support.function": builtinFunctions }, "identifier", false, " "); this.$rules = { "start" : [ { token : "comment", regex : ";.*$" }, { token : "keyword", //parens regex : "[\\(|\\)]" }, { token : "keyword", //lists regex : "[\\'\\(]" }, { token : "keyword", //vectors regex : "[\\[|\\]]" }, { token : "keyword", //sets and maps regex : "[\\{|\\}|\\#\\{|\\#\\}]" }, { token : "keyword", // ampersands regex : '[\\&]' }, { token : "keyword", // metadata regex : '[\\#\\^\\{]' }, { token : "keyword", // anonymous fn syntactic sugar regex : '[\\%]' }, { token : "keyword", // deref reader macro regex : '[@]' }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language", regex : '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]' }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" }, { token : "string", // single line regex : '"', next: "string" }, { token : "constant", // symbol regex : /:[^()\[\]{}'"\^%`,;\s]+/ }, { token : "string.regexp", //Regular Expressions regex : '/#"(?:\\.|(?:\\\")|[^\""\n])*"/g' } ], "string" : [ { token : "constant.language.escape", regex : "\\\\.|\\\\$" }, { token : "string", regex : '[^"\\\\]+' }, { token : "string", regex : '"', next : "start" } ] }; }; oop.inherits(ClojureHighlightRules, TextHighlightRules); exports.ClojureHighlightRules = ClojureHighlightRules; }); define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingParensOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\)/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\))/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { var match = line.match(/^(\s+)/); if (match) { return match[1]; } return ""; }; }).call(MatchingParensOutdent.prototype); exports.MatchingParensOutdent = MatchingParensOutdent; }); define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules; var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent; var Mode = function() { this.HighlightRules = ClojureHighlightRules; this.$outdent = new MatchingParensOutdent(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ";"; this.minorIndentFunctions = ["defn", "defn-", "defmacro", "def", "deftest", "testing"]; this.$toIndent = function(str) { return str.split('').map(function(ch) { if (/\s/.exec(ch)) { return ch; } else { return ' '; } }).join(''); }; this.$calculateIndent = function(line, tab) { var baseIndent = this.$getIndent(line); var delta = 0; var isParen, ch; for (var i = line.length - 1; i >= 0; i--) { ch = line[i]; if (ch === '(') { delta--; isParen = true; } else if (ch === '(' || ch === '[' || ch === '{') { delta--; isParen = false; } else if (ch === ')' || ch === ']' || ch === '}') { delta++; } if (delta < 0) { break; } } if (delta < 0 && isParen) { i += 1; var iBefore = i; var fn = ''; while (true) { ch = line[i]; if (ch === ' ' || ch === '\t') { if(this.minorIndentFunctions.indexOf(fn) !== -1) { return this.$toIndent(line.substring(0, iBefore - 1) + tab); } else { return this.$toIndent(line.substring(0, i + 1)); } } else if (ch === undefined) { return this.$toIndent(line.substring(0, iBefore - 1) + tab); } fn += line[i]; i++; } } else if(delta < 0 && !isParen) { return this.$toIndent(line.substring(0, i+1)); } else if(delta > 0) { baseIndent = baseIndent.substring(0, baseIndent.length - tab.length); return baseIndent; } else { return baseIndent; } }; this.getNextLineIndent = function(state, line, tab) { return this.$calculateIndent(line, tab); }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/clojure"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-luapage.js0000644000076400007640000033324612554155240023603 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LuaHighlightRules = function() { var keywords = ( "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ "return|then|until|while|or|and|not" ); var builtinConstants = ("true|false|nil|_G|_VERSION"); var functions = ( "string|xpcall|package|tostring|print|os|unpack|require|"+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ "collectgarbage|getmetatable|module|rawset|math|debug|"+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ "load|error|loadfile|"+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ "lines|write|close|flush|open|output|type|read|stderr|"+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ "status|wrap|create|running|"+ "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" ); var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); var futureReserved = ""; var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); var keywordMapper = this.createKeywordMapper({ "keyword": keywords, "support.function": functions, "invalid.deprecated": deprecatedIn5152, "constant.library": stdLibaries, "constant.language": builtinConstants, "invalid.illegal": futureReserved, "variable.language": "self" }, "identifier"); var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)"; var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; var floatNumber = "(?:" + pointFloat + ")"; this.$rules = { "start" : [{ stateName: "bracketedComment", onMatch : function(value, currentState, stack){ stack.unshift(this.next, value.length - 2, currentState); return "comment"; }, regex : /\-\-\[=*\[/, next : [ { onMatch : function(value, currentState, stack) { if (value.length == stack[1]) { stack.shift(); stack.shift(); this.next = stack.shift(); } else { this.next = ""; } return "comment"; }, regex : /\]=*\]/, next : "start" }, { defaultToken : "comment" } ] }, { token : "comment", regex : "\\-\\-.*$" }, { stateName: "bracketedString", onMatch : function(value, currentState, stack){ stack.unshift(this.next, value.length, currentState); return "comment"; }, regex : /\[=*\[/, next : [ { onMatch : function(value, currentState, stack) { if (value.length == stack[1]) { stack.shift(); stack.shift(); this.next = stack.shift(); } else { this.next = ""; } return "comment"; }, regex : /\]=*\]/, next : "start" }, { defaultToken : "comment" } ] }, { token : "string", // " string regex : '"(?:[^\\\\]|\\\\.)*?"' }, { token : "string", // ' string regex : "'(?:[^\\\\]|\\\\.)*?'" }, { token : "constant.numeric", // float regex : floatNumber }, { token : "constant.numeric", // integer regex : integer + "\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." }, { token : "paren.lparen", regex : "[\\[\\(\\{]" }, { token : "paren.rparen", regex : "[\\]\\)\\}]" }, { token : "text", regex : "\\s+|\\w+" } ] }; this.normalizeRules(); } oop.inherits(LuaHighlightRules, TextHighlightRules); exports.LuaHighlightRules = LuaHighlightRules; }); define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var TokenIterator = require("../../token_iterator").TokenIterator; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var isStart = this.foldingStartMarker.test(line); var isEnd = this.foldingStopMarker.test(line); if (isStart && !isEnd) { var match = line.match(this.foldingStartMarker); if (match[1] == "then" && /\belseif\b/.test(line)) return; if (match[1]) { if (session.getTokenAt(row, match.index + 1).type === "keyword") return "start"; } else if (match[2]) { var type = session.bgTokenizer.getState(row) || ""; if (type[0] == "bracketedComment" || type[0] == "bracketedString") return "start"; } else { return "start"; } } if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) return ""; var match = line.match(this.foldingStopMarker); if (match[0] === "end") { if (session.getTokenAt(row, match.index + 1).type === "keyword") return "end"; } else if (match[0][0] === "]") { var type = session.bgTokenizer.getState(row - 1) || ""; if (type[0] == "bracketedComment" || type[0] == "bracketedString") return "end"; } else return "end"; }; this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.doc.getLine(row); var match = this.foldingStartMarker.exec(line); if (match) { if (match[1]) return this.luaBlock(session, row, match.index + 1); if (match[2]) return session.getCommentFoldRange(row, match.index + 1); return this.openingBracketBlock(session, "{", row, match.index); } var match = this.foldingStopMarker.exec(line); if (match) { if (match[0] === "end") { if (session.getTokenAt(row, match.index + 1).type === "keyword") return this.luaBlock(session, row, match.index + 1); } if (match[0][0] === "]") return session.getCommentFoldRange(row, match.index + 1); return this.closingBracketBlock(session, "}", row, match.index + match[0].length); } }; this.luaBlock = function(session, row, column) { var stream = new TokenIterator(session, row, column); var indentKeywords = { "function": 1, "do": 1, "then": 1, "elseif": -1, "end": -1, "repeat": 1, "until": -1 }; var token = stream.getCurrentToken(); if (!token || token.type != "keyword") return; var val = token.value; var stack = [val]; var dir = indentKeywords[val]; if (!dir) return; var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; var startRow = row; stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; while(token = stream.step()) { if (token.type !== "keyword") continue; var level = dir * indentKeywords[token.value]; if (level > 0) { stack.unshift(token.value); } else if (level <= 0) { stack.shift(); if (!stack.length && token.value != "elseif") break; if (level === 0) stack.unshift(token.value); } } var row = stream.getCurrentTokenRow(); if (dir === -1) return new Range(row, session.getLine(row).length, startRow, startColumn); else return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); }; }).call(FoldMode.prototype); }); define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; var LuaFoldMode = require("./folding/lua").FoldMode; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var Mode = function() { this.HighlightRules = LuaHighlightRules; this.foldingRules = new LuaFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.blockComment = {start: "--[", end: "]--"}; var indentKeywords = { "function": 1, "then": 1, "do": 1, "else": 1, "elseif": 1, "repeat": 1, "end": -1, "until": -1 }; var outdentKeywords = [ "else", "elseif", "end", "until" ]; function getNetIndentLevel(tokens) { var level = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (token.type == "keyword") { if (token.value in indentKeywords) { level += indentKeywords[token.value]; } } else if (token.type == "paren.lparen") { level ++; } else if (token.type == "paren.rparen") { level --; } } if (level < 0) { return -1; } else if (level > 0) { return 1; } else { return 0; } } this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var level = 0; var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (state == "start") { level = getNetIndentLevel(tokens); } if (level > 0) { return indent + tab; } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { if (!this.checkOutdent(state, line, "\n")) { return indent.substr(0, indent.length - tab.length); } } return indent; }; this.checkOutdent = function(state, line, input) { if (input != "\n" && input != "\r" && input != "\r\n") return false; if (line.match(/^\s*[\)\}\]]$/)) return true; var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; if (!tokens || !tokens.length) return false; return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); }; this.autoOutdent = function(state, session, row) { var prevLine = session.getLine(row - 1); var prevIndent = this.$getIndent(prevLine).length; var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; var tabLength = session.getTabString().length; var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); var curIndent = this.$getIndent(session.getLine(row)).length; if (curIndent < expectedIndent) { return; } session.outdentRows(new Range(row, 0, row + 2, 0)); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/lua"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; var LuaPageHighlightRules = function() { HtmlHighlightRules.call(this); var startRules = [ { token: "keyword", regex: "<\\%\\=?", push: "lua-start" }, { token: "keyword", regex: "<\\?lua\\=?", push: "lua-start" } ]; var endRules = [ { token: "keyword", regex: "\\%>", next: "pop" }, { token: "keyword", regex: "\\?>", next: "pop" } ]; this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]); for (var key in this.$rules) this.$rules[key].unshift.apply(this.$rules[key], startRules); this.normalizeRules(); }; oop.inherits(LuaPageHighlightRules, HtmlHighlightRules); exports.LuaPageHighlightRules = LuaPageHighlightRules; }); define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var LuaMode = require("./lua").Mode; var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules; var Mode = function() { HtmlMode.call(this); this.HighlightRules = LuaPageHighlightRules; this.createModeDelegates({ "lua-": LuaMode }); }; oop.inherits(Mode, HtmlMode); (function() { this.$id = "ace/mode/luapage"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-verilog.js0000644000076400007640000000706412554155240023630 0ustar pravipravidefine("ace/mode/verilog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var VerilogHighlightRules = function() { var keywords = "always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|" + "deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|" + "endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|" + "highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|" + "macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|" + "posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|" + "reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|" + "strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|" + "unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xor" + "begin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|" + "endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|" + "macromodule|module|primitive|repeat|specify|table|task|while"; var builtinConstants = ( "true|false|null" ); var builtinFunctions = ( "count|min|max|avg|sum|rank|now|coalesce|main" ); var keywordMapper = this.createKeywordMapper({ "support.function": builtinFunctions, "keyword": keywords, "constant.language": builtinConstants }, "identifier", true); this.$rules = { "start" : [ { token : "comment", regex : "//.*$" }, { token : "string", // " string regex : '".*?"' }, { token : "string", // ' string regex : "'.*?'" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" }, { token : "paren.lparen", regex : "[\\(]" }, { token : "paren.rparen", regex : "[\\)]" }, { token : "text", regex : "\\s+" } ] }; }; oop.inherits(VerilogHighlightRules, TextHighlightRules); exports.VerilogHighlightRules = VerilogHighlightRules; }); define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = VerilogHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/verilog"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-django.js0000644000076400007640000030016212554155240023416 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DjangoHighlightRules = function(){ this.$rules = { 'start': [{ token: "string", regex: '".*?"' }, { token: "string", regex: "'.*?'" }, { token: "constant", regex: '[0-9]+' }, { token: "variable", regex: "[-_a-zA-Z0-9:]+" }], 'comment': [{ token : "comment.block", merge: true, regex : ".+?" }], 'tag': [{ token: "entity.name.function", regex: "[a-zA-Z][_a-zA-Z0-9]*", next: "start" }] }; }; oop.inherits(DjangoHighlightRules, TextHighlightRules) var DjangoHtmlHighlightRules = function() { this.$rules = new HtmlHighlightRules().getRules(); for (var i in this.$rules) { this.$rules[i].unshift({ token: "comment.line", regex: "\\{#.*?#\\}" }, { token: "comment.block", regex: "\\{\\%\\s*comment\\s*\\%\\}", merge: true, next: "django-comment" }, { token: "constant.language", regex: "\\{\\{", next: "django-start" }, { token: "constant.language", regex: "\\{\\%", next: "django-tag" }); this.embedRules(DjangoHighlightRules, "django-", [{ token: "comment.block", regex: "\\{\\%\\s*endcomment\\s*\\%\\}", merge: true, next: "start" }, { token: "constant.language", regex: "\\%\\}", next: "start" }, { token: "constant.language", regex: "\\}\\}", next: "start" }]); } }; oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules); var Mode = function() { HtmlMode.call(this); this.HighlightRules = DjangoHtmlHighlightRules; }; oop.inherits(Mode, HtmlMode); (function() { this.$id = "ace/mode/django"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-chromevox.js0000644000076400007640000003251112554155240024042 0ustar pravipravidefine("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { var cvoxAce = {}; cvoxAce.SpeechProperty; cvoxAce.Cursor; cvoxAce.Token; cvoxAce.Annotation; var CONSTANT_PROP = { 'rate': 0.8, 'pitch': 0.4, 'volume': 0.9 }; var DEFAULT_PROP = { 'rate': 1, 'pitch': 0.5, 'volume': 0.9 }; var ENTITY_PROP = { 'rate': 0.8, 'pitch': 0.8, 'volume': 0.9 }; var KEYWORD_PROP = { 'rate': 0.8, 'pitch': 0.3, 'volume': 0.9 }; var STORAGE_PROP = { 'rate': 0.8, 'pitch': 0.7, 'volume': 0.9 }; var VARIABLE_PROP = { 'rate': 0.8, 'pitch': 0.8, 'volume': 0.9 }; var DELETED_PROP = { 'punctuationEcho': 'none', 'relativePitch': -0.6 }; var ERROR_EARCON = 'ALERT_NONMODAL'; var MODE_SWITCH_EARCON = 'ALERT_MODAL'; var NO_MATCH_EARCON = 'INVALID_KEYPRESS'; var INSERT_MODE_STATE = 'insertMode'; var COMMAND_MODE_STATE = 'start'; var REPLACE_LIST = [ { substr: ';', newSubstr: ' semicolon ' }, { substr: ':', newSubstr: ' colon ' } ]; var Command = { SPEAK_ANNOT: 'annots', SPEAK_ALL_ANNOTS: 'all_annots', TOGGLE_LOCATION: 'toggle_location', SPEAK_MODE: 'mode', SPEAK_ROW_COL: 'row_col', TOGGLE_DISPLACEMENT: 'toggle_displacement', FOCUS_TEXT: 'focus_text' }; var KEY_PREFIX = 'CONTROL + SHIFT '; cvoxAce.editor = null; var lastCursor = null; var annotTable = {}; var shouldSpeakRowLocation = false; var shouldSpeakDisplacement = false; var changed = false; var vimState = null; var keyCodeToShortcutMap = {}; var cmdToShortcutMap = {}; var getKeyShortcutString = function(keyCode) { return KEY_PREFIX + String.fromCharCode(keyCode); }; var isVimMode = function() { var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler(); return keyboardHandler.$id === 'ace/keyboard/vim'; }; var getCurrentToken = function(cursor) { return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1); }; var getCurrentLine = function(cursor) { return cvoxAce.editor.getSession().getLine(cursor.row); }; var onRowChange = function(currCursor) { if (annotTable[currCursor.row]) { cvox.Api.playEarcon(ERROR_EARCON); } if (shouldSpeakRowLocation) { cvox.Api.stop(); speakChar(currCursor); speakTokenQueue(getCurrentToken(currCursor)); speakLine(currCursor.row, 1); } else { speakLine(currCursor.row, 0); } }; var isWord = function(cursor) { var line = getCurrentLine(cursor); var lineSuffix = line.substr(cursor.column - 1); if (cursor.column === 0) { lineSuffix = ' ' + line; } var firstWordRegExp = /^\W(\w+)/; var words = firstWordRegExp.exec(lineSuffix); return words !== null; }; var rules = { 'constant': { prop: CONSTANT_PROP }, 'entity': { prop: ENTITY_PROP }, 'keyword': { prop: KEYWORD_PROP }, 'storage': { prop: STORAGE_PROP }, 'variable': { prop: VARIABLE_PROP }, 'meta': { prop: DEFAULT_PROP, replace: [ { substr: '', newSubstr: ' close tag ' }, { substr: '<', newSubstr: ' tag start ' }, { substr: '>', newSubstr: ' tag end ' } ] } }; var DEFAULT_RULE = { prop: DEFAULT_RULE }; var expand = function(value, replaceRules) { var newValue = value; for (var i = 0; i < replaceRules.length; i++) { var replaceRule = replaceRules[i]; var regexp = new RegExp(replaceRule.substr, 'g'); newValue = newValue.replace(regexp, replaceRule.newSubstr); } return newValue; }; var mergeTokens = function(tokens, start, end) { var newToken = {}; newToken.value = ''; newToken.type = tokens[start].type; for (var j = start; j < end; j++) { newToken.value += tokens[j].value; } return newToken; }; var mergeLikeTokens = function(tokens) { if (tokens.length <= 1) { return tokens; } var newTokens = []; var lastLikeIndex = 0; for (var i = 1; i < tokens.length; i++) { var lastLikeToken = tokens[lastLikeIndex]; var currToken = tokens[i]; if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) { newTokens.push(mergeTokens(tokens, lastLikeIndex, i)); lastLikeIndex = i; } } newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length)); return newTokens; }; var isRowWhiteSpace = function(row) { var line = cvoxAce.editor.getSession().getLine(row); var whiteSpaceRegexp = /^\s*$/; return whiteSpaceRegexp.exec(line) !== null; }; var speakLine = function(row, queue) { var tokens = cvoxAce.editor.getSession().getTokens(row); if (tokens.length === 0 || isRowWhiteSpace(row)) { cvox.Api.playEarcon('EDITABLE_TEXT'); return; } tokens = mergeLikeTokens(tokens); var firstToken = tokens[0]; tokens = tokens.filter(function(token) { return token !== firstToken; }); speakToken_(firstToken, queue); tokens.forEach(speakTokenQueue); }; var speakTokenFlush = function(token) { speakToken_(token, 0); }; var speakTokenQueue = function(token) { speakToken_(token, 1); }; var getTokenRule = function(token) { if (!token || !token.type) { return; } var split = token.type.split('.'); if (split.length === 0) { return; } var type = split[0]; var rule = rules[type]; if (!rule) { return DEFAULT_RULE; } return rule; }; var speakToken_ = function(token, queue) { var rule = getTokenRule(token); var value = expand(token.value, REPLACE_LIST); if (rule.replace) { value = expand(value, rule.replace); } cvox.Api.speak(value, queue, rule.prop); }; var speakChar = function(cursor) { var line = getCurrentLine(cursor); cvox.Api.speak(line[cursor.column], 1); }; var speakDisplacement = function(lastCursor, currCursor) { var line = getCurrentLine(currCursor); var displace = line.substring(lastCursor.column, currCursor.column); displace = displace.replace(/ /g, ' space '); cvox.Api.speak(displace); }; var speakCharOrWordOrLine = function(lastCursor, currCursor) { if (Math.abs(lastCursor.column - currCursor.column) !== 1) { var currLineLength = getCurrentLine(currCursor).length; if (currCursor.column === 0 || currCursor.column === currLineLength) { speakLine(currCursor.row, 0); return; } if (isWord(currCursor)) { cvox.Api.stop(); speakTokenQueue(getCurrentToken(currCursor)); return; } } speakChar(currCursor); }; var onColumnChange = function(lastCursor, currCursor) { if (!cvoxAce.editor.selection.isEmpty()) { speakDisplacement(lastCursor, currCursor); cvox.Api.speak('selected', 1); } else if (shouldSpeakDisplacement) { speakDisplacement(lastCursor, currCursor); } else { speakCharOrWordOrLine(lastCursor, currCursor); } }; var onCursorChange = function(evt) { if (changed) { changed = false; return; } var currCursor = cvoxAce.editor.selection.getCursor(); if (currCursor.row !== lastCursor.row) { onRowChange(currCursor); } else { onColumnChange(lastCursor, currCursor); } lastCursor = currCursor; }; var onSelectionChange = function(evt) { if (cvoxAce.editor.selection.isEmpty()) { cvox.Api.speak('unselected'); } }; var onChange = function(evt) { var data = evt.data; switch (data.action) { case 'removeText': cvox.Api.speak(data.text, 0, DELETED_PROP); changed = true; break; case 'insertText': cvox.Api.speak(data.text, 0); changed = true; break; } }; var isNewAnnotation = function(annot) { var row = annot.row; var col = annot.column; return !annotTable[row] || !annotTable[row][col]; }; var populateAnnotations = function(annotations) { annotTable = {}; for (var i = 0; i < annotations.length; i++) { var annotation = annotations[i]; var row = annotation.row; var col = annotation.column; if (!annotTable[row]) { annotTable[row] = {}; } annotTable[row][col] = annotation; } }; var onAnnotationChange = function(evt) { var annotations = cvoxAce.editor.getSession().getAnnotations(); var newAnnotations = annotations.filter(isNewAnnotation); if (newAnnotations.length > 0) { cvox.Api.playEarcon(ERROR_EARCON); } populateAnnotations(annotations); }; var speakAnnot = function(annot) { var annotText = annot.type + ' ' + annot.text + ' on ' + rowColToString(annot.row, annot.column); annotText = annotText.replace(';', 'semicolon'); cvox.Api.speak(annotText, 1); }; var speakAnnotsByRow = function(row) { var annots = annotTable[row]; for (var col in annots) { speakAnnot(annots[col]); } }; var rowColToString = function(row, col) { return 'row ' + (row + 1) + ' column ' + (col + 1); }; var speakCurrRowAndCol = function() { cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column)); }; var speakAllAnnots = function() { for (var row in annotTable) { speakAnnotsByRow(row); } }; var speakMode = function() { if (!isVimMode()) { return; } switch (cvoxAce.editor.keyBinding.$data.state) { case INSERT_MODE_STATE: cvox.Api.speak('Insert mode'); break; case COMMAND_MODE_STATE: cvox.Api.speak('Command mode'); break; } }; var toggleSpeakRowLocation = function() { shouldSpeakRowLocation = !shouldSpeakRowLocation; if (shouldSpeakRowLocation) { cvox.Api.speak('Speak location on row change enabled.'); } else { cvox.Api.speak('Speak location on row change disabled.'); } }; var toggleSpeakDisplacement = function() { shouldSpeakDisplacement = !shouldSpeakDisplacement; if (shouldSpeakDisplacement) { cvox.Api.speak('Speak displacement on column changes.'); } else { cvox.Api.speak('Speak current character or word on column changes.'); } }; var onKeyDown = function(evt) { if (evt.ctrlKey && evt.shiftKey) { var shortcut = keyCodeToShortcutMap[evt.keyCode]; if (shortcut) { shortcut.func(); } } }; var onChangeStatus = function(evt, editor) { if (!isVimMode()) { return; } var state = editor.keyBinding.$data.state; if (state === vimState) { return; } switch (state) { case INSERT_MODE_STATE: cvox.Api.playEarcon(MODE_SWITCH_EARCON); cvox.Api.setKeyEcho(true); break; case COMMAND_MODE_STATE: cvox.Api.playEarcon(MODE_SWITCH_EARCON); cvox.Api.setKeyEcho(false); break; } vimState = state; }; var contextMenuHandler = function(evt) { var cmd = evt.detail['customCommand']; var shortcut = cmdToShortcutMap[cmd]; if (shortcut) { shortcut.func(); cvoxAce.editor.focus(); } }; var initContextMenu = function() { var ACTIONS = SHORTCUTS.map(function(shortcut) { return { desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode), cmd: shortcut.cmd }; }); var body = document.querySelector('body'); body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS)); body.addEventListener('ATCustomEvent', contextMenuHandler, true); }; var onFindSearchbox = function(evt) { if (evt.match) { speakLine(lastCursor.row, 0); } else { cvox.Api.playEarcon(NO_MATCH_EARCON); } }; var focus = function() { cvoxAce.editor.focus(); }; var SHORTCUTS = [ { keyCode: 49, func: function() { speakAnnotsByRow(lastCursor.row); }, cmd: Command.SPEAK_ANNOT, desc: 'Speak annotations on line' }, { keyCode: 50, func: speakAllAnnots, cmd: Command.SPEAK_ALL_ANNOTS, desc: 'Speak all annotations' }, { keyCode: 51, func: speakMode, cmd: Command.SPEAK_MODE, desc: 'Speak Vim mode' }, { keyCode: 52, func: toggleSpeakRowLocation, cmd: Command.TOGGLE_LOCATION, desc: 'Toggle speak row location' }, { keyCode: 53, func: speakCurrRowAndCol, cmd: Command.SPEAK_ROW_COL, desc: 'Speak row and column' }, { keyCode: 54, func: toggleSpeakDisplacement, cmd: Command.TOGGLE_DISPLACEMENT, desc: 'Toggle speak displacement' }, { keyCode: 55, func: focus, cmd: Command.FOCUS_TEXT, desc: 'Focus text' } ]; var onFocus = function() { cvoxAce.editor = editor; editor.getSession().selection.on('changeCursor', onCursorChange); editor.getSession().selection.on('changeSelection', onSelectionChange); editor.getSession().on('change', onChange); editor.getSession().on('changeAnnotation', onAnnotationChange); editor.on('changeStatus', onChangeStatus); editor.on('findSearchBox', onFindSearchbox); editor.container.addEventListener('keydown', onKeyDown); lastCursor = editor.selection.getCursor(); }; var init = function(editor) { onFocus(); SHORTCUTS.forEach(function(shortcut) { keyCodeToShortcutMap[shortcut.keyCode] = shortcut; cmdToShortcutMap[shortcut.cmd] = shortcut; }); editor.on('focus', onFocus); if (isVimMode()) { cvox.Api.setKeyEcho(false); } initContextMenu(); }; function cvoxApiExists() { return (typeof(cvox) !== 'undefined') && cvox && cvox.Api; } var tries = 0; var MAX_TRIES = 15; function watchForCvoxLoad(editor) { if (cvoxApiExists()) { init(editor); } else { tries++; if (tries >= MAX_TRIES) { return; } window.setTimeout(watchForCvoxLoad, 500, editor); } } var Editor = require('../editor').Editor; require('../config').defineOptions(Editor.prototype, 'editor', { enableChromevoxEnhancements: { set: function(val) { if (val) { watchForCvoxLoad(this); } }, value: true // turn it on by default or check for window.cvox } }); }); (function() { window.require(["ace/ext/chromevox"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-css.js0000644000076400007640000010734212554155240022751 0ustar pravipravidefine("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-pastel_on_dark.js0000644000076400007640000000556212554155240025325 0ustar pravipravidefine("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-pastel-on-dark"; exports.cssText = ".ace-pastel-on-dark .ace_gutter {\ background: #353030;\ color: #8F938F\ }\ .ace-pastel-on-dark .ace_print-margin {\ width: 1px;\ background: #353030\ }\ .ace-pastel-on-dark {\ background-color: #2C2828;\ color: #8F938F\ }\ .ace-pastel-on-dark .ace_cursor {\ color: #A7A7A7\ }\ .ace-pastel-on-dark .ace_marker-layer .ace_selection {\ background: rgba(221, 240, 255, 0.20)\ }\ .ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #2C2828;\ border-radius: 2px\ }\ .ace-pastel-on-dark .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-pastel-on-dark .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgba(255, 255, 255, 0.25)\ }\ .ace-pastel-on-dark .ace_marker-layer .ace_active-line {\ background: rgba(255, 255, 255, 0.031)\ }\ .ace-pastel-on-dark .ace_gutter-active-line {\ background-color: rgba(255, 255, 255, 0.031)\ }\ .ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\ border: 1px solid rgba(221, 240, 255, 0.20)\ }\ .ace-pastel-on-dark .ace_invisible {\ color: rgba(255, 255, 255, 0.25)\ }\ .ace-pastel-on-dark .ace_keyword,\ .ace-pastel-on-dark .ace_meta {\ color: #757aD8\ }\ .ace-pastel-on-dark .ace_constant,\ .ace-pastel-on-dark .ace_constant.ace_character,\ .ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\ .ace-pastel-on-dark .ace_constant.ace_other {\ color: #4FB7C5\ }\ .ace-pastel-on-dark .ace_keyword.ace_operator {\ color: #797878\ }\ .ace-pastel-on-dark .ace_constant.ace_character {\ color: #AFA472\ }\ .ace-pastel-on-dark .ace_constant.ace_language {\ color: #DE8E30\ }\ .ace-pastel-on-dark .ace_constant.ace_numeric {\ color: #CCCCCC\ }\ .ace-pastel-on-dark .ace_invalid,\ .ace-pastel-on-dark .ace_invalid.ace_illegal {\ color: #F8F8F8;\ background-color: rgba(86, 45, 86, 0.75)\ }\ .ace-pastel-on-dark .ace_invalid.ace_deprecated {\ text-decoration: underline;\ font-style: italic;\ color: #D2A8A1\ }\ .ace-pastel-on-dark .ace_fold {\ background-color: #757aD8;\ border-color: #8F938F\ }\ .ace-pastel-on-dark .ace_support.ace_function {\ color: #AEB2F8\ }\ .ace-pastel-on-dark .ace_string {\ color: #66A968\ }\ .ace-pastel-on-dark .ace_string.ace_regexp {\ color: #E9C062\ }\ .ace-pastel-on-dark .ace_comment {\ color: #A6C6FF\ }\ .ace-pastel-on-dark .ace_variable {\ color: #BEBF55\ }\ .ace-pastel-on-dark .ace_variable.ace_language {\ color: #C1C144\ }\ .ace-pastel-on-dark .ace_xml-pe {\ color: #494949\ }\ .ace-pastel-on-dark .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-pascal.js0000644000076400007640000001657312554155240023431 0ustar pravipravidefine("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var PascalHighlightRules = function() { this.$rules = { start: [ { caseInsensitive: true, token: 'keyword.control.pascal', regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' }, { caseInsensitive: true, token: [ 'variable.pascal', "text", 'storage.type.prototype.pascal', 'entity.name.function.prototype.pascal' ], regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' }, { caseInsensitive: true, token: [ 'variable.pascal', "text", 'storage.type.function.pascal', 'entity.name.function.pascal' ], regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' }, { token: 'constant.numeric.pascal', regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' }, { token: 'punctuation.definition.comment.pascal', regex: '--.*$', push_: [ { token: 'comment.line.double-dash.pascal.one', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.double-dash.pascal.one' } ] }, { token: 'punctuation.definition.comment.pascal', regex: '//.*$', push_: [ { token: 'comment.line.double-slash.pascal.two', regex: '$', next: 'pop' }, { defaultToken: 'comment.line.double-slash.pascal.two' } ] }, { token: 'punctuation.definition.comment.pascal', regex: '\\(\\*', push: [ { token: 'punctuation.definition.comment.pascal', regex: '\\*\\)', next: 'pop' }, { defaultToken: 'comment.block.pascal.one' } ] }, { token: 'punctuation.definition.comment.pascal', regex: '\\{', push: [ { token: 'punctuation.definition.comment.pascal', regex: '\\}', next: 'pop' }, { defaultToken: 'comment.block.pascal.two' } ] }, { token: 'punctuation.definition.string.begin.pascal', regex: '"', push: [ { token: 'constant.character.escape.pascal', regex: '\\\\.' }, { token: 'punctuation.definition.string.end.pascal', regex: '"', next: 'pop' }, { defaultToken: 'string.quoted.double.pascal' } ], }, { token: 'punctuation.definition.string.begin.pascal', regex: '\'', push: [ { token: 'constant.character.escape.apostrophe.pascal', regex: '\'\'' }, { token: 'punctuation.definition.string.end.pascal', regex: '\'', next: 'pop' }, { defaultToken: 'string.quoted.single.pascal' } ] }, { token: 'keyword.operator', regex: '[+\\-;,/*%]|:=|=' } ] } this.normalizeRules(); }; oop.inherits(PascalHighlightRules, TextHighlightRules); exports.PascalHighlightRules = PascalHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = PascalHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ["--", "//"]; this.blockComment = [ {start: "(*", end: "*)"}, {start: "{", end: "}"} ]; this.$id = "ace/mode/pascal"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-matlab.js0000644000076400007640000005516212554155240023423 0ustar pravipravidefine("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var MatlabHighlightRules = function() { var keywords = ( "break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while" ); var builtinConstants = ( "true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout" ); var builtinFunctions = ( "abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|"+ "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" + "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|"+ "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|"+ "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|"+ "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:\.(?:close|closeVar|"+ "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|"+ "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|"+ "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|"+ "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|"+ "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|"+ "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|"+ "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|"+ "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|"+ "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|"+ "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|"+ "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers\.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|"+ "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|"+ "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|"+ "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|"+ "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|"+ "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|"+ "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event\.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|"+ "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|"+ "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|"+ "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|"+ "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|"+ "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|"+ "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|"+ "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|"+ "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|"+ "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|"+ "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|"+ "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|"+ "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|"+ "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|"+ "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|"+ "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|"+ "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab\.io\.MatFile|matlab\.mixin\.(?:Copyable|Heterogeneous(?:\.getDefaultScalarElement)?)|matlabrc|"+ "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta\.(?:class(?:\.fromName)?|DynamicProperty|EnumeratedValue|event|"+ "MetaData|method|package(?:\.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:\.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|"+ "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|"+ "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|"+ "ncwriteschema|ndgrid|ndims|ne|NET(?:\.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|"+ "NetException|setStaticProperty))?|netcdf\.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|"+ "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|"+ "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|"+ "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|"+ "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|"+ "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|"+ "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|"+ "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|"+ "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:\.(?:create|"+ "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|"+ "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|"+ "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|"+ "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|"+ "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|"+ "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|"+ "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|"+ "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|"+ "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|"+ "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:\.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|"+ "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|"+ "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|"+ "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|"+ "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:\.isPlatformSupported)?|VideoWriter(?:\.getProfiles)?|"+ "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|"+ "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|"+ "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|"+ "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|"+ "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:\.(?:fit|make|template))?|Ensemble|KNN(?:\.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|"+ "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|"+ "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|"+ "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|"+ "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:\.fit)?|geo(?:cdf|inv|mean|"+ "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:\.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|"+ "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|"+ "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|"+ "LinearModel(?:\.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|"+ "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:\.fit)?|nan(?:cov|max|mean|median|min|std|"+ "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|"+ "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:\.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|"+ "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|"+ "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|"+ "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|regstats|relieff|ridge|"+ "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|"+ "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|"+ "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest"+ "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|"+ "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|"+ "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|"+ "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|"+ "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|"+ "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|"+ "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|"+ "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|"+ "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|"+ "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|"+ "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|"+ "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|"+ "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|"+ "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|"+ "reflect|regionprops|registration\.metric\.(?:MattesMutualInformation|MeanSquares)|registration\.optimizer\.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|"+ "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|"+ "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|"+ "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog" ); var storageType = ( "cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse" ); var keywordMapper = this.createKeywordMapper({ "storage.type": storageType, "support.function": builtinFunctions, "keyword": keywords, "constant.language": builtinConstants }, "identifier", true); this.$rules = { start: [{ token : "string", regex : "'", stateName : "qstring", next : [{ token : "constant.language.escape", regex : "''" }, { token : "string", regex : "'|$", next : "start" }, { defaultToken: "string" }] }, { token : "text", regex : "\\s+" }, { regex: "", next: "noQstring" }], noQstring : [{ regex: "^\\s*%{\\s*$", token: "comment.start", push: "blockComment" }, { token : "comment", regex : "%[^\r\n]*" }, { token : "string", regex : '"', stateName : "qqstring", next : [{ token : "constant.language.escape", regex : /\\./ }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "start" }, { defaultToken: "string" }] }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=", next: "start" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\.", next: "start" }, { token : "paren.lparen", regex : "[({\\[]", next: "start" }, { token : "paren.rparen", regex : "[\\]})]" }, { token : "text", regex : "\\s+" }, { token : "text", regex : "$", next : "start" }], blockComment: [{ regex: "^\\s*%{\\s*$", token: "comment.start", push: "blockComment" }, { regex: "^\\s*%}\\s*$", token: "comment.end", next: "pop" }, { defaultToken: "comment" }], }; this.normalizeRules(); }; oop.inherits(MatlabHighlightRules, TextHighlightRules); exports.MatlabHighlightRules = MatlabHighlightRules; }); define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = MatlabHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "%"; this.blockComment = {start: "%{", end: "%}"}; this.$id = "ace/mode/matlab"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-xquery.js0000644000076400007640000122551412554155240023521 0ustar pravipravidefine("ace/mode/xquery/xquery_lexer",["require","exports","module"], function(require, exports, module) { module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 ? XQueryTokenizer.TOKEN[o] : null; }; this.getExpectedTokenSet = function(e) { var expected; if (e.getExpected() < 0) { expected = XQueryTokenizer.getTokenSet(- e.getState()); } else { expected = [XQueryTokenizer.TOKEN[e.getExpected()]]; } return expected; }; this.getErrorMessage = function(e) { var tokenSet = this.getExpectedTokenSet(e); var found = this.getOffendingToken(e); var prefix = input.substring(0, e.getBegin()); var lines = prefix.split("\n"); var line = lines.length; var column = lines[line - 1].length + 1; var size = e.getEnd() - e.getBegin(); return e.getMessage() + (found == null ? "" : ", found " + found) + "\nwhile expecting " + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + "\n" + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + "at line " + line + ", column " + column + ":\n..." + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + "..."; }; this.parse_start = function() { eventHandler.startNonterminal("start", e0); lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | switch (l1) { case 55: // '' | '=' | '>' switch (l1) { case 58: // '>' shift(58); // '>' break; case 50: // '/>' shift(50); // '/>' break; case 27: // QName shift(27); // QName break; case 57: // '=' shift(57); // '=' break; case 35: // '"' shift(35); // '"' break; case 38: // "'" shift(38); // "'" break; default: shift(33); // EOF } eventHandler.endNonterminal("StartTag", e0); }; this.parse_TagContent = function() { eventHandler.startNonterminal("TagContent", e0); lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | switch (l1) { case 23: // ElementContentChar shift(23); // ElementContentChar break; case 6: // Tag shift(6); // Tag break; case 7: // EndTag shift(7); // EndTag break; case 55: // '' switch (l1) { case 11: // CDataSectionContents shift(11); // CDataSectionContents break; case 64: // ']]>' shift(64); // ']]>' break; default: shift(33); // EOF } eventHandler.endNonterminal("CData", e0); }; this.parse_XMLComment = function() { eventHandler.startNonterminal("XMLComment", e0); lookahead1(0); // DirCommentContents | EOF | '-->' switch (l1) { case 9: // DirCommentContents shift(9); // DirCommentContents break; case 47: // '-->' shift(47); // '-->' break; default: shift(33); // EOF } eventHandler.endNonterminal("XMLComment", e0); }; this.parse_PI = function() { eventHandler.startNonterminal("PI", e0); lookahead1(3); // DirPIContents | EOF | '?' | '?>' switch (l1) { case 10: // DirPIContents shift(10); // DirPIContents break; case 59: // '?' shift(59); // '?' break; case 60: // '?>' shift(60); // '?>' break; default: shift(33); // EOF } eventHandler.endNonterminal("PI", e0); }; this.parse_Pragma = function() { eventHandler.startNonterminal("Pragma", e0); lookahead1(2); // PragmaContents | EOF | '#' | '#)' switch (l1) { case 8: // PragmaContents shift(8); // PragmaContents break; case 36: // '#' shift(36); // '#' break; case 37: // '#)' shift(37); // '#)' break; default: shift(33); // EOF } eventHandler.endNonterminal("Pragma", e0); }; this.parse_Comment = function() { eventHandler.startNonterminal("Comment", e0); lookahead1(4); // CommentContents | EOF | '(:' | ':)' switch (l1) { case 52: // ':)' shift(52); // ':)' break; case 41: // '(:' shift(41); // '(:' break; case 30: // CommentContents shift(30); // CommentContents break; default: shift(33); // EOF } eventHandler.endNonterminal("Comment", e0); }; this.parse_CommentDoc = function() { eventHandler.startNonterminal("CommentDoc", e0); lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)' switch (l1) { case 31: // DocTag shift(31); // DocTag break; case 32: // DocCommentContents shift(32); // DocCommentContents break; case 52: // ':)' shift(52); // ':)' break; case 41: // '(:' shift(41); // '(:' break; default: shift(33); // EOF } eventHandler.endNonterminal("CommentDoc", e0); }; this.parse_QuotString = function() { eventHandler.startNonterminal("QuotString", e0); lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"' switch (l1) { case 18: // PredefinedEntityRef shift(18); // PredefinedEntityRef break; case 29: // CharRef shift(29); // CharRef break; case 19: // EscapeQuot shift(19); // EscapeQuot break; case 21: // QuotChar shift(21); // QuotChar break; case 35: // '"' shift(35); // '"' break; default: shift(33); // EOF } eventHandler.endNonterminal("QuotString", e0); }; this.parse_AposString = function() { eventHandler.startNonterminal("AposString", e0); lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" switch (l1) { case 18: // PredefinedEntityRef shift(18); // PredefinedEntityRef break; case 29: // CharRef shift(29); // CharRef break; case 20: // EscapeApos shift(20); // EscapeApos break; case 22: // AposChar shift(22); // AposChar break; case 38: // "'" shift(38); // "'" break; default: shift(33); // EOF } eventHandler.endNonterminal("AposString", e0); }; this.parse_Prefix = function() { eventHandler.startNonterminal("Prefix", e0); lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | whitespace(); parse_NCName(); eventHandler.endNonterminal("Prefix", e0); }; this.parse__EQName = function() { eventHandler.startNonterminal("_EQName", e0); lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | whitespace(); parse_EQName(); eventHandler.endNonterminal("_EQName", e0); }; function parse_EQName() { eventHandler.startNonterminal("EQName", e0); switch (l1) { case 77: // 'attribute' shift(77); // 'attribute' break; case 91: // 'comment' shift(91); // 'comment' break; case 115: // 'document-node' shift(115); // 'document-node' break; case 116: // 'element' shift(116); // 'element' break; case 119: // 'empty-sequence' shift(119); // 'empty-sequence' break; case 140: // 'function' shift(140); // 'function' break; case 147: // 'if' shift(147); // 'if' break; case 160: // 'item' shift(160); // 'item' break; case 180: // 'namespace-node' shift(180); // 'namespace-node' break; case 186: // 'node' shift(186); // 'node' break; case 211: // 'processing-instruction' shift(211); // 'processing-instruction' break; case 221: // 'schema-attribute' shift(221); // 'schema-attribute' break; case 222: // 'schema-element' shift(222); // 'schema-element' break; case 238: // 'switch' shift(238); // 'switch' break; case 239: // 'text' shift(239); // 'text' break; case 248: // 'typeswitch' shift(248); // 'typeswitch' break; default: parse_FunctionName(); } eventHandler.endNonterminal("EQName", e0); } function parse_FunctionName() { eventHandler.startNonterminal("FunctionName", e0); switch (l1) { case 14: // EQName^Token shift(14); // EQName^Token break; case 65: // 'after' shift(65); // 'after' break; case 68: // 'ancestor' shift(68); // 'ancestor' break; case 69: // 'ancestor-or-self' shift(69); // 'ancestor-or-self' break; case 70: // 'and' shift(70); // 'and' break; case 74: // 'as' shift(74); // 'as' break; case 75: // 'ascending' shift(75); // 'ascending' break; case 79: // 'before' shift(79); // 'before' break; case 83: // 'case' shift(83); // 'case' break; case 84: // 'cast' shift(84); // 'cast' break; case 85: // 'castable' shift(85); // 'castable' break; case 88: // 'child' shift(88); // 'child' break; case 89: // 'collation' shift(89); // 'collation' break; case 98: // 'copy' shift(98); // 'copy' break; case 100: // 'count' shift(100); // 'count' break; case 103: // 'declare' shift(103); // 'declare' break; case 104: // 'default' shift(104); // 'default' break; case 105: // 'delete' shift(105); // 'delete' break; case 106: // 'descendant' shift(106); // 'descendant' break; case 107: // 'descendant-or-self' shift(107); // 'descendant-or-self' break; case 108: // 'descending' shift(108); // 'descending' break; case 113: // 'div' shift(113); // 'div' break; case 114: // 'document' shift(114); // 'document' break; case 117: // 'else' shift(117); // 'else' break; case 118: // 'empty' shift(118); // 'empty' break; case 121: // 'end' shift(121); // 'end' break; case 123: // 'eq' shift(123); // 'eq' break; case 124: // 'every' shift(124); // 'every' break; case 126: // 'except' shift(126); // 'except' break; case 129: // 'first' shift(129); // 'first' break; case 130: // 'following' shift(130); // 'following' break; case 131: // 'following-sibling' shift(131); // 'following-sibling' break; case 132: // 'for' shift(132); // 'for' break; case 141: // 'ge' shift(141); // 'ge' break; case 143: // 'group' shift(143); // 'group' break; case 145: // 'gt' shift(145); // 'gt' break; case 146: // 'idiv' shift(146); // 'idiv' break; case 148: // 'import' shift(148); // 'import' break; case 154: // 'insert' shift(154); // 'insert' break; case 155: // 'instance' shift(155); // 'instance' break; case 157: // 'intersect' shift(157); // 'intersect' break; case 158: // 'into' shift(158); // 'into' break; case 159: // 'is' shift(159); // 'is' break; case 165: // 'last' shift(165); // 'last' break; case 167: // 'le' shift(167); // 'le' break; case 169: // 'let' shift(169); // 'let' break; case 173: // 'lt' shift(173); // 'lt' break; case 175: // 'mod' shift(175); // 'mod' break; case 176: // 'modify' shift(176); // 'modify' break; case 177: // 'module' shift(177); // 'module' break; case 179: // 'namespace' shift(179); // 'namespace' break; case 181: // 'ne' shift(181); // 'ne' break; case 193: // 'only' shift(193); // 'only' break; case 195: // 'or' shift(195); // 'or' break; case 196: // 'order' shift(196); // 'order' break; case 197: // 'ordered' shift(197); // 'ordered' break; case 201: // 'parent' shift(201); // 'parent' break; case 207: // 'preceding' shift(207); // 'preceding' break; case 208: // 'preceding-sibling' shift(208); // 'preceding-sibling' break; case 213: // 'rename' shift(213); // 'rename' break; case 214: // 'replace' shift(214); // 'replace' break; case 215: // 'return' shift(215); // 'return' break; case 219: // 'satisfies' shift(219); // 'satisfies' break; case 224: // 'self' shift(224); // 'self' break; case 230: // 'some' shift(230); // 'some' break; case 231: // 'stable' shift(231); // 'stable' break; case 232: // 'start' shift(232); // 'start' break; case 243: // 'to' shift(243); // 'to' break; case 244: // 'treat' shift(244); // 'treat' break; case 245: // 'try' shift(245); // 'try' break; case 249: // 'union' shift(249); // 'union' break; case 251: // 'unordered' shift(251); // 'unordered' break; case 255: // 'validate' shift(255); // 'validate' break; case 261: // 'where' shift(261); // 'where' break; case 265: // 'with' shift(265); // 'with' break; case 269: // 'xquery' shift(269); // 'xquery' break; case 67: // 'allowing' shift(67); // 'allowing' break; case 76: // 'at' shift(76); // 'at' break; case 78: // 'base-uri' shift(78); // 'base-uri' break; case 80: // 'boundary-space' shift(80); // 'boundary-space' break; case 81: // 'break' shift(81); // 'break' break; case 86: // 'catch' shift(86); // 'catch' break; case 93: // 'construction' shift(93); // 'construction' break; case 96: // 'context' shift(96); // 'context' break; case 97: // 'continue' shift(97); // 'continue' break; case 99: // 'copy-namespaces' shift(99); // 'copy-namespaces' break; case 101: // 'decimal-format' shift(101); // 'decimal-format' break; case 120: // 'encoding' shift(120); // 'encoding' break; case 127: // 'exit' shift(127); // 'exit' break; case 128: // 'external' shift(128); // 'external' break; case 136: // 'ft-option' shift(136); // 'ft-option' break; case 149: // 'in' shift(149); // 'in' break; case 150: // 'index' shift(150); // 'index' break; case 156: // 'integrity' shift(156); // 'integrity' break; case 166: // 'lax' shift(166); // 'lax' break; case 187: // 'nodes' shift(187); // 'nodes' break; case 194: // 'option' shift(194); // 'option' break; case 198: // 'ordering' shift(198); // 'ordering' break; case 217: // 'revalidation' shift(217); // 'revalidation' break; case 220: // 'schema' shift(220); // 'schema' break; case 223: // 'score' shift(223); // 'score' break; case 229: // 'sliding' shift(229); // 'sliding' break; case 235: // 'strict' shift(235); // 'strict' break; case 246: // 'tumbling' shift(246); // 'tumbling' break; case 247: // 'type' shift(247); // 'type' break; case 252: // 'updating' shift(252); // 'updating' break; case 256: // 'value' shift(256); // 'value' break; case 257: // 'variable' shift(257); // 'variable' break; case 258: // 'version' shift(258); // 'version' break; case 262: // 'while' shift(262); // 'while' break; case 92: // 'constraint' shift(92); // 'constraint' break; case 171: // 'loop' shift(171); // 'loop' break; default: shift(216); // 'returning' } eventHandler.endNonterminal("FunctionName", e0); } function parse_NCName() { eventHandler.startNonterminal("NCName", e0); switch (l1) { case 26: // NCName^Token shift(26); // NCName^Token break; case 65: // 'after' shift(65); // 'after' break; case 70: // 'and' shift(70); // 'and' break; case 74: // 'as' shift(74); // 'as' break; case 75: // 'ascending' shift(75); // 'ascending' break; case 79: // 'before' shift(79); // 'before' break; case 83: // 'case' shift(83); // 'case' break; case 84: // 'cast' shift(84); // 'cast' break; case 85: // 'castable' shift(85); // 'castable' break; case 89: // 'collation' shift(89); // 'collation' break; case 100: // 'count' shift(100); // 'count' break; case 104: // 'default' shift(104); // 'default' break; case 108: // 'descending' shift(108); // 'descending' break; case 113: // 'div' shift(113); // 'div' break; case 117: // 'else' shift(117); // 'else' break; case 118: // 'empty' shift(118); // 'empty' break; case 121: // 'end' shift(121); // 'end' break; case 123: // 'eq' shift(123); // 'eq' break; case 126: // 'except' shift(126); // 'except' break; case 132: // 'for' shift(132); // 'for' break; case 141: // 'ge' shift(141); // 'ge' break; case 143: // 'group' shift(143); // 'group' break; case 145: // 'gt' shift(145); // 'gt' break; case 146: // 'idiv' shift(146); // 'idiv' break; case 155: // 'instance' shift(155); // 'instance' break; case 157: // 'intersect' shift(157); // 'intersect' break; case 158: // 'into' shift(158); // 'into' break; case 159: // 'is' shift(159); // 'is' break; case 167: // 'le' shift(167); // 'le' break; case 169: // 'let' shift(169); // 'let' break; case 173: // 'lt' shift(173); // 'lt' break; case 175: // 'mod' shift(175); // 'mod' break; case 176: // 'modify' shift(176); // 'modify' break; case 181: // 'ne' shift(181); // 'ne' break; case 193: // 'only' shift(193); // 'only' break; case 195: // 'or' shift(195); // 'or' break; case 196: // 'order' shift(196); // 'order' break; case 215: // 'return' shift(215); // 'return' break; case 219: // 'satisfies' shift(219); // 'satisfies' break; case 231: // 'stable' shift(231); // 'stable' break; case 232: // 'start' shift(232); // 'start' break; case 243: // 'to' shift(243); // 'to' break; case 244: // 'treat' shift(244); // 'treat' break; case 249: // 'union' shift(249); // 'union' break; case 261: // 'where' shift(261); // 'where' break; case 265: // 'with' shift(265); // 'with' break; case 68: // 'ancestor' shift(68); // 'ancestor' break; case 69: // 'ancestor-or-self' shift(69); // 'ancestor-or-self' break; case 77: // 'attribute' shift(77); // 'attribute' break; case 88: // 'child' shift(88); // 'child' break; case 91: // 'comment' shift(91); // 'comment' break; case 98: // 'copy' shift(98); // 'copy' break; case 103: // 'declare' shift(103); // 'declare' break; case 105: // 'delete' shift(105); // 'delete' break; case 106: // 'descendant' shift(106); // 'descendant' break; case 107: // 'descendant-or-self' shift(107); // 'descendant-or-self' break; case 114: // 'document' shift(114); // 'document' break; case 115: // 'document-node' shift(115); // 'document-node' break; case 116: // 'element' shift(116); // 'element' break; case 119: // 'empty-sequence' shift(119); // 'empty-sequence' break; case 124: // 'every' shift(124); // 'every' break; case 129: // 'first' shift(129); // 'first' break; case 130: // 'following' shift(130); // 'following' break; case 131: // 'following-sibling' shift(131); // 'following-sibling' break; case 140: // 'function' shift(140); // 'function' break; case 147: // 'if' shift(147); // 'if' break; case 148: // 'import' shift(148); // 'import' break; case 154: // 'insert' shift(154); // 'insert' break; case 160: // 'item' shift(160); // 'item' break; case 165: // 'last' shift(165); // 'last' break; case 177: // 'module' shift(177); // 'module' break; case 179: // 'namespace' shift(179); // 'namespace' break; case 180: // 'namespace-node' shift(180); // 'namespace-node' break; case 186: // 'node' shift(186); // 'node' break; case 197: // 'ordered' shift(197); // 'ordered' break; case 201: // 'parent' shift(201); // 'parent' break; case 207: // 'preceding' shift(207); // 'preceding' break; case 208: // 'preceding-sibling' shift(208); // 'preceding-sibling' break; case 211: // 'processing-instruction' shift(211); // 'processing-instruction' break; case 213: // 'rename' shift(213); // 'rename' break; case 214: // 'replace' shift(214); // 'replace' break; case 221: // 'schema-attribute' shift(221); // 'schema-attribute' break; case 222: // 'schema-element' shift(222); // 'schema-element' break; case 224: // 'self' shift(224); // 'self' break; case 230: // 'some' shift(230); // 'some' break; case 238: // 'switch' shift(238); // 'switch' break; case 239: // 'text' shift(239); // 'text' break; case 245: // 'try' shift(245); // 'try' break; case 248: // 'typeswitch' shift(248); // 'typeswitch' break; case 251: // 'unordered' shift(251); // 'unordered' break; case 255: // 'validate' shift(255); // 'validate' break; case 257: // 'variable' shift(257); // 'variable' break; case 269: // 'xquery' shift(269); // 'xquery' break; case 67: // 'allowing' shift(67); // 'allowing' break; case 76: // 'at' shift(76); // 'at' break; case 78: // 'base-uri' shift(78); // 'base-uri' break; case 80: // 'boundary-space' shift(80); // 'boundary-space' break; case 81: // 'break' shift(81); // 'break' break; case 86: // 'catch' shift(86); // 'catch' break; case 93: // 'construction' shift(93); // 'construction' break; case 96: // 'context' shift(96); // 'context' break; case 97: // 'continue' shift(97); // 'continue' break; case 99: // 'copy-namespaces' shift(99); // 'copy-namespaces' break; case 101: // 'decimal-format' shift(101); // 'decimal-format' break; case 120: // 'encoding' shift(120); // 'encoding' break; case 127: // 'exit' shift(127); // 'exit' break; case 128: // 'external' shift(128); // 'external' break; case 136: // 'ft-option' shift(136); // 'ft-option' break; case 149: // 'in' shift(149); // 'in' break; case 150: // 'index' shift(150); // 'index' break; case 156: // 'integrity' shift(156); // 'integrity' break; case 166: // 'lax' shift(166); // 'lax' break; case 187: // 'nodes' shift(187); // 'nodes' break; case 194: // 'option' shift(194); // 'option' break; case 198: // 'ordering' shift(198); // 'ordering' break; case 217: // 'revalidation' shift(217); // 'revalidation' break; case 220: // 'schema' shift(220); // 'schema' break; case 223: // 'score' shift(223); // 'score' break; case 229: // 'sliding' shift(229); // 'sliding' break; case 235: // 'strict' shift(235); // 'strict' break; case 246: // 'tumbling' shift(246); // 'tumbling' break; case 247: // 'type' shift(247); // 'type' break; case 252: // 'updating' shift(252); // 'updating' break; case 256: // 'value' shift(256); // 'value' break; case 258: // 'version' shift(258); // 'version' break; case 262: // 'while' shift(262); // 'while' break; case 92: // 'constraint' shift(92); // 'constraint' break; case 171: // 'loop' shift(171); // 'loop' break; default: shift(216); // 'returning' } eventHandler.endNonterminal("NCName", e0); } function shift(t) { if (l1 == t) { whitespace(); eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); b0 = b1; e0 = e1; l1 = 0; } else { error(b1, e1, 0, l1, t); } } function whitespace() { if (e0 != b1) { b0 = e0; e0 = b1; eventHandler.whitespace(b0, e0); } } function matchW(set) { var code; for (;;) { code = match(set); if (code != 28) // S^WS { break; } } return code; } function lookahead1W(set) { if (l1 == 0) { l1 = matchW(set); b1 = begin; e1 = end; } } function lookahead1(set) { if (l1 == 0) { l1 = match(set); b1 = begin; e1 = end; } } function error(b, e, s, l, t) { throw new self.ParseException(b, e, s, l, t); } var lk, b0, e0; var l1, b1, e1; var eventHandler; var input; var size; var begin; var end; function match(tokenSetId) { var nonbmp = false; begin = end; var current = end; var result = XQueryTokenizer.INITIAL[tokenSetId]; var state = 0; for (var code = result & 4095; code != 0; ) { var charclass; var c0 = current < size ? input.charCodeAt(current) : 0; ++current; if (c0 < 0x80) { charclass = XQueryTokenizer.MAP0[c0]; } else if (c0 < 0xd800) { var c1 = c0 >> 4; charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]]; } else { if (c0 < 0xdc00) { var c1 = current < size ? input.charCodeAt(current) : 0; if (c1 >= 0xdc00 && c1 < 0xe000) { ++current; c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; nonbmp = true; } } var lo = 0, hi = 5; for (var m = 3; ; m = (hi + lo) >> 1) { if (XQueryTokenizer.MAP2[m] > c0) hi = m - 1; else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1; else {charclass = XQueryTokenizer.MAP2[12 + m]; break;} if (lo > hi) {charclass = 0; break;} } } state = code; var i0 = (charclass << 12) + code - 1; code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]]; if (code > 4095) { result = code; code &= 4095; end = current; } } result >>= 12; if (result == 0) { end = current - 1; var c1 = end < size ? input.charCodeAt(end) : 0; if (c1 >= 0xdc00 && c1 < 0xe000) --end; return error(begin, end, state, -1, -1); } if (nonbmp) { for (var i = result >> 9; i > 0; --i) { --end; var c1 = end < size ? input.charCodeAt(end) : 0; if (c1 >= 0xdc00 && c1 < 0xe000) --end; } } else { end -= result >> 9; } return (result & 511) - 1; } } XQueryTokenizer.getTokenSet = function(tokenSetId) { var set = []; var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; for (var i = 0; i < 276; i += 32) { var j = i; var i0 = (i >> 5) * 2062 + s - 1; var i1 = i0 >> 2; var i2 = i1 >> 2; var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]]; for ( ; f != 0; f >>>= 1, ++j) { if ((f & 1) != 0) { set.push(XQueryTokenizer.TOKEN[j]); } } } return set; }; XQueryTokenizer.MAP0 = [ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35 ]; XQueryTokenizer.MAP1 = [ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65 ]; XQueryTokenizer.MAP2 = [ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35 ]; XQueryTokenizer.INITIAL = [ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]; XQueryTokenizer.TRANSITION = [ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008, 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233, 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008, 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987, 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370, 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888, 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855, 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888, 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518, 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694, 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701, 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401, 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505, 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654, 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964, 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279, 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711, 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831, 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935, 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222, 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946, 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008, 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233, 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067, 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386, 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401, 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193, 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552, 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851, 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224, 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659, 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401, 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211, 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185, 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401, 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358, 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418, 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540, 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211, 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659, 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419, 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982, 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462, 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164, 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211, 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211, 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607, 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086, 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057, 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613, 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344, 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211, 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799, 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930, 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085, 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729, 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189, 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568, 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121, 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619, 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211, 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086, 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836, 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211, 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986, 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500, 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356, 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989, 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211, 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890, 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211, 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601, 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260, 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261, 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488, 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248, 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490, 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274, 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782, 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888, 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261, 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888, 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888, 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628, 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401, 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895, 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738, 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678, 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888, 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217, 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473, 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783, 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837, 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888, 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523, 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938, 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574, 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016, 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835, 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181, 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888, 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334, 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437, 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497, 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401, 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401, 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851, 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000, 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888, 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401, 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058, 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144, 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856, 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889, 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367, 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572, 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764, 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942, 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211, 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590, 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123, 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963, 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097, 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442, 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775, 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284, 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679, 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211, 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659, 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853, 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113, 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413, 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164, 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211, 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890, 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211, 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123, 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086, 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105, 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782, 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154, 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666, 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211, 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739, 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778, 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447, 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008, 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059, 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121, 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211, 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836, 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211, 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888, 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893, 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064, 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890, 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888, 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211, 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100, 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888, 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888, 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346, 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67 ]; XQueryTokenizer.EXPECTED = [ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456 ]; XQueryTokenizer.TOKEN = [ "(0)", "ModuleDecl", "Annotation", "OptionDecl", "Operator", "Variable", "Tag", "EndTag", "PragmaContents", "DirCommentContents", "DirPIContents", "CDataSectionContents", "AttrTest", "Wildcard", "EQName", "IntegerLiteral", "DecimalLiteral", "DoubleLiteral", "PredefinedEntityRef", "'\"\"'", "EscapeApos", "QuotChar", "AposChar", "ElementContentChar", "QuotAttrContentChar", "AposAttrContentChar", "NCName", "QName", "S", "CharRef", "CommentContents", "DocTag", "DocCommentContents", "EOF", "'!'", "'\"'", "'#'", "'#)'", "''''", "'('", "'(#'", "'(:'", "'(:~'", "')'", "'*'", "'*'", "','", "'-->'", "'.'", "'/'", "'/>'", "':'", "':)'", "';'", "''), token: xmlcomment, next: function(stack){ stack.pop(); } } ], CData: [ { name: 'CDataSectionContents', token: cdata }, { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } } ], PI: [ { name: 'DirPIContents', token: pi }, { name: n('?'), token: pi }, { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } } ], AposString: [ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } }, { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, { name: 'CharRef', token: 'constant.language.escape' }, { name: 'EscapeApos', token: 'constant.language.escape' }, { name: 'AposChar', token: 'string' } ], QuotString: [ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } }, { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, { name: 'CharRef', token: 'constant.language.escape' }, { name: 'EscapeQuot', token: 'constant.language.escape' }, { name: 'QuotChar', token: 'string' } ] }; exports.XQueryLexer = function(){ return new Lexer(XQueryTokenizer, Rules); }; }, {"./XQueryTokenizer":1,"./lexer":2}]},{},[3]) (3) }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === "') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken(); var atCursor = false; var state = JSON.parse(state).pop(); if ((token && token.value === '>') || state !== "StartTag") return; if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ do { token = iterator.stepBackward(); } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); } else { atCursor = true; } var previous = iterator.stepBackward(); if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { return } var tag = token.value.substring(1); if (atCursor){ var tag = tag.substring(0, position.column - token.start); } return { text: '>' + '', selection: [1, 1] } } }); } oop.inherits(XQueryBehaviour, Behaviour); exports.XQueryBehaviour = XQueryBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { "use strict"; var WorkerClient = require("../worker/worker_client").WorkerClient; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XQueryLexer = require("./xquery/xquery_lexer").XQueryLexer; var Range = require("../range").Range; var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Anchor = require("../anchor").Anchor; var Mode = function() { this.$tokenizer = new XQueryLexer(); this.$behaviour = new XQueryBehaviour(); this.foldingRules = new CStyleFoldMode(); this.$highlightRules = new TextHighlightRules(); }; oop.inherits(Mode, TextMode); (function() { this.completer = { getCompletions: function(editor, session, pos, prefix, callback) { if (!session.$worker) return callback(); session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } }); session.$worker.on("complete", function(e){ callback(null, e.data); }); } }; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); if (match) indent += tab; return indent; }; this.checkOutdent = function(state, line, input) { if (! /^\s+$/.test(line)) return false; return (/^\s*[\}\)]/).test(input); }; this.autoOutdent = function(state, doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*[\}\)])/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.toggleCommentLines = function(state, doc, startRow, endRow) { var i, line; var outdent = true; var re = /^\s*\(:(.*):\)/; for (i=startRow; i<= endRow; i++) { if (!re.test(doc.getLine(i))) { outdent = false; break; } } var range = new Range(0, 0, 0, 0); for (i=startRow; i<= endRow; i++) { line = doc.getLine(i); range.start.row = i; range.end.row = i; range.end.column = line.length; doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); } }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); var that = this; worker.attachToDocument(session.getDocument()); worker.on("ok", function(e) { session.clearAnnotations(); }); worker.on("markers", function(e) { session.clearAnnotations(); that.addMarkers(e.data, session); }); worker.on("highlight", function(tokens) { that.$tokenizer.tokens = tokens.data.tokens; that.$tokenizer.lines = session.getDocument().getAllLines(); var rows = Object.keys(that.$tokenizer.tokens); for(var i=0; i < rows.length; i++) { var row = parseInt(rows[i]); delete session.bgTokenizer.lines[row]; delete session.bgTokenizer.states[row]; session.bgTokenizer.fireUpdateEvent(row, row); } }); return worker; }; this.removeMarkers = function(session) { var markers = session.getMarkers(false); for (var id in markers) { if (markers[id].clazz.indexOf('language_highlight_') === 0) { session.removeMarker(id); } } for (var i = 0; i < session.markerAnchors.length; i++) { session.markerAnchors[i].detach(); } session.markerAnchors = []; }; this.addMarkers = function(annos, mySession) { var _self = this; if (!mySession.markerAnchors) mySession.markerAnchors = []; this.removeMarkers(mySession); mySession.languageAnnos = []; annos.forEach(function(anno) { var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0); mySession.markerAnchors.push(anchor); var markerId; var colDiff = anno.pos.ec - anno.pos.sc; var rowDiff = anno.pos.el - anno.pos.sl; var gutterAnno = { guttertext: anno.message, type: anno.level || "warning", text: anno.message }; function updateFloat(single) { if (markerId) mySession.removeMarker(markerId); gutterAnno.row = anchor.row; if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) { var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec); markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default")); } if (single) mySession.setAnnotations(mySession.languageAnnos); } updateFloat(); anchor.on("change", function() { updateFloat(true); }); if (anno.message) mySession.languageAnnos.push(gutterAnno); }); mySession.setAnnotations(mySession.languageAnnos); }; this.$id = "ace/mode/xquery"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-csharp.js0000644000076400007640000007446112554155240023446 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var CSharpHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "variable.language": "this", "keyword": "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", "constant.language": "null|true|false" }, "identifier"); this.$rules = { "start" : [ { token : "comment", regex : "\\/\\/.*$" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string", // character regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/ }, { token : "string", start : '"', end : '"|$', next: [ {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/}, {token: "invalid", regex: /\\./} ] }, { token : "string", start : '@"', end : '"', next:[ {token: "constant.language.escape", regex: '""'} ] }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" }, { token : "keyword", regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); this.normalizeRules(); }; oop.inherits(CSharpHighlightRules, TextHighlightRules); exports.CSharpHighlightRules = CSharpHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var CFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, CFoldMode); (function() { this.usingRe = /^\s*using \S/; this.getFoldWidgetRangeBase = this.getFoldWidgetRange; this.getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var fw = this.getFoldWidgetBase(session, foldStyle, row); if (!fw) { var line = session.getLine(row); if (/^\s*#region\b/.test(line)) return "start"; var usingRe = this.usingRe; if (usingRe.test(line)) { var prev = session.getLine(row - 1); var next = session.getLine(row + 1); if (!usingRe.test(prev) && usingRe.test(next)) return "start" } } return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.getFoldWidgetRangeBase(session, foldStyle, row); if (range) return range; var line = session.getLine(row); if (this.usingRe.test(line)) return this.getUsingStatementBlock(session, line, row); if (/^\s*#region\b/.test(line)) return this.getRegionBlock(session, line, row); }; this.getUsingStatementBlock = function(session, line, row) { var startColumn = line.match(this.usingRe)[0].length - 1; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); if (/^\s*$/.test(line)) continue; if (!this.usingRe.test(line)) break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/csharp").FoldMode; var Mode = function() { this.HighlightRules = CSharpHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { return null; }; this.$id = "ace/mode/csharp"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-clouds_midnight.js0000644000076400007640000000522112554155240025504 0ustar pravipravidefine("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-clouds-midnight"; exports.cssText = ".ace-clouds-midnight .ace_gutter {\ background: #232323;\ color: #929292\ }\ .ace-clouds-midnight .ace_print-margin {\ width: 1px;\ background: #232323\ }\ .ace-clouds-midnight {\ background-color: #191919;\ color: #929292\ }\ .ace-clouds-midnight .ace_cursor {\ color: #7DA5DC\ }\ .ace-clouds-midnight .ace_marker-layer .ace_selection {\ background: #000000\ }\ .ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #191919;\ border-radius: 2px\ }\ .ace-clouds-midnight .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-clouds-midnight .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #BFBFBF\ }\ .ace-clouds-midnight .ace_marker-layer .ace_active-line {\ background: rgba(215, 215, 215, 0.031)\ }\ .ace-clouds-midnight .ace_gutter-active-line {\ background-color: rgba(215, 215, 215, 0.031)\ }\ .ace-clouds-midnight .ace_marker-layer .ace_selected-word {\ border: 1px solid #000000\ }\ .ace-clouds-midnight .ace_invisible {\ color: #666\ }\ .ace-clouds-midnight .ace_keyword,\ .ace-clouds-midnight .ace_meta,\ .ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\ color: #927C5D\ }\ .ace-clouds-midnight .ace_keyword.ace_operator {\ color: #4B4B4B\ }\ .ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\ color: #366F1A\ }\ .ace-clouds-midnight .ace_constant.ace_language {\ color: #39946A\ }\ .ace-clouds-midnight .ace_constant.ace_numeric {\ color: #46A609\ }\ .ace-clouds-midnight .ace_constant.ace_character.ace_entity {\ color: #A165AC\ }\ .ace-clouds-midnight .ace_invalid {\ color: #FFFFFF;\ background-color: #E92E2E\ }\ .ace-clouds-midnight .ace_fold {\ background-color: #927C5D;\ border-color: #929292\ }\ .ace-clouds-midnight .ace_storage,\ .ace-clouds-midnight .ace_support.ace_class,\ .ace-clouds-midnight .ace_support.ace_function,\ .ace-clouds-midnight .ace_support.ace_other,\ .ace-clouds-midnight .ace_support.ace_type {\ color: #E92E2E\ }\ .ace-clouds-midnight .ace_string {\ color: #5D90CD\ }\ .ace-clouds-midnight .ace_comment {\ color: #3C403B\ }\ .ace-clouds-midnight .ace_entity.ace_name.ace_tag,\ .ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\ color: #606060\ }\ .ace-clouds-midnight .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ace.js0000644000076400007640000231657012554155240021776 0ustar pravipravi/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ /** * Define a module along with a payload * @param module a name for the payload * @param payload a function to call with (require, exports, module) params */ (function() { var ACE_NAMESPACE = ""; var global = (function() { return this; })(); if (!global && typeof window != "undefined") global = window; // strict mode if (!ACE_NAMESPACE && typeof requirejs !== "undefined") return; var define = function(module, deps, payload) { if (typeof module !== "string") { if (define.original) define.original.apply(this, arguments); else { console.error("dropping module because define wasn\'t a string."); console.trace(); } return; } if (arguments.length == 2) payload = deps; if (!define.modules[module]) { define.payloads[module] = payload; define.modules[module] = null; } }; define.modules = {}; define.payloads = {}; /** * Get at functionality define()ed using the function above */ var _require = function(parentId, module, callback) { if (typeof module === "string") { var payload = lookup(parentId, module); if (payload != undefined) { callback && callback(); return payload; } } else if (Object.prototype.toString.call(module) === "[object Array]") { var params = []; for (var i = 0, l = module.length; i < l; ++i) { var dep = lookup(parentId, module[i]); if (dep == undefined && require.original) return; params.push(dep); } return callback && callback.apply(null, params) || true; } }; var require = function(module, callback) { var packagedModule = _require("", module, callback); if (packagedModule == undefined && require.original) return require.original.apply(this, arguments); return packagedModule; }; var normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = base + "/" + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; /** * Internal function to lookup moduleNames and resolve them by calling the * definition function if needed. */ var lookup = function(parentId, moduleName) { moduleName = normalizeModule(parentId, moduleName); var module = define.modules[moduleName]; if (!module) { module = define.payloads[moduleName]; if (typeof module === 'function') { var exports = {}; var mod = { id: moduleName, uri: '', exports: exports, packaged: true }; var req = function(module, callback) { return _require(moduleName, module, callback); }; var returnValue = module(req, exports, mod); exports = returnValue || mod.exports; define.modules[moduleName] = exports; delete define.payloads[moduleName]; } module = define.modules[moduleName] = exports || module; } return module; }; function exportAce(ns) { var root = global; if (ns) { if (!global[ns]) global[ns] = {}; root = global[ns]; } if (!root.define || !root.define.packaged) { define.original = root.define; root.define = define; root.define.packaged = true; } if (!root.require || !root.require.packaged) { require.original = root.require; root.require = require; root.require.packaged = true; } } exportAce(ACE_NAMESPACE); })(); define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) { "use strict"; var real = { exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split }, compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups compliantLastIndexIncrement = function () { var x = /^/g; real.test.call(x, ""); return !x.lastIndex; }(); if (compliantLastIndexIncrement && compliantExecNpcg) return; RegExp.prototype.exec = function (str) { var match = real.exec.apply(this, arguments), name, r2; if ( typeof(str) == 'string' && match) { if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", "")); real.replace.call(str.slice(match.index), r2, function () { for (var i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (this._xregexp && this._xregexp.captureNames) { for (var i = 1; i < match.length; i++) { name = this._xregexp.captureNames[i - 1]; if (name) match[name] = match[i]; } } if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; } return match; }; if (!compliantLastIndexIncrement) { RegExp.prototype.test = function (str) { var match = real.exec.call(this, str); if (match && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; return !!match; }; } function getNativeFlags (regex) { return (regex.global ? "g" : "") + (regex.ignoreCase ? "i" : "") + (regex.multiline ? "m" : "") + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 (regex.sticky ? "y" : ""); } function indexOf (array, item, from) { if (Array.prototype.indexOf) // Use the native array method if available return array.indexOf(item, from); for (var i = from || 0; i < array.length; i++) { if (array[i] === item) return i; } return -1; } }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) { "use strict"; require("./regexp"); require("./es5-shim"); }); define("ace/lib/dom",["require","exports","module"], function(require, exports, module) { "use strict"; var XHTML_NS = "http://www.w3.org/1999/xhtml"; exports.getDocumentHead = function(doc) { if (!doc) doc = document; return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; } exports.createElement = function(tag, ns) { return document.createElementNS ? document.createElementNS(ns || XHTML_NS, tag) : document.createElement(tag); }; exports.hasCssClass = function(el, name) { var classes = (el.className || "").split(/\s+/g); return classes.indexOf(name) !== -1; }; exports.addCssClass = function(el, name) { if (!exports.hasCssClass(el, name)) { el.className += " " + name; } }; exports.removeCssClass = function(el, name) { var classes = el.className.split(/\s+/g); while (true) { var index = classes.indexOf(name); if (index == -1) { break; } classes.splice(index, 1); } el.className = classes.join(" "); }; exports.toggleCssClass = function(el, name) { var classes = el.className.split(/\s+/g), add = true; while (true) { var index = classes.indexOf(name); if (index == -1) { break; } add = false; classes.splice(index, 1); } if(add) classes.push(name); el.className = classes.join(" "); return add; }; exports.setCssClass = function(node, className, include) { if (include) { exports.addCssClass(node, className); } else { exports.removeCssClass(node, className); } }; exports.hasCssString = function(id, doc) { var index = 0, sheets; doc = doc || document; if (doc.createStyleSheet && (sheets = doc.styleSheets)) { while (index < sheets.length) if (sheets[index++].owningElement.id === id) return true; } else if ((sheets = doc.getElementsByTagName("style"))) { while (index < sheets.length) if (sheets[index++].id === id) return true; } return false; }; exports.importCssString = function importCssString(cssText, id, doc) { doc = doc || document; if (id && exports.hasCssString(id, doc)) return null; var style; if (doc.createStyleSheet) { style = doc.createStyleSheet(); style.cssText = cssText; if (id) style.owningElement.id = id; } else { style = doc.createElementNS ? doc.createElementNS(XHTML_NS, "style") : doc.createElement("style"); style.appendChild(doc.createTextNode(cssText)); if (id) style.id = id; exports.getDocumentHead(doc).appendChild(style); } }; exports.importCssStylsheet = function(uri, doc) { if (doc.createStyleSheet) { doc.createStyleSheet(uri); } else { var link = exports.createElement('link'); link.rel = 'stylesheet'; link.href = uri; exports.getDocumentHead(doc).appendChild(link); } }; exports.getInnerWidth = function(element) { return ( parseInt(exports.computedStyle(element, "paddingLeft"), 10) + parseInt(exports.computedStyle(element, "paddingRight"), 10) + element.clientWidth ); }; exports.getInnerHeight = function(element) { return ( parseInt(exports.computedStyle(element, "paddingTop"), 10) + parseInt(exports.computedStyle(element, "paddingBottom"), 10) + element.clientHeight ); }; if (typeof document == "undefined") return; if (window.pageYOffset !== undefined) { exports.getPageScrollTop = function() { return window.pageYOffset; }; exports.getPageScrollLeft = function() { return window.pageXOffset; }; } else { exports.getPageScrollTop = function() { return document.body.scrollTop; }; exports.getPageScrollLeft = function() { return document.body.scrollLeft; }; } if (window.getComputedStyle) exports.computedStyle = function(element, style) { if (style) return (window.getComputedStyle(element, "") || {})[style] || ""; return window.getComputedStyle(element, "") || {}; }; else exports.computedStyle = function(element, style) { if (style) return element.currentStyle[style]; return element.currentStyle; }; exports.scrollbarWidth = function(document) { var inner = exports.createElement("ace_inner"); inner.style.width = "100%"; inner.style.minWidth = "0px"; inner.style.height = "200px"; inner.style.display = "block"; var outer = exports.createElement("ace_outer"); var style = outer.style; style.position = "absolute"; style.left = "-10000px"; style.overflow = "hidden"; style.width = "200px"; style.minWidth = "0px"; style.height = "150px"; style.display = "block"; outer.appendChild(inner); var body = document.documentElement; body.appendChild(outer); var noScrollbar = inner.offsetWidth; style.overflow = "scroll"; var withScrollbar = inner.offsetWidth; if (noScrollbar == withScrollbar) { withScrollbar = outer.clientWidth; } body.removeChild(outer); return noScrollbar-withScrollbar; }; exports.setInnerHtml = function(el, innerHtml) { var element = el.cloneNode(false);//document.createElement("div"); element.innerHTML = innerHtml; el.parentNode.replaceChild(element, el); return element; }; if ("textContent" in document.documentElement) { exports.setInnerText = function(el, innerText) { el.textContent = innerText; }; exports.getInnerText = function(el) { return el.textContent; }; } else { exports.setInnerText = function(el, innerText) { el.innerText = innerText; }; exports.getInnerText = function(el) { return el.innerText; }; } exports.getParentWindow = function(document) { return document.defaultView || document.parentWindow; }; }); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) { "use strict"; require("./fixoldbrowsers"); var oop = require("./oop"); var Keys = (function() { var ret = { MODIFIER_KEYS: { 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' }, KEY_MODS: { "ctrl": 1, "alt": 2, "option" : 2, "shift": 4, "super": 8, "meta": 8, "command": 8, "cmd": 8 }, FUNCTION_KEYS : { 8 : "Backspace", 9 : "Tab", 13 : "Return", 19 : "Pause", 27 : "Esc", 32 : "Space", 33 : "PageUp", 34 : "PageDown", 35 : "End", 36 : "Home", 37 : "Left", 38 : "Up", 39 : "Right", 40 : "Down", 44 : "Print", 45 : "Insert", 46 : "Delete", 96 : "Numpad0", 97 : "Numpad1", 98 : "Numpad2", 99 : "Numpad3", 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", 104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", 145: "Scrolllock" }, PRINTABLE_KEYS: { 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',221: ']', 222: '\'' } }; var name, i; for (i in ret.FUNCTION_KEYS) { name = ret.FUNCTION_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } for (i in ret.PRINTABLE_KEYS) { name = ret.PRINTABLE_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } oop.mixin(ret, ret.MODIFIER_KEYS); oop.mixin(ret, ret.PRINTABLE_KEYS); oop.mixin(ret, ret.FUNCTION_KEYS); ret.enter = ret["return"]; ret.escape = ret.esc; ret.del = ret["delete"]; ret[173] = '-'; (function() { var mods = ["cmd", "ctrl", "alt", "shift"]; for (var i = Math.pow(2, mods.length); i--;) { ret.KEY_MODS[i] = mods.filter(function(x) { return i & ret.KEY_MODS[x]; }).join("-") + "-"; } })(); ret.KEY_MODS[0] = ""; ret.KEY_MODS[-1] = "input-"; return ret; })(); oop.mixin(exports, Keys); exports.keyCodeToString = function(keyCode) { var keyString = Keys[keyCode]; if (typeof keyString != "string") keyString = String.fromCharCode(keyCode); return keyString.toLowerCase(); }; }); define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) { "use strict"; exports.OS = { LINUX: "LINUX", MAC: "MAC", WINDOWS: "WINDOWS" }; exports.getOS = function() { if (exports.isMac) { return exports.OS.MAC; } else if (exports.isLinux) { return exports.OS.LINUX; } else { return exports.OS.WINDOWS; } }; if (typeof navigator != "object") return; var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); var ua = navigator.userAgent; exports.isWin = (os == "win"); exports.isMac = (os == "mac"); exports.isLinux = (os == "linux"); exports.isIE = (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie exports.isOldIE = exports.isIE && exports.isIE < 9; exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4; exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; exports.isAIR = ua.indexOf("AdobeAIR") >= 0; exports.isIPad = ua.indexOf("iPad") >= 0; exports.isTouchPad = ua.indexOf("TouchPad") >= 0; exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; }); define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keys = require("./keys"); var useragent = require("./useragent"); exports.addListener = function(elem, type, callback) { if (elem.addEventListener) { return elem.addEventListener(type, callback, false); } if (elem.attachEvent) { var wrapper = function() { callback.call(elem, window.event); }; callback._wrapper = wrapper; elem.attachEvent("on" + type, wrapper); } }; exports.removeListener = function(elem, type, callback) { if (elem.removeEventListener) { return elem.removeEventListener(type, callback, false); } if (elem.detachEvent) { elem.detachEvent("on" + type, callback._wrapper || callback); } }; exports.stopEvent = function(e) { exports.stopPropagation(e); exports.preventDefault(e); return false; }; exports.stopPropagation = function(e) { if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; }; exports.preventDefault = function(e) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; }; exports.getButton = function(e) { if (e.type == "dblclick") return 0; if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) return 2; if (e.preventDefault) { return e.button; } else { return {1:0, 2:2, 4:1}[e.button]; } }; exports.capture = function(el, eventHandler, releaseCaptureHandler) { function onMouseUp(e) { eventHandler && eventHandler(e); releaseCaptureHandler && releaseCaptureHandler(e); exports.removeListener(document, "mousemove", eventHandler, true); exports.removeListener(document, "mouseup", onMouseUp, true); exports.removeListener(document, "dragstart", onMouseUp, true); } exports.addListener(document, "mousemove", eventHandler, true); exports.addListener(document, "mouseup", onMouseUp, true); exports.addListener(document, "dragstart", onMouseUp, true); return onMouseUp; }; exports.addMouseWheelListener = function(el, callback) { if ("onmousewheel" in el) { exports.addListener(el, "mousewheel", function(e) { var factor = 8; if (e.wheelDeltaX !== undefined) { e.wheelX = -e.wheelDeltaX / factor; e.wheelY = -e.wheelDeltaY / factor; } else { e.wheelX = 0; e.wheelY = -e.wheelDelta / factor; } callback(e); }); } else if ("onwheel" in el) { exports.addListener(el, "wheel", function(e) { var factor = 0.35; switch (e.deltaMode) { case e.DOM_DELTA_PIXEL: e.wheelX = e.deltaX * factor || 0; e.wheelY = e.deltaY * factor || 0; break; case e.DOM_DELTA_LINE: case e.DOM_DELTA_PAGE: e.wheelX = (e.deltaX || 0) * 5; e.wheelY = (e.deltaY || 0) * 5; break; } callback(e); }); } else { exports.addListener(el, "DOMMouseScroll", function(e) { if (e.axis && e.axis == e.HORIZONTAL_AXIS) { e.wheelX = (e.detail || 0) * 5; e.wheelY = 0; } else { e.wheelX = 0; e.wheelY = (e.detail || 0) * 5; } callback(e); }); } }; exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) { var clicks = 0; var startX, startY, timer; var eventNames = { 2: "dblclick", 3: "tripleclick", 4: "quadclick" }; exports.addListener(el, "mousedown", function(e) { if (exports.getButton(e) !== 0) { clicks = 0; } else if (e.detail > 1) { clicks++; if (clicks > 4) clicks = 1; } else { clicks = 1; } if (useragent.isIE) { var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; if (!timer || isNewClick) clicks = 1; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); if (clicks == 1) { startX = e.clientX; startY = e.clientY; } } e._clicks = clicks; eventHandler[callbackName]("mousedown", e); if (clicks > 4) clicks = 0; else if (clicks > 1) return eventHandler[callbackName](eventNames[clicks], e); }); if (useragent.isOldIE) { exports.addListener(el, "dblclick", function(e) { clicks = 2; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); eventHandler[callbackName]("mousedown", e); eventHandler[callbackName](eventNames[clicks], e); }); } }; var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window) ? function(e) { return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); } : function(e) { return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); }; exports.getModifierString = function(e) { return keys.KEY_MODS[getModifierHash(e)]; }; function normalizeCommandKeys(callback, e, keyCode) { var hashId = getModifierHash(e); if (!useragent.isMac && pressedKeys) { if (pressedKeys[91] || pressedKeys[92]) hashId |= 8; if (pressedKeys.altGr) { if ((3 & hashId) != 3) pressedKeys.altGr = 0; else return; } if (keyCode === 18 || keyCode === 17) { var location = "location" in e ? e.location : e.keyLocation; if (keyCode === 17 && location === 1) { if (pressedKeys[keyCode] == 1) ts = e.timeStamp; } else if (keyCode === 18 && hashId === 3 && location === 2) { var dt = e.timestamp - ts; if (dt < 50) pressedKeys.altGr = true; } } } if (keyCode in keys.MODIFIER_KEYS) { keyCode = -1; } if (hashId & 8 && (keyCode === 91 || keyCode === 93)) { keyCode = -1; } if (!hashId && keyCode === 13) { var location = "location" in e ? e.location : e.keyLocation; if (location === 3) { callback(e, hashId, -keyCode); if (e.defaultPrevented) return; } } if (useragent.isChromeOS && hashId & 8) { callback(e, hashId, keyCode); if (e.defaultPrevented) return; else hashId &= ~8; } if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { return false; } return callback(e, hashId, keyCode); } var pressedKeys = null; var ts = 0; exports.addCommandKeyListener = function(el, callback) { var addListener = exports.addListener; if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) { var lastKeyDownKeyCode = null; addListener(el, "keydown", function(e) { lastKeyDownKeyCode = e.keyCode; }); addListener(el, "keypress", function(e) { return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); }); } else { var lastDefaultPrevented = null; addListener(el, "keydown", function(e) { pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1; var result = normalizeCommandKeys(callback, e, e.keyCode); lastDefaultPrevented = e.defaultPrevented; return result; }); addListener(el, "keypress", function(e) { if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { exports.stopEvent(e); lastDefaultPrevented = null; } }); addListener(el, "keyup", function(e) { pressedKeys[e.keyCode] = null; }); if (!pressedKeys) { pressedKeys = Object.create(null); addListener(window, "focus", function(e) { pressedKeys = Object.create(null); }); } } }; if (window.postMessage && !useragent.isOldIE) { var postMessageId = 1; exports.nextTick = function(callback, win) { win = win || window; var messageName = "zero-timeout-message-" + postMessageId; exports.addListener(win, "message", function listener(e) { if (e.data == messageName) { exports.stopPropagation(e); exports.removeListener(win, "message", listener); callback(); } }); win.postMessage(messageName, "*"); }; } exports.nextFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame; if (exports.nextFrame) exports.nextFrame = exports.nextFrame.bind(window); else exports.nextFrame = function(callback) { setTimeout(callback, 17); }; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i 1); return ev.preventDefault(); }; this.startSelect = function(pos, waitForClickSelection) { pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); var editor = this.editor; editor.$blockScrolling++; if (this.mousedownEvent.getShiftKey()) editor.selection.selectToPosition(pos); else if (!waitForClickSelection) editor.selection.moveToPosition(pos); if (!waitForClickSelection) this.select(); if (editor.renderer.scroller.setCapture) { editor.renderer.scroller.setCapture(); } editor.setStyle("ace_selecting"); this.setState("select"); editor.$blockScrolling--; }; this.select = function() { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); editor.$blockScrolling++; if (this.$clickSelection) { var cmp = this.$clickSelection.comparePoint(cursor); if (cmp == -1) { anchor = this.$clickSelection.end; } else if (cmp == 1) { anchor = this.$clickSelection.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.extendSelectionBy = function(unitName) { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); var range = editor.selection[unitName](cursor.row, cursor.column); editor.$blockScrolling++; if (this.$clickSelection) { var cmpStart = this.$clickSelection.comparePoint(range.start); var cmpEnd = this.$clickSelection.comparePoint(range.end); if (cmpStart == -1 && cmpEnd <= 0) { anchor = this.$clickSelection.end; if (range.end.row != cursor.row || range.end.column != cursor.column) cursor = range.start; } else if (cmpEnd == 1 && cmpStart >= 0) { anchor = this.$clickSelection.start; if (range.start.row != cursor.row || range.start.column != cursor.column) cursor = range.end; } else if (cmpStart == -1 && cmpEnd == 1) { cursor = range.end; anchor = range.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() { this.$clickSelection = null; this.editor.unsetStyle("ace_selecting"); if (this.editor.renderer.scroller.releaseCapture) { this.editor.renderer.scroller.releaseCapture(); } }; this.focusWait = function() { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); var time = Date.now(); if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) this.startSelect(this.mousedownEvent.getDocumentPosition()); }; this.onDoubleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; var session = editor.session; var range = session.getBracketRange(pos); if (range) { if (range.isEmpty()) { range.start.column--; range.end.column++; } this.setState("select"); } else { range = editor.selection.getWordRange(pos.row, pos.column); this.setState("selectByWords"); } this.$clickSelection = range; this.select(); }; this.onTripleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; this.setState("selectByLines"); var range = editor.getSelectionRange(); if (range.isMultiLine() && range.contains(pos.row, pos.column)) { this.$clickSelection = editor.selection.getLineRange(range.start.row); this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; } else { this.$clickSelection = editor.selection.getLineRange(pos.row); } this.select(); }; this.onQuadClick = function(ev) { var editor = this.editor; editor.selectAll(); this.$clickSelection = editor.getSelectionRange(); this.setState("selectAll"); }; this.onMouseWheel = function(ev) { if (ev.getAccelKey()) return; if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { ev.wheelX = ev.wheelY; ev.wheelY = 0; } var t = ev.domEvent.timeStamp; var dt = t - (this.$lastScrollTime||0); var editor = this.editor; var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); if (isScrolable || dt < 200) { this.$lastScrollTime = t; editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); return ev.stop(); } }; }).call(DefaultHandlers.prototype); exports.DefaultHandlers = DefaultHandlers; function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } function calcRangeOrientation(range, cursor) { if (range.start.row == range.end.row) var cmp = 2 * cursor.column - range.start.column - range.end.column; else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) var cmp = cursor.column - 4; else var cmp = 2 * cursor.row - range.start.row - range.end.row; if (cmp < 0) return {cursor: range.start, anchor: range.end}; else return {cursor: range.end, anchor: range.start}; } }); define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); function Tooltip (parentNode) { this.isOpen = false; this.$element = null; this.$parentNode = parentNode; } (function() { this.$init = function() { this.$element = dom.createElement("div"); this.$element.className = "ace_tooltip"; this.$element.style.display = "none"; this.$parentNode.appendChild(this.$element); return this.$element; }; this.getElement = function() { return this.$element || this.$init(); }; this.setText = function(text) { dom.setInnerText(this.getElement(), text); }; this.setHtml = function(html) { this.getElement().innerHTML = html; }; this.setPosition = function(x, y) { this.getElement().style.left = x + "px"; this.getElement().style.top = y + "px"; }; this.setClassName = function(className) { dom.addCssClass(this.getElement(), className); }; this.show = function(text, x, y) { if (text != null) this.setText(text); if (x != null && y != null) this.setPosition(x, y); if (!this.isOpen) { this.getElement().style.display = "block"; this.isOpen = true; } }; this.hide = function() { if (this.isOpen) { this.getElement().style.display = "none"; this.isOpen = false; } }; this.getHeight = function() { return this.getElement().offsetHeight; }; this.getWidth = function() { return this.getElement().offsetWidth; }; }).call(Tooltip.prototype); exports.Tooltip = Tooltip; }); define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var event = require("../lib/event"); var Tooltip = require("../tooltip").Tooltip; function GutterHandler(mouseHandler) { var editor = mouseHandler.editor; var gutter = editor.renderer.$gutterLayer; var tooltip = new GutterTooltip(editor.container); mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { if (!editor.isFocused() || e.getButton() != 0) return; var gutterRegion = gutter.getRegion(e); if (gutterRegion == "foldWidgets") return; var row = e.getDocumentPosition().row; var selection = editor.session.selection; if (e.getShiftKey()) selection.selectTo(row, 0); else { if (e.domEvent.detail == 2) { editor.selectAll(); return e.preventDefault(); } mouseHandler.$clickSelection = editor.selection.getLineRange(row); } mouseHandler.setState("selectByLines"); mouseHandler.captureMouse(e); return e.preventDefault(); }); var tooltipTimeout, mouseEvent, tooltipAnnotation; function showTooltip() { var row = mouseEvent.getDocumentPosition().row; var annotation = gutter.$annotations[row]; if (!annotation) return hideTooltip(); var maxRow = editor.session.getLength(); if (row == maxRow) { var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; var pos = mouseEvent.$pos; if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) return hideTooltip(); } if (tooltipAnnotation == annotation) return; tooltipAnnotation = annotation.text.join("
    "); tooltip.setHtml(tooltipAnnotation); tooltip.show(); editor.on("mousewheel", hideTooltip); if (mouseHandler.$tooltipFollowsMouse) { moveTooltip(mouseEvent); } else { var gutterElement = gutter.$cells[editor.session.documentToScreenRow(row, 0)].element; var rect = gutterElement.getBoundingClientRect(); var style = tooltip.getElement().style; style.left = rect.right + "px"; style.top = rect.bottom + "px"; } } function hideTooltip() { if (tooltipTimeout) tooltipTimeout = clearTimeout(tooltipTimeout); if (tooltipAnnotation) { tooltip.hide(); tooltipAnnotation = null; editor.removeEventListener("mousewheel", hideTooltip); } } function moveTooltip(e) { tooltip.setPosition(e.x, e.y); } mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { var target = e.domEvent.target || e.domEvent.srcElement; if (dom.hasCssClass(target, "ace_fold-widget")) return hideTooltip(); if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) moveTooltip(e); mouseEvent = e; if (tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; if (mouseEvent && !mouseHandler.isMousePressed) showTooltip(); else hideTooltip(); }, 50); }); event.addListener(editor.renderer.$gutter, "mouseout", function(e) { mouseEvent = null; if (!tooltipAnnotation || tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; hideTooltip(); }, 50); }); editor.on("changeSession", hideTooltip); } function GutterTooltip(parentNode) { Tooltip.call(this, parentNode); } oop.inherits(GutterTooltip, Tooltip); (function(){ this.setPosition = function(x, y) { var windowWidth = window.innerWidth || document.documentElement.clientWidth; var windowHeight = window.innerHeight || document.documentElement.clientHeight; var width = this.getWidth(); var height = this.getHeight(); x += 15; y += 15; if (x + width > windowWidth) { x -= (x + width) - windowWidth; } if (y + height > windowHeight) { y -= 20 + height; } Tooltip.prototype.setPosition.call(this, x, y); }; }).call(GutterTooltip.prototype); exports.GutterHandler = GutterHandler; }); define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); var useragent = require("../lib/useragent"); var MouseEvent = exports.MouseEvent = function(domEvent, editor) { this.domEvent = domEvent; this.editor = editor; this.x = this.clientX = domEvent.clientX; this.y = this.clientY = domEvent.clientY; this.$pos = null; this.$inSelection = null; this.propagationStopped = false; this.defaultPrevented = false; }; (function() { this.stopPropagation = function() { event.stopPropagation(this.domEvent); this.propagationStopped = true; }; this.preventDefault = function() { event.preventDefault(this.domEvent); this.defaultPrevented = true; }; this.stop = function() { this.stopPropagation(); this.preventDefault(); }; this.getDocumentPosition = function() { if (this.$pos) return this.$pos; this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); return this.$pos; }; this.inSelection = function() { if (this.$inSelection !== null) return this.$inSelection; var editor = this.editor; var selectionRange = editor.getSelectionRange(); if (selectionRange.isEmpty()) this.$inSelection = false; else { var pos = this.getDocumentPosition(); this.$inSelection = selectionRange.contains(pos.row, pos.column); } return this.$inSelection; }; this.getButton = function() { return event.getButton(this.domEvent); }; this.getShiftKey = function() { return this.domEvent.shiftKey; }; this.getAccelKey = useragent.isMac ? function() { return this.domEvent.metaKey; } : function() { return this.domEvent.ctrlKey; }; }).call(MouseEvent.prototype); }); define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var event = require("../lib/event"); var useragent = require("../lib/useragent"); var AUTOSCROLL_DELAY = 200; var SCROLL_CURSOR_DELAY = 200; var SCROLL_CURSOR_HYSTERESIS = 5; function DragdropHandler(mouseHandler) { var editor = mouseHandler.editor; var blankImage = dom.createElement("img"); blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; if (useragent.isOpera) blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; exports.forEach(function(x) { mouseHandler[x] = this[x]; }, this); editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); var mouseTarget = editor.container; var dragSelectionMarker, x, y; var timerId, range; var dragCursor, counter = 0; var dragOperation; var isInternal; var autoScrollStartTime; var cursorMovedTime; var cursorPointOnCaretMoved; this.onDragStart = function(e) { if (this.cancelDrag || !mouseTarget.draggable) { var self = this; setTimeout(function(){ self.startSelect(); self.captureMouse(e); }, 0); return e.preventDefault(); } range = editor.getSelectionRange(); var dataTransfer = e.dataTransfer; dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; if (useragent.isOpera) { editor.container.appendChild(blankImage); blankImage.scrollTop = 0; } dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); if (useragent.isOpera) { editor.container.removeChild(blankImage); } dataTransfer.clearData(); dataTransfer.setData("Text", editor.session.getTextRange()); isInternal = true; this.setState("drag"); }; this.onDragEnd = function(e) { mouseTarget.draggable = false; isInternal = false; this.setState(null); if (!editor.getReadOnly()) { var dropEffect = e.dataTransfer.dropEffect; if (!dragOperation && dropEffect == "move") editor.session.remove(editor.getSelectionRange()); editor.renderer.$cursorLayer.setBlinking(true); } this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); }; this.onDragEnter = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) addDragMarker(); counter++; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragOver = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) { addDragMarker(); counter++; } if (onMouseMoveTimer !== null) onMouseMoveTimer = null; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragLeave = function(e) { counter--; if (counter <= 0 && dragSelectionMarker) { clearDragMarker(); dragOperation = null; return event.preventDefault(e); } }; this.onDrop = function(e) { if (!dragCursor) return; var dataTransfer = e.dataTransfer; if (isInternal) { switch (dragOperation) { case "move": if (range.contains(dragCursor.row, dragCursor.column)) { range = { start: dragCursor, end: dragCursor }; } else { range = editor.moveText(range, dragCursor); } break; case "copy": range = editor.moveText(range, dragCursor, true); break; } } else { var dropData = dataTransfer.getData('Text'); range = { start: dragCursor, end: editor.session.insert(dragCursor, dropData) }; editor.focus(); dragOperation = null; } clearDragMarker(); return event.preventDefault(e); }; event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); function scrollCursorIntoView(cursor, prevCursor) { var now = Date.now(); var vMovement = !prevCursor || cursor.row != prevCursor.row; var hMovement = !prevCursor || cursor.column != prevCursor.column; if (!cursorMovedTime || vMovement || hMovement) { editor.$blockScrolling += 1; editor.moveCursorToPosition(cursor); editor.$blockScrolling -= 1; cursorMovedTime = now; cursorPointOnCaretMoved = {x: x, y: y}; } else { var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); if (distance > SCROLL_CURSOR_HYSTERESIS) { cursorMovedTime = null; } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { editor.renderer.scrollCursorIntoView(); cursorMovedTime = null; } } } function autoScroll(cursor, prevCursor) { var now = Date.now(); var lineHeight = editor.renderer.layerConfig.lineHeight; var characterWidth = editor.renderer.layerConfig.characterWidth; var editorRect = editor.renderer.scroller.getBoundingClientRect(); var offsets = { x: { left: x - editorRect.left, right: editorRect.right - x }, y: { top: y - editorRect.top, bottom: editorRect.bottom - y } }; var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); var scrollCursor = {row: cursor.row, column: cursor.column}; if (nearestXOffset / characterWidth <= 2) { scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); } if (nearestYOffset / lineHeight <= 1) { scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); } var vScroll = cursor.row != scrollCursor.row; var hScroll = cursor.column != scrollCursor.column; var vMovement = !prevCursor || cursor.row != prevCursor.row; if (vScroll || (hScroll && !vMovement)) { if (!autoScrollStartTime) autoScrollStartTime = now; else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) editor.renderer.scrollCursorIntoView(scrollCursor); } else { autoScrollStartTime = null; } } function onDragInterval() { var prevCursor = dragCursor; dragCursor = editor.renderer.screenToTextCoordinates(x, y); scrollCursorIntoView(dragCursor, prevCursor); autoScroll(dragCursor, prevCursor); } function addDragMarker() { range = editor.selection.toOrientedRange(); dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); editor.clearSelection(); if (editor.isFocused()) editor.renderer.$cursorLayer.setBlinking(false); clearInterval(timerId); onDragInterval(); timerId = setInterval(onDragInterval, 20); counter = 0; event.addListener(document, "mousemove", onMouseMove); } function clearDragMarker() { clearInterval(timerId); editor.session.removeMarker(dragSelectionMarker); dragSelectionMarker = null; editor.$blockScrolling += 1; editor.selection.fromOrientedRange(range); editor.$blockScrolling -= 1; if (editor.isFocused() && !isInternal) editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); range = null; dragCursor = null; counter = 0; autoScrollStartTime = null; cursorMovedTime = null; event.removeListener(document, "mousemove", onMouseMove); } var onMouseMoveTimer = null; function onMouseMove() { if (onMouseMoveTimer == null) { onMouseMoveTimer = setTimeout(function() { if (onMouseMoveTimer != null && dragSelectionMarker) clearDragMarker(); }, 20); } } function canAccept(dataTransfer) { var types = dataTransfer.types; return !types || Array.prototype.some.call(types, function(type) { return type == 'text/plain' || type == 'Text'; }); } function getDropEffect(e) { var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; var effectAllowed = "uninitialized"; try { effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); } catch (e) {} var dropEffect = "none"; if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; else if (moveAllowed.indexOf(effectAllowed) >= 0) dropEffect = "move"; else if (copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; return dropEffect; } } (function() { this.dragWait = function() { var interval = Date.now() - this.mousedownEvent.time; if (interval > this.editor.getDragDelay()) this.startDrag(); }; this.dragWaitEnd = function() { var target = this.editor.container; target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); this.selectEnd(); }; this.dragReadyEnd = function(e) { this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); this.dragWaitEnd(); }; this.startDrag = function(){ this.cancelDrag = false; var editor = this.editor; var target = editor.container; target.draggable = true; editor.renderer.$cursorLayer.setBlinking(false); editor.setStyle("ace_dragging"); var cursorStyle = useragent.isWin ? "default" : "move"; editor.renderer.setCursorStyle(cursorStyle); this.setState("dragReady"); }; this.onMouseDrag = function(e) { var target = this.editor.container; if (useragent.isIE && this.state == "dragReady") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 3) target.dragDrop(); } if (this.state === "dragWait") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 0) { target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); } } }; this.onMouseDown = function(e) { if (!this.$dragEnabled) return; this.mousedownEvent = e; var editor = this.editor; var inSelection = e.inSelection(); var button = e.getButton(); var clickCount = e.domEvent.detail || 1; if (clickCount === 1 && button === 0 && inSelection) { if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return; this.mousedownEvent.time = Date.now(); var eventTarget = e.domEvent.target || e.domEvent.srcElement; if ("unselectable" in eventTarget) eventTarget.unselectable = "on"; if (editor.getDragDelay()) { if (useragent.isWebKit) { this.cancelDrag = true; var mouseTarget = editor.container; mouseTarget.draggable = true; } this.setState("dragWait"); } else { this.startDrag(); } this.captureMouse(e, this.onMouseDrag.bind(this)); e.defaultPrevented = true; } }; }).call(DragdropHandler.prototype); function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } exports.DragdropHandler = DragdropHandler; }); define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("./dom"); exports.get = function (url, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { callback(xhr.responseText); } }; xhr.send(null); }; exports.loadScript = function(path, callback) { var head = dom.getDocumentHead(); var s = document.createElement('script'); s.src = path; head.appendChild(s); s.onload = s.onreadystatechange = function(_, isAbort) { if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { s = s.onload = s.onreadystatechange = null; if (!isAbort) callback(); } }; }; exports.qualifyURL = function(url) { var a = document.createElement('a'); a.href = url; return a.href; } }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i 1) base = parts[parts.length - 2]; var path = options[component + "Path"]; if (path == null) { path = options.basePath; } else if (sep == "/") { component = sep = ""; } if (path && path.slice(-1) != "/") path += "/"; return path + component + sep + base + this.get("suffix"); }; exports.setModuleUrl = function(name, subst) { return options.$moduleUrls[name] = subst; }; exports.$loading = {}; exports.loadModule = function(moduleName, onLoad) { var module, moduleType; if (Array.isArray(moduleName)) { moduleType = moduleName[0]; moduleName = moduleName[1]; } try { module = require(moduleName); } catch (e) {} if (module && !exports.$loading[moduleName]) return onLoad && onLoad(module); if (!exports.$loading[moduleName]) exports.$loading[moduleName] = []; exports.$loading[moduleName].push(onLoad); if (exports.$loading[moduleName].length > 1) return; var afterLoad = function() { require([moduleName], function(module) { exports._emit("load.module", {name: moduleName, module: module}); var listeners = exports.$loading[moduleName]; exports.$loading[moduleName] = null; listeners.forEach(function(onLoad) { onLoad && onLoad(module); }); }); }; if (!exports.get("packaged")) return afterLoad(); net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); }; init(true);function init(packaged) { options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged); if (!global.document) return ""; var scriptOptions = {}; var scriptUrl = ""; var currentScript = (document.currentScript || document._currentScript ); // native or polyfill var currentDocument = currentScript && currentScript.ownerDocument || document; var scripts = currentDocument.getElementsByTagName("script"); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Selection = function(session) { this.session = session; this.doc = session.getDocument(); this.clearSelection(); this.lead = this.selectionLead = this.doc.createAnchor(0, 0); this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); var self = this; this.lead.on("change", function(e) { self._emit("changeCursor"); if (!self.$isEmpty) self._emit("changeSelection"); if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) self.$desiredColumn = null; }); this.selectionAnchor.on("change", function() { if (!self.$isEmpty) self._emit("changeSelection"); }); }; (function() { oop.implement(this, EventEmitter); this.isEmpty = function() { return (this.$isEmpty || ( this.anchor.row == this.lead.row && this.anchor.column == this.lead.column )); }; this.isMultiLine = function() { if (this.isEmpty()) { return false; } return this.getRange().isMultiLine(); }; this.getCursor = function() { return this.lead.getPosition(); }; this.setSelectionAnchor = function(row, column) { this.anchor.setPosition(row, column); if (this.$isEmpty) { this.$isEmpty = false; this._emit("changeSelection"); } }; this.getSelectionAnchor = function() { if (this.$isEmpty) return this.getSelectionLead(); else return this.anchor.getPosition(); }; this.getSelectionLead = function() { return this.lead.getPosition(); }; this.shiftSelection = function(columns) { if (this.$isEmpty) { this.moveCursorTo(this.lead.row, this.lead.column + columns); return; } var anchor = this.getSelectionAnchor(); var lead = this.getSelectionLead(); var isBackwards = this.isBackwards(); if (!isBackwards || anchor.column !== 0) this.setSelectionAnchor(anchor.row, anchor.column + columns); if (isBackwards || lead.column !== 0) { this.$moveSelection(function() { this.moveCursorTo(lead.row, lead.column + columns); }); } }; this.isBackwards = function() { var anchor = this.anchor; var lead = this.lead; return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); }; this.getRange = function() { var anchor = this.anchor; var lead = this.lead; if (this.isEmpty()) return Range.fromPoints(lead, lead); if (this.isBackwards()) { return Range.fromPoints(lead, anchor); } else { return Range.fromPoints(anchor, lead); } }; this.clearSelection = function() { if (!this.$isEmpty) { this.$isEmpty = true; this._emit("changeSelection"); } }; this.selectAll = function() { var lastRow = this.doc.getLength() - 1; this.setSelectionAnchor(0, 0); this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); }; this.setRange = this.setSelectionRange = function(range, reverse) { if (reverse) { this.setSelectionAnchor(range.end.row, range.end.column); this.selectTo(range.start.row, range.start.column); } else { this.setSelectionAnchor(range.start.row, range.start.column); this.selectTo(range.end.row, range.end.column); } if (this.getRange().isEmpty()) this.$isEmpty = true; this.$desiredColumn = null; }; this.$moveSelection = function(mover) { var lead = this.lead; if (this.$isEmpty) this.setSelectionAnchor(lead.row, lead.column); mover.call(this); }; this.selectTo = function(row, column) { this.$moveSelection(function() { this.moveCursorTo(row, column); }); }; this.selectToPosition = function(pos) { this.$moveSelection(function() { this.moveCursorToPosition(pos); }); }; this.moveTo = function(row, column) { this.clearSelection(); this.moveCursorTo(row, column); }; this.moveToPosition = function(pos) { this.clearSelection(); this.moveCursorToPosition(pos); }; this.selectUp = function() { this.$moveSelection(this.moveCursorUp); }; this.selectDown = function() { this.$moveSelection(this.moveCursorDown); }; this.selectRight = function() { this.$moveSelection(this.moveCursorRight); }; this.selectLeft = function() { this.$moveSelection(this.moveCursorLeft); }; this.selectLineStart = function() { this.$moveSelection(this.moveCursorLineStart); }; this.selectLineEnd = function() { this.$moveSelection(this.moveCursorLineEnd); }; this.selectFileEnd = function() { this.$moveSelection(this.moveCursorFileEnd); }; this.selectFileStart = function() { this.$moveSelection(this.moveCursorFileStart); }; this.selectWordRight = function() { this.$moveSelection(this.moveCursorWordRight); }; this.selectWordLeft = function() { this.$moveSelection(this.moveCursorWordLeft); }; this.getWordRange = function(row, column) { if (typeof column == "undefined") { var cursor = row || this.lead; row = cursor.row; column = cursor.column; } return this.session.getWordRange(row, column); }; this.selectWord = function() { this.setSelectionRange(this.getWordRange()); }; this.selectAWord = function() { var cursor = this.getCursor(); var range = this.session.getAWordRange(cursor.row, cursor.column); this.setSelectionRange(range); }; this.getLineRange = function(row, excludeLastChar) { var rowStart = typeof row == "number" ? row : this.lead.row; var rowEnd; var foldLine = this.session.getFoldLine(rowStart); if (foldLine) { rowStart = foldLine.start.row; rowEnd = foldLine.end.row; } else { rowEnd = rowStart; } if (excludeLastChar === true) return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); else return new Range(rowStart, 0, rowEnd + 1, 0); }; this.selectLine = function() { this.setSelectionRange(this.getLineRange()); }; this.moveCursorUp = function() { this.moveCursorBy(-1, 0); }; this.moveCursorDown = function() { this.moveCursorBy(1, 0); }; this.moveCursorLeft = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); } else if (cursor.column === 0) { if (cursor.row > 0) { this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); } } else { var tabSize = this.session.getTabSize(); if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) this.moveCursorBy(0, -tabSize); else this.moveCursorBy(0, -1); } }; this.moveCursorRight = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { this.moveCursorTo(fold.end.row, fold.end.column); } else if (this.lead.column == this.doc.getLine(this.lead.row).length) { if (this.lead.row < this.doc.getLength() - 1) { this.moveCursorTo(this.lead.row + 1, 0); } } else { var tabSize = this.session.getTabSize(); var cursor = this.lead; if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) this.moveCursorBy(0, tabSize); else this.moveCursorBy(0, 1); } }; this.moveCursorLineStart = function() { var row = this.lead.row; var column = this.lead.column; var screenRow = this.session.documentToScreenRow(row, column); var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); var beforeCursor = this.session.getDisplayLine( row, null, firstColumnPosition.row, firstColumnPosition.column ); var leadingSpace = beforeCursor.match(/^\s*/); if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) firstColumnPosition.column += leadingSpace[0].length; this.moveCursorToPosition(firstColumnPosition); }; this.moveCursorLineEnd = function() { var lead = this.lead; var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); if (this.lead.column == lineEnd.column) { var line = this.session.getLine(lineEnd.row); if (lineEnd.column == line.length) { var textEnd = line.search(/\s+$/); if (textEnd > 0) lineEnd.column = textEnd; } } this.moveCursorTo(lineEnd.row, lineEnd.column); }; this.moveCursorFileEnd = function() { var row = this.doc.getLength() - 1; var column = this.doc.getLine(row).length; this.moveCursorTo(row, column); }; this.moveCursorFileStart = function() { this.moveCursorTo(0, 0); }; this.moveCursorLongWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; var fold = this.session.getFoldAt(row, column, 1); if (fold) { this.moveCursorTo(fold.end.row, fold.end.column); return; } if (match = this.session.nonTokenRe.exec(rightOfCursor)) { column += this.session.nonTokenRe.lastIndex; this.session.nonTokenRe.lastIndex = 0; rightOfCursor = line.substring(column); } if (column >= line.length) { this.moveCursorTo(row, line.length); this.moveCursorRight(); if (row < this.doc.getLength() - 1) this.moveCursorWordRight(); return; } if (match = this.session.tokenRe.exec(rightOfCursor)) { column += this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.moveCursorLongWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); return; } var str = this.session.getFoldStringAt(row, column, -1); if (str == null) { str = this.doc.getLine(row).substring(0, column); } var leftOfCursor = lang.stringReverse(str); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; if (match = this.session.nonTokenRe.exec(leftOfCursor)) { column -= this.session.nonTokenRe.lastIndex; leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); this.session.nonTokenRe.lastIndex = 0; } if (column <= 0) { this.moveCursorTo(row, 0); this.moveCursorLeft(); if (row > 0) this.moveCursorWordLeft(); return; } if (match = this.session.tokenRe.exec(leftOfCursor)) { column -= this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.$shortWordEndIndex = function(rightOfCursor) { var match, index = 0, ch; var whitespaceRe = /\s/; var tokenRe = this.session.tokenRe; tokenRe.lastIndex = 0; if (match = this.session.tokenRe.exec(rightOfCursor)) { index = this.session.tokenRe.lastIndex; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index < 1) { tokenRe.lastIndex = 0; while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { tokenRe.lastIndex = 0; index ++; if (whitespaceRe.test(ch)) { if (index > 2) { index--; break; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index > 2) break; } } } } } tokenRe.lastIndex = 0; return index; }; this.moveCursorShortWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var fold = this.session.getFoldAt(row, column, 1); if (fold) return this.moveCursorTo(fold.end.row, fold.end.column); if (column == line.length) { var l = this.doc.getLength(); do { row++; rightOfCursor = this.doc.getLine(row); } while (row < l && /^\s*$/.test(rightOfCursor)); if (!/^\s+/.test(rightOfCursor)) rightOfCursor = ""; column = 0; } var index = this.$shortWordEndIndex(rightOfCursor); this.moveCursorTo(row, column + index); }; this.moveCursorShortWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) return this.moveCursorTo(fold.start.row, fold.start.column); var line = this.session.getLine(row).substring(0, column); if (column === 0) { do { row--; line = this.doc.getLine(row); } while (row > 0 && /^\s*$/.test(line)); column = line.length; if (!/\s+$/.test(line)) line = ""; } var leftOfCursor = lang.stringReverse(line); var index = this.$shortWordEndIndex(leftOfCursor); return this.moveCursorTo(row, column - index); }; this.moveCursorWordRight = function() { if (this.session.$selectLongWords) this.moveCursorLongWordRight(); else this.moveCursorShortWordRight(); }; this.moveCursorWordLeft = function() { if (this.session.$selectLongWords) this.moveCursorLongWordLeft(); else this.moveCursorShortWordLeft(); }; this.moveCursorBy = function(rows, chars) { var screenPos = this.session.documentToScreenPosition( this.lead.row, this.lead.column ); if (chars === 0) { if (this.$desiredColumn) screenPos.column = this.$desiredColumn; else this.$desiredColumn = screenPos.column; } var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) docPos.row++; } this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); }; this.moveCursorToPosition = function(position) { this.moveCursorTo(position.row, position.column); }; this.moveCursorTo = function(row, column, keepDesiredColumn) { var fold = this.session.getFoldAt(row, column, 1); if (fold) { row = fold.start.row; column = fold.start.column; } this.$keepDesiredColumnOnChange = true; this.lead.setPosition(row, column); this.$keepDesiredColumnOnChange = false; if (!keepDesiredColumn) this.$desiredColumn = null; }; this.moveCursorToScreen = function(row, column, keepDesiredColumn) { var pos = this.session.screenToDocumentPosition(row, column); this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); }; this.detach = function() { this.lead.detach(); this.anchor.detach(); this.session = this.doc = null; }; this.fromOrientedRange = function(range) { this.setSelectionRange(range, range.cursor == range.start); this.$desiredColumn = range.desiredColumn || this.$desiredColumn; }; this.toOrientedRange = function(range) { var r = this.getRange(); if (range) { range.start.column = r.start.column; range.start.row = r.start.row; range.end.column = r.end.column; range.end.row = r.end.row; } else { range = r; } range.cursor = this.isBackwards() ? range.start : range.end; range.desiredColumn = this.$desiredColumn; return range; }; this.getRangeOfMovements = function(func) { var start = this.getCursor(); try { func.call(null, this); var end = this.getCursor(); return Range.fromPoints(start,end); } catch(e) { return Range.fromPoints(start,start); } finally { this.moveCursorToPosition(start); } }; this.toJSON = function() { if (this.rangeCount) { var data = this.ranges.map(function(r) { var r1 = r.clone(); r1.isBackwards = r.cursor == r.start; return r1; }); } else { var data = this.getRange(); data.isBackwards = this.isBackwards(); } return data; }; this.fromJSON = function(data) { if (data.start == undefined) { if (this.rangeList) { this.toSingleRange(data[0]); for (var i = data.length; i--; ) { var r = Range.fromPoints(data[i].start, data[i].end); if (data.isBackwards) r.cursor = r.start; this.addRange(r, true); } return; } else data = data[0]; } if (this.rangeList) this.toSingleRange(data); this.setSelectionRange(data, data.isBackwards); }; this.isEqual = function(data) { if ((data.length || this.rangeCount) && data.length != this.rangeCount) return false; if (!data.length || !this.ranges) return this.getRange().isEqual(data); for (var i = this.ranges.length; i--; ) { if (!this.ranges[i].isEqual(data[i])) return false; } return true; }; }).call(Selection.prototype); exports.Selection = Selection; }); define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) { "use strict"; var config = require("./config"); var MAX_TOKEN_COUNT = 2000; var Tokenizer = function(rules) { this.states = rules; this.regExps = {}; this.matchMappings = {}; for (var key in this.states) { var state = this.states[key]; var ruleRegExps = []; var matchTotal = 0; var mapping = this.matchMappings[key] = {defaultToken: "text"}; var flag = "g"; var splitterRurles = []; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.defaultToken) mapping.defaultToken = rule.defaultToken; if (rule.caseInsensitive) flag = "gi"; if (rule.regex == null) continue; if (rule.regex instanceof RegExp) rule.regex = rule.regex.toString().slice(1, -1); var adjustedregex = rule.regex; var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; if (Array.isArray(rule.token)) { if (rule.token.length == 1 || matchcount == 1) { rule.token = rule.token[0]; } else if (matchcount - 1 != rule.token.length) { this.reportError("number of classes and regexp groups doesn't match", { rule: rule, groupCount: matchcount - 1 }); rule.token = rule.token[0]; } else { rule.tokenArray = rule.token; rule.token = null; rule.onMatch = this.$arrayTokens; } } else if (typeof rule.token == "function" && !rule.onMatch) { if (matchcount > 1) rule.onMatch = this.$applyToken; else rule.onMatch = rule.token; } if (matchcount > 1) { if (/\\\d/.test(rule.regex)) { adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) { return "\\" + (parseInt(digit, 10) + matchTotal + 1); }); } else { matchcount = 1; adjustedregex = this.removeCapturingGroups(rule.regex); } if (!rule.splitRegex && typeof rule.token != "string") splitterRurles.push(rule); // flag will be known only at the very end } mapping[matchTotal] = i; matchTotal += matchcount; ruleRegExps.push(adjustedregex); if (!rule.onMatch) rule.onMatch = null; } if (!ruleRegExps.length) { mapping[0] = 0; ruleRegExps.push("$"); } splitterRurles.forEach(function(rule) { rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); }, this); this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); } }; (function() { this.$setMaxTokenCount = function(m) { MAX_TOKEN_COUNT = m | 0; }; this.$applyToken = function(str) { var values = this.splitRegex.exec(str).slice(1); var types = this.token.apply(this, values); if (typeof types === "string") return [{type: types, value: str}]; var tokens = []; for (var i = 0, l = types.length; i < l; i++) { if (values[i]) tokens[tokens.length] = { type: types[i], value: values[i] }; } return tokens; }, this.$arrayTokens = function(str) { if (!str) return []; var values = this.splitRegex.exec(str); if (!values) return "text"; var tokens = []; var types = this.tokenArray; for (var i = 0, l = types.length; i < l; i++) { if (values[i + 1]) tokens[tokens.length] = { type: types[i], value: values[i + 1] }; } return tokens; }; this.removeCapturingGroups = function(src) { var r = src.replace( /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, function(x, y) {return y ? "(?:" : x;} ); return r; }; this.createSplitterRegexp = function(src, flag) { if (src.indexOf("(?=") != -1) { var stack = 0; var inChClass = false; var lastCapture = {}; src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function( m, esc, parenOpen, parenClose, square, index ) { if (inChClass) { inChClass = square != "]"; } else if (square) { inChClass = true; } else if (parenClose) { if (stack == lastCapture.stack) { lastCapture.end = index+1; lastCapture.stack = -1; } stack--; } else if (parenOpen) { stack++; if (parenOpen.length != 1) { lastCapture.stack = stack lastCapture.start = index; } } return m; }); if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); } return new RegExp(src, (flag||"").replace("g", "")); }; this.getLineTokens = function(line, startState) { if (startState && typeof startState != "string") { var stack = startState.slice(0); startState = stack[0]; if (startState === "#tmp") { stack.shift() startState = stack.shift() } } else var stack = []; var currentState = startState || "start"; var state = this.states[currentState]; if (!state) { currentState = "start"; state = this.states[currentState]; } var mapping = this.matchMappings[currentState]; var re = this.regExps[currentState]; re.lastIndex = 0; var match, tokens = []; var lastIndex = 0; var matchAttempts = 0; var token = {type: null, value: ""}; while (match = re.exec(line)) { var type = mapping.defaultToken; var rule = null; var value = match[0]; var index = re.lastIndex; if (index - value.length > lastIndex) { var skipped = line.substring(lastIndex, index - value.length); if (token.type == type) { token.value += skipped; } else { if (token.type) tokens.push(token); token = {type: type, value: skipped}; } } for (var i = 0; i < match.length-2; i++) { if (match[i + 1] === undefined) continue; rule = state[mapping[i]]; if (rule.onMatch) type = rule.onMatch(value, currentState, stack); else type = rule.token; if (rule.next) { if (typeof rule.next == "string") { currentState = rule.next; } else { currentState = rule.next(currentState, stack); } state = this.states[currentState]; if (!state) { this.reportError("state doesn't exist", currentState); currentState = "start"; state = this.states[currentState]; } mapping = this.matchMappings[currentState]; lastIndex = index; re = this.regExps[currentState]; re.lastIndex = index; } break; } if (value) { if (typeof type === "string") { if ((!rule || rule.merge !== false) && token.type === type) { token.value += value; } else { if (token.type) tokens.push(token); token = {type: type, value: value}; } } else if (type) { if (token.type) tokens.push(token); token = {type: null, value: ""}; for (var i = 0; i < type.length; i++) tokens.push(type[i]); } } if (lastIndex == line.length) break; lastIndex = index; if (matchAttempts++ > MAX_TOKEN_COUNT) { if (matchAttempts > 2 * line.length) { this.reportError("infinite loop with in ace tokenizer", { startState: startState, line: line }); } while (lastIndex < line.length) { if (token.type) tokens.push(token); token = { value: line.substring(lastIndex, lastIndex += 2000), type: "overflow" }; } currentState = "start"; stack = []; break; } } if (token.type) tokens.push(token); if (stack.length > 1) { if (stack[0] !== currentState) stack.unshift("#tmp", currentState); } return { tokens : tokens, state : stack.length ? stack : currentState }; }; this.reportError = config.reportError; }).call(Tokenizer.prototype); exports.Tokenizer = Tokenizer; }); define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); var TextHighlightRules = function() { this.$rules = { "start" : [{ token : "empty_line", regex : '^$' }, { defaultToken : "text" }] }; }; (function() { this.addRules = function(rules, prefix) { if (!prefix) { for (var key in rules) this.$rules[key] = rules[key]; return; } for (var key in rules) { var state = rules[key]; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.next || rule.onMatch) { if (typeof rule.next != "string") { if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) rule.nextState = prefix + rule.nextState; } else { if (rule.next.indexOf(prefix) !== 0) rule.next = prefix + rule.next; } } } this.$rules[prefix + key] = state; } }; this.getRules = function() { return this.$rules; }; this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { var embedRules = typeof HighlightRules == "function" ? new HighlightRules().getRules() : HighlightRules; if (states) { for (var i = 0; i < states.length; i++) states[i] = prefix + states[i]; } else { states = []; for (var key in embedRules) states.push(prefix + key); } this.addRules(embedRules, prefix); if (escapeRules) { var addRules = Array.prototype[append ? "push" : "unshift"]; for (var i = 0; i < states.length; i++) addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules)); } if (!this.$embeds) this.$embeds = []; this.$embeds.push(prefix); }; this.getEmbeds = function() { return this.$embeds; }; var pushState = function(currentState, stack) { if (currentState != "start" || stack.length) stack.unshift(this.nextState, currentState); return this.nextState; }; var popState = function(currentState, stack) { stack.shift(); return stack.shift() || "start"; }; this.normalizeRules = function() { var id = 0; var rules = this.$rules; function processState(key) { var state = rules[key]; state.processed = true; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (!rule.regex && rule.start) { rule.regex = rule.start; if (!rule.next) rule.next = []; rule.next.push({ defaultToken: rule.token }, { token: rule.token + ".end", regex: rule.end || rule.start, next: "pop" }); rule.token = rule.token + ".start"; rule.push = true; } var next = rule.next || rule.push; if (next && Array.isArray(next)) { var stateName = rule.stateName; if (!stateName) { stateName = rule.token; if (typeof stateName != "string") stateName = stateName[0] || ""; if (rules[stateName]) stateName += id++; } rules[stateName] = next; rule.next = stateName; processState(stateName); } else if (next == "pop") { rule.next = popState; } if (rule.push) { rule.nextState = rule.next || rule.push; rule.next = pushState; delete rule.push; } if (rule.rules) { for (var r in rule.rules) { if (rules[r]) { if (rules[r].push) rules[r].push.apply(rules[r], rule.rules[r]); } else { rules[r] = rule.rules[r]; } } } if (rule.include || typeof rule == "string") { var includeName = rule.include || rule; var toInsert = rules[includeName]; } else if (Array.isArray(rule)) toInsert = rule; if (toInsert) { var args = [i, 1].concat(toInsert); if (rule.noEscape) args = args.filter(function(x) {return !x.next;}); state.splice.apply(state, args); i--; toInsert = null; } if (rule.keywordMap) { rule.token = this.createKeywordMapper( rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive ); delete rule.defaultToken; } } } Object.keys(rules).forEach(processState, this); }; this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) { var keywords = Object.create(null); Object.keys(map).forEach(function(className) { var a = map[className]; if (ignoreCase) a = a.toLowerCase(); var list = a.split(splitChar || "|"); for (var i = list.length; i--; ) keywords[list[i]] = className; }); if (Object.getPrototypeOf(keywords)) { keywords.__proto__ = null; } this.$keywordList = Object.keys(keywords); map = null; return ignoreCase ? function(value) {return keywords[value.toLowerCase()] || defaultToken } : function(value) {return keywords[value] || defaultToken }; }; this.getKeywords = function() { return this.$keywords; }; }).call(TextHighlightRules.prototype); exports.TextHighlightRules = TextHighlightRules; }); define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) { "use strict"; var Behaviour = function() { this.$behaviours = {}; }; (function () { this.add = function (name, action, callback) { switch (undefined) { case this.$behaviours: this.$behaviours = {}; case this.$behaviours[name]: this.$behaviours[name] = {}; } this.$behaviours[name][action] = callback; } this.addBehaviours = function (behaviours) { for (var key in behaviours) { for (var action in behaviours[key]) { this.add(key, action, behaviours[key][action]); } } } this.remove = function (name) { if (this.$behaviours && this.$behaviours[name]) { delete this.$behaviours[name]; } } this.inherit = function (mode, filter) { if (typeof mode === "function") { var behaviours = new mode().getBehaviours(filter); } else { var behaviours = mode.getBehaviours(filter); } this.addBehaviours(behaviours); } this.getBehaviours = function (filter) { if (!filter) { return this.$behaviours; } else { var ret = {} for (var i = 0; i < filter.length; i++) { if (this.$behaviours[filter[i]]) { ret[filter[i]] = this.$behaviours[filter[i]]; } } return ret; } } }).call(Behaviour.prototype); exports.Behaviour = Behaviour; }); define("ace/unicode",["require","exports","module"], function(require, exports, module) { "use strict"; exports.packages = {}; addUnicodePackage({ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", Me: "0488048906DE20DD-20E020E2-20E4A670-A672", N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", Z: "002000A01680180E2000-200A20282029202F205F3000", Zs: "002000A01680180E2000-200A202F205F3000", Zl: "2028", Zp: "2029", C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", Cc: "0000-001F007F-009F", Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", Co: "E000-F8FF", Cs: "D800-DFFF", Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" }); function addUnicodePackage (pack) { var codePoint = /\w{4}/g; for (var name in pack) exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); }; }); define("ace/token_iterator",["require","exports","module"], function(require, exports, module) { "use strict"; var TokenIterator = function(session, initialRow, initialColumn) { this.$session = session; this.$row = initialRow; this.$rowTokens = session.getTokens(initialRow); var token = session.getTokenAt(initialRow, initialColumn); this.$tokenIndex = token ? token.index : -1; }; (function() { this.stepBackward = function() { this.$tokenIndex -= 1; while (this.$tokenIndex < 0) { this.$row -= 1; if (this.$row < 0) { this.$row = 0; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = this.$rowTokens.length - 1; } return this.$rowTokens[this.$tokenIndex]; }; this.stepForward = function() { this.$tokenIndex += 1; var rowCount; while (this.$tokenIndex >= this.$rowTokens.length) { this.$row += 1; if (!rowCount) rowCount = this.$session.getLength(); if (this.$row >= rowCount) { this.$row = rowCount - 1; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = 0; } return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentToken = function () { return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentTokenRow = function () { return this.$row; }; this.getCurrentTokenColumn = function() { var rowTokens = this.$rowTokens; var tokenIndex = this.$tokenIndex; var column = rowTokens[tokenIndex].start; if (column !== undefined) return column; column = 0; while (tokenIndex > 0) { tokenIndex -= 1; column += rowTokens[tokenIndex].value.length; } return column; }; }).call(TokenIterator.prototype); exports.TokenIterator = TokenIterator; }); define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var Behaviour = require("./behaviour").Behaviour; var unicode = require("../unicode"); var lang = require("../lib/lang"); var TokenIterator = require("../token_iterator").TokenIterator; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = TextHighlightRules; this.$behaviour = new Behaviour(); }; (function() { this.tokenRe = new RegExp("^[" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]+", "g" ); this.nonTokenRe = new RegExp("^(?:[^" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]|\\s])+", "g" ); this.getTokenizer = function() { if (!this.$tokenizer) { this.$highlightRules = this.$highlightRules || new this.HighlightRules(); this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); } return this.$tokenizer; }; this.lineCommentStart = ""; this.blockComment = ""; this.toggleCommentLines = function(state, session, startRow, endRow) { var doc = session.doc; var ignoreBlankLines = true; var shouldRemove = true; var minIndent = Infinity; var tabSize = session.getTabSize(); var insertAtTabStop = false; if (!this.lineCommentStart) { if (!this.blockComment) return false; var lineCommentStart = this.blockComment.start; var lineCommentEnd = this.blockComment.end; var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); var comment = function(line, i) { if (testRemove(line, i)) return; if (!ignoreBlankLines || /\S/.test(line)) { doc.insertInLine({row: i, column: line.length}, lineCommentEnd); doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var uncomment = function(line, i) { var m; if (m = line.match(regexpEnd)) doc.removeInLine(i, line.length - m[0].length, line.length); if (m = line.match(regexpStart)) doc.removeInLine(i, m[1].length, m[0].length); }; var testRemove = function(line, row) { if (regexpStart.test(line)) return true; var tokens = session.getTokens(row); for (var i = 0; i < tokens.length; i++) { if (tokens[i].type === 'comment') return true; } }; } else { if (Array.isArray(this.lineCommentStart)) { var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); var lineCommentStart = this.lineCommentStart[0]; } else { var regexpStart = lang.escapeRegExp(this.lineCommentStart); var lineCommentStart = this.lineCommentStart; } regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); insertAtTabStop = session.getUseSoftTabs(); var uncomment = function(line, i) { var m = line.match(regexpStart); if (!m) return; var start = m[1].length, end = m[0].length; if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") end--; doc.removeInLine(i, start, end); }; var commentWithSpace = lineCommentStart + " "; var comment = function(line, i) { if (!ignoreBlankLines || /\S/.test(line)) { if (shouldInsertSpace(line, minIndent, minIndent)) doc.insertInLine({row: i, column: minIndent}, commentWithSpace); else doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var testRemove = function(line, i) { return regexpStart.test(line); }; var shouldInsertSpace = function(line, before, after) { var spaces = 0; while (before-- && line.charAt(before) == " ") spaces++; if (spaces % tabSize != 0) return false; var spaces = 0; while (line.charAt(after++) == " ") spaces++; if (tabSize > 2) return spaces % tabSize != tabSize - 1; else return spaces % tabSize == 0; return true; }; } function iter(fun) { for (var i = startRow; i <= endRow; i++) fun(doc.getLine(i), i); } var minEmptyLength = Infinity; iter(function(line, i) { var indent = line.search(/\S/); if (indent !== -1) { if (indent < minIndent) minIndent = indent; if (shouldRemove && !testRemove(line, i)) shouldRemove = false; } else if (minEmptyLength > line.length) { minEmptyLength = line.length; } }); if (minIndent == Infinity) { minIndent = minEmptyLength; ignoreBlankLines = false; shouldRemove = false; } if (insertAtTabStop && minIndent % tabSize != 0) minIndent = Math.floor(minIndent / tabSize) * tabSize; iter(shouldRemove ? uncomment : comment); }; this.toggleBlockComment = function(state, session, range, cursor) { var comment = this.blockComment; if (!comment) return; if (!comment.start && comment[0]) comment = comment[0]; var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); var sel = session.selection; var initialRange = session.selection.toOrientedRange(); var startRow, colDiff; if (token && /comment/.test(token.type)) { var startRange, endRange; while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.start); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; startRange = new Range(row, column, row, column + comment.start.length); break; } token = iterator.stepBackward(); } var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.end); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; endRange = new Range(row, column, row, column + comment.end.length); break; } token = iterator.stepForward(); } if (endRange) session.remove(endRange); if (startRange) { session.remove(startRange); startRow = startRange.start.row; colDiff = -comment.start.length; } } else { colDiff = comment.start.length; startRow = range.start.row; session.insert(range.end, comment.end); session.insert(range.start, comment.start); } if (initialRange.start.row == startRow) initialRange.start.column += colDiff; if (initialRange.end.row == startRow) initialRange.end.column += colDiff; session.selection.fromOrientedRange(initialRange); }; this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.autoOutdent = function(state, doc, row) { }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; this.createWorker = function(session) { return null; }; this.createModeDelegates = function (mapping) { this.$embeds = []; this.$modes = {}; for (var i in mapping) { if (mapping[i]) { this.$embeds.push(i); this.$modes[i] = new mapping[i](); } } var delegations = ['toggleBlockComment', 'toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions']; for (var i = 0; i < delegations.length; i++) { (function(scope) { var functionName = delegations[i]; var defaultHandler = scope[functionName]; scope[delegations[i]] = function() { return this.$delegator(functionName, arguments, defaultHandler); }; } (this)); } }; this.$delegator = function(method, args, defaultHandler) { var state = args[0]; if (typeof state != "string") state = state[0]; for (var i = 0; i < this.$embeds.length; i++) { if (!this.$modes[this.$embeds[i]]) continue; var split = state.split(this.$embeds[i]); if (!split[0] && split[1]) { args[0] = split[1]; var mode = this.$modes[this.$embeds[i]]; return mode[method].apply(mode, args); } } var ret = defaultHandler.apply(this, args); return defaultHandler ? ret : undefined; }; this.transformAction = function(state, action, editor, session, param) { if (this.$behaviour) { var behaviours = this.$behaviour.getBehaviours(); for (var key in behaviours) { if (behaviours[key][action]) { var ret = behaviours[key][action].apply(this, arguments); if (ret) { return ret; } } } } }; this.getKeywords = function(append) { if (!this.completionKeywords) { var rules = this.$tokenizer.rules; var completionKeywords = []; for (var rule in rules) { var ruleItr = rules[rule]; for (var r = 0, l = ruleItr.length; r < l; r++) { if (typeof ruleItr[r].token === "string") { if (/keyword|support|storage/.test(ruleItr[r].token)) completionKeywords.push(ruleItr[r].regex); } else if (typeof ruleItr[r].token === "object") { for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { if (/keyword|support|storage/.test(ruleItr[r].token[a])) { var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; completionKeywords.push(rule.substr(1, rule.length - 2)); } } } } } this.completionKeywords = completionKeywords; } if (!append) return this.$keywordList; return completionKeywords.concat(this.$keywordList || []); }; this.$createKeywordList = function() { if (!this.$highlightRules) this.getTokenizer(); return this.$keywordList = this.$highlightRules.$keywordList || []; }; this.getCompletions = function(state, session, pos, prefix) { var keywords = this.$keywordList || this.$createKeywordList(); return keywords.map(function(word) { return { name: word, value: word, score: 0, meta: "keyword" }; }); }; this.$id = "ace/mode/text"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var BackgroundTokenizer = function(tokenizer, editor) { this.running = false; this.lines = []; this.states = []; this.currentLine = 0; this.tokenizer = tokenizer; var self = this; this.$worker = function() { if (!self.running) { return; } var workerStart = new Date(); var currentLine = self.currentLine; var endLine = -1; var doc = self.doc; while (self.lines[currentLine]) currentLine++; var startLine = currentLine; var len = doc.getLength(); var processedLines = 0; self.running = false; while (currentLine < len) { self.$tokenizeRow(currentLine); endLine = currentLine; do { currentLine++; } while (self.lines[currentLine]); processedLines ++; if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { self.running = setTimeout(self.$worker, 20); break; } } self.currentLine = currentLine; if (startLine <= endLine) self.fireUpdateEvent(startLine, endLine); }; }; (function(){ oop.implement(this, EventEmitter); this.setTokenizer = function(tokenizer) { this.tokenizer = tokenizer; this.lines = []; this.states = []; this.start(0); }; this.setDocument = function(doc) { this.doc = doc; this.lines = []; this.states = []; this.stop(); }; this.fireUpdateEvent = function(firstRow, lastRow) { var data = { first: firstRow, last: lastRow }; this._signal("update", {data: data}); }; this.start = function(startRow) { this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); this.lines.splice(this.currentLine, this.lines.length); this.states.splice(this.currentLine, this.states.length); this.stop(); this.running = setTimeout(this.$worker, 700); }; this.scheduleStart = function() { if (!this.running) this.running = setTimeout(this.$worker, 700); } this.$updateOnChange = function(delta) { var range = delta.range; var startRow = range.start.row; var len = range.end.row - startRow; if (len === 0) { this.lines[startRow] = null; } else if (delta.action == "removeText" || delta.action == "removeLines") { this.lines.splice(startRow, len + 1, null); this.states.splice(startRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(startRow, 1); this.lines.splice.apply(this.lines, args); this.states.splice.apply(this.states, args); } this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); this.stop(); }; this.stop = function() { if (this.running) clearTimeout(this.running); this.running = false; }; this.getTokens = function(row) { return this.lines[row] || this.$tokenizeRow(row); }; this.getState = function(row) { if (this.currentLine == row) this.$tokenizeRow(row); return this.states[row] || "start"; }; this.$tokenizeRow = function(row) { var line = this.doc.getLine(row); var state = this.states[row - 1]; var data = this.tokenizer.getLineTokens(line, state, row); if (this.states[row] + "" !== data.state + "") { this.states[row] = data.state; this.lines[row + 1] = null; if (this.currentLine > row + 1) this.currentLine = row + 1; } else if (this.currentLine == row) { this.currentLine = row + 1; } return this.lines[row] = data.tokens; }; }).call(BackgroundTokenizer.prototype); exports.BackgroundTokenizer = BackgroundTokenizer; }); define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); var oop = require("./lib/oop"); var Range = require("./range").Range; var SearchHighlight = function(regExp, clazz, type) { this.setRegexp(regExp); this.clazz = clazz; this.type = type || "text"; }; (function() { this.MAX_RANGES = 500; this.setRegexp = function(regExp) { if (this.regExp+"" == regExp+"") return; this.regExp = regExp; this.cache = []; }; this.update = function(html, markerLayer, session, config) { if (!this.regExp) return; var start = config.firstRow, end = config.lastRow; for (var i = start; i <= end; i++) { var ranges = this.cache[i]; if (ranges == null) { ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); if (ranges.length > this.MAX_RANGES) ranges = ranges.slice(0, this.MAX_RANGES); ranges = ranges.map(function(match) { return new Range(i, match.offset, i, match.offset + match.length); }); this.cache[i] = ranges.length ? ranges : ""; } for (var j = ranges.length; j --; ) { markerLayer.drawSingleLineMarker( html, ranges[j].toScreenRange(session), this.clazz, config); } } }; }).call(SearchHighlight.prototype); exports.SearchHighlight = SearchHighlight; }); define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; function FoldLine(foldData, folds) { this.foldData = foldData; if (Array.isArray(folds)) { this.folds = folds; } else { folds = this.folds = [ folds ]; } var last = folds[folds.length - 1]; this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column); this.start = this.range.start; this.end = this.range.end; this.folds.forEach(function(fold) { fold.setFoldLine(this); }, this); } (function() { this.shiftRow = function(shift) { this.start.row += shift; this.end.row += shift; this.folds.forEach(function(fold) { fold.start.row += shift; fold.end.row += shift; }); }; this.addFold = function(fold) { if (fold.sameRow) { if (fold.start.row < this.startRow || fold.endRow > this.endRow) { throw new Error("Can't add a fold to this FoldLine as it has no connection"); } this.folds.push(fold); this.folds.sort(function(a, b) { return -a.range.compareEnd(b.start.row, b.start.column); }); if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { this.start.row = fold.start.row; this.start.column = fold.start.column; } } else if (fold.start.row == this.end.row) { this.folds.push(fold); this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (fold.end.row == this.start.row) { this.folds.unshift(fold); this.start.row = fold.start.row; this.start.column = fold.start.column; } else { throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); } fold.foldLine = this; }; this.containsRow = function(row) { return row >= this.start.row && row <= this.end.row; }; this.walk = function(callback, endRow, endColumn) { var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true; if (endRow == null) { endRow = this.end.row; endColumn = this.end.column; } for (var i = 0; i < folds.length; i++) { fold = folds[i]; cmp = fold.range.compareStart(endRow, endColumn); if (cmp == -1) { callback(null, endRow, endColumn, lastEnd, isNewRow); return; } stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); if (stop || cmp === 0) { return; } isNewRow = !fold.sameRow; lastEnd = fold.end.column; } callback(null, endRow, endColumn, lastEnd, isNewRow); }; this.getNextFoldTo = function(row, column) { var fold, cmp; for (var i = 0; i < this.folds.length; i++) { fold = this.folds[i]; cmp = fold.range.compareEnd(row, column); if (cmp == -1) { return { fold: fold, kind: "after" }; } else if (cmp === 0) { return { fold: fold, kind: "inside" }; } } return null; }; this.addRemoveChars = function(row, column, len) { var ret = this.getNextFoldTo(row, column), fold, folds; if (ret) { fold = ret.fold; if (ret.kind == "inside" && fold.start.column != column && fold.start.row != row) { window.console && window.console.log(row, column, fold); } else if (fold.start.row == row) { folds = this.folds; var i = folds.indexOf(fold); if (i === 0) { this.start.column += len; } for (i; i < folds.length; i++) { fold = folds[i]; fold.start.column += len; if (!fold.sameRow) { return; } fold.end.column += len; } this.end.column += len; } } }; this.split = function(row, column) { var pos = this.getNextFoldTo(row, column); if (!pos || pos.kind == "inside") return null; var fold = pos.fold; var folds = this.folds; var foldData = this.foldData; var i = folds.indexOf(fold); var foldBefore = folds[i - 1]; this.end.row = foldBefore.end.row; this.end.column = foldBefore.end.column; folds = folds.splice(i, folds.length - i); var newFoldLine = new FoldLine(foldData, folds); foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); return newFoldLine; }; this.merge = function(foldLineNext) { var folds = foldLineNext.folds; for (var i = 0; i < folds.length; i++) { this.addFold(folds[i]); } var foldData = this.foldData; foldData.splice(foldData.indexOf(foldLineNext), 1); }; this.toString = function() { var ret = [this.range.toString() + ": [" ]; this.folds.forEach(function(fold) { ret.push(" " + fold.toString()); }); ret.push("]"); return ret.join("\n"); }; this.idxToPosition = function(idx) { var lastFoldEndColumn = 0; for (var i = 0; i < this.folds.length; i++) { var fold = this.folds[i]; idx -= fold.start.column - lastFoldEndColumn; if (idx < 0) { return { row: fold.start.row, column: fold.start.column + idx }; } idx -= fold.placeholder.length; if (idx < 0) { return fold.start; } lastFoldEndColumn = fold.end.column; } return { row: this.end.row, column: this.end.column + idx }; }; }).call(FoldLine.prototype); exports.FoldLine = FoldLine; }); define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var comparePoints = Range.comparePoints; var RangeList = function() { this.ranges = []; }; (function() { this.comparePoints = comparePoints; this.pointIndex = function(pos, excludeEdges, startIndex) { var list = this.ranges; for (var i = startIndex || 0; i < list.length; i++) { var range = list[i]; var cmpEnd = comparePoints(pos, range.end); if (cmpEnd > 0) continue; var cmpStart = comparePoints(pos, range.start); if (cmpEnd === 0) return excludeEdges && cmpStart !== 0 ? -i-2 : i; if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) return i; return -i-1; } return -i - 1; }; this.add = function(range) { var excludeEdges = !range.isEmpty(); var startIndex = this.pointIndex(range.start, excludeEdges); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; else endIndex++; return this.ranges.splice(startIndex, endIndex - startIndex, range); }; this.addList = function(list) { var removed = []; for (var i = list.length; i--; ) { removed.push.call(removed, this.add(list[i])); } return removed; }; this.substractPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges.splice(i, 1); }; this.merge = function() { var removed = []; var list = this.ranges; list = list.sort(function(a, b) { return comparePoints(a.start, b.start); }); var next = list[0], range; for (var i = 1; i < list.length; i++) { range = next; next = list[i]; var cmp = comparePoints(range.end, next.start); if (cmp < 0) continue; if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) continue; if (comparePoints(range.end, next.end) < 0) { range.end.row = next.end.row; range.end.column = next.end.column; } list.splice(i, 1); removed.push(next); next = range; i--; } this.ranges = list; return removed; }; this.contains = function(row, column) { return this.pointIndex({row: row, column: column}) >= 0; }; this.containsPoint = function(pos) { return this.pointIndex(pos) >= 0; }; this.rangeAtPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges[i]; }; this.clipRows = function(startRow, endRow) { var list = this.ranges; if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) return []; var startIndex = this.pointIndex({row: startRow, column: 0}); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; var clipped = []; for (var i = startIndex; i < endIndex; i++) { clipped.push(list[i]); } return clipped; }; this.removeAll = function() { return this.ranges.splice(0, this.ranges.length); }; this.attach = function(session) { if (this.session) this.detach(); this.session = session; this.onChange = this.$onChange.bind(this); this.session.on('change', this.onChange); }; this.detach = function() { if (!this.session) return; this.session.removeListener('change', this.onChange); this.session = null; }; this.$onChange = function(e) { var changeRange = e.data.range; if (e.data.action[0] == "i"){ var start = changeRange.start; var end = changeRange.end; } else { var end = changeRange.start; var start = changeRange.end; } var startRow = start.row; var endRow = end.row; var lineDif = endRow - startRow; var colDiff = -start.column + end.column; var ranges = this.ranges; for (var i = 0, n = ranges.length; i < n; i++) { var r = ranges[i]; if (r.end.row < startRow) continue; if (r.start.row > startRow) break; if (r.start.row == startRow && r.start.column >= start.column ) { if (r.start.column == start.column && this.$insertRight) { } else { r.start.column += colDiff; r.start.row += lineDif; } } if (r.end.row == startRow && r.end.column >= start.column) { if (r.end.column == start.column && this.$insertRight) { continue; } if (r.end.column == start.column && colDiff > 0 && i < n - 1) { if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) r.end.column -= colDiff; } r.end.column += colDiff; r.end.row += lineDif; } } if (lineDif != 0 && i < n) { for (; i < n; i++) { var r = ranges[i]; r.start.row += lineDif; r.end.row += lineDif; } } }; }).call(RangeList.prototype); exports.RangeList = RangeList; }); define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var RangeList = require("../range_list").RangeList; var oop = require("../lib/oop") var Fold = exports.Fold = function(range, placeholder) { this.foldLine = null; this.placeholder = placeholder; this.range = range; this.start = range.start; this.end = range.end; this.sameRow = range.start.row == range.end.row; this.subFolds = this.ranges = []; }; oop.inherits(Fold, RangeList); (function() { this.toString = function() { return '"' + this.placeholder + '" ' + this.range.toString(); }; this.setFoldLine = function(foldLine) { this.foldLine = foldLine; this.subFolds.forEach(function(fold) { fold.setFoldLine(foldLine); }); }; this.clone = function() { var range = this.range.clone(); var fold = new Fold(range, this.placeholder); this.subFolds.forEach(function(subFold) { fold.subFolds.push(subFold.clone()); }); fold.collapseChildren = this.collapseChildren; return fold; }; this.addSubFold = function(fold) { if (this.range.isEqual(fold)) return; if (!this.range.containsRange(fold)) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); consumeRange(fold, this.start); var row = fold.start.row, column = fold.start.column; for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { cmp = this.subFolds[i].range.compare(row, column); if (cmp != 1) break; } var afterStart = this.subFolds[i]; if (cmp == 0) return afterStart.addSubFold(fold); var row = fold.range.end.row, column = fold.range.end.column; for (var j = i, cmp = -1; j < this.subFolds.length; j++) { cmp = this.subFolds[j].range.compare(row, column); if (cmp != 1) break; } var afterEnd = this.subFolds[j]; if (cmp == 0) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); var consumedFolds = this.subFolds.splice(i, j - i, fold); fold.setFoldLine(this.foldLine); return fold; }; this.restoreRange = function(range) { return restoreRange(range, this.start); }; }).call(Fold.prototype); function consumePoint(point, anchor) { point.row -= anchor.row; if (point.row == 0) point.column -= anchor.column; } function consumeRange(range, anchor) { consumePoint(range.start, anchor); consumePoint(range.end, anchor); } function restorePoint(point, anchor) { if (point.row == 0) point.column += anchor.column; point.row += anchor.row; } function restoreRange(range, anchor) { restorePoint(range.start, anchor); restorePoint(range.end, anchor); } }); define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var FoldLine = require("./fold_line").FoldLine; var Fold = require("./fold").Fold; var TokenIterator = require("../token_iterator").TokenIterator; function Folding() { this.getFoldAt = function(row, column, side) { var foldLine = this.getFoldLine(row); if (!foldLine) return null; var folds = foldLine.folds; for (var i = 0; i < folds.length; i++) { var fold = folds[i]; if (fold.range.contains(row, column)) { if (side == 1 && fold.range.isEnd(row, column)) { continue; } else if (side == -1 && fold.range.isStart(row, column)) { continue; } return fold; } } }; this.getFoldsInRange = function(range) { var start = range.start; var end = range.end; var foldLines = this.$foldData; var foundFolds = []; start.column += 1; end.column -= 1; for (var i = 0; i < foldLines.length; i++) { var cmp = foldLines[i].range.compareRange(range); if (cmp == 2) { continue; } else if (cmp == -2) { break; } var folds = foldLines[i].folds; for (var j = 0; j < folds.length; j++) { var fold = folds[j]; cmp = fold.range.compareRange(range); if (cmp == -2) { break; } else if (cmp == 2) { continue; } else if (cmp == 42) { break; } foundFolds.push(fold); } } start.column -= 1; end.column += 1; return foundFolds; }; this.getFoldsInRangeList = function(ranges) { if (Array.isArray(ranges)) { var folds = []; ranges.forEach(function(range) { folds = folds.concat(this.getFoldsInRange(range)); }, this); } else { var folds = this.getFoldsInRange(ranges); } return folds; } this.getAllFolds = function() { var folds = []; var foldLines = this.$foldData; for (var i = 0; i < foldLines.length; i++) for (var j = 0; j < foldLines[i].folds.length; j++) folds.push(foldLines[i].folds[j]); return folds; }; this.getFoldStringAt = function(row, column, trim, foldLine) { foldLine = foldLine || this.getFoldLine(row); if (!foldLine) return null; var lastFold = { end: { column: 0 } }; var str, fold; for (var i = 0; i < foldLine.folds.length; i++) { fold = foldLine.folds[i]; var cmp = fold.range.compareEnd(row, column); if (cmp == -1) { str = this .getLine(fold.start.row) .substring(lastFold.end.column, fold.start.column); break; } else if (cmp === 0) { return null; } lastFold = fold; } if (!str) str = this.getLine(fold.start.row).substring(lastFold.end.column); if (trim == -1) return str.substring(0, column - lastFold.end.column); else if (trim == 1) return str.substring(column - lastFold.end.column); else return str; }; this.getFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { return foldLine; } else if (foldLine.end.row > docRow) { return null; } } return null; }; this.getNextFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.end.row >= docRow) { return foldLine; } } return null; }; this.getFoldedRowCount = function(first, last) { var foldData = this.$foldData, rowCount = last-first+1; for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row; if (end >= last) { if(start < last) { if(start >= first) rowCount -= last-start; else rowCount = 0;//in one fold } break; } else if(end >= first){ if (start >= first) //fold inside range rowCount -= end-start; else rowCount -= end-first+1; } } return rowCount; }; this.$addFoldLine = function(foldLine) { this.$foldData.push(foldLine); this.$foldData.sort(function(a, b) { return a.start.row - b.start.row; }); return foldLine; }; this.addFold = function(placeholder, range) { var foldData = this.$foldData; var added = false; var fold; if (placeholder instanceof Fold) fold = placeholder; else { fold = new Fold(range, placeholder); fold.collapseChildren = range.collapseChildren; } this.$clipRangeToDocument(fold.range); var startRow = fold.start.row; var startColumn = fold.start.column; var endRow = fold.end.row; var endColumn = fold.end.column; if (!(startRow < endRow || startRow == endRow && startColumn <= endColumn - 2)) throw new Error("The range has to be at least 2 characters width"); var startFold = this.getFoldAt(startRow, startColumn, 1); var endFold = this.getFoldAt(endRow, endColumn, -1); if (startFold && endFold == startFold) return startFold.addSubFold(fold); if (startFold && !startFold.range.isStart(startRow, startColumn)) this.removeFold(startFold); if (endFold && !endFold.range.isEnd(endRow, endColumn)) this.removeFold(endFold); var folds = this.getFoldsInRange(fold.range); if (folds.length > 0) { this.removeFolds(folds); folds.forEach(function(subFold) { fold.addSubFold(subFold); }); } for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i]; if (endRow == foldLine.start.row) { foldLine.addFold(fold); added = true; break; } else if (startRow == foldLine.end.row) { foldLine.addFold(fold); added = true; if (!fold.sameRow) { var foldLineNext = foldData[i + 1]; if (foldLineNext && foldLineNext.start.row == endRow) { foldLine.merge(foldLineNext); break; } } break; } else if (endRow <= foldLine.start.row) { break; } } if (!added) foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); if (this.$useWrapMode) this.$updateWrapData(foldLine.start.row, foldLine.start.row); else this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); this.$modified = true; this._emit("changeFold", { data: fold, action: "add" }); return fold; }; this.addFolds = function(folds) { folds.forEach(function(fold) { this.addFold(fold); }, this); }; this.removeFold = function(fold) { var foldLine = fold.foldLine; var startRow = foldLine.start.row; var endRow = foldLine.end.row; var foldLines = this.$foldData; var folds = foldLine.folds; if (folds.length == 1) { foldLines.splice(foldLines.indexOf(foldLine), 1); } else if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { folds.pop(); foldLine.end.row = folds[folds.length - 1].end.row; foldLine.end.column = folds[folds.length - 1].end.column; } else if (foldLine.range.isStart(fold.start.row, fold.start.column)) { folds.shift(); foldLine.start.row = folds[0].start.row; foldLine.start.column = folds[0].start.column; } else if (fold.sameRow) { folds.splice(folds.indexOf(fold), 1); } else { var newFoldLine = foldLine.split(fold.start.row, fold.start.column); folds = newFoldLine.folds; folds.shift(); newFoldLine.start.row = folds[0].start.row; newFoldLine.start.column = folds[0].start.column; } if (!this.$updating) { if (this.$useWrapMode) this.$updateWrapData(startRow, endRow); else this.$updateRowLengthCache(startRow, endRow); } this.$modified = true; this._emit("changeFold", { data: fold, action: "remove" }); }; this.removeFolds = function(folds) { var cloneFolds = []; for (var i = 0; i < folds.length; i++) { cloneFolds.push(folds[i]); } cloneFolds.forEach(function(fold) { this.removeFold(fold); }, this); this.$modified = true; }; this.expandFold = function(fold) { this.removeFold(fold); fold.subFolds.forEach(function(subFold) { fold.restoreRange(subFold); this.addFold(subFold); }, this); if (fold.collapseChildren > 0) { this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1); } fold.subFolds = []; }; this.expandFolds = function(folds) { folds.forEach(function(fold) { this.expandFold(fold); }, this); }; this.unfold = function(location, expandInner) { var range, folds; if (location == null) { range = new Range(0, 0, this.getLength(), 0); expandInner = true; } else if (typeof location == "number") range = new Range(location, 0, location, this.getLine(location).length); else if ("row" in location) range = Range.fromPoints(location, location); else range = location; folds = this.getFoldsInRangeList(range); if (expandInner) { this.removeFolds(folds); } else { var subFolds = folds; while (subFolds.length) { this.expandFolds(subFolds); subFolds = this.getFoldsInRangeList(range); } } if (folds.length) return folds; }; this.isRowFolded = function(docRow, startFoldRow) { return !!this.getFoldLine(docRow, startFoldRow); }; this.getRowFoldEnd = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.end.row : docRow; }; this.getRowFoldStart = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.start.row : docRow; }; this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { if (startRow == null) startRow = foldLine.start.row; if (startColumn == null) startColumn = 0; if (endRow == null) endRow = foldLine.end.row; if (endColumn == null) endColumn = this.getLine(endRow).length; var doc = this.doc; var textLine = ""; foldLine.walk(function(placeholder, row, column, lastColumn) { if (row < startRow) return; if (row == startRow) { if (column < startColumn) return; lastColumn = Math.max(startColumn, lastColumn); } if (placeholder != null) { textLine += placeholder; } else { textLine += doc.getLine(row).substring(lastColumn, column); } }, endRow, endColumn); return textLine; }; this.getDisplayLine = function(row, endColumn, startRow, startColumn) { var foldLine = this.getFoldLine(row); if (!foldLine) { var line; line = this.doc.getLine(row); return line.substring(startColumn || 0, endColumn || line.length); } else { return this.getFoldDisplayLine( foldLine, row, endColumn, startRow, startColumn); } }; this.$cloneFoldData = function() { var fd = []; fd = this.$foldData.map(function(foldLine) { var folds = foldLine.folds.map(function(fold) { return fold.clone(); }); return new FoldLine(fd, folds); }); return fd; }; this.toggleFold = function(tryToUnfold) { var selection = this.selection; var range = selection.getRange(); var fold; var bracketPos; if (range.isEmpty()) { var cursor = range.start; fold = this.getFoldAt(cursor.row, cursor.column); if (fold) { this.expandFold(fold); return; } else if (bracketPos = this.findMatchingBracket(cursor)) { if (range.comparePoint(bracketPos) == 1) { range.end = bracketPos; } else { range.start = bracketPos; range.start.column++; range.end.column--; } } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) { if (range.comparePoint(bracketPos) == 1) range.end = bracketPos; else range.start = bracketPos; range.start.column++; } else { range = this.getCommentFoldRange(cursor.row, cursor.column) || range; } } else { var folds = this.getFoldsInRange(range); if (tryToUnfold && folds.length) { this.expandFolds(folds); return; } else if (folds.length == 1 ) { fold = folds[0]; } } if (!fold) fold = this.getFoldAt(range.start.row, range.start.column); if (fold && fold.range.toString() == range.toString()) { this.expandFold(fold); return; } var placeholder = "..."; if (!range.isMultiLine()) { placeholder = this.getTextRange(range); if(placeholder.length < 4) return; placeholder = placeholder.trim().substring(0, 2) + ".."; } this.addFold(placeholder, range); }; this.getCommentFoldRange = function(row, column, dir) { var iterator = new TokenIterator(this, row, column); var token = iterator.getCurrentToken(); if (token && /^comment|string/.test(token.type)) { var range = new Range(); var re = new RegExp(token.type.replace(/\..*/, "\\.")); if (dir != 1) { do { token = iterator.stepBackward(); } while(token && re.test(token.type)); iterator.stepForward(); } range.start.row = iterator.getCurrentTokenRow(); range.start.column = iterator.getCurrentTokenColumn() + 2; iterator = new TokenIterator(this, row, column); if (dir != -1) { do { token = iterator.stepForward(); } while(token && re.test(token.type)); token = iterator.stepBackward(); } else token = iterator.getCurrentToken(); range.end.row = iterator.getCurrentTokenRow(); range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2; return range; } }; this.foldAll = function(startRow, endRow, depth) { if (depth == undefined) depth = 100000; // JSON.stringify doesn't hanle Infinity var foldWidgets = this.foldWidgets; if (!foldWidgets) return; // mode doesn't support folding endRow = endRow || this.getLength(); startRow = startRow || 0; for (var row = startRow; row < endRow; row++) { if (foldWidgets[row] == null) foldWidgets[row] = this.getFoldWidget(row); if (foldWidgets[row] != "start") continue; var range = this.getFoldWidgetRange(row); if (range && range.isMultiLine() && range.end.row <= endRow && range.start.row >= startRow ) { row = range.end.row; try { var fold = this.addFold("...", range); if (fold) fold.collapseChildren = depth; } catch(e) {} } } }; this.$foldStyles = { "manual": 1, "markbegin": 1, "markbeginend": 1 }; this.$foldStyle = "markbegin"; this.setFoldStyle = function(style) { if (!this.$foldStyles[style]) throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); if (this.$foldStyle == style) return; this.$foldStyle = style; if (style == "manual") this.unfold(); var mode = this.$foldMode; this.$setFolding(null); this.$setFolding(mode); }; this.$setFolding = function(foldMode) { if (this.$foldMode == foldMode) return; this.$foldMode = foldMode; this.off('change', this.$updateFoldWidgets); this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); this._emit("changeAnnotation"); if (!foldMode || this.$foldStyle == "manual") { this.foldWidgets = null; return; } this.foldWidgets = []; this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); this.on('change', this.$updateFoldWidgets); this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); }; this.getParentFoldRangeData = function (row, ignoreCurrent) { var fw = this.foldWidgets; if (!fw || (ignoreCurrent && fw[row])) return {}; var i = row - 1, firstRange; while (i >= 0) { var c = fw[i]; if (c == null) c = fw[i] = this.getFoldWidget(i); if (c == "start") { var range = this.getFoldWidgetRange(i); if (!firstRange) firstRange = range; if (range && range.end.row >= row) break; } i--; } return { range: i !== -1 && range, firstRange: firstRange }; } this.onFoldWidgetClick = function(row, e) { e = e.domEvent; var options = { children: e.shiftKey, all: e.ctrlKey || e.metaKey, siblings: e.altKey }; var range = this.$toggleFoldWidget(row, options); if (!range) { var el = (e.target || e.srcElement) if (el && /ace_fold-widget/.test(el.className)) el.className += " ace_invalid"; } }; this.$toggleFoldWidget = function(row, options) { if (!this.getFoldWidget) return; var type = this.getFoldWidget(row); var line = this.getLine(row); var dir = type === "end" ? -1 : 1; var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); if (fold) { if (options.children || options.all) this.removeFold(fold); else this.expandFold(fold); return; } var range = this.getFoldWidgetRange(row, true); if (range && !range.isMultiLine()) { fold = this.getFoldAt(range.start.row, range.start.column, 1); if (fold && range.isEqual(fold.range)) { this.removeFold(fold); return; } } if (options.siblings) { var data = this.getParentFoldRangeData(row); if (data.range) { var startRow = data.range.start.row + 1; var endRow = data.range.end.row; } this.foldAll(startRow, endRow, options.all ? 10000 : 0); } else if (options.children) { endRow = range ? range.end.row : this.getLength(); this.foldAll(row + 1, endRow, options.all ? 10000 : 0); } else if (range) { if (options.all) range.collapseChildren = 10000; this.addFold("...", range); } return range; }; this.toggleFoldWidget = function(toggleParent) { var row = this.selection.getCursor().row; row = this.getRowFoldStart(row); var range = this.$toggleFoldWidget(row, {}); if (range) return; var data = this.getParentFoldRangeData(row, true); range = data.range || data.firstRange; if (range) { row = range.start.row; var fold = this.getFoldAt(row, this.getLine(row).length, 1); if (fold) { this.removeFold(fold); } else { this.addFold("...", range); } } }; this.updateFoldWidgets = function(e) { var delta = e.data; var range = delta.range; var firstRow = range.start.row; var len = range.end.row - firstRow; if (len === 0) { this.foldWidgets[firstRow] = null; } else if (delta.action == "removeText" || delta.action == "removeLines") { this.foldWidgets.splice(firstRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(firstRow, 1); this.foldWidgets.splice.apply(this.foldWidgets, args); } }; this.tokenizerUpdateFoldWidgets = function(e) { var rows = e.data; if (rows.first != rows.last) { if (this.foldWidgets.length > rows.first) this.foldWidgets.splice(rows.first, this.foldWidgets.length); } } } exports.Folding = Folding; }); define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var Range = require("../range").Range; function BracketMatch() { this.findMatchingBracket = function(position, chr) { if (position.column == 0) return null; var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1); if (charBeforeCursor == "") return null; var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); if (!match) return null; if (match[1]) return this.$findClosingBracket(match[1], position); else return this.$findOpeningBracket(match[2], position); }; this.getBracketRange = function(pos) { var line = this.getLine(pos.row); var before = true, range; var chr = line.charAt(pos.column-1); var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); if (!match) { chr = line.charAt(pos.column); pos = {row: pos.row, column: pos.column + 1}; match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); before = false; } if (!match) return null; if (match[1]) { var bracketPos = this.$findClosingBracket(match[1], pos); if (!bracketPos) return null; range = Range.fromPoints(pos, bracketPos); if (!before) { range.end.column++; range.start.column--; } range.cursor = range.end; } else { var bracketPos = this.$findOpeningBracket(match[2], pos); if (!bracketPos) return null; range = Range.fromPoints(bracketPos, pos); if (!before) { range.start.column++; range.end.column--; } range.cursor = range.start; } return range; }; this.$brackets = { ")": "(", "(": ")", "]": "[", "[": "]", "{": "}", "}": "{" }; this.$findOpeningBracket = function(bracket, position, typeRe) { var openBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("rparen", ".paren") .replace(/\b(?:end|start|begin)\b/, "") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; var value = token.value; while (true) { while (valueIndex >= 0) { var chr = value.charAt(valueIndex); if (chr == openBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex -= 1; } do { token = iterator.stepBackward(); } while (token && !typeRe.test(token.type)); if (token == null) break; value = token.value; valueIndex = value.length - 1; } return null; }; this.$findClosingBracket = function(bracket, position, typeRe) { var closingBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("lparen", ".paren") .replace(/\b(?:end|start|begin)\b/, "") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn(); while (true) { var value = token.value; var valueLength = value.length; while (valueIndex < valueLength) { var chr = value.charAt(valueIndex); if (chr == closingBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex += 1; } do { token = iterator.stepForward(); } while (token && !typeRe.test(token.type)); if (token == null) break; valueIndex = 0; } return null; }; } exports.BracketMatch = BracketMatch; }); define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var config = require("./config"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Selection = require("./selection").Selection; var TextMode = require("./mode/text").Mode; var Range = require("./range").Range; var Document = require("./document").Document; var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer; var SearchHighlight = require("./search_highlight").SearchHighlight; var EditSession = function(text, mode) { this.$breakpoints = []; this.$decorations = []; this.$frontMarkers = {}; this.$backMarkers = {}; this.$markerId = 1; this.$undoSelect = true; this.$foldData = []; this.$foldData.toString = function() { return this.join("\n"); } this.on("changeFold", this.onChangeFold.bind(this)); this.$onChange = this.onChange.bind(this); if (typeof text != "object" || !text.getLine) text = new Document(text); this.setDocument(text); this.selection = new Selection(this); config.resetOptions(this); this.setMode(mode); config._signal("session", this); }; (function() { oop.implement(this, EventEmitter); this.setDocument = function(doc) { if (this.doc) this.doc.removeListener("change", this.$onChange); this.doc = doc; doc.on("change", this.$onChange); if (this.bgTokenizer) this.bgTokenizer.setDocument(this.getDocument()); this.resetCaches(); }; this.getDocument = function() { return this.doc; }; this.$resetRowCache = function(docRow) { if (!docRow) { this.$docRowCache = []; this.$screenRowCache = []; return; } var l = this.$docRowCache.length; var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; if (l > i) { this.$docRowCache.splice(i, l); this.$screenRowCache.splice(i, l); } }; this.$getRowCacheIndex = function(cacheArray, val) { var low = 0; var hi = cacheArray.length - 1; while (low <= hi) { var mid = (low + hi) >> 1; var c = cacheArray[mid]; if (val > c) low = mid + 1; else if (val < c) hi = mid - 1; else return mid; } return low -1; }; this.resetCaches = function() { this.$modified = true; this.$wrapData = []; this.$rowLengthCache = []; this.$resetRowCache(0); if (this.bgTokenizer) this.bgTokenizer.start(0); }; this.onChangeFold = function(e) { var fold = e.data; this.$resetRowCache(fold.start.row); }; this.onChange = function(e) { var delta = e.data; this.$modified = true; this.$resetRowCache(delta.range.start.row); var removedFolds = this.$updateInternalDataOnChange(e); if (!this.$fromUndo && this.$undoManager && !delta.ignore) { this.$deltasDoc.push(delta); if (removedFolds && removedFolds.length != 0) { this.$deltasFold.push({ action: "removeFolds", folds: removedFolds }); } this.$informUndoManager.schedule(); } this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta); this._signal("change", e); }; this.setValue = function(text) { this.doc.setValue(text); this.selection.moveTo(0, 0); this.$resetRowCache(0); this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; this.setUndoManager(this.$undoManager); this.getUndoManager().reset(); }; this.getValue = this.toString = function() { return this.doc.getValue(); }; this.getSelection = function() { return this.selection; }; this.getState = function(row) { return this.bgTokenizer.getState(row); }; this.getTokens = function(row) { return this.bgTokenizer.getTokens(row); }; this.getTokenAt = function(row, column) { var tokens = this.bgTokenizer.getTokens(row); var token, c = 0; if (column == null) { i = tokens.length - 1; c = this.getLine(row).length; } else { for (var i = 0; i < tokens.length; i++) { c += tokens[i].value.length; if (c >= column) break; } } token = tokens[i]; if (!token) return null; token.index = i; token.start = c - token.value.length; return token; }; this.setUndoManager = function(undoManager) { this.$undoManager = undoManager; this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; if (this.$informUndoManager) this.$informUndoManager.cancel(); if (undoManager) { var self = this; this.$syncInformUndoManager = function() { self.$informUndoManager.cancel(); if (self.$deltasFold.length) { self.$deltas.push({ group: "fold", deltas: self.$deltasFold }); self.$deltasFold = []; } if (self.$deltasDoc.length) { self.$deltas.push({ group: "doc", deltas: self.$deltasDoc }); self.$deltasDoc = []; } if (self.$deltas.length > 0) { undoManager.execute({ action: "aceupdate", args: [self.$deltas, self], merge: self.mergeUndoDeltas }); } self.mergeUndoDeltas = false; self.$deltas = []; }; this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); } }; this.markUndoGroup = function() { if (this.$syncInformUndoManager) this.$syncInformUndoManager(); }; this.$defaultUndoManager = { undo: function() {}, redo: function() {}, reset: function() {} }; this.getUndoManager = function() { return this.$undoManager || this.$defaultUndoManager; }; this.getTabString = function() { if (this.getUseSoftTabs()) { return lang.stringRepeat(" ", this.getTabSize()); } else { return "\t"; } }; this.setUseSoftTabs = function(val) { this.setOption("useSoftTabs", val); }; this.getUseSoftTabs = function() { return this.$useSoftTabs && !this.$mode.$indentWithTabs; }; this.setTabSize = function(tabSize) { this.setOption("tabSize", tabSize); }; this.getTabSize = function() { return this.$tabSize; }; this.isTabStop = function(position) { return this.$useSoftTabs && (position.column % this.$tabSize === 0); }; this.$overwrite = false; this.setOverwrite = function(overwrite) { this.setOption("overwrite", overwrite); }; this.getOverwrite = function() { return this.$overwrite; }; this.toggleOverwrite = function() { this.setOverwrite(!this.$overwrite); }; this.addGutterDecoration = function(row, className) { if (!this.$decorations[row]) this.$decorations[row] = ""; this.$decorations[row] += " " + className; this._signal("changeBreakpoint", {}); }; this.removeGutterDecoration = function(row, className) { this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); this._signal("changeBreakpoint", {}); }; this.getBreakpoints = function() { return this.$breakpoints; }; this.setBreakpoints = function(rows) { this.$breakpoints = []; for (var i=0; i 0) inToken = !!line.charAt(column - 1).match(this.tokenRe); if (!inToken) inToken = !!line.charAt(column).match(this.tokenRe); if (inToken) var re = this.tokenRe; else if (/^\s+$/.test(line.slice(column-1, column+1))) var re = /\s/; else var re = this.nonTokenRe; var start = column; if (start > 0) { do { start--; } while (start >= 0 && line.charAt(start).match(re)); start++; } var end = column; while (end < line.length && line.charAt(end).match(re)) { end++; } return new Range(row, start, row, end); }; this.getAWordRange = function(row, column) { var wordRange = this.getWordRange(row, column); var line = this.getLine(wordRange.end.row); while (line.charAt(wordRange.end.column).match(/[ \t]/)) { wordRange.end.column += 1; } return wordRange; }; this.setNewLineMode = function(newLineMode) { this.doc.setNewLineMode(newLineMode); }; this.getNewLineMode = function() { return this.doc.getNewLineMode(); }; this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); }; this.getUseWorker = function() { return this.$useWorker; }; this.onReloadTokenizer = function(e) { var rows = e.data; this.bgTokenizer.start(rows.first); this._signal("tokenizerUpdate", e); }; this.$modes = {}; this.$mode = null; this.$modeId = null; this.setMode = function(mode, cb) { if (mode && typeof mode === "object") { if (mode.getTokenizer) return this.$onChangeMode(mode); var options = mode; var path = options.path; } else { path = mode || "ace/mode/text"; } if (!this.$modes["ace/mode/text"]) this.$modes["ace/mode/text"] = new TextMode(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); cb && cb(); return; } this.$modeId = path; config.loadModule(["mode", path], function(m) { if (this.$modeId !== path) return cb && cb(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); } else if (m && m.Mode) { m = new m.Mode(options); if (!options) { this.$modes[path] = m; m.$id = path; } this.$onChangeMode(m); } cb && cb(); }.bind(this)); if (!this.$mode) this.$onChangeMode(this.$modes["ace/mode/text"], true); }; this.$onChangeMode = function(mode, $isPlaceholder) { if (!$isPlaceholder) this.$modeId = mode.$id; if (this.$mode === mode) return; this.$mode = mode; this.$stopWorker(); if (this.$useWorker) this.$startWorker(); var tokenizer = mode.getTokenizer(); if(tokenizer.addEventListener !== undefined) { var onReloadTokenizer = this.onReloadTokenizer.bind(this); tokenizer.addEventListener("update", onReloadTokenizer); } if (!this.bgTokenizer) { this.bgTokenizer = new BackgroundTokenizer(tokenizer); var _self = this; this.bgTokenizer.addEventListener("update", function(e) { _self._signal("tokenizerUpdate", e); }); } else { this.bgTokenizer.setTokenizer(tokenizer); } this.bgTokenizer.setDocument(this.getDocument()); this.tokenRe = mode.tokenRe; this.nonTokenRe = mode.nonTokenRe; if (!$isPlaceholder) { if (mode.attachToSession) mode.attachToSession(this); this.$options.wrapMethod.set.call(this, this.$wrapMethod); this.$setFolding(mode.foldingRules); this.bgTokenizer.start(0); this._emit("changeMode"); } }; this.$stopWorker = function() { if (this.$worker) { this.$worker.terminate(); this.$worker = null; } }; this.$startWorker = function() { try { this.$worker = this.$mode.createWorker(this); } catch (e) { config.warn("Could not load worker", e); this.$worker = null; } }; this.getMode = function() { return this.$mode; }; this.$scrollTop = 0; this.setScrollTop = function(scrollTop) { if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return; this.$scrollTop = scrollTop; this._signal("changeScrollTop", scrollTop); }; this.getScrollTop = function() { return this.$scrollTop; }; this.$scrollLeft = 0; this.setScrollLeft = function(scrollLeft) { if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return; this.$scrollLeft = scrollLeft; this._signal("changeScrollLeft", scrollLeft); }; this.getScrollLeft = function() { return this.$scrollLeft; }; this.getScreenWidth = function() { this.$computeWidth(); if (this.lineWidgets) return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); return this.screenWidth; }; this.getLineWidgetMaxWidth = function() { if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth; var width = 0; this.lineWidgets.forEach(function(w) { if (w && w.screenWidth > width) width = w.screenWidth; }); return this.lineWidgetWidth = width; }; this.$computeWidth = function(force) { if (this.$modified || force) { this.$modified = false; if (this.$useWrapMode) return this.screenWidth = this.$wrapLimit; var lines = this.doc.getAllLines(); var cache = this.$rowLengthCache; var longestScreenLine = 0; var foldIndex = 0; var foldLine = this.$foldData[foldIndex]; var foldStart = foldLine ? foldLine.start.row : Infinity; var len = lines.length; for (var i = 0; i < len; i++) { if (i > foldStart) { i = foldLine.end.row + 1; if (i >= len) break; foldLine = this.$foldData[foldIndex++]; foldStart = foldLine ? foldLine.start.row : Infinity; } if (cache[i] == null) cache[i] = this.$getStringScreenWidth(lines[i])[0]; if (cache[i] > longestScreenLine) longestScreenLine = cache[i]; } this.screenWidth = longestScreenLine; } }; this.getLine = function(row) { return this.doc.getLine(row); }; this.getLines = function(firstRow, lastRow) { return this.doc.getLines(firstRow, lastRow); }; this.getLength = function() { return this.doc.getLength(); }; this.getTextRange = function(range) { return this.doc.getTextRange(range || this.selection.getRange()); }; this.insert = function(position, text) { return this.doc.insert(position, text); }; this.remove = function(range) { return this.doc.remove(range); }; this.undoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = deltas.length - 1; i != -1; i--) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.revertDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, true, lastUndoRange); } else { delta.deltas.forEach(function(foldDelta) { this.addFolds(foldDelta.folds); }, this); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.redoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = 0; i < deltas.length; i++) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.applyDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, false, lastUndoRange); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.setUndoSelect = function(enable) { this.$undoSelect = enable; }; this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { function isInsert(delta) { var insert = delta.action === "insertText" || delta.action === "insertLines"; return isUndo ? !insert : insert; } var delta = deltas[0]; var range, point; var lastDeltaIsInsert = false; if (isInsert(delta)) { range = Range.fromPoints(delta.range.start, delta.range.end); lastDeltaIsInsert = true; } else { range = Range.fromPoints(delta.range.start, delta.range.start); lastDeltaIsInsert = false; } for (var i = 1; i < deltas.length; i++) { delta = deltas[i]; if (isInsert(delta)) { point = delta.range.start; if (range.compare(point.row, point.column) == -1) { range.setStart(delta.range.start); } point = delta.range.end; if (range.compare(point.row, point.column) == 1) { range.setEnd(delta.range.end); } lastDeltaIsInsert = true; } else { point = delta.range.start; if (range.compare(point.row, point.column) == -1) { range = Range.fromPoints(delta.range.start, delta.range.start); } lastDeltaIsInsert = false; } } if (lastUndoRange != null) { if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { lastUndoRange.start.column += range.end.column - range.start.column; lastUndoRange.end.column += range.end.column - range.start.column; } var cmp = lastUndoRange.compareRange(range); if (cmp == 1) { range.setStart(lastUndoRange.start); } else if (cmp == -1) { range.setEnd(lastUndoRange.end); } } return range; }; this.replace = function(range, text) { return this.doc.replace(range, text); }; this.moveText = function(fromRange, toPosition, copy) { var text = this.getTextRange(fromRange); var folds = this.getFoldsInRange(fromRange); var toRange = Range.fromPoints(toPosition, toPosition); if (!copy) { this.remove(fromRange); var rowDiff = fromRange.start.row - fromRange.end.row; var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; if (collDiff) { if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) toRange.start.column += collDiff; if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) toRange.end.column += collDiff; } if (rowDiff && toRange.start.row >= fromRange.end.row) { toRange.start.row += rowDiff; toRange.end.row += rowDiff; } } toRange.end = this.insert(toRange.start, text); if (folds.length) { var oldStart = fromRange.start; var newStart = toRange.start; var rowDiff = newStart.row - oldStart.row; var collDiff = newStart.column - oldStart.column; this.addFolds(folds.map(function(x) { x = x.clone(); if (x.start.row == oldStart.row) x.start.column += collDiff; if (x.end.row == oldStart.row) x.end.column += collDiff; x.start.row += rowDiff; x.end.row += rowDiff; return x; })); } return toRange; }; this.indentRows = function(startRow, endRow, indentString) { indentString = indentString.replace(/\t/g, this.getTabString()); for (var row=startRow; row<=endRow; row++) this.insert({row: row, column:0}, indentString); }; this.outdentRows = function (range) { var rowRange = range.collapseRows(); var deleteRange = new Range(0, 0, 0, 0); var size = this.getTabSize(); for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { var line = this.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; for (var j = 0; j < size; ++j) if (line.charAt(j) != ' ') break; if (j < size && line.charAt(j) == '\t') { deleteRange.start.column = j; deleteRange.end.column = j + 1; } else { deleteRange.start.column = 0; deleteRange.end.column = j; } this.remove(deleteRange); } }; this.$moveLines = function(firstRow, lastRow, dir) { firstRow = this.getRowFoldStart(firstRow); lastRow = this.getRowFoldEnd(lastRow); if (dir < 0) { var row = this.getRowFoldStart(firstRow + dir); if (row < 0) return 0; var diff = row-firstRow; } else if (dir > 0) { var row = this.getRowFoldEnd(lastRow + dir); if (row > this.doc.getLength()-1) return 0; var diff = row-lastRow; } else { firstRow = this.$clipRowToDocument(firstRow); lastRow = this.$clipRowToDocument(lastRow); var diff = lastRow - firstRow + 1; } var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); var folds = this.getFoldsInRange(range).map(function(x){ x = x.clone(); x.start.row += diff; x.end.row += diff; return x; }); var lines = dir == 0 ? this.doc.getLines(firstRow, lastRow) : this.doc.removeLines(firstRow, lastRow); this.doc.insertLines(firstRow+diff, lines); folds.length && this.addFolds(folds); return diff; }; this.moveLinesUp = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, -1); }; this.moveLinesDown = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 1); }; this.duplicateLines = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 0); }; this.$clipRowToDocument = function(row) { return Math.max(0, Math.min(row, this.doc.getLength()-1)); }; this.$clipColumnToRow = function(row, column) { if (column < 0) return 0; return Math.min(this.doc.getLine(row).length, column); }; this.$clipPositionToDocument = function(row, column) { column = Math.max(0, column); if (row < 0) { row = 0; column = 0; } else { var len = this.doc.getLength(); if (row >= len) { row = len - 1; column = this.doc.getLine(len-1).length; } else { column = Math.min(this.doc.getLine(row).length, column); } } return { row: row, column: column }; }; this.$clipRangeToDocument = function(range) { if (range.start.row < 0) { range.start.row = 0; range.start.column = 0; } else { range.start.column = this.$clipColumnToRow( range.start.row, range.start.column ); } var len = this.doc.getLength() - 1; if (range.end.row > len) { range.end.row = len; range.end.column = this.doc.getLine(len).length; } else { range.end.column = this.$clipColumnToRow( range.end.row, range.end.column ); } return range; }; this.$wrapLimit = 80; this.$useWrapMode = false; this.$wrapLimitRange = { min : null, max : null }; this.setUseWrapMode = function(useWrapMode) { if (useWrapMode != this.$useWrapMode) { this.$useWrapMode = useWrapMode; this.$modified = true; this.$resetRowCache(0); if (useWrapMode) { var len = this.getLength(); this.$wrapData = Array(len); this.$updateWrapData(0, len - 1); } this._signal("changeWrapMode"); } }; this.getUseWrapMode = function() { return this.$useWrapMode; }; this.setWrapLimitRange = function(min, max) { if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { this.$wrapLimitRange = { min: min, max: max }; this.$modified = true; if (this.$useWrapMode) this._signal("changeWrapMode"); } }; this.adjustWrapLimit = function(desiredLimit, $printMargin) { var limits = this.$wrapLimitRange; if (limits.max < 0) limits = {min: $printMargin, max: $printMargin}; var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { this.$wrapLimit = wrapLimit; this.$modified = true; if (this.$useWrapMode) { this.$updateWrapData(0, this.getLength() - 1); this.$resetRowCache(0); this._signal("changeWrapLimit"); } return true; } return false; }; this.$constrainWrapLimit = function(wrapLimit, min, max) { if (min) wrapLimit = Math.max(min, wrapLimit); if (max) wrapLimit = Math.min(max, wrapLimit); return wrapLimit; }; this.getWrapLimit = function() { return this.$wrapLimit; }; this.setWrapLimit = function (limit) { this.setWrapLimitRange(limit, limit); }; this.getWrapLimitRange = function() { return { min : this.$wrapLimitRange.min, max : this.$wrapLimitRange.max }; }; this.$updateInternalDataOnChange = function(e) { var useWrapMode = this.$useWrapMode; var len; var action = e.data.action; var firstRow = e.data.range.start.row; var lastRow = e.data.range.end.row; var start = e.data.range.start; var end = e.data.range.end; var removedFolds = null; if (action.indexOf("Lines") != -1) { if (action == "insertLines") { lastRow = firstRow + (e.data.lines.length); } else { lastRow = firstRow; } len = e.data.lines ? e.data.lines.length : lastRow - firstRow; } else { len = lastRow - firstRow; } this.$updating = true; if (len != 0) { if (action.indexOf("remove") != -1) { this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); var foldLines = this.$foldData; removedFolds = this.getFoldsInRange(e.data.range); this.removeFolds(removedFolds); var foldLine = this.getFoldLine(end.row); var idx = 0; if (foldLine) { foldLine.addRemoveChars(end.row, end.column, start.column - end.column); foldLine.shiftRow(-len); var foldLineBefore = this.getFoldLine(firstRow); if (foldLineBefore && foldLineBefore !== foldLine) { foldLineBefore.merge(foldLine); foldLine = foldLineBefore; } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= end.row) { foldLine.shiftRow(-len); } } lastRow = firstRow; } else { var args = Array(len); args.unshift(firstRow, 0); var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache arr.splice.apply(arr, args); var foldLines = this.$foldData; var foldLine = this.getFoldLine(firstRow); var idx = 0; if (foldLine) { var cmp = foldLine.range.compareInside(start.row, start.column); if (cmp == 0) { foldLine = foldLine.split(start.row, start.column); if (foldLine) { foldLine.shiftRow(len); foldLine.addRemoveChars(lastRow, 0, end.column - start.column); } } else if (cmp == -1) { foldLine.addRemoveChars(firstRow, 0, end.column - start.column); foldLine.shiftRow(len); } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= firstRow) { foldLine.shiftRow(len); } } } } else { len = Math.abs(e.data.range.start.column - e.data.range.end.column); if (action.indexOf("remove") != -1) { removedFolds = this.getFoldsInRange(e.data.range); this.removeFolds(removedFolds); len = -len; } var foldLine = this.getFoldLine(firstRow); if (foldLine) { foldLine.addRemoveChars(firstRow, start.column, len); } } if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { console.error("doc.getLength() and $wrapData.length have to be the same!"); } this.$updating = false; if (useWrapMode) this.$updateWrapData(firstRow, lastRow); else this.$updateRowLengthCache(firstRow, lastRow); return removedFolds; }; this.$updateRowLengthCache = function(firstRow, lastRow, b) { this.$rowLengthCache[firstRow] = null; this.$rowLengthCache[lastRow] = null; }; this.$updateWrapData = function(firstRow, lastRow) { var lines = this.doc.getAllLines(); var tabSize = this.getTabSize(); var wrapData = this.$wrapData; var wrapLimit = this.$wrapLimit; var tokens; var foldLine; var row = firstRow; lastRow = Math.min(lastRow, lines.length - 1); while (row <= lastRow) { foldLine = this.getFoldLine(row, foldLine); if (!foldLine) { tokens = this.$getDisplayTokens(lines[row]); wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row ++; } else { tokens = []; foldLine.walk(function(placeholder, row, column, lastColumn) { var walkTokens; if (placeholder != null) { walkTokens = this.$getDisplayTokens( placeholder, tokens.length); walkTokens[0] = PLACEHOLDER_START; for (var i = 1; i < walkTokens.length; i++) { walkTokens[i] = PLACEHOLDER_BODY; } } else { walkTokens = this.$getDisplayTokens( lines[row].substring(lastColumn, column), tokens.length); } tokens = tokens.concat(walkTokens); }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1 ); wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row = foldLine.end.row + 1; } } }; var CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12; this.$computeWrapSplits = function(tokens, wrapLimit) { if (tokens.length == 0) { return []; } var splits = []; var displayLength = tokens.length; var lastSplit = 0, lastDocSplit = 0; var isCode = this.$wrapAsCode; function addSplit(screenPos) { var displayed = tokens.slice(lastSplit, screenPos); var len = displayed.length; displayed.join(""). replace(/12/g, function() { len -= 1; }). replace(/2/g, function() { len -= 1; }); lastDocSplit += len; splits.push(lastDocSplit); lastSplit = screenPos; } while (displayLength - lastSplit > wrapLimit) { var split = lastSplit + wrapLimit; if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { addSplit(split); continue; } if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { for (split; split != lastSplit - 1; split--) { if (tokens[split] == PLACEHOLDER_START) { break; } } if (split > lastSplit) { addSplit(split); continue; } split = lastSplit + wrapLimit; for (split; split < tokens.length; split++) { if (tokens[split] != PLACEHOLDER_BODY) { break; } } if (split == tokens.length) { break; // Breaks the while-loop. } addSplit(split); continue; } var minSplit = Math.max(split - (isCode ? 10 : wrapLimit-(wrapLimit>>2)), lastSplit - 1); while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } if (isCode) { while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } while (split > minSplit && tokens[split] == PUNCTUATION) { split --; } } else { while (split > minSplit && tokens[split] < SPACE) { split --; } } if (split > minSplit) { addSplit(++split); continue; } split = lastSplit + wrapLimit; if (tokens[split] == CHAR_EXT) split--; addSplit(split); } return splits; }; this.$getDisplayTokens = function(str, offset) { var arr = []; var tabSize; offset = offset || 0; for (var i = 0; i < str.length; i++) { var c = str.charCodeAt(i); if (c == 9) { tabSize = this.getScreenTabSize(arr.length + offset); arr.push(TAB); for (var n = 1; n < tabSize; n++) { arr.push(TAB_SPACE); } } else if (c == 32) { arr.push(SPACE); } else if((c > 39 && c < 48) || (c > 57 && c < 64)) { arr.push(PUNCTUATION); } else if (c >= 0x1100 && isFullWidth(c)) { arr.push(CHAR, CHAR_EXT); } else { arr.push(CHAR); } } return arr; }; this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn == 0) return [0, 0]; if (maxScreenColumn == null) maxScreenColumn = Infinity; screenColumn = screenColumn || 0; var c, column; for (column = 0; column < str.length; column++) { c = str.charCodeAt(column); if (c == 9) { screenColumn += this.getScreenTabSize(screenColumn); } else if (c >= 0x1100 && isFullWidth(c)) { screenColumn += 2; } else { screenColumn += 1; } if (screenColumn > maxScreenColumn) { break; } } return [screenColumn, column]; }; this.lineWidgets = null; this.getRowLength = function(row) { if (this.lineWidgets) var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0 if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.getRowLineCount = function(row) { if (!this.$useWrapMode || !this.$wrapData[row]) { return 1; } else { return this.$wrapData[row].length + 1; } }; this.getScreenLastRowColumn = function(screenRow) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); return this.documentToScreenColumn(pos.row, pos.column); }; this.getDocumentLastRowColumn = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.getScreenLastRowColumn(screenRow); }; this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); }; this.getRowSplitData = function(row) { if (!this.$useWrapMode) { return undefined; } else { return this.$wrapData[row]; } }; this.getScreenTabSize = function(screenColumn) { return this.$tabSize - screenColumn % this.$tabSize; }; this.screenToDocumentRow = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).row; }; this.screenToDocumentColumn = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).column; }; this.screenToDocumentPosition = function(screenRow, screenColumn) { if (screenRow < 0) return {row: 0, column: 0}; var line; var docRow = 0; var docColumn = 0; var column; var row = 0; var rowLength = 0; var rowCache = this.$screenRowCache; var i = this.$getRowCacheIndex(rowCache, screenRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var docRow = this.$docRowCache[i]; var doCache = screenRow > rowCache[l - 1]; } else { var doCache = !l; } var maxRow = this.getLength() - 1; var foldLine = this.getNextFoldLine(docRow); var foldStart = foldLine ? foldLine.start.row : Infinity; while (row <= screenRow) { rowLength = this.getRowLength(docRow); if (row + rowLength > screenRow || docRow >= maxRow) { break; } else { row += rowLength; docRow++; if (docRow > foldStart) { docRow = foldLine.end.row+1; foldLine = this.getNextFoldLine(docRow, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } } if (doCache) { this.$docRowCache.push(docRow); this.$screenRowCache.push(row); } } if (foldLine && foldLine.start.row <= docRow) { line = this.getFoldDisplayLine(foldLine); docRow = foldLine.start.row; } else if (row + rowLength <= screenRow || docRow > maxRow) { return { row: maxRow, column: this.getLine(maxRow).length }; } else { line = this.getLine(docRow); foldLine = null; } if (this.$useWrapMode) { var splits = this.$wrapData[docRow]; if (splits) { var splitIndex = Math.floor(screenRow - row); column = splits[splitIndex]; if(splitIndex > 0 && splits.length) { docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; line = line.substring(docColumn); } } } docColumn += this.$getStringScreenWidth(line, screenColumn)[1]; if (this.$useWrapMode && docColumn >= column) docColumn = column - 1; if (foldLine) return foldLine.idxToPosition(docColumn); return {row: docRow, column: docColumn}; }; this.documentToScreenPosition = function(docRow, docColumn) { if (typeof docColumn === "undefined") var pos = this.$clipPositionToDocument(docRow.row, docRow.column); else pos = this.$clipPositionToDocument(docRow, docColumn); docRow = pos.row; docColumn = pos.column; var screenRow = 0; var foldStartRow = null; var fold = null; fold = this.getFoldAt(docRow, docColumn, 1); if (fold) { docRow = fold.start.row; docColumn = fold.start.column; } var rowEnd, row = 0; var rowCache = this.$docRowCache; var i = this.$getRowCacheIndex(rowCache, docRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var screenRow = this.$screenRowCache[i]; var doCache = docRow > rowCache[l - 1]; } else { var doCache = !l; } var foldLine = this.getNextFoldLine(row); var foldStart = foldLine ?foldLine.start.row :Infinity; while (row < docRow) { if (row >= foldStart) { rowEnd = foldLine.end.row + 1; if (rowEnd > docRow) break; foldLine = this.getNextFoldLine(rowEnd, foldLine); foldStart = foldLine ?foldLine.start.row :Infinity; } else { rowEnd = row + 1; } screenRow += this.getRowLength(row); row = rowEnd; if (doCache) { this.$docRowCache.push(row); this.$screenRowCache.push(screenRow); } } var textLine = ""; if (foldLine && row >= foldStart) { textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); foldStartRow = foldLine.start.row; } else { textLine = this.getLine(docRow).substring(0, docColumn); foldStartRow = docRow; } if (this.$useWrapMode) { var wrapRow = this.$wrapData[foldStartRow]; if (wrapRow) { var screenRowOffset = 0; while (textLine.length >= wrapRow[screenRowOffset]) { screenRow ++; screenRowOffset++; } textLine = textLine.substring( wrapRow[screenRowOffset - 1] || 0, textLine.length ); } } return { row: screenRow, column: this.$getStringScreenWidth(textLine)[0] }; }; this.documentToScreenColumn = function(row, docColumn) { return this.documentToScreenPosition(row, docColumn).column; }; this.documentToScreenRow = function(docRow, docColumn) { return this.documentToScreenPosition(docRow, docColumn).row; }; this.getScreenLength = function() { var screenRows = 0; var fold = null; if (!this.$useWrapMode) { screenRows = this.getLength(); var foldData = this.$foldData; for (var i = 0; i < foldData.length; i++) { fold = foldData[i]; screenRows -= fold.end.row - fold.start.row; } } else { var lastRow = this.$wrapData.length; var row = 0, i = 0; var fold = this.$foldData[i++]; var foldStart = fold ? fold.start.row :Infinity; while (row < lastRow) { var splits = this.$wrapData[row]; screenRows += splits ? splits.length + 1 : 1; row ++; if (row > foldStart) { row = fold.end.row+1; fold = this.$foldData[i++]; foldStart = fold ?fold.start.row :Infinity; } } } if (this.lineWidgets) screenRows += this.$getWidgetScreenLength(); return screenRows; }; this.$setFontMetrics = function(fm) { }; this.destroy = function() { if (this.bgTokenizer) { this.bgTokenizer.setDocument(null); this.bgTokenizer = null; } this.$stopWorker(); }; function isFullWidth(c) { if (c < 0x1100) return false; return c >= 0x1100 && c <= 0x115F || c >= 0x11A3 && c <= 0x11A7 || c >= 0x11FA && c <= 0x11FF || c >= 0x2329 && c <= 0x232A || c >= 0x2E80 && c <= 0x2E99 || c >= 0x2E9B && c <= 0x2EF3 || c >= 0x2F00 && c <= 0x2FD5 || c >= 0x2FF0 && c <= 0x2FFB || c >= 0x3000 && c <= 0x303E || c >= 0x3041 && c <= 0x3096 || c >= 0x3099 && c <= 0x30FF || c >= 0x3105 && c <= 0x312D || c >= 0x3131 && c <= 0x318E || c >= 0x3190 && c <= 0x31BA || c >= 0x31C0 && c <= 0x31E3 || c >= 0x31F0 && c <= 0x321E || c >= 0x3220 && c <= 0x3247 || c >= 0x3250 && c <= 0x32FE || c >= 0x3300 && c <= 0x4DBF || c >= 0x4E00 && c <= 0xA48C || c >= 0xA490 && c <= 0xA4C6 || c >= 0xA960 && c <= 0xA97C || c >= 0xAC00 && c <= 0xD7A3 || c >= 0xD7B0 && c <= 0xD7C6 || c >= 0xD7CB && c <= 0xD7FB || c >= 0xF900 && c <= 0xFAFF || c >= 0xFE10 && c <= 0xFE19 || c >= 0xFE30 && c <= 0xFE52 || c >= 0xFE54 && c <= 0xFE66 || c >= 0xFE68 && c <= 0xFE6B || c >= 0xFF01 && c <= 0xFF60 || c >= 0xFFE0 && c <= 0xFFE6; }; }).call(EditSession.prototype); require("./edit_session/folding").Folding.call(EditSession.prototype); require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); config.defineOptions(EditSession.prototype, "session", { wrap: { set: function(value) { if (!value || value == "off") value = false; else if (value == "free") value = true; else if (value == "printMargin") value = -1; else if (typeof value == "string") value = parseInt(value, 10) || false; if (this.$wrap == value) return; this.$wrap = value; if (!value) { this.setUseWrapMode(false); } else { var col = typeof value == "number" ? value : null; this.setWrapLimitRange(col, col); this.setUseWrapMode(true); } }, get: function() { if (this.getUseWrapMode()) { if (this.$wrap == -1) return "printMargin"; if (!this.getWrapLimitRange().min) return "free"; return this.$wrap; } return "off"; }, handlesSet: true }, wrapMethod: { set: function(val) { val = val == "auto" ? this.$mode.type != "text" : val != "text"; if (val != this.$wrapAsCode) { this.$wrapAsCode = val; if (this.$useWrapMode) { this.$modified = true; this.$resetRowCache(0); this.$updateWrapData(0, this.getLength() - 1); } } }, initialValue: "auto" }, firstLineNumber: { set: function() {this._signal("changeBreakpoint");}, initialValue: 1 }, useWorker: { set: function(useWorker) { this.$useWorker = useWorker; this.$stopWorker(); if (useWorker) this.$startWorker(); }, initialValue: true }, useSoftTabs: {initialValue: true}, tabSize: { set: function(tabSize) { if (isNaN(tabSize) || this.$tabSize === tabSize) return; this.$modified = true; this.$rowLengthCache = []; this.$tabSize = tabSize; this._signal("changeTabSize"); }, initialValue: 4, handlesSet: true }, overwrite: { set: function(val) {this._signal("changeOverwrite");}, initialValue: false }, newLineMode: { set: function(val) {this.doc.setNewLineMode(val)}, get: function() {return this.doc.getNewLineMode()}, handlesSet: true }, mode: { set: function(val) { this.setMode(val) }, get: function() { return this.$modeId } } }); exports.EditSession = EditSession; }); define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); var oop = require("./lib/oop"); var Range = require("./range").Range; var Search = function() { this.$options = {}; }; (function() { this.set = function(options) { oop.mixin(this.$options, options); return this; }; this.getOptions = function() { return lang.copyObject(this.$options); }; this.setOptions = function(options) { this.$options = options; }; this.find = function(session) { var options = this.$options; var iterator = this.$matchIterator(session, options); if (!iterator) return false; var firstRange = null; iterator.forEach(function(range, row, offset) { if (!range.start) { var column = range.offset + (offset || 0); firstRange = new Range(row, column, row, column + range.length); if (!range.length && options.start && options.start.start && options.skipCurrent != false && firstRange.isEqual(options.start) ) { firstRange = null; return false; } } else firstRange = range; return true; }); return firstRange; }; this.findAll = function(session) { var options = this.$options; if (!options.needle) return []; this.$assembleRegExp(options); var range = options.range; var lines = range ? session.getLines(range.start.row, range.end.row) : session.doc.getAllLines(); var ranges = []; var re = options.re; if (options.$isMultiLine) { var len = re.length; var maxRow = lines.length - len; var prevRange; outer: for (var row = re.offset || 0; row <= maxRow; row++) { for (var j = 0; j < len; j++) if (lines[row + j].search(re[j]) == -1) continue outer; var startLine = lines[row]; var line = lines[row + len - 1]; var startIndex = startLine.length - startLine.match(re[0])[0].length; var endIndex = line.match(re[len - 1])[0].length; if (prevRange && prevRange.end.row === row && prevRange.end.column > startIndex ) { continue; } ranges.push(prevRange = new Range( row, startIndex, row + len - 1, endIndex )); if (len > 2) row = row + len - 2; } } else { for (var i = 0; i < lines.length; i++) { var matches = lang.getMatchOffsets(lines[i], re); for (var j = 0; j < matches.length; j++) { var match = matches[j]; ranges.push(new Range(i, match.offset, i, match.offset + match.length)); } } } if (range) { var startColumn = range.start.column; var endColumn = range.start.column; var i = 0, j = ranges.length - 1; while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) i++; while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) j--; ranges = ranges.slice(i, j + 1); for (i = 0, j = ranges.length; i < j; i++) { ranges[i].start.row += range.start.row; ranges[i].end.row += range.start.row; } } return ranges; }; this.replace = function(input, replacement) { var options = this.$options; var re = this.$assembleRegExp(options); if (options.$isMultiLine) return replacement; if (!re) return; var match = re.exec(input); if (!match || match[0].length != input.length) return null; replacement = input.replace(re, replacement); if (options.preserveCase) { replacement = replacement.split(""); for (var i = Math.min(input.length, input.length); i--; ) { var ch = input[i]; if (ch && ch.toLowerCase() != ch) replacement[i] = replacement[i].toUpperCase(); else replacement[i] = replacement[i].toLowerCase(); } replacement = replacement.join(""); } return replacement; }; this.$matchIterator = function(session, options) { var re = this.$assembleRegExp(options); if (!re) return false; var callback; if (options.$isMultiLine) { var len = re.length; var matchIterator = function(line, row, offset) { var startIndex = line.search(re[0]); if (startIndex == -1) return; for (var i = 1; i < len; i++) { line = session.getLine(row + i); if (line.search(re[i]) == -1) return; } var endIndex = line.match(re[len - 1])[0].length; var range = new Range(row, startIndex, row + len - 1, endIndex); if (re.offset == 1) { range.start.row--; range.start.column = Number.MAX_VALUE; } else if (offset) range.start.column += offset; if (callback(range)) return true; }; } else if (options.backwards) { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = matches.length-1; i >= 0; i--) if (callback(matches[i], row, startIndex)) return true; }; } else { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = 0; i < matches.length; i++) if (callback(matches[i], row, startIndex)) return true; }; } var lineIterator = this.$lineIterator(session, options); return { forEach: function(_callback) { callback = _callback; lineIterator.forEach(matchIterator); } }; }; this.$assembleRegExp = function(options, $disableFakeMultiline) { if (options.needle instanceof RegExp) return options.re = options.needle; var needle = options.needle; if (!options.needle) return options.re = false; if (!options.regExp) needle = lang.escapeRegExp(needle); if (options.wholeWord) needle = "\\b" + needle + "\\b"; var modifier = options.caseSensitive ? "gm" : "gmi"; options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); if (options.$isMultiLine) return options.re = this.$assembleMultilineRegExp(needle, modifier); try { var re = new RegExp(needle, modifier); } catch(e) { re = false; } return options.re = re; }; this.$assembleMultilineRegExp = function(needle, modifier) { var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); var re = []; for (var i = 0; i < parts.length; i++) try { re.push(new RegExp(parts[i], modifier)); } catch(e) { return false; } if (parts[0] == "") { re.shift(); re.offset = 1; } else { re.offset = 0; } return re; }; this.$lineIterator = function(session, options) { var backwards = options.backwards == true; var skipCurrent = options.skipCurrent != false; var range = options.range; var start = options.start; if (!start) start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); if (start.start) start = start[skipCurrent != backwards ? "end" : "start"]; var firstRow = range ? range.start.row : 0; var lastRow = range ? range.end.row : session.getLength() - 1; var forEach = backwards ? function(callback) { var row = start.row; var line = session.getLine(row).substring(0, start.column); if (callback(line, row)) return; for (row--; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = lastRow, firstRow = start.row; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; } : function(callback) { var row = start.row; var line = session.getLine(row).substr(start.column); if (callback(line, row, start.column)) return; for (row = row+1; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = firstRow, lastRow = start.row; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; }; return {forEach: forEach}; }; }).call(Search.prototype); exports.Search = Search; }); define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keyUtil = require("../lib/keys"); var useragent = require("../lib/useragent"); var KEY_MODS = keyUtil.KEY_MODS; function HashHandler(config, platform) { this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; this.commandKeyBinding = {}; this.addCommands(config); this.$singleCommand = true; } function MultiHashHandler(config, platform) { HashHandler.call(this, config, platform); this.$singleCommand = false; } MultiHashHandler.prototype = HashHandler.prototype; (function() { this.addCommand = function(command) { if (this.commands[command.name]) this.removeCommand(command); this.commands[command.name] = command; if (command.bindKey) this._buildKeyHash(command); }; this.removeCommand = function(command, keepCommand) { var name = command && (typeof command === 'string' ? command : command.name); command = this.commands[name]; if (!keepCommand) delete this.commands[name]; var ckb = this.commandKeyBinding; for (var keyId in ckb) { var cmdGroup = ckb[keyId]; if (cmdGroup == command) { delete ckb[keyId]; } else if (Array.isArray(cmdGroup)) { var i = cmdGroup.indexOf(command); if (i != -1) { cmdGroup.splice(i, 1); if (cmdGroup.length == 1) ckb[keyId] = cmdGroup[0]; } } } }; this.bindKey = function(key, command, asDefault) { if (typeof key == "object") key = key[this.platform]; if (!key) return; if (typeof command == "function") return this.addCommand({exec: command, bindKey: key, name: command.name || key}); key.split("|").forEach(function(keyPart) { var chain = ""; if (keyPart.indexOf(" ") != -1) { var parts = keyPart.split(/\s+/); keyPart = parts.pop(); parts.forEach(function(keyPart) { var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; chain += (chain ? " " : "") + id; this._addCommandToBinding(chain, "chainKeys"); }, this); chain += " "; } var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; this._addCommandToBinding(chain + id, command, asDefault); }, this); }; this._addCommandToBinding = function(keyId, command, asDefault) { var ckb = this.commandKeyBinding, i; if (!command) { delete ckb[keyId]; } else if (!ckb[keyId] || this.$singleCommand) { ckb[keyId] = command; } else { if (!Array.isArray(ckb[keyId])) { ckb[keyId] = [ckb[keyId]]; } else if ((i = ckb[keyId].indexOf(command)) != -1) { ckb[keyId].splice(i, 1); } if (asDefault || command.isDefault) ckb[keyId].unshift(command); else ckb[keyId].push(command); } }; this.addCommands = function(commands) { commands && Object.keys(commands).forEach(function(name) { var command = commands[name]; if (!command) return; if (typeof command === "string") return this.bindKey(command, name); if (typeof command === "function") command = { exec: command }; if (typeof command !== "object") return; if (!command.name) command.name = name; this.addCommand(command); }, this); }; this.removeCommands = function(commands) { Object.keys(commands).forEach(function(name) { this.removeCommand(commands[name]); }, this); }; this.bindKeys = function(keyList) { Object.keys(keyList).forEach(function(key) { this.bindKey(key, keyList[key]); }, this); }; this._buildKeyHash = function(command) { this.bindKey(command.bindKey, command); }; this.parseKeys = function(keys) { var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); var key = parts.pop(); var keyCode = keyUtil[key]; if (keyUtil.FUNCTION_KEYS[keyCode]) key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); else if (!parts.length) return {key: key, hashId: -1}; else if (parts.length == 1 && parts[0] == "shift") return {key: key.toUpperCase(), hashId: -1}; var hashId = 0; for (var i = parts.length; i--;) { var modifier = keyUtil.KEY_MODS[parts[i]]; if (modifier == null) { if (typeof console != "undefined") console.error("invalid modifier " + parts[i] + " in " + keys); return false; } hashId |= modifier; } return {key: key, hashId: hashId}; }; this.findKeyCommand = function findKeyCommand(hashId, keyString) { var key = KEY_MODS[hashId] + keyString; return this.commandKeyBinding[key]; }; this.handleKeyboard = function(data, hashId, keyString, keyCode) { var key = KEY_MODS[hashId] + keyString; var command = this.commandKeyBinding[key]; if (data.$keyChain) { data.$keyChain += " " + key; command = this.commandKeyBinding[data.$keyChain] || command; } if (command) { if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { data.$keyChain = data.$keyChain || key; return {command: "null"}; } } if (data.$keyChain && keyCode > 0) data.$keyChain = ""; return {command: command}; }; }).call(HashHandler.prototype); exports.HashHandler = HashHandler; exports.MultiHashHandler = MultiHashHandler; }); define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler; var EventEmitter = require("../lib/event_emitter").EventEmitter; var CommandManager = function(platform, commands) { MultiHashHandler.call(this, commands, platform); this.byName = this.commands; this.setDefaultHandler("exec", function(e) { return e.command.exec(e.editor, e.args || {}); }); }; oop.inherits(CommandManager, MultiHashHandler); (function() { oop.implement(this, EventEmitter); this.exec = function(command, editor, args) { if (Array.isArray(command)) { for (var i = command.length; i--; ) { if (this.exec(command[i], editor, args)) return true; } return false; } if (typeof command === "string") command = this.commands[command]; if (!command) return false; if (editor && editor.$readOnly && !command.readOnly) return false; var e = {editor: editor, command: command, args: args}; e.returnValue = this._emit("exec", e); this._signal("afterExec", e); return e.returnValue === false ? false : true; }; this.toggleRecording = function(editor) { if (this.$inReplay) return; editor && editor._emit("changeStatus"); if (this.recording) { this.macro.pop(); this.removeEventListener("exec", this.$addCommandToMacro); if (!this.macro.length) this.macro = this.oldMacro; return this.recording = false; } if (!this.$addCommandToMacro) { this.$addCommandToMacro = function(e) { this.macro.push([e.command, e.args]); }.bind(this); } this.oldMacro = this.macro; this.macro = []; this.on("exec", this.$addCommandToMacro); return this.recording = true; }; this.replay = function(editor) { if (this.$inReplay || !this.macro) return; if (this.recording) return this.toggleRecording(editor); try { this.$inReplay = true; this.macro.forEach(function(x) { if (typeof x == "string") this.exec(x, editor); else this.exec(x[0], editor, x[1]); }, this); } finally { this.$inReplay = false; } }; this.trimMacro = function(m) { return m.map(function(x){ if (typeof x[0] != "string") x[0] = x[0].name; if (!x[1]) x = x[0]; return x; }); }; }).call(CommandManager.prototype); exports.CommandManager = CommandManager; }); define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); var config = require("../config"); var Range = require("../range").Range; function bindKey(win, mac) { return {win: win, mac: mac}; } exports.commands = [{ name: "showSettingsMenu", bindKey: bindKey("Ctrl-,", "Command-,"), exec: function(editor) { config.loadModule("ace/ext/settings_menu", function(module) { module.init(editor); editor.showSettingsMenu(); }); }, readOnly: true }, { name: "goToNextError", bindKey: bindKey("Alt-E", "Ctrl-E"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, 1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "goToPreviousError", bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, -1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "selectall", bindKey: bindKey("Ctrl-A", "Command-A"), exec: function(editor) { editor.selectAll(); }, readOnly: true }, { name: "centerselection", bindKey: bindKey(null, "Ctrl-L"), exec: function(editor) { editor.centerSelection(); }, readOnly: true }, { name: "gotoline", bindKey: bindKey("Ctrl-L", "Command-L"), exec: function(editor) { var line = parseInt(prompt("Enter line number:"), 10); if (!isNaN(line)) { editor.gotoLine(line); } }, readOnly: true }, { name: "fold", bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), exec: function(editor) { editor.session.toggleFold(false); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "unfold", bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), exec: function(editor) { editor.session.toggleFold(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleFoldWidget", bindKey: bindKey("F2", "F2"), exec: function(editor) { editor.session.toggleFoldWidget(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleParentFoldWidget", bindKey: bindKey("Alt-F2", "Alt-F2"), exec: function(editor) { editor.session.toggleFoldWidget(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "foldall", bindKey: bindKey(null, "Ctrl-Command-Option-0"), exec: function(editor) { editor.session.foldAll(); }, scrollIntoView: "center", readOnly: true }, { name: "foldOther", bindKey: bindKey("Alt-0", "Command-Option-0"), exec: function(editor) { editor.session.foldAll(); editor.session.unfold(editor.selection.getAllRanges()); }, scrollIntoView: "center", readOnly: true }, { name: "unfoldall", bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), exec: function(editor) { editor.session.unfold(); }, scrollIntoView: "center", readOnly: true }, { name: "findnext", bindKey: bindKey("Ctrl-K", "Command-G"), exec: function(editor) { editor.findNext(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "findprevious", bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), exec: function(editor) { editor.findPrevious(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "selectOrFindNext", bindKey: bindKey("Alt-K", "Ctrl-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findNext(); }, readOnly: true }, { name: "selectOrFindPrevious", bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findPrevious(); }, readOnly: true }, { name: "find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); }, readOnly: true }, { name: "overwrite", bindKey: "Insert", exec: function(editor) { editor.toggleOverwrite(); }, readOnly: true }, { name: "selecttostart", bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"), exec: function(editor) { editor.getSelection().selectFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotostart", bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), exec: function(editor) { editor.navigateFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectup", bindKey: bindKey("Shift-Up", "Shift-Up"), exec: function(editor) { editor.getSelection().selectUp(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golineup", bindKey: bindKey("Up", "Up|Ctrl-P"), exec: function(editor, args) { editor.navigateUp(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttoend", bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"), exec: function(editor) { editor.getSelection().selectFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotoend", bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), exec: function(editor) { editor.navigateFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectdown", bindKey: bindKey("Shift-Down", "Shift-Down"), exec: function(editor) { editor.getSelection().selectDown(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golinedown", bindKey: bindKey("Down", "Down|Ctrl-N"), exec: function(editor, args) { editor.navigateDown(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordleft", bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), exec: function(editor) { editor.getSelection().selectWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordleft", bindKey: bindKey("Ctrl-Left", "Option-Left"), exec: function(editor) { editor.navigateWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolinestart", bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolinestart", bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), exec: function(editor) { editor.navigateLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectleft", bindKey: bindKey("Shift-Left", "Shift-Left"), exec: function(editor) { editor.getSelection().selectLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoleft", bindKey: bindKey("Left", "Left|Ctrl-B"), exec: function(editor, args) { editor.navigateLeft(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordright", bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), exec: function(editor) { editor.getSelection().selectWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordright", bindKey: bindKey("Ctrl-Right", "Option-Right"), exec: function(editor) { editor.navigateWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolineend", bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolineend", bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), exec: function(editor) { editor.navigateLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectright", bindKey: bindKey("Shift-Right", "Shift-Right"), exec: function(editor) { editor.getSelection().selectRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoright", bindKey: bindKey("Right", "Right|Ctrl-F"), exec: function(editor, args) { editor.navigateRight(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectpagedown", bindKey: "Shift-PageDown", exec: function(editor) { editor.selectPageDown(); }, readOnly: true }, { name: "pagedown", bindKey: bindKey(null, "Option-PageDown"), exec: function(editor) { editor.scrollPageDown(); }, readOnly: true }, { name: "gotopagedown", bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), exec: function(editor) { editor.gotoPageDown(); }, readOnly: true }, { name: "selectpageup", bindKey: "Shift-PageUp", exec: function(editor) { editor.selectPageUp(); }, readOnly: true }, { name: "pageup", bindKey: bindKey(null, "Option-PageUp"), exec: function(editor) { editor.scrollPageUp(); }, readOnly: true }, { name: "gotopageup", bindKey: "PageUp", exec: function(editor) { editor.gotoPageUp(); }, readOnly: true }, { name: "scrollup", bindKey: bindKey("Ctrl-Up", null), exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "scrolldown", bindKey: bindKey("Ctrl-Down", null), exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "selectlinestart", bindKey: "Shift-Home", exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectlineend", bindKey: "Shift-End", exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "togglerecording", bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), exec: function(editor) { editor.commands.toggleRecording(editor); }, readOnly: true }, { name: "replaymacro", bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), exec: function(editor) { editor.commands.replay(editor); }, readOnly: true }, { name: "jumptomatching", bindKey: bindKey("Ctrl-P", "Ctrl-P"), exec: function(editor) { editor.jumpToMatching(); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "selecttomatching", bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), exec: function(editor) { editor.jumpToMatching(true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "expandToMatching", bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), exec: function(editor) { editor.jumpToMatching(true, true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "passKeysToBrowser", bindKey: bindKey(null, null), exec: function() {}, passEvent: true, readOnly: true }, { name: "cut", exec: function(editor) { var range = editor.getSelectionRange(); editor._emit("cut", range); if (!editor.selection.isEmpty()) { editor.session.remove(range); editor.clearSelection(); } }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "removeline", bindKey: bindKey("Ctrl-D", "Command-D"), exec: function(editor) { editor.removeLines(); }, scrollIntoView: "cursor", multiSelectAction: "forEachLine" }, { name: "duplicateSelection", bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), exec: function(editor) { editor.duplicateSelection(); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "sortlines", bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), exec: function(editor) { editor.sortLines(); }, scrollIntoView: "selection", multiSelectAction: "forEachLine" }, { name: "togglecomment", bindKey: bindKey("Ctrl-/", "Command-/"), exec: function(editor) { editor.toggleCommentLines(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "toggleBlockComment", bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), exec: function(editor) { editor.toggleBlockComment(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "modifyNumberUp", bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), exec: function(editor) { editor.modifyNumber(1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "modifyNumberDown", bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), exec: function(editor) { editor.modifyNumber(-1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "replace", bindKey: bindKey("Ctrl-H", "Command-Option-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); } }, { name: "undo", bindKey: bindKey("Ctrl-Z", "Command-Z"), exec: function(editor) { editor.undo(); } }, { name: "redo", bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), exec: function(editor) { editor.redo(); } }, { name: "copylinesup", bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), exec: function(editor) { editor.copyLinesUp(); }, scrollIntoView: "cursor" }, { name: "movelinesup", bindKey: bindKey("Alt-Up", "Option-Up"), exec: function(editor) { editor.moveLinesUp(); }, scrollIntoView: "cursor" }, { name: "copylinesdown", bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), exec: function(editor) { editor.copyLinesDown(); }, scrollIntoView: "cursor" }, { name: "movelinesdown", bindKey: bindKey("Alt-Down", "Option-Down"), exec: function(editor) { editor.moveLinesDown(); }, scrollIntoView: "cursor" }, { name: "del", bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), exec: function(editor) { editor.remove("right"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "backspace", bindKey: bindKey( "Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" ), exec: function(editor) { editor.remove("left"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "cut_or_delete", bindKey: bindKey("Shift-Delete", null), exec: function(editor) { if (editor.selection.isEmpty()) { editor.remove("left"); } else { return false; } }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolinestart", bindKey: bindKey("Alt-Backspace", "Command-Backspace"), exec: function(editor) { editor.removeToLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolineend", bindKey: bindKey("Alt-Delete", "Ctrl-K"), exec: function(editor) { editor.removeToLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordleft", bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), exec: function(editor) { editor.removeWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordright", bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), exec: function(editor) { editor.removeWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "outdent", bindKey: bindKey("Shift-Tab", "Shift-Tab"), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "indent", bindKey: bindKey("Tab", "Tab"), exec: function(editor) { editor.indent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "blockoutdent", bindKey: bindKey("Ctrl-[", "Ctrl-["), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "blockindent", bindKey: bindKey("Ctrl-]", "Ctrl-]"), exec: function(editor) { editor.blockIndent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "insertstring", exec: function(editor, str) { editor.insert(str); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "inserttext", exec: function(editor, args) { editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "splitline", bindKey: bindKey(null, "Ctrl-O"), exec: function(editor) { editor.splitLine(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "transposeletters", bindKey: bindKey("Ctrl-T", "Ctrl-T"), exec: function(editor) { editor.transposeLetters(); }, multiSelectAction: function(editor) {editor.transposeSelections(1); }, scrollIntoView: "cursor" }, { name: "touppercase", bindKey: bindKey("Ctrl-U", "Ctrl-U"), exec: function(editor) { editor.toUpperCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "tolowercase", bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), exec: function(editor) { editor.toLowerCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "expandtoline", bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), exec: function(editor) { var range = editor.selection.getRange(); range.start.column = range.end.column = 0; range.end.row++; editor.selection.setRange(range, false); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "joinlines", bindKey: bindKey(null, null), exec: function(editor) { var isBackwards = editor.selection.isBackwards(); var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); var selectedCount = selectedText.replace(/\n\s*/, " ").length; var insertLine = editor.session.doc.getLine(selectionStart.row); for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); if (curLine.length !== 0) { curLine = " " + curLine; } insertLine += curLine; } if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { insertLine += editor.session.doc.getNewLineCharacter(); } editor.clearSelection(); editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); if (selectedCount > 0) { editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); } else { firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); } }, multiSelectAction: "forEach", readOnly: true }, { name: "invertSelection", bindKey: bindKey(null, null), exec: function(editor) { var endRow = editor.session.doc.getLength() - 1; var endCol = editor.session.doc.getLine(endRow).length; var ranges = editor.selection.rangeList.ranges; var newRanges = []; if (ranges.length < 1) { ranges = [editor.selection.getRange()]; } for (var i = 0; i < ranges.length; i++) { if (i == (ranges.length - 1)) { if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); } } if (i === 0) { if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); } } else { newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column)); } } editor.exitMultiSelectMode(); editor.clearSelection(); for(var i = 0; i < newRanges.length; i++) { editor.selection.addRange(newRanges[i], false); } }, readOnly: true, scrollIntoView: "none" }]; }); define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var oop = require("./lib/oop"); var dom = require("./lib/dom"); var lang = require("./lib/lang"); var useragent = require("./lib/useragent"); var TextInput = require("./keyboard/textinput").TextInput; var MouseHandler = require("./mouse/mouse_handler").MouseHandler; var FoldHandler = require("./mouse/fold_handler").FoldHandler; var KeyBinding = require("./keyboard/keybinding").KeyBinding; var EditSession = require("./edit_session").EditSession; var Search = require("./search").Search; var Range = require("./range").Range; var EventEmitter = require("./lib/event_emitter").EventEmitter; var CommandManager = require("./commands/command_manager").CommandManager; var defaultCommands = require("./commands/default_commands").commands; var config = require("./config"); var TokenIterator = require("./token_iterator").TokenIterator; var Editor = function(renderer, session) { var container = renderer.getContainerElement(); this.container = container; this.renderer = renderer; this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); this.textInput = new TextInput(renderer.getTextAreaContainer(), this); this.renderer.textarea = this.textInput.getElement(); this.keyBinding = new KeyBinding(this); this.$mouseHandler = new MouseHandler(this); new FoldHandler(this); this.$blockScrolling = 0; this.$search = new Search().set({ wrap: true }); this.$historyTracker = this.$historyTracker.bind(this); this.commands.on("exec", this.$historyTracker); this.$initOperationListeners(); this._$emitInputEvent = lang.delayedCall(function() { this._signal("input", {}); if (this.session && this.session.bgTokenizer) this.session.bgTokenizer.scheduleStart(); }.bind(this)); this.on("change", function(_, _self) { _self._$emitInputEvent.schedule(31); }); this.setSession(session || new EditSession("")); config.resetOptions(this); config._signal("editor", this); }; (function(){ oop.implement(this, EventEmitter); this.$initOperationListeners = function() { function last(a) {return a[a.length - 1]} this.selections = []; this.commands.on("exec", this.startOperation.bind(this), true); this.commands.on("afterExec", this.endOperation.bind(this), true); this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); this.on("change", function() { this.curOp || this.startOperation(); this.curOp.docChanged = true; }.bind(this), true); this.on("changeSelection", function() { this.curOp || this.startOperation(); this.curOp.selectionChanged = true; }.bind(this), true); }; this.curOp = null; this.prevOp = {}; this.startOperation = function(commadEvent) { if (this.curOp) { if (!commadEvent || this.curOp.command) return; this.prevOp = this.curOp; } if (!commadEvent) { this.previousCommand = null; commadEvent = {}; } this.$opResetTimer.schedule(); this.curOp = { command: commadEvent.command || {}, args: commadEvent.args, scrollTop: this.renderer.scrollTop }; if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined) this.$blockScrolling++; }; this.endOperation = function(e) { if (this.curOp) { if (e && e.returnValue === false) return this.curOp = null; this._signal("beforeEndOperation"); var command = this.curOp.command; if (command.name && this.$blockScrolling > 0) this.$blockScrolling--; if (command && command.scrollIntoView) { switch (command.scrollIntoView) { case "center": this.renderer.scrollCursorIntoView(null, 0.5); break; case "animate": case "cursor": this.renderer.scrollCursorIntoView(); break; case "selectionPart": var range = this.selection.getRange(); var config = this.renderer.layerConfig; if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); } break; default: break; } if (command.scrollIntoView == "animate") this.renderer.animateScrolling(this.curOp.scrollTop); } this.prevOp = this.curOp; this.curOp = null; } }; this.$mergeableCommands = ["backspace", "del", "insertstring"]; this.$historyTracker = function(e) { if (!this.$mergeUndoDeltas) return; var prev = this.prevOp; var mergeableCommands = this.$mergeableCommands; var shouldMerge = prev.command && (e.command.name == prev.command.name); if (e.command.name == "insertstring") { var text = e.args; if (this.mergeNextCommand === undefined) this.mergeNextCommand = true; shouldMerge = shouldMerge && this.mergeNextCommand // previous command allows to coalesce with && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type this.mergeNextCommand = true; } else { shouldMerge = shouldMerge && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable } if ( this.$mergeUndoDeltas != "always" && Date.now() - this.sequenceStartTime > 2000 ) { shouldMerge = false; // the sequence is too long } if (shouldMerge) this.session.mergeUndoDeltas = true; else if (mergeableCommands.indexOf(e.command.name) !== -1) this.sequenceStartTime = Date.now(); }; this.setKeyboardHandler = function(keyboardHandler, cb) { if (keyboardHandler && typeof keyboardHandler === "string") { this.$keybindingId = keyboardHandler; var _self = this; config.loadModule(["keybinding", keyboardHandler], function(module) { if (_self.$keybindingId == keyboardHandler) _self.keyBinding.setKeyboardHandler(module && module.handler); cb && cb(); }); } else { this.$keybindingId = null; this.keyBinding.setKeyboardHandler(keyboardHandler); cb && cb(); } }; this.getKeyboardHandler = function() { return this.keyBinding.getKeyboardHandler(); }; this.setSession = function(session) { if (this.session == session) return; var oldSession = this.session; if (oldSession) { this.session.removeEventListener("change", this.$onDocumentChange); this.session.removeEventListener("changeMode", this.$onChangeMode); this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate); this.session.removeEventListener("changeTabSize", this.$onChangeTabSize); this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit); this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode); this.session.removeEventListener("onChangeFold", this.$onChangeFold); this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker); this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint); this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation); this.session.removeEventListener("changeOverwrite", this.$onCursorChange); this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange); this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange); var selection = this.session.getSelection(); selection.removeEventListener("changeCursor", this.$onCursorChange); selection.removeEventListener("changeSelection", this.$onSelectionChange); } this.session = session; if (session) { this.$onDocumentChange = this.onDocumentChange.bind(this); session.addEventListener("change", this.$onDocumentChange); this.renderer.setSession(session); this.$onChangeMode = this.onChangeMode.bind(this); session.addEventListener("changeMode", this.$onChangeMode); this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate); this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); session.addEventListener("changeTabSize", this.$onChangeTabSize); this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit); this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); session.addEventListener("changeWrapMode", this.$onChangeWrapMode); this.$onChangeFold = this.onChangeFold.bind(this); session.addEventListener("changeFold", this.$onChangeFold); this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker); this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint); this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation); this.$onCursorChange = this.onCursorChange.bind(this); this.session.addEventListener("changeOverwrite", this.$onCursorChange); this.$onScrollTopChange = this.onScrollTopChange.bind(this); this.session.addEventListener("changeScrollTop", this.$onScrollTopChange); this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange); this.selection = session.getSelection(); this.selection.addEventListener("changeCursor", this.$onCursorChange); this.$onSelectionChange = this.onSelectionChange.bind(this); this.selection.addEventListener("changeSelection", this.$onSelectionChange); this.onChangeMode(); this.$blockScrolling += 1; this.onCursorChange(); this.$blockScrolling -= 1; this.onScrollTopChange(); this.onScrollLeftChange(); this.onSelectionChange(); this.onChangeFrontMarker(); this.onChangeBackMarker(); this.onChangeBreakpoint(); this.onChangeAnnotation(); this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); this.renderer.updateFull(); } else { this.selection = null; this.renderer.setSession(session); } this._signal("changeSession", { session: session, oldSession: oldSession }); oldSession && oldSession._signal("changeEditor", {oldEditor: this}); session && session._signal("changeEditor", {editor: this}); }; this.getSession = function() { return this.session; }; this.setValue = function(val, cursorPos) { this.session.doc.setValue(val); if (!cursorPos) this.selectAll(); else if (cursorPos == 1) this.navigateFileEnd(); else if (cursorPos == -1) this.navigateFileStart(); return val; }; this.getValue = function() { return this.session.getValue(); }; this.getSelection = function() { return this.selection; }; this.resize = function(force) { this.renderer.onResize(force); }; this.setTheme = function(theme, cb) { this.renderer.setTheme(theme, cb); }; this.getTheme = function() { return this.renderer.getTheme(); }; this.setStyle = function(style) { this.renderer.setStyle(style); }; this.unsetStyle = function(style) { this.renderer.unsetStyle(style); }; this.getFontSize = function () { return this.getOption("fontSize") || dom.computedStyle(this.container, "fontSize"); }; this.setFontSize = function(size) { this.setOption("fontSize", size); }; this.$highlightBrackets = function() { if (this.session.$bracketHighlight) { this.session.removeMarker(this.session.$bracketHighlight); this.session.$bracketHighlight = null; } if (this.$highlightPending) { return; } var self = this; this.$highlightPending = true; setTimeout(function() { self.$highlightPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = session.findMatchingBracket(self.getCursorPosition()); if (pos) { var range = new Range(pos.row, pos.column, pos.row, pos.column + 1); } else if (session.$mode.getMatching) { var range = session.$mode.getMatching(self.session); } if (range) session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text"); }, 50); }; this.$highlightTags = function() { if (this.$highlightTagPending) return; var self = this; this.$highlightTagPending = true; setTimeout(function() { self.$highlightTagPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = self.getCursorPosition(); var iterator = new TokenIterator(self.session, pos.row, pos.column); var token = iterator.getCurrentToken(); if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { session.removeMarker(session.$tagHighlight); session.$tagHighlight = null; return; } if (token.type.indexOf("tag-open") != -1) { token = iterator.stepForward(); if (!token) return; } var tag = token.value; var depth = 0; var prevToken = iterator.stepBackward(); if (prevToken.value == '<'){ do { prevToken = token; token = iterator.stepForward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<'){ depth++; } else if (prevToken.value === '= 0); } else { do { token = prevToken; prevToken = iterator.stepBackward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<') { depth++; } else if (prevToken.value === ' 1)) highlight = false; } if (session.$highlightLineMarker && !highlight) { session.removeMarker(session.$highlightLineMarker.id); session.$highlightLineMarker = null; } else if (!session.$highlightLineMarker && highlight) { var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); range.id = session.addMarker(range, "ace_active-line", "screenLine"); session.$highlightLineMarker = range; } else if (highlight) { session.$highlightLineMarker.start.row = highlight.row; session.$highlightLineMarker.end.row = highlight.row; session.$highlightLineMarker.start.column = highlight.column; session._signal("changeBackMarker"); } }; this.onSelectionChange = function(e) { var session = this.session; if (session.$selectionMarker) { session.removeMarker(session.$selectionMarker); } session.$selectionMarker = null; if (!this.selection.isEmpty()) { var range = this.selection.getRange(); var style = this.getSelectionStyle(); session.$selectionMarker = session.addMarker(range, "ace_selection", style); } else { this.$updateHighlightActiveLine(); } var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); this.session.highlight(re); this._signal("changeSelection"); }; this.$getSelectionHighLightRegexp = function() { var session = this.session; var selection = this.getSelectionRange(); if (selection.isEmpty() || selection.isMultiLine()) return; var startOuter = selection.start.column - 1; var endOuter = selection.end.column + 1; var line = session.getLine(selection.start.row); var lineCols = line.length; var needle = line.substring(Math.max(startOuter, 0), Math.min(endOuter, lineCols)); if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || (endOuter <= lineCols && /[\w\d]$/.test(needle))) return; needle = line.substring(selection.start.column, selection.end.column); if (!/^[\w\d]+$/.test(needle)) return; var re = this.$search.$assembleRegExp({ wholeWord: true, caseSensitive: true, needle: needle }); return re; }; this.onChangeFrontMarker = function() { this.renderer.updateFrontMarkers(); }; this.onChangeBackMarker = function() { this.renderer.updateBackMarkers(); }; this.onChangeBreakpoint = function() { this.renderer.updateBreakpoints(); }; this.onChangeAnnotation = function() { this.renderer.setAnnotations(this.session.getAnnotations()); }; this.onChangeMode = function(e) { this.renderer.updateText(); this._emit("changeMode", e); }; this.onChangeWrapLimit = function() { this.renderer.updateFull(); }; this.onChangeWrapMode = function() { this.renderer.onResize(true); }; this.onChangeFold = function() { this.$updateHighlightActiveLine(); this.renderer.updateFull(); }; this.getSelectedText = function() { return this.session.getTextRange(this.getSelectionRange()); }; this.getCopyText = function() { var text = this.getSelectedText(); this._signal("copy", text); return text; }; this.onCopy = function() { this.commands.exec("copy", this); }; this.onCut = function() { this.commands.exec("cut", this); }; this.onPaste = function(text) { if (this.$readOnly) return; var e = {text: text}; this._signal("paste", e); text = e.text; if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { this.insert(text); } else { var lines = text.split(/\r\n|\r|\n/); var ranges = this.selection.rangeList.ranges; if (lines.length > ranges.length || lines.length < 2 || !lines[1]) return this.commands.exec("insertstring", this, text); for (var i = ranges.length; i--;) { var range = ranges[i]; if (!range.isEmpty()) this.session.remove(range); this.session.insert(range.start, lines[i]); } } this.renderer.scrollCursorIntoView(); }; this.execCommand = function(command, args) { return this.commands.exec(command, this, args); }; this.insert = function(text, pasted) { var session = this.session; var mode = session.getMode(); var cursor = this.getCursorPosition(); if (this.getBehavioursEnabled() && !pasted) { var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); if (transform) { if (text !== transform.text) { this.session.mergeUndoDeltas = false; this.$mergeNextCommand = false; } text = transform.text; } } if (text == "\t") text = this.session.getTabString(); if (!this.selection.isEmpty()) { var range = this.getSelectionRange(); cursor = this.session.remove(range); this.clearSelection(); } else if (this.session.getOverwrite()) { var range = new Range.fromPoints(cursor, cursor); range.end.column += text.length; this.session.remove(range); } if (text == "\n" || text == "\r\n") { var line = session.getLine(cursor.row); if (cursor.column > line.search(/\S|$/)) { var d = line.substr(cursor.column).search(/\S|$/); session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); } } this.clearSelection(); var start = cursor.column; var lineState = session.getState(cursor.row); var line = session.getLine(cursor.row); var shouldOutdent = mode.checkOutdent(lineState, line, text); var end = session.insert(cursor, text); if (transform && transform.selection) { if (transform.selection.length == 2) { // Transform relative to the current column this.selection.setSelectionRange( new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1])); } else { // Transform relative to the current row. this.selection.setSelectionRange( new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3])); } } if (session.getDocument().isNewLine(text)) { var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); session.insert({row: cursor.row+1, column: 0}, lineIndent); } if (shouldOutdent) mode.autoOutdent(lineState, session, cursor.row); }; this.onTextInput = function(text) { this.keyBinding.onTextInput(text); }; this.onCommandKey = function(e, hashId, keyCode) { this.keyBinding.onCommandKey(e, hashId, keyCode); }; this.setOverwrite = function(overwrite) { this.session.setOverwrite(overwrite); }; this.getOverwrite = function() { return this.session.getOverwrite(); }; this.toggleOverwrite = function() { this.session.toggleOverwrite(); }; this.setScrollSpeed = function(speed) { this.setOption("scrollSpeed", speed); }; this.getScrollSpeed = function() { return this.getOption("scrollSpeed"); }; this.setDragDelay = function(dragDelay) { this.setOption("dragDelay", dragDelay); }; this.getDragDelay = function() { return this.getOption("dragDelay"); }; this.setSelectionStyle = function(val) { this.setOption("selectionStyle", val); }; this.getSelectionStyle = function() { return this.getOption("selectionStyle"); }; this.setHighlightActiveLine = function(shouldHighlight) { this.setOption("highlightActiveLine", shouldHighlight); }; this.getHighlightActiveLine = function() { return this.getOption("highlightActiveLine"); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.setHighlightSelectedWord = function(shouldHighlight) { this.setOption("highlightSelectedWord", shouldHighlight); }; this.getHighlightSelectedWord = function() { return this.$highlightSelectedWord; }; this.setAnimatedScroll = function(shouldAnimate){ this.renderer.setAnimatedScroll(shouldAnimate); }; this.getAnimatedScroll = function(){ return this.renderer.getAnimatedScroll(); }; this.setShowInvisibles = function(showInvisibles) { this.renderer.setShowInvisibles(showInvisibles); }; this.getShowInvisibles = function() { return this.renderer.getShowInvisibles(); }; this.setDisplayIndentGuides = function(display) { this.renderer.setDisplayIndentGuides(display); }; this.getDisplayIndentGuides = function() { return this.renderer.getDisplayIndentGuides(); }; this.setShowPrintMargin = function(showPrintMargin) { this.renderer.setShowPrintMargin(showPrintMargin); }; this.getShowPrintMargin = function() { return this.renderer.getShowPrintMargin(); }; this.setPrintMarginColumn = function(showPrintMargin) { this.renderer.setPrintMarginColumn(showPrintMargin); }; this.getPrintMarginColumn = function() { return this.renderer.getPrintMarginColumn(); }; this.setReadOnly = function(readOnly) { this.setOption("readOnly", readOnly); }; this.getReadOnly = function() { return this.getOption("readOnly"); }; this.setBehavioursEnabled = function (enabled) { this.setOption("behavioursEnabled", enabled); }; this.getBehavioursEnabled = function () { return this.getOption("behavioursEnabled"); }; this.setWrapBehavioursEnabled = function (enabled) { this.setOption("wrapBehavioursEnabled", enabled); }; this.getWrapBehavioursEnabled = function () { return this.getOption("wrapBehavioursEnabled"); }; this.setShowFoldWidgets = function(show) { this.setOption("showFoldWidgets", show); }; this.getShowFoldWidgets = function() { return this.getOption("showFoldWidgets"); }; this.setFadeFoldWidgets = function(fade) { this.setOption("fadeFoldWidgets", fade); }; this.getFadeFoldWidgets = function() { return this.getOption("fadeFoldWidgets"); }; this.remove = function(dir) { if (this.selection.isEmpty()){ if (dir == "left") this.selection.selectLeft(); else this.selection.selectRight(); } var range = this.getSelectionRange(); if (this.getBehavioursEnabled()) { var session = this.session; var state = session.getState(range.start.row); var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); if (range.end.column === 0) { var text = session.getTextRange(range); if (text[text.length - 1] == "\n") { var line = session.getLine(range.end.row); if (/^\s+$/.test(line)) { range.end.column = line.length; } } } if (new_range) range = new_range; } this.session.remove(range); this.clearSelection(); }; this.removeWordRight = function() { if (this.selection.isEmpty()) this.selection.selectWordRight(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeWordLeft = function() { if (this.selection.isEmpty()) this.selection.selectWordLeft(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineStart = function() { if (this.selection.isEmpty()) this.selection.selectLineStart(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineEnd = function() { if (this.selection.isEmpty()) this.selection.selectLineEnd(); var range = this.getSelectionRange(); if (range.start.column == range.end.column && range.start.row == range.end.row) { range.end.column = 0; range.end.row++; } this.session.remove(range); this.clearSelection(); }; this.splitLine = function() { if (!this.selection.isEmpty()) { this.session.remove(this.getSelectionRange()); this.clearSelection(); } var cursor = this.getCursorPosition(); this.insert("\n"); this.moveCursorToPosition(cursor); }; this.transposeLetters = function() { if (!this.selection.isEmpty()) { return; } var cursor = this.getCursorPosition(); var column = cursor.column; if (column === 0) return; var line = this.session.getLine(cursor.row); var swap, range; if (column < line.length) { swap = line.charAt(column) + line.charAt(column-1); range = new Range(cursor.row, column-1, cursor.row, column+1); } else { swap = line.charAt(column-1) + line.charAt(column-2); range = new Range(cursor.row, column-2, cursor.row, column); } this.session.replace(range, swap); }; this.toLowerCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toLowerCase()); this.selection.setSelectionRange(originalRange); }; this.toUpperCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toUpperCase()); this.selection.setSelectionRange(originalRange); }; this.indent = function() { var session = this.session; var range = this.getSelectionRange(); if (range.start.row < range.end.row) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } else if (range.start.column < range.end.column) { var text = session.getTextRange(range); if (!/^\s+$/.test(text)) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } } var line = session.getLine(range.start.row); var position = range.start; var size = session.getTabSize(); var column = session.documentToScreenColumn(position.row, position.column); if (this.session.getUseSoftTabs()) { var count = (size - column % size); var indentString = lang.stringRepeat(" ", count); } else { var count = column % size; while (line[range.start.column] == " " && count) { range.start.column--; count--; } this.selection.setSelectionRange(range); indentString = "\t"; } return this.insert(indentString); }; this.blockIndent = function() { var rows = this.$getSelectedRows(); this.session.indentRows(rows.first, rows.last, "\t"); }; this.blockOutdent = function() { var selection = this.session.getSelection(); this.session.outdentRows(selection.getRange()); }; this.sortLines = function() { var rows = this.$getSelectedRows(); var session = this.session; var lines = []; for (i = rows.first; i <= rows.last; i++) lines.push(session.getLine(i)); lines.sort(function(a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); var deleteRange = new Range(0, 0, 0, 0); for (var i = rows.first; i <= rows.last; i++) { var line = session.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; deleteRange.end.column = line.length; session.replace(deleteRange, lines[i-rows.first]); } }; this.toggleCommentLines = function() { var state = this.session.getState(this.getCursorPosition().row); var rows = this.$getSelectedRows(); this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); }; this.toggleBlockComment = function() { var cursor = this.getCursorPosition(); var state = this.session.getState(cursor.row); var range = this.getSelectionRange(); this.session.getMode().toggleBlockComment(state, this.session, range, cursor); }; this.getNumberAt = function(row, column) { var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; _numberRx.lastIndex = 0; var s = this.session.getLine(row); while (_numberRx.lastIndex < column) { var m = _numberRx.exec(s); if(m.index <= column && m.index+m[0].length >= column){ var number = { value: m[0], start: m.index, end: m.index+m[0].length }; return number; } } return null; }; this.modifyNumber = function(amount) { var row = this.selection.getCursor().row; var column = this.selection.getCursor().column; var charRange = new Range(row, column-1, row, column); var c = this.session.getTextRange(charRange); if (!isNaN(parseFloat(c)) && isFinite(c)) { var nr = this.getNumberAt(row, column); if (nr) { var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; var decimals = nr.start + nr.value.length - fp; var t = parseFloat(nr.value); t *= Math.pow(10, decimals); if(fp !== nr.end && column < fp){ amount *= Math.pow(10, nr.end - column - 1); } else { amount *= Math.pow(10, nr.end - column); } t += amount; t /= Math.pow(10, decimals); var nnr = t.toFixed(decimals); var replaceRange = new Range(row, nr.start, row, nr.end); this.session.replace(replaceRange, nnr); this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); } } }; this.removeLines = function() { var rows = this.$getSelectedRows(); var range; if (rows.first === 0 || rows.last+1 < this.session.getLength()) range = new Range(rows.first, 0, rows.last+1, 0); else range = new Range( rows.first-1, this.session.getLine(rows.first-1).length, rows.last, this.session.getLine(rows.last).length ); this.session.remove(range); this.clearSelection(); }; this.duplicateSelection = function() { var sel = this.selection; var doc = this.session; var range = sel.getRange(); var reverse = sel.isBackwards(); if (range.isEmpty()) { var row = range.start.row; doc.duplicateLines(row, row); } else { var point = reverse ? range.start : range.end; var endPoint = doc.insert(point, doc.getTextRange(range), false); range.start = point; range.end = endPoint; sel.setSelectionRange(range, reverse); } }; this.moveLinesDown = function() { this.$moveLines(1, false); }; this.moveLinesUp = function() { this.$moveLines(-1, false); }; this.moveText = function(range, toPosition, copy) { return this.session.moveText(range, toPosition, copy); }; this.copyLinesUp = function() { this.$moveLines(-1, true); }; this.copyLinesDown = function() { this.$moveLines(1, true); }; this.$moveLines = function(dir, copy) { var rows, moved; var selection = this.selection; if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { var range = selection.toOrientedRange(); rows = this.$getSelectedRows(range); moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); if (copy && dir == -1) moved = 0; range.moveBy(moved, 0); selection.fromOrientedRange(range); } else { var ranges = selection.rangeList.ranges; selection.rangeList.detach(this.session); this.inVirtualSelectionMode = true; var diff = 0; var totalDiff = 0; var l = ranges.length; for (var i = 0; i < l; i++) { var rangeIndex = i; ranges[i].moveBy(diff, 0); rows = this.$getSelectedRows(ranges[i]); var first = rows.first; var last = rows.last; while (++i < l) { if (totalDiff) ranges[i].moveBy(totalDiff, 0); var subRows = this.$getSelectedRows(ranges[i]); if (copy && subRows.first != last) break; else if (!copy && subRows.first > last + 1) break; last = subRows.last; } i--; diff = this.session.$moveLines(first, last, copy ? 0 : dir); if (copy && dir == -1) rangeIndex = i + 1; while (rangeIndex <= i) { ranges[rangeIndex].moveBy(diff, 0); rangeIndex++; } if (!copy) diff = 0; totalDiff += diff; } selection.fromOrientedRange(selection.ranges[0]); selection.rangeList.attach(this.session); this.inVirtualSelectionMode = false; } }; this.$getSelectedRows = function(range) { range = (range || this.getSelectionRange()).collapseRows(); return { first: this.session.getRowFoldStart(range.start.row), last: this.session.getRowFoldEnd(range.end.row) }; }; this.onCompositionStart = function(text) { this.renderer.showComposition(this.getCursorPosition()); }; this.onCompositionUpdate = function(text) { this.renderer.setCompositionText(text); }; this.onCompositionEnd = function() { this.renderer.hideComposition(); }; this.getFirstVisibleRow = function() { return this.renderer.getFirstVisibleRow(); }; this.getLastVisibleRow = function() { return this.renderer.getLastVisibleRow(); }; this.isRowVisible = function(row) { return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); }; this.isRowFullyVisible = function(row) { return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); }; this.$getVisibleRowCount = function() { return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; }; this.$moveByPage = function(dir, select) { var renderer = this.renderer; var config = this.renderer.layerConfig; var rows = dir * Math.floor(config.height / config.lineHeight); this.$blockScrolling++; if (select === true) { this.selection.$moveSelection(function(){ this.moveCursorBy(rows, 0); }); } else if (select === false) { this.selection.moveCursorBy(rows, 0); this.selection.clearSelection(); } this.$blockScrolling--; var scrollTop = renderer.scrollTop; renderer.scrollBy(0, rows * config.lineHeight); if (select != null) renderer.scrollCursorIntoView(null, 0.5); renderer.animateScrolling(scrollTop); }; this.selectPageDown = function() { this.$moveByPage(1, true); }; this.selectPageUp = function() { this.$moveByPage(-1, true); }; this.gotoPageDown = function() { this.$moveByPage(1, false); }; this.gotoPageUp = function() { this.$moveByPage(-1, false); }; this.scrollPageDown = function() { this.$moveByPage(1); }; this.scrollPageUp = function() { this.$moveByPage(-1); }; this.scrollToRow = function(row) { this.renderer.scrollToRow(row); }; this.scrollToLine = function(line, center, animate, callback) { this.renderer.scrollToLine(line, center, animate, callback); }; this.centerSelection = function() { var range = this.getSelectionRange(); var pos = { row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) }; this.renderer.alignCursor(pos, 0.5); }; this.getCursorPosition = function() { return this.selection.getCursor(); }; this.getCursorPositionScreen = function() { return this.session.documentToScreenPosition(this.getCursorPosition()); }; this.getSelectionRange = function() { return this.selection.getRange(); }; this.selectAll = function() { this.$blockScrolling += 1; this.selection.selectAll(); this.$blockScrolling -= 1; }; this.clearSelection = function() { this.selection.clearSelection(); }; this.moveCursorTo = function(row, column) { this.selection.moveCursorTo(row, column); }; this.moveCursorToPosition = function(pos) { this.selection.moveCursorToPosition(pos); }; this.jumpToMatching = function(select, expand) { var cursor = this.getCursorPosition(); var iterator = new TokenIterator(this.session, cursor.row, cursor.column); var prevToken = iterator.getCurrentToken(); var token = prevToken || iterator.stepForward(); if (!token) return; var matchType; var found = false; var depth = {}; var i = cursor.column - token.start; var bracketType; var brackets = { ")": "(", "(": "(", "]": "[", "[": "[", "{": "{", "}": "{" }; do { if (token.value.match(/[{}()\[\]]/g)) { for (; i < token.value.length && !found; i++) { if (!brackets[token.value[i]]) { continue; } bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); if (isNaN(depth[bracketType])) { depth[bracketType] = 0; } switch (token.value[i]) { case '(': case '[': case '{': depth[bracketType]++; break; case ')': case ']': case '}': depth[bracketType]--; if (depth[bracketType] === -1) { matchType = 'bracket'; found = true; } break; } } } else if (token && token.type.indexOf('tag-name') !== -1) { if (isNaN(depth[token.value])) { depth[token.value] = 0; } if (prevToken.value === '<') { depth[token.value]++; } else if (prevToken.value === '= 0; --i) { if(this.$tryReplace(ranges[i], replacement)) { replaced++; } } this.selection.setSelectionRange(selection); this.$blockScrolling -= 1; return replaced; }; this.$tryReplace = function(range, replacement) { var input = this.session.getTextRange(range); replacement = this.$search.replace(input, replacement); if (replacement !== null) { range.end = this.session.replace(range, replacement); return range; } else { return null; } }; this.getLastSearchOptions = function() { return this.$search.getOptions(); }; this.find = function(needle, options, animate) { if (!options) options = {}; if (typeof needle == "string" || needle instanceof RegExp) options.needle = needle; else if (typeof needle == "object") oop.mixin(options, needle); var range = this.selection.getRange(); if (options.needle == null) { needle = this.session.getTextRange(range) || this.$search.$options.needle; if (!needle) { range = this.session.getWordRange(range.start.row, range.start.column); needle = this.session.getTextRange(range); } this.$search.set({needle: needle}); } this.$search.set(options); if (!options.start) this.$search.set({start: range}); var newRange = this.$search.find(this.session); if (options.preventScroll) return newRange; if (newRange) { this.revealRange(newRange, animate); return newRange; } if (options.backwards) range.start = range.end; else range.end = range.start; this.selection.setRange(range); }; this.findNext = function(options, animate) { this.find({skipCurrent: true, backwards: false}, options, animate); }; this.findPrevious = function(options, animate) { this.find(options, {skipCurrent: true, backwards: true}, animate); }; this.revealRange = function(range, animate) { this.$blockScrolling += 1; this.session.unfold(range); this.selection.setSelectionRange(range); this.$blockScrolling -= 1; var scrollTop = this.renderer.scrollTop; this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); if (animate !== false) this.renderer.animateScrolling(scrollTop); }; this.undo = function() { this.$blockScrolling++; this.session.getUndoManager().undo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.redo = function() { this.$blockScrolling++; this.session.getUndoManager().redo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.destroy = function() { this.renderer.destroy(); this._signal("destroy", this); if (this.session) { this.session.destroy(); } }; this.setAutoScrollEditorIntoView = function(enable) { if (!enable) return; var rect; var self = this; var shouldScroll = false; if (!this.$scrollAnchor) this.$scrollAnchor = document.createElement("div"); var scrollAnchor = this.$scrollAnchor; scrollAnchor.style.cssText = "position:absolute"; this.container.insertBefore(scrollAnchor, this.container.firstChild); var onChangeSelection = this.on("changeSelection", function() { shouldScroll = true; }); var onBeforeRender = this.renderer.on("beforeRender", function() { if (shouldScroll) rect = self.renderer.container.getBoundingClientRect(); }); var onAfterRender = this.renderer.on("afterRender", function() { if (shouldScroll && rect && (self.isFocused() || self.searchBox && self.searchBox.isFocused()) ) { var renderer = self.renderer; var pos = renderer.$cursorLayer.$pixelPos; var config = renderer.layerConfig; var top = pos.top - config.offset; if (pos.top >= 0 && top + rect.top < 0) { shouldScroll = true; } else if (pos.top < config.height && pos.top + rect.top + config.lineHeight > window.innerHeight) { shouldScroll = false; } else { shouldScroll = null; } if (shouldScroll != null) { scrollAnchor.style.top = top + "px"; scrollAnchor.style.left = pos.left + "px"; scrollAnchor.style.height = config.lineHeight + "px"; scrollAnchor.scrollIntoView(shouldScroll); } shouldScroll = rect = null; } }); this.setAutoScrollEditorIntoView = function(enable) { if (enable) return; delete this.setAutoScrollEditorIntoView; this.removeEventListener("changeSelection", onChangeSelection); this.renderer.removeEventListener("afterRender", onAfterRender); this.renderer.removeEventListener("beforeRender", onBeforeRender); }; }; this.$resetCursorStyle = function() { var style = this.$cursorStyle || "ace"; var cursorLayer = this.renderer.$cursorLayer; if (!cursorLayer) return; cursorLayer.setSmoothBlinking(/smooth/.test(style)); cursorLayer.isBlinking = !this.$readOnly && style != "wide"; dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); }; }).call(Editor.prototype); config.defineOptions(Editor.prototype, "editor", { selectionStyle: { set: function(style) { this.onSelectionChange(); this._signal("changeSelectionStyle", {data: style}); }, initialValue: "line" }, highlightActiveLine: { set: function() {this.$updateHighlightActiveLine();}, initialValue: true }, highlightSelectedWord: { set: function(shouldHighlight) {this.$onSelectionChange();}, initialValue: true }, readOnly: { set: function(readOnly) { this.$resetCursorStyle(); }, initialValue: false }, cursorStyle: { set: function(val) { this.$resetCursorStyle(); }, values: ["ace", "slim", "smooth", "wide"], initialValue: "ace" }, mergeUndoDeltas: { values: [false, true, "always"], initialValue: true }, behavioursEnabled: {initialValue: true}, wrapBehavioursEnabled: {initialValue: true}, autoScrollEditorIntoView: { set: function(val) {this.setAutoScrollEditorIntoView(val)} }, hScrollBarAlwaysVisible: "renderer", vScrollBarAlwaysVisible: "renderer", highlightGutterLine: "renderer", animatedScroll: "renderer", showInvisibles: "renderer", showPrintMargin: "renderer", printMarginColumn: "renderer", printMargin: "renderer", fadeFoldWidgets: "renderer", showFoldWidgets: "renderer", showLineNumbers: "renderer", showGutter: "renderer", displayIndentGuides: "renderer", fontSize: "renderer", fontFamily: "renderer", maxLines: "renderer", minLines: "renderer", scrollPastEnd: "renderer", fixedWidthGutter: "renderer", theme: "renderer", scrollSpeed: "$mouseHandler", dragDelay: "$mouseHandler", dragEnabled: "$mouseHandler", focusTimout: "$mouseHandler", tooltipFollowsMouse: "$mouseHandler", firstLineNumber: "session", overwrite: "session", newLineMode: "session", useWorker: "session", useSoftTabs: "session", tabSize: "session", wrap: "session", foldStyle: "session", mode: "session" }); exports.Editor = Editor; }); define("ace/undomanager",["require","exports","module"], function(require, exports, module) { "use strict"; var UndoManager = function() { this.reset(); }; (function() { this.execute = function(options) { var deltas = options.args[0]; this.$doc = options.args[1]; if (options.merge && this.hasUndo()){ this.dirtyCounter--; deltas = this.$undoStack.pop().concat(deltas); } this.$undoStack.push(deltas); this.$redoStack = []; if (this.dirtyCounter < 0) { this.dirtyCounter = NaN; } this.dirtyCounter++; }; this.undo = function(dontSelect) { var deltas = this.$undoStack.pop(); var undoSelectionRange = null; if (deltas) { undoSelectionRange = this.$doc.undoChanges(deltas, dontSelect); this.$redoStack.push(deltas); this.dirtyCounter--; } return undoSelectionRange; }; this.redo = function(dontSelect) { var deltas = this.$redoStack.pop(); var redoSelectionRange = null; if (deltas) { redoSelectionRange = this.$doc.redoChanges(deltas, dontSelect); this.$undoStack.push(deltas); this.dirtyCounter++; } return redoSelectionRange; }; this.reset = function() { this.$undoStack = []; this.$redoStack = []; this.dirtyCounter = 0; }; this.hasUndo = function() { return this.$undoStack.length > 0; }; this.hasRedo = function() { return this.$redoStack.length > 0; }; this.markClean = function() { this.dirtyCounter = 0; }; this.isClean = function() { return this.dirtyCounter === 0; }; }).call(UndoManager.prototype); exports.UndoManager = UndoManager; }); define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var lang = require("../lib/lang"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Gutter = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_gutter-layer"; parentEl.appendChild(this.element); this.setShowFoldWidgets(this.$showFoldWidgets); this.gutterWidth = 0; this.$annotations = []; this.$updateAnnotations = this.$updateAnnotations.bind(this); this.$cells = []; }; (function() { oop.implement(this, EventEmitter); this.setSession = function(session) { if (this.session) this.session.removeEventListener("change", this.$updateAnnotations); this.session = session; if (session) session.on("change", this.$updateAnnotations); }; this.addGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.addGutterDecoration"); this.session.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.removeGutterDecoration"); this.session.removeGutterDecoration(row, className); }; this.setAnnotations = function(annotations) { this.$annotations = []; for (var i = 0; i < annotations.length; i++) { var annotation = annotations[i]; var row = annotation.row; var rowInfo = this.$annotations[row]; if (!rowInfo) rowInfo = this.$annotations[row] = {text: []}; var annoText = annotation.text; annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText); var type = annotation.type; if (type == "error") rowInfo.className = " ace_error"; else if (type == "warning" && rowInfo.className != " ace_error") rowInfo.className = " ace_warning"; else if (type == "info" && (!rowInfo.className)) rowInfo.className = " ace_info"; } }; this.$updateAnnotations = function (e) { if (!this.$annotations.length) return; var delta = e.data; var range = delta.range; var firstRow = range.start.row; var len = range.end.row - firstRow; if (len === 0) { } else if (delta.action == "removeText" || delta.action == "removeLines") { this.$annotations.splice(firstRow, len + 1, null); } else { var args = new Array(len + 1); args.unshift(firstRow, 1); this.$annotations.splice.apply(this.$annotations, args); } }; this.update = function(config) { var session = this.session; var firstRow = config.firstRow; var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar session.getLength() - 1); var fold = session.getNextFoldLine(firstRow); var foldStart = fold ? fold.start.row : Infinity; var foldWidgets = this.$showFoldWidgets && session.foldWidgets; var breakpoints = session.$breakpoints; var decorations = session.$decorations; var firstLineNumber = session.$firstLineNumber; var lastLineNumber = 0; var gutterRenderer = session.gutterRenderer || this.$renderer; var cell = null; var index = -1; var row = firstRow; while (true) { if (row > foldStart) { row = fold.end.row + 1; fold = session.getNextFoldLine(row, fold); foldStart = fold ? fold.start.row : Infinity; } if (row > lastRow) { while (this.$cells.length > index + 1) { cell = this.$cells.pop(); this.element.removeChild(cell.element); } break; } cell = this.$cells[++index]; if (!cell) { cell = {element: null, textNode: null, foldWidget: null}; cell.element = dom.createElement("div"); cell.textNode = document.createTextNode(''); cell.element.appendChild(cell.textNode); this.element.appendChild(cell.element); this.$cells[index] = cell; } var className = "ace_gutter-cell "; if (breakpoints[row]) className += breakpoints[row]; if (decorations[row]) className += decorations[row]; if (this.$annotations[row]) className += this.$annotations[row].className; if (cell.element.className != className) cell.element.className = className; var height = session.getRowLength(row) * config.lineHeight + "px"; if (height != cell.element.style.height) cell.element.style.height = height; if (foldWidgets) { var c = foldWidgets[row]; if (c == null) c = foldWidgets[row] = session.getFoldWidget(row); } if (c) { if (!cell.foldWidget) { cell.foldWidget = dom.createElement("span"); cell.element.appendChild(cell.foldWidget); } var className = "ace_fold-widget ace_" + c; if (c == "start" && row == foldStart && row < fold.end.row) className += " ace_closed"; else className += " ace_open"; if (cell.foldWidget.className != className) cell.foldWidget.className = className; var height = config.lineHeight + "px"; if (cell.foldWidget.style.height != height) cell.foldWidget.style.height = height; } else { if (cell.foldWidget) { cell.element.removeChild(cell.foldWidget); cell.foldWidget = null; } } var text = lastLineNumber = gutterRenderer ? gutterRenderer.getText(session, row) : row + firstLineNumber; if (text != cell.textNode.data) cell.textNode.data = text; row++; } this.element.style.height = config.minHeight + "px"; if (this.$fixedWidth || session.$useWrapMode) lastLineNumber = session.getLength() + firstLineNumber; var gutterWidth = gutterRenderer ? gutterRenderer.getWidth(session, lastLineNumber, config) : lastLineNumber.toString().length * config.characterWidth; var padding = this.$padding || this.$computePadding(); gutterWidth += padding.left + padding.right; if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { this.gutterWidth = gutterWidth; this.element.style.width = Math.ceil(this.gutterWidth) + "px"; this._emit("changeGutterWidth", gutterWidth); } }; this.$fixedWidth = false; this.$showLineNumbers = true; this.$renderer = ""; this.setShowLineNumbers = function(show) { this.$renderer = !show && { getWidth: function() {return ""}, getText: function() {return ""} }; }; this.getShowLineNumbers = function() { return this.$showLineNumbers; }; this.$showFoldWidgets = true; this.setShowFoldWidgets = function(show) { if (show) dom.addCssClass(this.element, "ace_folding-enabled"); else dom.removeCssClass(this.element, "ace_folding-enabled"); this.$showFoldWidgets = show; this.$padding = null; }; this.getShowFoldWidgets = function() { return this.$showFoldWidgets; }; this.$computePadding = function() { if (!this.element.firstChild) return {left: 0, right: 0}; var style = dom.computedStyle(this.element.firstChild); this.$padding = {}; this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; this.$padding.right = parseInt(style.paddingRight) || 0; return this.$padding; }; this.getRegion = function(point) { var padding = this.$padding || this.$computePadding(); var rect = this.element.getBoundingClientRect(); if (point.x < padding.left + rect.left) return "markers"; if (this.$showFoldWidgets && point.x > rect.right - padding.right) return "foldWidgets"; }; }).call(Gutter.prototype); exports.Gutter = Gutter; }); define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var dom = require("../lib/dom"); var Marker = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_marker-layer"; parentEl.appendChild(this.element); }; (function() { this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setMarkers = function(markers) { this.markers = markers; }; this.update = function(config) { var config = config || this.config; if (!config) return; this.config = config; var html = []; for (var key in this.markers) { var marker = this.markers[key]; if (!marker.range) { marker.update(html, this, this.session, config); continue; } var range = marker.range.clipRows(config.firstRow, config.lastRow); if (range.isEmpty()) continue; range = range.toScreenRange(this.session); if (marker.renderer) { var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; marker.renderer(html, range, left, top, config); } else if (marker.type == "fullLine") { this.drawFullLineMarker(html, range, marker.clazz, config); } else if (marker.type == "screenLine") { this.drawScreenLineMarker(html, range, marker.clazz, config); } else if (range.isMultiLine()) { if (marker.type == "text") this.drawTextMarker(html, range, marker.clazz, config); else this.drawMultiLineMarker(html, range, marker.clazz, config); } else { this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config); } } this.element.innerHTML = html.join(""); }; this.$getTop = function(row, layerConfig) { return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; }; this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) { var row = range.start.row; var lineRange = new Range( row, range.start.column, row, this.session.getScreenLastRowColumn(row) ); this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle); row = range.end.row; lineRange = new Range(row, 0, row, range.end.column); this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle); for (row = range.start.row + 1; row < range.end.row; row++) { lineRange.start.row = row; lineRange.end.row = row; lineRange.end.column = this.session.getScreenLastRowColumn(row); this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle); } }; this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var padding = this.$padding; var height = config.lineHeight; var top = this.$getTop(range.start.row, config); var left = padding + range.start.column * config.characterWidth; extraStyle = extraStyle || ""; stringBuilder.push( "
    " ); top = this.$getTop(range.end.row, config); var width = range.end.column * config.characterWidth; stringBuilder.push( "
    " ); height = (range.end.row - range.start.row - 1) * config.lineHeight; if (height < 0) return; top = this.$getTop(range.start.row + 1, config); stringBuilder.push( "
    " ); }; this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { var height = config.lineHeight; var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; stringBuilder.push( "
    " ); }; this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; if (range.start.row != range.end.row) height += this.$getTop(range.end.row, config) - top; stringBuilder.push( "
    " ); }; this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; stringBuilder.push( "
    " ); }; }).call(Marker.prototype); exports.Marker = Marker; }); define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Text = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_text-layer"; parentEl.appendChild(this.element); this.$updateEolChar = this.$updateEolChar.bind(this); }; (function() { oop.implement(this, EventEmitter); this.EOF_CHAR = "\xB6"; this.EOL_CHAR_LF = "\xAC"; this.EOL_CHAR_CRLF = "\xa4"; this.EOL_CHAR = this.EOL_CHAR_LF; this.TAB_CHAR = "\u2192"; //"\u21E5"; this.SPACE_CHAR = "\xB7"; this.$padding = 0; this.$updateEolChar = function() { var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF; if (this.EOL_CHAR != EOL_CHAR) { this.EOL_CHAR = EOL_CHAR; return true; } } this.setPadding = function(padding) { this.$padding = padding; this.element.style.padding = "0 " + padding + "px"; }; this.getLineHeight = function() { return this.$fontMetrics.$characterSize.height || 0; }; this.getCharacterWidth = function() { return this.$fontMetrics.$characterSize.width || 0; }; this.$setFontMetrics = function(measure) { this.$fontMetrics = measure; this.$fontMetrics.on("changeCharacterSize", function(e) { this._signal("changeCharacterSize", e); }.bind(this)); this.$pollSizeChanges(); } this.checkForSizeChanges = function() { this.$fontMetrics.checkForSizeChanges(); }; this.$pollSizeChanges = function() { return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); }; this.setSession = function(session) { this.session = session; if (session) this.$computeTabString(); }; this.showInvisibles = false; this.setShowInvisibles = function(showInvisibles) { if (this.showInvisibles == showInvisibles) return false; this.showInvisibles = showInvisibles; this.$computeTabString(); return true; }; this.displayIndentGuides = true; this.setDisplayIndentGuides = function(display) { if (this.displayIndentGuides == display) return false; this.displayIndentGuides = display; this.$computeTabString(); return true; }; this.$tabStrings = []; this.onChangeTabSize = this.$computeTabString = function() { var tabSize = this.session.getTabSize(); this.tabSize = tabSize; var tabStr = this.$tabStrings = [0]; for (var i = 1; i < tabSize + 1; i++) { if (this.showInvisibles) { tabStr.push("" + this.TAB_CHAR + lang.stringRepeat(" ", i - 1) + ""); } else { tabStr.push(lang.stringRepeat(" ", i)); } } if (this.displayIndentGuides) { this.$indentGuideRe = /\s\S| \t|\t |\s$/; var className = "ace_indent-guide"; var spaceClass = ""; var tabClass = ""; if (this.showInvisibles) { className += " ace_invisible"; spaceClass = " ace_invisible_space"; tabClass = " ace_invisible_tab"; var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); var tabContent = this.TAB_CHAR + lang.stringRepeat(" ", this.tabSize - 1); } else{ var spaceContent = lang.stringRepeat(" ", this.tabSize); var tabContent = spaceContent; } this.$tabStrings[" "] = "" + spaceContent + ""; this.$tabStrings["\t"] = "" + tabContent + ""; } }; this.updateLines = function(config, firstRow, lastRow) { if (this.config.lastRow != config.lastRow || this.config.firstRow != config.firstRow) { this.scrollLines(config); } this.config = config; var first = Math.max(firstRow, config.firstRow); var last = Math.min(lastRow, config.lastRow); var lineElements = this.element.childNodes; var lineElementsIdx = 0; for (var row = config.firstRow; row < first; row++) { var foldLine = this.session.getFoldLine(row); if (foldLine) { if (foldLine.containsRow(first)) { first = foldLine.start.row; break; } else { row = foldLine.end.row; } } lineElementsIdx ++; } var row = first; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > last) break; var lineElement = lineElements[lineElementsIdx++]; if (lineElement) { var html = []; this.$renderLine( html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false ); lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; lineElement.innerHTML = html.join(""); } row++; } }; this.scrollLines = function(config) { var oldConfig = this.config; this.config = config; if (!oldConfig || oldConfig.lastRow < config.firstRow) return this.update(config); if (config.lastRow < oldConfig.firstRow) return this.update(config); var el = this.element; if (oldConfig.firstRow < config.firstRow) for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) el.removeChild(el.firstChild); if (oldConfig.lastRow > config.lastRow) for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) el.removeChild(el.lastChild); if (config.firstRow < oldConfig.firstRow) { var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); if (el.firstChild) el.insertBefore(fragment, el.firstChild); else el.appendChild(fragment); } if (config.lastRow > oldConfig.lastRow) { var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); el.appendChild(fragment); } }; this.$renderLinesFragment = function(config, firstRow, lastRow) { var fragment = this.element.ownerDocument.createDocumentFragment(); var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } if (row > lastRow) break; var container = dom.createElement("div"); var html = []; this.$renderLine(html, row, false, row == foldStart ? foldLine : false); container.innerHTML = html.join(""); if (this.$useLineGroups()) { container.className = 'ace_line_group'; fragment.appendChild(container); container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; } else { while(container.firstChild) fragment.appendChild(container.firstChild); } row++; } return fragment; }; this.update = function(config) { this.config = config; var html = []; var firstRow = config.firstRow, lastRow = config.lastRow; var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > lastRow) break; if (this.$useLineGroups()) html.push("
    ") this.$renderLine(html, row, false, row == foldStart ? foldLine : false); if (this.$useLineGroups()) html.push("
    "); // end the line group row++; } this.element.innerHTML = html.join(""); }; this.$textToken = { "text": true, "rparen": true, "lparen": true }; this.$renderToken = function(stringBuilder, screenColumn, token, value) { var self = this; var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; var replaceFunc = function(c, a, b, tabIdx, idx4) { if (a) { return self.showInvisibles ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" : c; } else if (c == "&") { return "&"; } else if (c == "<") { return "<"; } else if (c == "\t") { var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); screenColumn += tabSize - 1; return self.$tabStrings[tabSize]; } else if (c == "\u3000") { var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; var space = self.showInvisibles ? self.SPACE_CHAR : ""; screenColumn += 1; return "" + space + ""; } else if (b) { return "" + self.SPACE_CHAR + ""; } else { screenColumn += 1; return "" + c + ""; } }; var output = value.replace(replaceReg, replaceFunc); if (!this.$textToken[token.type]) { var classes = "ace_" + token.type.replace(/\./g, " ace_"); var style = ""; if (token.type == "fold") style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; stringBuilder.push("", output, ""); } else { stringBuilder.push(output); } return screenColumn + value.length; }; this.renderIndentGuide = function(stringBuilder, value, max) { var cols = value.search(this.$indentGuideRe); if (cols <= 0 || cols >= max) return value; if (value[0] == " ") { cols -= cols % this.tabSize; stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); return value.substr(cols); } else if (value[0] == "\t") { stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols)); return value.substr(cols); } return value; }; this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) { var chars = 0; var split = 0; var splitChars = splits[0]; var screenColumn = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var value = token.value; if (i == 0 && this.displayIndentGuides) { chars = value.length; value = this.renderIndentGuide(stringBuilder, value, splitChars); if (!value) continue; chars -= value.length; } if (chars + value.length < splitChars) { screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); chars += value.length; } else { while (chars + value.length >= splitChars) { screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value.substring(0, splitChars - chars) ); value = value.substring(splitChars - chars); chars = splitChars; if (!onlyContents) { stringBuilder.push("", "
    " ); } split ++; screenColumn = 0; splitChars = splits[split] || Number.MAX_VALUE; } if (value.length != 0) { chars += value.length; screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value ); } } } }; this.$renderSimpleLine = function(stringBuilder, tokens) { var screenColumn = 0; var token = tokens[0]; var value = token.value; if (this.displayIndentGuides) value = this.renderIndentGuide(stringBuilder, value); if (value) screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); for (var i = 1; i < tokens.length; i++) { token = tokens[i]; value = token.value; screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); } }; this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { if (!foldLine && foldLine != false) foldLine = this.session.getFoldLine(row); if (foldLine) var tokens = this.$getFoldLineTokens(row, foldLine); else var tokens = this.session.getTokens(row); if (!onlyContents) { stringBuilder.push( "
    " ); } if (tokens.length) { var splits = this.session.getRowSplitData(row); if (splits && splits.length) this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); else this.$renderSimpleLine(stringBuilder, tokens); } if (this.showInvisibles) { if (foldLine) row = foldLine.end.row stringBuilder.push( "", row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, "" ); } if (!onlyContents) stringBuilder.push("
    "); }; this.$getFoldLineTokens = function(row, foldLine) { var session = this.session; var renderTokens = []; function addTokens(tokens, from, to) { var idx = 0, col = 0; while ((col + tokens[idx].value.length) < from) { col += tokens[idx].value.length; idx++; if (idx == tokens.length) return; } if (col != from) { var value = tokens[idx].value.substring(from - col); if (value.length > (to - from)) value = value.substring(0, to - from); renderTokens.push({ type: tokens[idx].type, value: value }); col = from + value.length; idx += 1; } while (col < to && idx < tokens.length) { var value = tokens[idx].value; if (value.length + col > to) { renderTokens.push({ type: tokens[idx].type, value: value.substring(0, to - col) }); } else renderTokens.push(tokens[idx]); col += value.length; idx += 1; } } var tokens = session.getTokens(row); foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { if (placeholder != null) { renderTokens.push({ type: "fold", value: placeholder }); } else { if (isNewRow) tokens = session.getTokens(row); if (tokens.length) addTokens(tokens, lastColumn, column); } }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); return renderTokens; }; this.$useLineGroups = function() { return this.session.getUseWrapMode(); }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.$measureNode) this.$measureNode.parentNode.removeChild(this.$measureNode); delete this.$measureNode; }; }).call(Text.prototype); exports.Text = Text; }); define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var IE8; var Cursor = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_cursor-layer"; parentEl.appendChild(this.element); if (IE8 === undefined) IE8 = "opacity" in this.element; this.isVisible = false; this.isBlinking = true; this.blinkInterval = 1000; this.smoothBlinking = false; this.cursors = []; this.cursor = this.addCursor(); dom.addCssClass(this.element, "ace_hidden-cursors"); this.$updateCursors = this.$updateVisibility.bind(this); }; (function() { this.$updateVisibility = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.visibility = val ? "" : "hidden"; }; this.$updateOpacity = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.opacity = val ? "" : "0"; }; this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setBlinking = function(blinking) { if (blinking != this.isBlinking){ this.isBlinking = blinking; this.restartTimer(); } }; this.setBlinkInterval = function(blinkInterval) { if (blinkInterval != this.blinkInterval){ this.blinkInterval = blinkInterval; this.restartTimer(); } }; this.setSmoothBlinking = function(smoothBlinking) { if (smoothBlinking != this.smoothBlinking && !IE8) { this.smoothBlinking = smoothBlinking; dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); this.$updateCursors(true); this.$updateCursors = (smoothBlinking ? this.$updateOpacity : this.$updateVisibility).bind(this); this.restartTimer(); } }; this.addCursor = function() { var el = dom.createElement("div"); el.className = "ace_cursor"; this.element.appendChild(el); this.cursors.push(el); return el; }; this.removeCursor = function() { if (this.cursors.length > 1) { var el = this.cursors.pop(); el.parentNode.removeChild(el); return el; } }; this.hideCursor = function() { this.isVisible = false; dom.addCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.showCursor = function() { this.isVisible = true; dom.removeCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.restartTimer = function() { var update = this.$updateCursors; clearInterval(this.intervalId); clearTimeout(this.timeoutId); if (this.smoothBlinking) { dom.removeCssClass(this.element, "ace_smooth-blinking"); } update(true); if (!this.isBlinking || !this.blinkInterval || !this.isVisible) return; if (this.smoothBlinking) { setTimeout(function(){ dom.addCssClass(this.element, "ace_smooth-blinking"); }.bind(this)); } var blink = function(){ this.timeoutId = setTimeout(function() { update(false); }, 0.6 * this.blinkInterval); }.bind(this); this.intervalId = setInterval(function() { update(true); blink(); }, this.blinkInterval); blink(); }; this.getPixelPosition = function(position, onScreen) { if (!this.config || !this.session) return {left : 0, top : 0}; if (!position) position = this.session.selection.getCursor(); var pos = this.session.documentToScreenPosition(position); var cursorLeft = this.$padding + pos.column * this.config.characterWidth; var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * this.config.lineHeight; return {left : cursorLeft, top : cursorTop}; }; this.update = function(config) { this.config = config; var selections = this.session.$selectionMarkers; var i = 0, cursorIndex = 0; if (selections === undefined || selections.length === 0){ selections = [{cursor: null}]; } for (var i = 0, n = selections.length; i < n; i++) { var pixelPos = this.getPixelPosition(selections[i].cursor, true); if ((pixelPos.top > config.height + config.offset || pixelPos.top < 0) && i > 1) { continue; } var style = (this.cursors[cursorIndex++] || this.addCursor()).style; if (!this.drawCursor) { style.left = pixelPos.left + "px"; style.top = pixelPos.top + "px"; style.width = config.characterWidth + "px"; style.height = config.lineHeight + "px"; } else { this.drawCursor(style, pixelPos, config, selections[i], this.session); } } while (this.cursors.length > cursorIndex) this.removeCursor(); var overwrite = this.session.getOverwrite(); this.$setOverwrite(overwrite); this.$pixelPos = pixelPos; this.restartTimer(); }; this.drawCursor = null; this.$setOverwrite = function(overwrite) { if (overwrite != this.overwrite) { this.overwrite = overwrite; if (overwrite) dom.addCssClass(this.element, "ace_overwrite-cursors"); else dom.removeCssClass(this.element, "ace_overwrite-cursors"); } }; this.destroy = function() { clearInterval(this.intervalId); clearTimeout(this.timeoutId); }; }).call(Cursor.prototype); exports.Cursor = Cursor; }); define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var event = require("./lib/event"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var ScrollBar = function(parent) { this.element = dom.createElement("div"); this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix; this.inner = dom.createElement("div"); this.inner.className = "ace_scrollbar-inner"; this.element.appendChild(this.inner); parent.appendChild(this.element); this.setVisible(false); this.skipEvent = false; event.addListener(this.element, "scroll", this.onScroll.bind(this)); event.addListener(this.element, "mousedown", event.preventDefault); }; (function() { oop.implement(this, EventEmitter); this.setVisible = function(isVisible) { this.element.style.display = isVisible ? "" : "none"; this.isVisible = isVisible; }; }).call(ScrollBar.prototype); var VScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollTop = 0; renderer.$scrollbarWidth = this.width = dom.scrollbarWidth(parent.ownerDocument); this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + "px"; }; oop.inherits(VScrollBar, ScrollBar); (function() { this.classSuffix = '-v'; this.onScroll = function() { if (!this.skipEvent) { this.scrollTop = this.element.scrollTop; this._emit("scroll", {data: this.scrollTop}); } this.skipEvent = false; }; this.getWidth = function() { return this.isVisible ? this.width : 0; }; this.setHeight = function(height) { this.element.style.height = height + "px"; }; this.setInnerHeight = function(height) { this.inner.style.height = height + "px"; }; this.setScrollHeight = function(height) { this.inner.style.height = height + "px"; }; this.setScrollTop = function(scrollTop) { if (this.scrollTop != scrollTop) { this.skipEvent = true; this.scrollTop = this.element.scrollTop = scrollTop; } }; }).call(VScrollBar.prototype); var HScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollLeft = 0; this.height = renderer.$scrollbarWidth; this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + "px"; }; oop.inherits(HScrollBar, ScrollBar); (function() { this.classSuffix = '-h'; this.onScroll = function() { if (!this.skipEvent) { this.scrollLeft = this.element.scrollLeft; this._emit("scroll", {data: this.scrollLeft}); } this.skipEvent = false; }; this.getHeight = function() { return this.isVisible ? this.height : 0; }; this.setWidth = function(width) { this.element.style.width = width + "px"; }; this.setInnerWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollLeft = function(scrollLeft) { if (this.scrollLeft != scrollLeft) { this.skipEvent = true; this.scrollLeft = this.element.scrollLeft = scrollLeft; } }; }).call(HScrollBar.prototype); exports.ScrollBar = VScrollBar; // backward compatibility exports.ScrollBarV = VScrollBar; // backward compatibility exports.ScrollBarH = HScrollBar; // backward compatibility exports.VScrollBar = VScrollBar; exports.HScrollBar = HScrollBar; }); define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) { "use strict"; var event = require("./lib/event"); var RenderLoop = function(onRender, win) { this.onRender = onRender; this.pending = false; this.changes = 0; this.window = win || window; }; (function() { this.schedule = function(change) { this.changes = this.changes | change; if (!this.pending && this.changes) { this.pending = true; var _self = this; event.nextFrame(function() { _self.pending = false; var changes; while (changes = _self.changes) { _self.changes = 0; _self.onRender(changes); } }, this.window); } }; }).call(RenderLoop.prototype); exports.RenderLoop = RenderLoop; }); define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var CHAR_COUNT = 0; var FontMetrics = exports.FontMetrics = function(parentEl, interval) { this.el = dom.createElement("div"); this.$setMeasureNodeStyles(this.el.style, true); this.$main = dom.createElement("div"); this.$setMeasureNodeStyles(this.$main.style); this.$measureNode = dom.createElement("div"); this.$setMeasureNodeStyles(this.$measureNode.style); this.el.appendChild(this.$main); this.el.appendChild(this.$measureNode); parentEl.appendChild(this.el); if (!CHAR_COUNT) this.$testFractionalRect(); this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); this.$characterSize = {width: 0, height: 0}; this.checkForSizeChanges(); }; (function() { oop.implement(this, EventEmitter); this.$characterSize = {width: 0, height: 0}; this.$testFractionalRect = function() { var el = dom.createElement("div"); this.$setMeasureNodeStyles(el.style); el.style.width = "0.2px"; document.documentElement.appendChild(el); var w = el.getBoundingClientRect().width; if (w > 0 && w < 1) CHAR_COUNT = 50; else CHAR_COUNT = 100; el.parentNode.removeChild(el); }; this.$setMeasureNodeStyles = function(style, isRoot) { style.width = style.height = "auto"; style.left = style.top = "0px"; style.visibility = "hidden"; style.position = "absolute"; style.whiteSpace = "pre"; if (useragent.isIE < 8) { style["font-family"] = "inherit"; } else { style.font = "inherit"; } style.overflow = isRoot ? "hidden" : "visible"; }; this.checkForSizeChanges = function() { var size = this.$measureSizes(); if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { this.$measureNode.style.fontWeight = "bold"; var boldSize = this.$measureSizes(); this.$measureNode.style.fontWeight = ""; this.$characterSize = size; this.charSizes = Object.create(null); this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; this._emit("changeCharacterSize", {data: size}); } }; this.$pollSizeChanges = function() { if (this.$pollSizeChangesTimer) return this.$pollSizeChangesTimer; var self = this; return this.$pollSizeChangesTimer = setInterval(function() { self.checkForSizeChanges(); }, 500); }; this.setPolling = function(val) { if (val) { this.$pollSizeChanges(); } else { if (this.$pollSizeChangesTimer) this.$pollSizeChangesTimer; } }; this.$measureSizes = function() { if (CHAR_COUNT === 50) { var rect = null; try { rect = this.$measureNode.getBoundingClientRect(); } catch(e) { rect = {width: 0, height:0 }; }; var size = { height: rect.height, width: rect.width / CHAR_COUNT }; } else { var size = { height: this.$measureNode.clientHeight, width: this.$measureNode.clientWidth / CHAR_COUNT }; } if (size.width === 0 || size.height === 0) return null; return size; }; this.$measureCharWidth = function(ch) { this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); var rect = this.$main.getBoundingClientRect(); return rect.width / CHAR_COUNT; }; this.getCharacterWidth = function(ch) { var w = this.charSizes[ch]; if (w === undefined) { this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; } return w; }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el); }; }).call(FontMetrics.prototype); }); define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var config = require("./config"); var useragent = require("./lib/useragent"); var GutterLayer = require("./layer/gutter").Gutter; var MarkerLayer = require("./layer/marker").Marker; var TextLayer = require("./layer/text").Text; var CursorLayer = require("./layer/cursor").Cursor; var HScrollBar = require("./scrollbar").HScrollBar; var VScrollBar = require("./scrollbar").VScrollBar; var RenderLoop = require("./renderloop").RenderLoop; var FontMetrics = require("./layer/font_metrics").FontMetrics; var EventEmitter = require("./lib/event_emitter").EventEmitter; var editorCss = ".ace_editor {\ position: relative;\ overflow: hidden;\ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ direction: ltr;\ }\ .ace_scroller {\ position: absolute;\ overflow: hidden;\ top: 0;\ bottom: 0;\ background-color: inherit;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ cursor: text;\ }\ .ace_content {\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ min-width: 100%;\ }\ .ace_dragging .ace_scroller:before{\ position: absolute;\ top: 0;\ left: 0;\ right: 0;\ bottom: 0;\ content: '';\ background: rgba(250, 250, 250, 0.01);\ z-index: 1000;\ }\ .ace_dragging.ace_dark .ace_scroller:before{\ background: rgba(0, 0, 0, 0.01);\ }\ .ace_selecting, .ace_selecting * {\ cursor: text !important;\ }\ .ace_gutter {\ position: absolute;\ overflow : hidden;\ width: auto;\ top: 0;\ bottom: 0;\ left: 0;\ cursor: default;\ z-index: 4;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ }\ .ace_gutter-active-line {\ position: absolute;\ left: 0;\ right: 0;\ }\ .ace_scroller.ace_scroll-left {\ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ }\ .ace_gutter-cell {\ padding-left: 19px;\ padding-right: 6px;\ background-repeat: no-repeat;\ }\ .ace_gutter-cell.ace_error {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_warning {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\ background-position: 2px center;\ }\ .ace_dark .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ }\ .ace_scrollbar {\ position: absolute;\ right: 0;\ bottom: 0;\ z-index: 6;\ }\ .ace_scrollbar-inner {\ position: absolute;\ cursor: text;\ left: 0;\ top: 0;\ }\ .ace_scrollbar-v{\ overflow-x: hidden;\ overflow-y: scroll;\ top: 0;\ }\ .ace_scrollbar-h {\ overflow-x: scroll;\ overflow-y: hidden;\ left: 0;\ }\ .ace_print-margin {\ position: absolute;\ height: 100%;\ }\ .ace_text-input {\ position: absolute;\ z-index: 0;\ width: 0.5em;\ height: 1em;\ opacity: 0;\ background: transparent;\ -moz-appearance: none;\ appearance: none;\ border: none;\ resize: none;\ outline: none;\ overflow: hidden;\ font: inherit;\ padding: 0 1px;\ margin: 0 -1px;\ text-indent: -1em;\ -ms-user-select: text;\ -moz-user-select: text;\ -webkit-user-select: text;\ user-select: text;\ }\ .ace_text-input.ace_composition {\ background: inherit;\ color: inherit;\ z-index: 1000;\ opacity: 1;\ text-indent: 0;\ }\ .ace_layer {\ z-index: 1;\ position: absolute;\ overflow: hidden;\ word-wrap: normal;\ white-space: pre;\ height: 100%;\ width: 100%;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ pointer-events: none;\ }\ .ace_gutter-layer {\ position: relative;\ width: auto;\ text-align: right;\ pointer-events: auto;\ }\ .ace_text-layer {\ font: inherit !important;\ }\ .ace_cjk {\ display: inline-block;\ text-align: center;\ }\ .ace_cursor-layer {\ z-index: 4;\ }\ .ace_cursor {\ z-index: 4;\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ border-left: 2px solid\ }\ .ace_slim-cursors .ace_cursor {\ border-left-width: 1px;\ }\ .ace_overwrite-cursors .ace_cursor {\ border-left-width: 0;\ border-bottom: 1px solid;\ }\ .ace_hidden-cursors .ace_cursor {\ opacity: 0.2;\ }\ .ace_smooth-blinking .ace_cursor {\ -webkit-transition: opacity 0.18s;\ transition: opacity 0.18s;\ }\ .ace_editor.ace_multiselect .ace_cursor {\ border-left-width: 1px;\ }\ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ position: absolute;\ z-index: 3;\ }\ .ace_marker-layer .ace_selection {\ position: absolute;\ z-index: 5;\ }\ .ace_marker-layer .ace_bracket {\ position: absolute;\ z-index: 6;\ }\ .ace_marker-layer .ace_active-line {\ position: absolute;\ z-index: 2;\ }\ .ace_marker-layer .ace_selected-word {\ position: absolute;\ z-index: 4;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ .ace_line .ace_fold {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ display: inline-block;\ height: 11px;\ margin-top: -2px;\ vertical-align: middle;\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\ background-repeat: no-repeat, repeat-x;\ background-position: center center, top left;\ color: transparent;\ border: 1px solid black;\ border-radius: 2px;\ cursor: pointer;\ pointer-events: auto;\ }\ .ace_dark .ace_fold {\ }\ .ace_fold:hover{\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\ }\ .ace_tooltip {\ background-color: #FFF;\ background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ border: 1px solid gray;\ border-radius: 1px;\ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ color: black;\ max-width: 100%;\ padding: 3px 4px;\ position: fixed;\ z-index: 999999;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ cursor: default;\ white-space: pre;\ word-wrap: break-word;\ line-height: normal;\ font-style: normal;\ font-weight: normal;\ letter-spacing: normal;\ pointer-events: none;\ }\ .ace_folding-enabled > .ace_gutter-cell {\ padding-right: 13px;\ }\ .ace_fold-widget {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ margin: 0 -12px 0 1px;\ display: none;\ width: 11px;\ vertical-align: top;\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: center;\ border-radius: 3px;\ border: 1px solid transparent;\ cursor: pointer;\ }\ .ace_folding-enabled .ace_fold-widget {\ display: inline-block; \ }\ .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\ }\ .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\ }\ .ace_fold-widget:hover {\ border: 1px solid rgba(0, 0, 0, 0.3);\ background-color: rgba(255, 255, 255, 0.2);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ }\ .ace_fold-widget:active {\ border: 1px solid rgba(0, 0, 0, 0.4);\ background-color: rgba(0, 0, 0, 0.05);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ }\ .ace_dark .ace_fold-widget {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\ }\ .ace_dark .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget:hover {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ background-color: rgba(255, 255, 255, 0.1);\ }\ .ace_dark .ace_fold-widget:active {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ }\ .ace_fold-widget.ace_invalid {\ background-color: #FFB4B4;\ border-color: #DE5555;\ }\ .ace_fade-fold-widgets .ace_fold-widget {\ -webkit-transition: opacity 0.4s ease 0.05s;\ transition: opacity 0.4s ease 0.05s;\ opacity: 0;\ }\ .ace_fade-fold-widgets:hover .ace_fold-widget {\ -webkit-transition: opacity 0.05s ease 0.05s;\ transition: opacity 0.05s ease 0.05s;\ opacity:1;\ }\ .ace_underline {\ text-decoration: underline;\ }\ .ace_bold {\ font-weight: bold;\ }\ .ace_nobold .ace_bold {\ font-weight: normal;\ }\ .ace_italic {\ font-style: italic;\ }\ .ace_error-marker {\ background-color: rgba(255, 0, 0,0.2);\ position: absolute;\ z-index: 9;\ }\ .ace_highlight-marker {\ background-color: rgba(255, 255, 0,0.2);\ position: absolute;\ z-index: 8;\ }\ "; dom.importCssString(editorCss, "ace_editor.css"); var VirtualRenderer = function(container, theme) { var _self = this; this.container = container || dom.createElement("div"); this.$keepTextAreaAtCursor = !useragent.isOldIE; dom.addCssClass(this.container, "ace_editor"); this.setTheme(theme); this.$gutter = dom.createElement("div"); this.$gutter.className = "ace_gutter"; this.container.appendChild(this.$gutter); this.scroller = dom.createElement("div"); this.scroller.className = "ace_scroller"; this.container.appendChild(this.scroller); this.content = dom.createElement("div"); this.content.className = "ace_content"; this.scroller.appendChild(this.content); this.$gutterLayer = new GutterLayer(this.$gutter); this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); this.$markerBack = new MarkerLayer(this.content); var textLayer = this.$textLayer = new TextLayer(this.content); this.canvas = textLayer.element; this.$markerFront = new MarkerLayer(this.content); this.$cursorLayer = new CursorLayer(this.content); this.$horizScroll = false; this.$vScroll = false; this.scrollBar = this.scrollBarV = new VScrollBar(this.container, this); this.scrollBarH = new HScrollBar(this.container, this); this.scrollBarV.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollTop(e.data - _self.scrollMargin.top); }); this.scrollBarH.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollLeft(e.data - _self.scrollMargin.left); }); this.scrollTop = 0; this.scrollLeft = 0; this.cursorPos = { row : 0, column : 0 }; this.$fontMetrics = new FontMetrics(this.container, 500); this.$textLayer.$setFontMetrics(this.$fontMetrics); this.$textLayer.addEventListener("changeCharacterSize", function(e) { _self.updateCharacterSize(); _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); _self._signal("changeCharacterSize", e); }); this.$size = { width: 0, height: 0, scrollerHeight: 0, scrollerWidth: 0, $dirty: true }; this.layerConfig = { width : 1, padding : 0, firstRow : 0, firstRowScreen: 0, lastRow : 0, lineHeight : 0, characterWidth : 0, minHeight : 1, maxHeight : 1, offset : 0, height : 1, gutterOffset: 1 }; this.scrollMargin = { left: 0, right: 0, top: 0, bottom: 0, v: 0, h: 0 }; this.$loop = new RenderLoop( this.$renderChanges.bind(this), this.container.ownerDocument.defaultView ); this.$loop.schedule(this.CHANGE_FULL); this.updateCharacterSize(); this.setPadding(4); config.resetOptions(this); config._emit("renderer", this); }; (function() { this.CHANGE_CURSOR = 1; this.CHANGE_MARKER = 2; this.CHANGE_GUTTER = 4; this.CHANGE_SCROLL = 8; this.CHANGE_LINES = 16; this.CHANGE_TEXT = 32; this.CHANGE_SIZE = 64; this.CHANGE_MARKER_BACK = 128; this.CHANGE_MARKER_FRONT = 256; this.CHANGE_FULL = 512; this.CHANGE_H_SCROLL = 1024; oop.implement(this, EventEmitter); this.updateCharacterSize = function() { if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { this.$allowBoldFonts = this.$textLayer.allowBoldFonts; this.setStyle("ace_nobold", !this.$allowBoldFonts); } this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth(); this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight(); this.$updatePrintMargin(); }; this.setSession = function(session) { if (this.session) this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); this.session = session; if (session && this.scrollMargin.top && session.getScrollTop() <= 0) session.setScrollTop(-this.scrollMargin.top); this.$cursorLayer.setSession(session); this.$markerBack.setSession(session); this.$markerFront.setSession(session); this.$gutterLayer.setSession(session); this.$textLayer.setSession(session); if (!session) return; this.$loop.schedule(this.CHANGE_FULL); this.session.$setFontMetrics(this.$fontMetrics); this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); this.onChangeNewLineMode() this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); }; this.updateLines = function(firstRow, lastRow, force) { if (lastRow === undefined) lastRow = Infinity; if (!this.$changedLines) { this.$changedLines = { firstRow: firstRow, lastRow: lastRow }; } else { if (this.$changedLines.firstRow > firstRow) this.$changedLines.firstRow = firstRow; if (this.$changedLines.lastRow < lastRow) this.$changedLines.lastRow = lastRow; } if (this.$changedLines.lastRow < this.layerConfig.firstRow) { if (force) this.$changedLines.lastRow = this.layerConfig.lastRow; else return; } if (this.$changedLines.firstRow > this.layerConfig.lastRow) return; this.$loop.schedule(this.CHANGE_LINES); }; this.onChangeNewLineMode = function() { this.$loop.schedule(this.CHANGE_TEXT); this.$textLayer.$updateEolChar(); }; this.onChangeTabSize = function() { this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); this.$textLayer.onChangeTabSize(); }; this.updateText = function() { this.$loop.schedule(this.CHANGE_TEXT); }; this.updateFull = function(force) { if (force) this.$renderChanges(this.CHANGE_FULL, true); else this.$loop.schedule(this.CHANGE_FULL); }; this.updateFontSize = function() { this.$textLayer.checkForSizeChanges(); }; this.$changes = 0; this.$updateSizeAsync = function() { if (this.$loop.pending) this.$size.$dirty = true; else this.onResize(); }; this.onResize = function(force, gutterWidth, width, height) { if (this.resizing > 2) return; else if (this.resizing > 0) this.resizing++; else this.resizing = force ? 1 : 0; var el = this.container; if (!height) height = el.clientHeight || el.scrollHeight; if (!width) width = el.clientWidth || el.scrollWidth; var changes = this.$updateCachedSize(force, gutterWidth, width, height); if (!this.$size.scrollerHeight || (!width && !height)) return this.resizing = 0; if (force) this.$gutterLayer.$padding = null; if (force) this.$renderChanges(changes | this.$changes, true); else this.$loop.schedule(changes | this.$changes); if (this.resizing) this.resizing = 0; this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; }; this.$updateCachedSize = function(force, gutterWidth, width, height) { height -= (this.$extraHeight || 0); var changes = 0; var size = this.$size; var oldSize = { width: size.width, height: size.height, scrollerHeight: size.scrollerHeight, scrollerWidth: size.scrollerWidth }; if (height && (force || size.height != height)) { size.height = height; changes |= this.CHANGE_SIZE; size.scrollerHeight = size.height; if (this.$horizScroll) size.scrollerHeight -= this.scrollBarH.getHeight(); this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; changes = changes | this.CHANGE_SCROLL; } if (width && (force || size.width != width)) { changes |= this.CHANGE_SIZE; size.width = width; if (gutterWidth == null) gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; this.gutterWidth = gutterWidth; this.scrollBarH.element.style.left = this.scroller.style.left = gutterWidth + "px"; size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); this.scrollBarH.element.style.right = this.scroller.style.right = this.scrollBarV.getWidth() + "px"; this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) changes |= this.CHANGE_FULL; } size.$dirty = !width || !height; if (changes) this._signal("resize", oldSize); return changes; }; this.onGutterResize = function() { var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; if (gutterWidth != this.gutterWidth) this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { this.$loop.schedule(this.CHANGE_FULL); } else if (this.$size.$dirty) { this.$loop.schedule(this.CHANGE_FULL); } else { this.$computeLayerConfig(); this.$loop.schedule(this.CHANGE_MARKER); } }; this.adjustWrapLimit = function() { var availableWidth = this.$size.scrollerWidth - this.$padding * 2; var limit = Math.floor(availableWidth / this.characterWidth); return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); }; this.setAnimatedScroll = function(shouldAnimate){ this.setOption("animatedScroll", shouldAnimate); }; this.getAnimatedScroll = function() { return this.$animatedScroll; }; this.setShowInvisibles = function(showInvisibles) { this.setOption("showInvisibles", showInvisibles); }; this.getShowInvisibles = function() { return this.getOption("showInvisibles"); }; this.getDisplayIndentGuides = function() { return this.getOption("displayIndentGuides"); }; this.setDisplayIndentGuides = function(display) { this.setOption("displayIndentGuides", display); }; this.setShowPrintMargin = function(showPrintMargin) { this.setOption("showPrintMargin", showPrintMargin); }; this.getShowPrintMargin = function() { return this.getOption("showPrintMargin"); }; this.setPrintMarginColumn = function(showPrintMargin) { this.setOption("printMarginColumn", showPrintMargin); }; this.getPrintMarginColumn = function() { return this.getOption("printMarginColumn"); }; this.getShowGutter = function(){ return this.getOption("showGutter"); }; this.setShowGutter = function(show){ return this.setOption("showGutter", show); }; this.getFadeFoldWidgets = function(){ return this.getOption("fadeFoldWidgets") }; this.setFadeFoldWidgets = function(show) { this.setOption("fadeFoldWidgets", show); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.$updateGutterLineHighlight = function() { var pos = this.$cursorLayer.$pixelPos; var height = this.layerConfig.lineHeight; if (this.session.getUseWrapMode()) { var cursor = this.session.selection.getCursor(); cursor.column = 0; pos = this.$cursorLayer.getPixelPosition(cursor, true); height *= this.session.getRowLength(cursor.row); } this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; this.$gutterLineHighlight.style.height = height + "px"; }; this.$updatePrintMargin = function() { if (!this.$showPrintMargin && !this.$printMarginEl) return; if (!this.$printMarginEl) { var containerEl = dom.createElement("div"); containerEl.className = "ace_layer ace_print-margin-layer"; this.$printMarginEl = dom.createElement("div"); this.$printMarginEl.className = "ace_print-margin"; containerEl.appendChild(this.$printMarginEl); this.content.insertBefore(containerEl, this.content.firstChild); } var style = this.$printMarginEl.style; style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; style.visibility = this.$showPrintMargin ? "visible" : "hidden"; if (this.session && this.session.$wrap == -1) this.adjustWrapLimit(); }; this.getContainerElement = function() { return this.container; }; this.getMouseEventTarget = function() { return this.content; }; this.getTextAreaContainer = function() { return this.container; }; this.$moveTextAreaToCursor = function() { if (!this.$keepTextAreaAtCursor) return; var config = this.layerConfig; var posTop = this.$cursorLayer.$pixelPos.top; var posLeft = this.$cursorLayer.$pixelPos.left; posTop -= config.offset; var style = this.textarea.style; var h = this.lineHeight; if (posTop < 0 || posTop > config.height - h) { style.top = style.left = "0"; return; } var w = this.characterWidth; if (this.$composition) { var val = this.textarea.value.replace(/^\x01+/, ""); w *= (this.session.$getStringScreenWidth(val)[0]+2); h += 2; } posLeft -= this.scrollLeft; if (posLeft > this.$size.scrollerWidth - w) posLeft = this.$size.scrollerWidth - w; posLeft += this.gutterWidth; style.height = h + "px"; style.width = w + "px"; style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; style.top = Math.min(posTop, this.$size.height - h) + "px"; }; this.getFirstVisibleRow = function() { return this.layerConfig.firstRow; }; this.getFirstFullyVisibleRow = function() { return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); }; this.getLastFullyVisibleRow = function() { var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight); return this.layerConfig.firstRow - 1 + flint; }; this.getLastVisibleRow = function() { return this.layerConfig.lastRow; }; this.$padding = null; this.setPadding = function(padding) { this.$padding = padding; this.$textLayer.setPadding(padding); this.$cursorLayer.setPadding(padding); this.$markerFront.setPadding(padding); this.$markerBack.setPadding(padding); this.$loop.schedule(this.CHANGE_FULL); this.$updatePrintMargin(); }; this.setScrollMargin = function(top, bottom, left, right) { var sm = this.scrollMargin; sm.top = top|0; sm.bottom = bottom|0; sm.right = right|0; sm.left = left|0; sm.v = sm.top + sm.bottom; sm.h = sm.left + sm.right; if (sm.top && this.scrollTop <= 0 && this.session) this.session.setScrollTop(-sm.top); this.updateFull(); }; this.getHScrollBarAlwaysVisible = function() { return this.$hScrollBarAlwaysVisible; }; this.setHScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("hScrollBarAlwaysVisible", alwaysVisible); }; this.getVScrollBarAlwaysVisible = function() { return this.$vScrollBarAlwaysVisible; }; this.setVScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("vScrollBarAlwaysVisible", alwaysVisible); }; this.$updateScrollBarV = function() { var scrollHeight = this.layerConfig.maxHeight; var scrollerHeight = this.$size.scrollerHeight; if (!this.$maxLines && this.$scrollPastEnd) { scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; if (this.scrollTop > scrollHeight - scrollerHeight) { scrollHeight = this.scrollTop + scrollerHeight; this.scrollBarV.scrollTop = null; } } this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); }; this.$updateScrollBarH = function() { this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); }; this.$frozen = false; this.freeze = function() { this.$frozen = true; }; this.unfreeze = function() { this.$frozen = false; }; this.$renderChanges = function(changes, force) { if (this.$changes) { changes |= this.$changes; this.$changes = 0; } if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { this.$changes |= changes; return; } if (this.$size.$dirty) { this.$changes |= changes; return this.onResize(true); } if (!this.lineHeight) { this.$textLayer.checkForSizeChanges(); } this._signal("beforeRender"); var config = this.layerConfig; if (changes & this.CHANGE_FULL || changes & this.CHANGE_SIZE || changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES || changes & this.CHANGE_SCROLL || changes & this.CHANGE_H_SCROLL ) { changes |= this.$computeLayerConfig(); if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; if (st > 0) { this.scrollTop = st; changes = changes | this.CHANGE_SCROLL; changes |= this.$computeLayerConfig(); } } config = this.layerConfig; this.$updateScrollBarV(); if (changes & this.CHANGE_H_SCROLL) this.$updateScrollBarH(); this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; this.content.style.marginTop = (-config.offset) + "px"; this.content.style.width = config.width + 2 * this.$padding + "px"; this.content.style.height = config.minHeight + "px"; } if (changes & this.CHANGE_H_SCROLL) { this.content.style.marginLeft = -this.scrollLeft + "px"; this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; } if (changes & this.CHANGE_FULL) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this._signal("afterRender"); return; } if (changes & this.CHANGE_SCROLL) { if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(config); else this.$textLayer.scrollLines(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this.$moveTextAreaToCursor(); this._signal("afterRender"); return; } if (changes & this.CHANGE_TEXT) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_LINES) { if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { if (this.$showGutter) this.$gutterLayer.update(config); } if (changes & this.CHANGE_CURSOR) { this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { this.$markerFront.update(config); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { this.$markerBack.update(config); } this._signal("afterRender"); }; this.$autosize = function() { var height = this.session.getScreenLength() * this.lineHeight; var maxHeight = this.$maxLines * this.lineHeight; var desiredHeight = Math.max( (this.$minLines||1) * this.lineHeight, Math.min(maxHeight, height) ) + this.scrollMargin.v + (this.$extraHeight || 0); var vScroll = height > maxHeight; if (desiredHeight != this.desiredHeight || this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { if (vScroll != this.$vScroll) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var w = this.container.clientWidth; this.container.style.height = desiredHeight + "px"; this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); this.desiredHeight = desiredHeight; this._signal("autosize"); } }; this.$computeLayerConfig = function() { if (this.$maxLines && this.lineHeight > 1) this.$autosize(); var session = this.session; var size = this.$size; var hideScrollbars = size.height <= 2 * this.lineHeight; var screenLines = this.session.getScreenLength(); var maxHeight = screenLines * this.lineHeight; var offset = this.scrollTop % this.lineHeight; var minHeight = size.scrollerHeight + this.lineHeight; var longestLine = this.$getLongestLine(); var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || size.scrollerWidth - longestLine - 2 * this.$padding < 0); var hScrollChanged = this.$horizScroll !== horizScroll; if (hScrollChanged) { this.$horizScroll = horizScroll; this.scrollBarH.setVisible(horizScroll); } var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd : 0; maxHeight += scrollPastEnd; this.session.setScrollTop(Math.max(-this.scrollMargin.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom))); this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right))); var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop); var vScrollChanged = this.$vScroll !== vScroll; if (vScrollChanged) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); var lastRow = firstRow + lineCount; var firstRowScreen, firstRowHeight; var lineHeight = this.lineHeight; firstRow = session.screenToDocumentRow(firstRow, 0); var foldLine = session.getFoldLine(firstRow); if (foldLine) { firstRow = foldLine.start.row; } firstRowScreen = session.documentToScreenRow(firstRow, 0); firstRowHeight = session.getRowLength(firstRow) * lineHeight; lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + firstRowHeight; offset = this.scrollTop - firstRowScreen * lineHeight; var changes = 0; if (this.layerConfig.width != longestLine) changes = this.CHANGE_H_SCROLL; if (hScrollChanged || vScrollChanged) { changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); this._signal("scrollbarVisibilityChanged"); if (vScrollChanged) longestLine = this.$getLongestLine(); } this.layerConfig = { width : longestLine, padding : this.$padding, firstRow : firstRow, firstRowScreen: firstRowScreen, lastRow : lastRow, lineHeight : lineHeight, characterWidth : this.characterWidth, minHeight : minHeight, maxHeight : maxHeight, offset : offset, gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)), height : this.$size.scrollerHeight }; return changes; }; this.$updateLines = function() { var firstRow = this.$changedLines.firstRow; var lastRow = this.$changedLines.lastRow; this.$changedLines = null; var layerConfig = this.layerConfig; if (firstRow > layerConfig.lastRow + 1) { return; } if (lastRow < layerConfig.firstRow) { return; } if (lastRow === Infinity) { if (this.$showGutter) this.$gutterLayer.update(layerConfig); this.$textLayer.update(layerConfig); return; } this.$textLayer.updateLines(layerConfig, firstRow, lastRow); return true; }; this.$getLongestLine = function() { var charCount = this.session.getScreenWidth(); if (this.showInvisibles && !this.session.$useWrapMode) charCount += 1; return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); }; this.updateFrontMarkers = function() { this.$markerFront.setMarkers(this.session.getMarkers(true)); this.$loop.schedule(this.CHANGE_MARKER_FRONT); }; this.updateBackMarkers = function() { this.$markerBack.setMarkers(this.session.getMarkers()); this.$loop.schedule(this.CHANGE_MARKER_BACK); }; this.addGutterDecoration = function(row, className){ this.$gutterLayer.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ this.$gutterLayer.removeGutterDecoration(row, className); }; this.updateBreakpoints = function(rows) { this.$loop.schedule(this.CHANGE_GUTTER); }; this.setAnnotations = function(annotations) { this.$gutterLayer.setAnnotations(annotations); this.$loop.schedule(this.CHANGE_GUTTER); }; this.updateCursor = function() { this.$loop.schedule(this.CHANGE_CURSOR); }; this.hideCursor = function() { this.$cursorLayer.hideCursor(); }; this.showCursor = function() { this.$cursorLayer.showCursor(); }; this.scrollSelectionIntoView = function(anchor, lead, offset) { this.scrollCursorIntoView(anchor, offset); this.scrollCursorIntoView(lead, offset); }; this.scrollCursorIntoView = function(cursor, offset, $viewMargin) { if (this.$size.scrollerHeight === 0) return; var pos = this.$cursorLayer.getPixelPosition(cursor); var left = pos.left; var top = pos.top; var topMargin = $viewMargin && $viewMargin.top || 0; var bottomMargin = $viewMargin && $viewMargin.bottom || 0; var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; if (scrollTop + topMargin > top) { if (offset) top -= offset * this.$size.scrollerHeight; if (top === 0) top = -this.scrollMargin.top; this.session.setScrollTop(top); } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { if (offset) top += offset * this.$size.scrollerHeight; this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); } var scrollLeft = this.scrollLeft; if (scrollLeft > left) { if (left < this.$padding + 2 * this.layerConfig.characterWidth) left = -this.scrollMargin.left; this.session.setScrollLeft(left); } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) { this.session.setScrollLeft(0); } }; this.getScrollTop = function() { return this.session.getScrollTop(); }; this.getScrollLeft = function() { return this.session.getScrollLeft(); }; this.getScrollTopRow = function() { return this.scrollTop / this.lineHeight; }; this.getScrollBottomRow = function() { return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); }; this.scrollToRow = function(row) { this.session.setScrollTop(row * this.lineHeight); }; this.alignCursor = function(cursor, alignment) { if (typeof cursor == "number") cursor = {row: cursor, column: 0}; var pos = this.$cursorLayer.getPixelPosition(cursor); var h = this.$size.scrollerHeight - this.lineHeight; var offset = pos.top - h * (alignment || 0); this.session.setScrollTop(offset); return offset; }; this.STEPS = 8; this.$calcSteps = function(fromValue, toValue){ var i = 0; var l = this.STEPS; var steps = []; var func = function(t, x_min, dx) { return dx * (Math.pow(t - 1, 3) + 1) + x_min; }; for (i = 0; i < l; ++i) steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); return steps; }; this.scrollToLine = function(line, center, animate, callback) { var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0}); var offset = pos.top; if (center) offset -= this.$size.scrollerHeight / 2; var initialScroll = this.scrollTop; this.session.setScrollTop(offset); if (animate !== false) this.animateScrolling(initialScroll, callback); }; this.animateScrolling = function(fromValue, callback) { var toValue = this.scrollTop; if (!this.$animatedScroll) return; var _self = this; if (fromValue == toValue) return; if (this.$scrollAnimation) { var oldSteps = this.$scrollAnimation.steps; if (oldSteps.length) { fromValue = oldSteps[0]; if (fromValue == toValue) return; } } var steps = _self.$calcSteps(fromValue, toValue); this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps}; clearInterval(this.$timer); _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; this.$timer = setInterval(function() { if (steps.length) { _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; } else if (toValue != null) { _self.session.$scrollTop = -1; _self.session.setScrollTop(toValue); toValue = null; } else { _self.$timer = clearInterval(_self.$timer); _self.$scrollAnimation = null; callback && callback(); } }, 10); }; this.scrollToY = function(scrollTop) { if (this.scrollTop !== scrollTop) { this.$loop.schedule(this.CHANGE_SCROLL); this.scrollTop = scrollTop; } }; this.scrollToX = function(scrollLeft) { if (this.scrollLeft !== scrollLeft) this.scrollLeft = scrollLeft; this.$loop.schedule(this.CHANGE_H_SCROLL); }; this.scrollTo = function(x, y) { this.session.setScrollTop(y); this.session.setScrollLeft(y); }; this.scrollBy = function(deltaX, deltaY) { deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); }; this.isScrollableBy = function(deltaX, deltaY) { if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) return true; if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) return true; if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) return true; if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width < -1 + this.scrollMargin.right) return true; }; this.pixelToScreenCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); var col = Math.round(offset); return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; }; this.screenToTextCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var col = Math.round( (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth ); var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; return this.session.screenToDocumentPosition(row, Math.max(col, 0)); }; this.textToScreenCoordinates = function(row, column) { var canvasPos = this.scroller.getBoundingClientRect(); var pos = this.session.documentToScreenPosition(row, column); var x = this.$padding + Math.round(pos.column * this.characterWidth); var y = pos.row * this.lineHeight; return { pageX: canvasPos.left + x - this.scrollLeft, pageY: canvasPos.top + y - this.scrollTop }; }; this.visualizeFocus = function() { dom.addCssClass(this.container, "ace_focus"); }; this.visualizeBlur = function() { dom.removeCssClass(this.container, "ace_focus"); }; this.showComposition = function(position) { if (!this.$composition) this.$composition = { keepTextAreaAtCursor: this.$keepTextAreaAtCursor, cssText: this.textarea.style.cssText }; this.$keepTextAreaAtCursor = true; dom.addCssClass(this.textarea, "ace_composition"); this.textarea.style.cssText = ""; this.$moveTextAreaToCursor(); }; this.setCompositionText = function(text) { this.$moveTextAreaToCursor(); }; this.hideComposition = function() { if (!this.$composition) return; dom.removeCssClass(this.textarea, "ace_composition"); this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; this.textarea.style.cssText = this.$composition.cssText; this.$composition = null; }; this.setTheme = function(theme, cb) { var _self = this; this.$themeId = theme; _self._dispatchEvent('themeChange',{theme:theme}); if (!theme || typeof theme == "string") { var moduleName = theme || this.$options.theme.initialValue; config.loadModule(["theme", moduleName], afterLoad); } else { afterLoad(theme); } function afterLoad(module) { if (_self.$themeId != theme) return cb && cb(); if (!module.cssClass) return; dom.importCssString( module.cssText, module.cssClass, _self.container.ownerDocument ); if (_self.theme) dom.removeCssClass(_self.container, _self.theme.cssClass); var padding = "padding" in module ? module.padding : "padding" in (_self.theme || {}) ? 4 : _self.$padding; if (_self.$padding && padding != _self.$padding) _self.setPadding(padding); _self.$theme = module.cssClass; _self.theme = module; dom.addCssClass(_self.container, module.cssClass); dom.setCssClass(_self.container, "ace_dark", module.isDark); if (_self.$size) { _self.$size.width = 0; _self.$updateSizeAsync(); } _self._dispatchEvent('themeLoaded', {theme:module}); cb && cb(); } }; this.getTheme = function() { return this.$themeId; }; this.setStyle = function(style, include) { dom.setCssClass(this.container, style, include !== false); }; this.unsetStyle = function(style) { dom.removeCssClass(this.container, style); }; this.setCursorStyle = function(style) { if (this.scroller.style.cursor != style) this.scroller.style.cursor = style; }; this.setMouseCursor = function(cursorStyle) { this.scroller.style.cursor = cursorStyle; }; this.destroy = function() { this.$textLayer.destroy(); this.$cursorLayer.destroy(); }; }).call(VirtualRenderer.prototype); config.defineOptions(VirtualRenderer.prototype, "renderer", { animatedScroll: {initialValue: false}, showInvisibles: { set: function(value) { if (this.$textLayer.setShowInvisibles(value)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: false }, showPrintMargin: { set: function() { this.$updatePrintMargin(); }, initialValue: true }, printMarginColumn: { set: function() { this.$updatePrintMargin(); }, initialValue: 80 }, printMargin: { set: function(val) { if (typeof val == "number") this.$printMarginColumn = val; this.$showPrintMargin = !!val; this.$updatePrintMargin(); }, get: function() { return this.$showPrintMargin && this.$printMarginColumn; } }, showGutter: { set: function(show){ this.$gutter.style.display = show ? "block" : "none"; this.$loop.schedule(this.CHANGE_FULL); this.onGutterResize(); }, initialValue: true }, fadeFoldWidgets: { set: function(show) { dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); }, initialValue: false }, showFoldWidgets: { set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, initialValue: true }, showLineNumbers: { set: function(show) { this.$gutterLayer.setShowLineNumbers(show); this.$loop.schedule(this.CHANGE_GUTTER); }, initialValue: true }, displayIndentGuides: { set: function(show) { if (this.$textLayer.setDisplayIndentGuides(show)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: true }, highlightGutterLine: { set: function(shouldHighlight) { if (!this.$gutterLineHighlight) { this.$gutterLineHighlight = dom.createElement("div"); this.$gutterLineHighlight.className = "ace_gutter-active-line"; this.$gutter.appendChild(this.$gutterLineHighlight); return; } this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; if (this.$cursorLayer.$pixelPos) this.$updateGutterLineHighlight(); }, initialValue: false, value: true }, hScrollBarAlwaysVisible: { set: function(val) { if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, vScrollBarAlwaysVisible: { set: function(val) { if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, fontSize: { set: function(size) { if (typeof size == "number") size = size + "px"; this.container.style.fontSize = size; this.updateFontSize(); }, initialValue: 12 }, fontFamily: { set: function(name) { this.container.style.fontFamily = name; this.updateFontSize(); } }, maxLines: { set: function(val) { this.updateFull(); } }, minLines: { set: function(val) { this.updateFull(); } }, scrollPastEnd: { set: function(val) { val = +val || 0; if (this.$scrollPastEnd == val) return; this.$scrollPastEnd = val; this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: 0, handlesSet: true }, fixedWidthGutter: { set: function(val) { this.$gutterLayer.$fixedWidth = !!val; this.$loop.schedule(this.CHANGE_GUTTER); } }, theme: { set: function(val) { this.setTheme(val) }, get: function() { return this.$themeId || this.theme; }, initialValue: "./theme/textmate", handlesSet: true } }); exports.VirtualRenderer = VirtualRenderer; }); define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var net = require("../lib/net"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var config = require("../config"); var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.onMessage = this.onMessage.bind(this); if (require.nameToUrl && !require.toUrl) require.toUrl = require.nameToUrl; if (config.get("packaged") || !require.toUrl) { workerUrl = workerUrl || config.moduleUrl(mod, "worker"); } else { var normalizePath = this.$normalizePath; workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); var tlns = {}; topLevelNamespaces.forEach(function(ns) { tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); }); } try { this.$worker = new Worker(workerUrl); } catch(e) { if (e instanceof window.DOMException) { var blob = this.$workerBlob(workerUrl); var URL = window.URL || window.webkitURL; var blobURL = URL.createObjectURL(blob); this.$worker = new Worker(blobURL); URL.revokeObjectURL(blobURL); } else { throw e; } } this.$worker.postMessage({ init : true, tlns : tlns, module : mod, classname : classname }); this.callbackId = 1; this.callbacks = {}; this.$worker.onmessage = this.onMessage; }; (function(){ oop.implement(this, EventEmitter); this.onMessage = function(e) { var msg = e.data; switch(msg.type) { case "event": this._signal(msg.name, {data: msg.data}); break; case "call": var callback = this.callbacks[msg.id]; if (callback) { callback(msg.data); delete this.callbacks[msg.id]; } break; case "error": this.reportError(msg.data); break; case "log": window.console && console.log && console.log.apply(console, msg.data); break; } }; this.reportError = function(err) { window.console && console.error && console.error(err); }; this.$normalizePath = function(path) { return net.qualifyURL(path); }; this.terminate = function() { this._signal("terminate", {}); this.deltaQueue = null; this.$worker.terminate(); this.$worker = null; if (this.$doc) this.$doc.off("change", this.changeListener); this.$doc = null; }; this.send = function(cmd, args) { this.$worker.postMessage({command: cmd, args: args}); }; this.call = function(cmd, args, callback) { if (callback) { var id = this.callbackId++; this.callbacks[id] = callback; args.push(id); } this.send(cmd, args); }; this.emit = function(event, data) { try { this.$worker.postMessage({event: event, data: {data: data.data}}); } catch(ex) { console.error(ex.stack); } }; this.attachToDocument = function(doc) { if(this.$doc) this.terminate(); this.$doc = doc; this.call("setValue", [doc.getValue()]); doc.on("change", this.changeListener); }; this.changeListener = function(e) { if (!this.deltaQueue) { this.deltaQueue = [e.data]; setTimeout(this.$sendDeltaQueue, 0); } else this.deltaQueue.push(e.data); }; this.$sendDeltaQueue = function() { var q = this.deltaQueue; if (!q) return; this.deltaQueue = null; if (q.length > 20 && q.length > this.$doc.getLength() >> 1) { this.call("setValue", [this.$doc.getValue()]); } else this.emit("change", {data: q}); }; this.$workerBlob = function(workerUrl) { var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; try { return new Blob([script], {"type": "application/javascript"}); } catch (e) { // Backwards-compatibility var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; var blobBuilder = new BlobBuilder(); blobBuilder.append(script); return blobBuilder.getBlob("application/javascript"); } }; }).call(WorkerClient.prototype); var UIWorkerClient = function(topLevelNamespaces, mod, classname) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.callbackId = 1; this.callbacks = {}; this.messageBuffer = []; var main = null; var emitSync = false; var sender = Object.create(EventEmitter); var _self = this; this.$worker = {}; this.$worker.terminate = function() {}; this.$worker.postMessage = function(e) { _self.messageBuffer.push(e); if (main) { if (emitSync) setTimeout(processNext); else processNext(); } }; this.setEmitSync = function(val) { emitSync = val }; var processNext = function() { var msg = _self.messageBuffer.shift(); if (msg.command) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); }; sender.postMessage = function(msg) { _self.onMessage({data: msg}); }; sender.callback = function(data, callbackId) { this.postMessage({type: "call", id: callbackId, data: data}); }; sender.emit = function(name, data) { this.postMessage({type: "event", name: name, data: data}); }; config.loadModule(["worker", mod], function(Main) { main = new Main[classname](sender); while (_self.messageBuffer.length) processNext(); }); }; UIWorkerClient.prototype = WorkerClient.prototype; exports.UIWorkerClient = UIWorkerClient; exports.WorkerClient = WorkerClient; }); define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var EventEmitter = require("./lib/event_emitter").EventEmitter; var oop = require("./lib/oop"); var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) { var _self = this; this.length = length; this.session = session; this.doc = session.getDocument(); this.mainClass = mainClass; this.othersClass = othersClass; this.$onUpdate = this.onUpdate.bind(this); this.doc.on("change", this.$onUpdate); this.$others = others; this.$onCursorChange = function() { setTimeout(function() { _self.onCursorChange(); }); }; this.$pos = pos; var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1}; this.$undoStackDepth = undoStack.length; this.setup(); session.selection.on("changeCursor", this.$onCursorChange); }; (function() { oop.implement(this, EventEmitter); this.setup = function() { var _self = this; var doc = this.doc; var session = this.session; var pos = this.$pos; this.selectionBefore = session.selection.toJSON(); if (session.selection.inMultiSelectMode) session.selection.toSingleRange(); this.pos = doc.createAnchor(pos.row, pos.column); this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); this.pos.on("change", function(event) { session.removeMarker(_self.markerId); _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false); }); this.others = []; this.$others.forEach(function(other) { var anchor = doc.createAnchor(other.row, other.column); _self.others.push(anchor); }); session.setUndoSelect(false); }; this.showOtherMarkers = function() { if(this.othersActive) return; var session = this.session; var _self = this; this.othersActive = true; this.others.forEach(function(anchor) { anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false); anchor.on("change", function(event) { session.removeMarker(anchor.markerId); anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false); }); }); }; this.hideOtherMarkers = function() { if(!this.othersActive) return; this.othersActive = false; for (var i = 0; i < this.others.length; i++) { this.session.removeMarker(this.others[i].markerId); } }; this.onUpdate = function(event) { var delta = event.data; var range = delta.range; if(range.start.row !== range.end.row) return; if(range.start.row !== this.pos.row) return; if (this.$updating) return; this.$updating = true; var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column; if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) { var distanceFromStart = range.start.column - this.pos.column; this.length += lengthDiff; if(!this.session.$fromUndo) { if(delta.action === "insertText") { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; if(otherPos.row === range.start.row && range.start.column < otherPos.column) newPos.column += lengthDiff; this.doc.insert(newPos, delta.text); } } else if(delta.action === "removeText") { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; if(otherPos.row === range.start.row && range.start.column < otherPos.column) newPos.column += lengthDiff; this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); } } if(range.start.column === this.pos.column && delta.action === "insertText") { setTimeout(function() { this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff); for (var i = 0; i < this.others.length; i++) { var other = this.others[i]; var newPos = {row: other.row, column: other.column - lengthDiff}; if(other.row === range.start.row && range.start.column < other.column) newPos.column += lengthDiff; other.setPosition(newPos.row, newPos.column); } }.bind(this), 0); } else if(range.start.column === this.pos.column && delta.action === "removeText") { setTimeout(function() { for (var i = 0; i < this.others.length; i++) { var other = this.others[i]; if(other.row === range.start.row && range.start.column < other.column) { other.setPosition(other.row, other.column - lengthDiff); } } }.bind(this), 0); } } this.pos._emit("change", {value: this.pos}); for (var i = 0; i < this.others.length; i++) { this.others[i]._emit("change", {value: this.others[i]}); } } this.$updating = false; }; this.onCursorChange = function(event) { if (this.$updating || !this.session) return; var pos = this.session.selection.getCursor(); if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { this.showOtherMarkers(); this._emit("cursorEnter", event); } else { this.hideOtherMarkers(); this._emit("cursorLeave", event); } }; this.detach = function() { this.session.removeMarker(this.markerId); this.hideOtherMarkers(); this.doc.removeEventListener("change", this.$onUpdate); this.session.selection.removeEventListener("changeCursor", this.$onCursorChange); this.pos.detach(); for (var i = 0; i < this.others.length; i++) { this.others[i].detach(); } this.session.setUndoSelect(true); this.session = null; }; this.cancel = function() { if(this.$undoStackDepth === -1) throw Error("Canceling placeholders only supported with undo manager attached to session."); var undoManager = this.session.getUndoManager(); var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; for (var i = 0; i < undosRequired; i++) { undoManager.undo(true); } if (this.selectionBefore) this.session.selection.fromJSON(this.selectionBefore); }; }).call(PlaceHolder.prototype); exports.PlaceHolder = PlaceHolder; }); define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { var event = require("../lib/event"); var useragent = require("../lib/useragent"); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } function onMouseDown(e) { var ev = e.domEvent; var alt = ev.altKey; var shift = ev.shiftKey; var ctrl = ev.ctrlKey; var accel = e.getAccelKey(); var button = e.getButton(); if (ctrl && useragent.isMac) button = ev.button; if (e.editor.inMultiSelectMode && button == 2) { e.editor.textInput.onContextMenu(e.domEvent); return; } if (!ctrl && !alt && !accel) { if (button === 0 && e.editor.inMultiSelectMode) e.editor.exitMultiSelectMode(); return; } if (button !== 0) return; var editor = e.editor; var selection = editor.selection; var isMultiSelect = editor.inMultiSelectMode; var pos = e.getDocumentPosition(); var cursor = selection.getCursor(); var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); var mouseX = e.x, mouseY = e.y; var onMouseSelection = function(e) { mouseX = e.clientX; mouseY = e.clientY; }; var session = editor.session; var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var screenCursor = screenAnchor; var selectionMode; if (editor.$mouseHandler.$enableJumpToDef) { if (ctrl && alt || accel && alt) selectionMode = "add"; else if (alt) selectionMode = "block"; } else { if (accel && !alt) { selectionMode = "add"; if (!isMultiSelect && shift) return; } else if (alt) { selectionMode = "block"; } } if (selectionMode && useragent.isMac && ev.ctrlKey) { editor.$mouseHandler.cancelContextMenu(); } if (selectionMode == "add") { if (!isMultiSelect && inSelection) return; // dragging if (!isMultiSelect) { var range = selection.toOrientedRange(); editor.addSelectionMarker(range); } var oldRange = selection.rangeList.rangeAtPoint(pos); editor.$blockScrolling++; editor.inVirtualSelectionMode = true; if (shift) { oldRange = null; range = selection.ranges[0]; editor.removeSelectionMarker(range); } editor.once("mouseup", function() { var tmpSel = selection.toOrientedRange(); if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) selection.substractPoint(tmpSel.cursor); else { if (shift) { selection.substractPoint(range.cursor); } else if (range) { editor.removeSelectionMarker(range); selection.addRange(range); } selection.addRange(tmpSel); } editor.$blockScrolling--; editor.inVirtualSelectionMode = false; }); } else if (selectionMode == "block") { e.stop(); editor.inVirtualSelectionMode = true; var initialRange; var rectSel = []; var blockSelect = function() { var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return; screenCursor = newCursor; editor.$blockScrolling++; editor.selection.moveToPosition(cursor); editor.renderer.scrollCursorIntoView(); editor.removeSelectionMarkers(rectSel); rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); rectSel.forEach(editor.addSelectionMarker, editor); editor.updateSelectionMarkers(); editor.$blockScrolling--; }; editor.$blockScrolling++; if (isMultiSelect && !accel) { selection.toSingleRange(); } else if (!isMultiSelect && accel) { initialRange = selection.toOrientedRange(); editor.addSelectionMarker(initialRange); } if (shift) screenAnchor = session.documentToScreenPosition(selection.lead); else selection.moveToPosition(pos); editor.$blockScrolling--; screenCursor = {row: -1, column: -1}; var onMouseSelectionEnd = function(e) { clearInterval(timerId); editor.removeSelectionMarkers(rectSel); if (!rectSel.length) rectSel = [selection.toOrientedRange()]; editor.$blockScrolling++; if (initialRange) { editor.removeSelectionMarker(initialRange); selection.toSingleRange(initialRange); } for (var i = 0; i < rectSel.length; i++) selection.addRange(rectSel[i]); editor.inVirtualSelectionMode = false; editor.$mouseHandler.$clickSelection = null; editor.$blockScrolling--; }; var onSelectionInterval = blockSelect; event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); var timerId = setInterval(function() {onSelectionInterval();}, 20); return e.preventDefault(); } } exports.onMouseDown = onMouseDown; }); define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) { exports.defaultCommands = [{ name: "addCursorAbove", exec: function(editor) { editor.selectMoreLines(-1); }, bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, scrollIntoView: "cursor", readonly: true }, { name: "addCursorBelow", exec: function(editor) { editor.selectMoreLines(1); }, bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, scrollIntoView: "cursor", readonly: true }, { name: "addCursorAboveSkipCurrent", exec: function(editor) { editor.selectMoreLines(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, scrollIntoView: "cursor", readonly: true }, { name: "addCursorBelowSkipCurrent", exec: function(editor) { editor.selectMoreLines(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, scrollIntoView: "cursor", readonly: true }, { name: "selectMoreBefore", exec: function(editor) { editor.selectMore(-1); }, bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, scrollIntoView: "cursor", readonly: true }, { name: "selectMoreAfter", exec: function(editor) { editor.selectMore(1); }, bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, scrollIntoView: "cursor", readonly: true }, { name: "selectNextBefore", exec: function(editor) { editor.selectMore(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, scrollIntoView: "cursor", readonly: true }, { name: "selectNextAfter", exec: function(editor) { editor.selectMore(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, scrollIntoView: "cursor", readonly: true }, { name: "splitIntoLines", exec: function(editor) { editor.multiSelect.splitIntoLines(); }, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, readonly: true }, { name: "alignCursors", exec: function(editor) { editor.alignCursors(); }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, scrollIntoView: "cursor" }, { name: "findAll", exec: function(editor) { editor.findAll(); }, bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, scrollIntoView: "cursor", readonly: true }]; exports.multiSelectCommands = [{ name: "singleSelection", bindKey: "esc", exec: function(editor) { editor.exitMultiSelectMode(); }, scrollIntoView: "cursor", readonly: true, isAvailable: function(editor) {return editor && editor.inMultiSelectMode} }]; var HashHandler = require("../keyboard/hash_handler").HashHandler; exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); }); define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) { var RangeList = require("./range_list").RangeList; var Range = require("./range").Range; var Selection = require("./selection").Selection; var onMouseDown = require("./mouse/multi_select_handler").onMouseDown; var event = require("./lib/event"); var lang = require("./lib/lang"); var commands = require("./commands/multi_select_commands"); exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); var Search = require("./search").Search; var search = new Search(); function find(session, needle, dir) { search.$options.wrap = true; search.$options.needle = needle; search.$options.backwards = dir == -1; return search.find(session); } var EditSession = require("./edit_session").EditSession; (function() { this.getSelectionMarkers = function() { return this.$selectionMarkers; }; }).call(EditSession.prototype); (function() { this.ranges = null; this.rangeList = null; this.addRange = function(range, $blockChangeEvents) { if (!range) return; if (!this.inMultiSelectMode && this.rangeCount === 0) { var oldRange = this.toOrientedRange(); this.rangeList.add(oldRange); this.rangeList.add(range); if (this.rangeList.ranges.length != 2) { this.rangeList.removeAll(); return $blockChangeEvents || this.fromOrientedRange(range); } this.rangeList.removeAll(); this.rangeList.add(oldRange); this.$onAddRange(oldRange); } if (!range.cursor) range.cursor = range.end; var removed = this.rangeList.add(range); this.$onAddRange(range); if (removed.length) this.$onRemoveRange(removed); if (this.rangeCount > 1 && !this.inMultiSelectMode) { this._signal("multiSelect"); this.inMultiSelectMode = true; this.session.$undoSelect = false; this.rangeList.attach(this.session); } return $blockChangeEvents || this.fromOrientedRange(range); }; this.toSingleRange = function(range) { range = range || this.ranges[0]; var removed = this.rangeList.removeAll(); if (removed.length) this.$onRemoveRange(removed); range && this.fromOrientedRange(range); }; this.substractPoint = function(pos) { var removed = this.rangeList.substractPoint(pos); if (removed) { this.$onRemoveRange(removed); return removed[0]; } }; this.mergeOverlappingRanges = function() { var removed = this.rangeList.merge(); if (removed.length) this.$onRemoveRange(removed); else if(this.ranges[0]) this.fromOrientedRange(this.ranges[0]); }; this.$onAddRange = function(range) { this.rangeCount = this.rangeList.ranges.length; this.ranges.unshift(range); this._signal("addRange", {range: range}); }; this.$onRemoveRange = function(removed) { this.rangeCount = this.rangeList.ranges.length; if (this.rangeCount == 1 && this.inMultiSelectMode) { var lastRange = this.rangeList.ranges.pop(); removed.push(lastRange); this.rangeCount = 0; } for (var i = removed.length; i--; ) { var index = this.ranges.indexOf(removed[i]); this.ranges.splice(index, 1); } this._signal("removeRange", {ranges: removed}); if (this.rangeCount === 0 && this.inMultiSelectMode) { this.inMultiSelectMode = false; this._signal("singleSelect"); this.session.$undoSelect = true; this.rangeList.detach(this.session); } lastRange = lastRange || this.ranges[0]; if (lastRange && !lastRange.isEqual(this.getRange())) this.fromOrientedRange(lastRange); }; this.$initRangeList = function() { if (this.rangeList) return; this.rangeList = new RangeList(); this.ranges = []; this.rangeCount = 0; }; this.getAllRanges = function() { return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; }; this.splitIntoLines = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var range = this.getRange(); var isBackwards = this.isBackwards(); var startRow = range.start.row; var endRow = range.end.row; if (startRow == endRow) { if (isBackwards) var start = range.end, end = range.start; else var start = range.start, end = range.end; this.addRange(Range.fromPoints(end, end)); this.addRange(Range.fromPoints(start, start)); return; } var rectSel = []; var r = this.getLineRange(startRow, true); r.start.column = range.start.column; rectSel.push(r); for (var i = startRow + 1; i < endRow; i++) rectSel.push(this.getLineRange(i, true)); r = this.getLineRange(endRow, true); r.end.column = range.end.column; rectSel.push(r); rectSel.forEach(this.addRange, this); } }; this.toggleBlockSelection = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var cursor = this.session.documentToScreenPosition(this.selectionLead); var anchor = this.session.documentToScreenPosition(this.selectionAnchor); var rectSel = this.rectangularRangeBlock(cursor, anchor); rectSel.forEach(this.addRange, this); } }; this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) { var rectSel = []; var xBackwards = screenCursor.column < screenAnchor.column; if (xBackwards) { var startColumn = screenCursor.column; var endColumn = screenAnchor.column; } else { var startColumn = screenAnchor.column; var endColumn = screenCursor.column; } var yBackwards = screenCursor.row < screenAnchor.row; if (yBackwards) { var startRow = screenCursor.row; var endRow = screenAnchor.row; } else { var startRow = screenAnchor.row; var endRow = screenCursor.row; } if (startColumn < 0) startColumn = 0; if (startRow < 0) startRow = 0; if (startRow == endRow) includeEmptyLines = true; for (var row = startRow; row <= endRow; row++) { var range = Range.fromPoints( this.session.screenToDocumentPosition(row, startColumn), this.session.screenToDocumentPosition(row, endColumn) ); if (range.isEmpty()) { if (docEnd && isSamePoint(range.end, docEnd)) break; var docEnd = range.end; } range.cursor = xBackwards ? range.start : range.end; rectSel.push(range); } if (yBackwards) rectSel.reverse(); if (!includeEmptyLines) { var end = rectSel.length - 1; while (rectSel[end].isEmpty() && end > 0) end--; if (end > 0) { var start = 0; while (rectSel[start].isEmpty()) start++; } for (var i = end; i >= start; i--) { if (rectSel[i].isEmpty()) rectSel.splice(i, 1); } } return rectSel; }; }).call(Selection.prototype); var Editor = require("./editor").Editor; (function() { this.updateSelectionMarkers = function() { this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.addSelectionMarker = function(orientedRange) { if (!orientedRange.cursor) orientedRange.cursor = orientedRange.end; var style = this.getSelectionStyle(); orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); this.session.$selectionMarkers.push(orientedRange); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; return orientedRange; }; this.removeSelectionMarker = function(range) { if (!range.marker) return; this.session.removeMarker(range.marker); var index = this.session.$selectionMarkers.indexOf(range); if (index != -1) this.session.$selectionMarkers.splice(index, 1); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; }; this.removeSelectionMarkers = function(ranges) { var markerList = this.session.$selectionMarkers; for (var i = ranges.length; i--; ) { var range = ranges[i]; if (!range.marker) continue; this.session.removeMarker(range.marker); var index = markerList.indexOf(range); if (index != -1) markerList.splice(index, 1); } this.session.selectionMarkerCount = markerList.length; }; this.$onAddRange = function(e) { this.addSelectionMarker(e.range); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onRemoveRange = function(e) { this.removeSelectionMarkers(e.ranges); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onMultiSelect = function(e) { if (this.inMultiSelectMode) return; this.inMultiSelectMode = true; this.setStyle("ace_multiselect"); this.keyBinding.addKeyboardHandler(commands.keyboardHandler); this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onSingleSelect = function(e) { if (this.session.multiSelect.inVirtualMode) return; this.inMultiSelectMode = false; this.unsetStyle("ace_multiselect"); this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); this._emit("changeSelection"); }; this.$onMultiSelectExec = function(e) { var command = e.command; var editor = e.editor; if (!editor.multiSelect) return; if (!command.multiSelectAction) { var result = command.exec(editor, e.args || {}); editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); editor.multiSelect.mergeOverlappingRanges(); } else if (command.multiSelectAction == "forEach") { result = editor.forEachSelection(command, e.args); } else if (command.multiSelectAction == "forEachLine") { result = editor.forEachSelection(command, e.args, true); } else if (command.multiSelectAction == "single") { editor.exitMultiSelectMode(); result = command.exec(editor, e.args || {}); } else { result = command.multiSelectAction(editor, e.args || {}); } return result; }; this.forEachSelection = function(cmd, args, options) { if (this.inVirtualSelectionMode) return; var keepOrder = options && options.keepOrder; var $byLines = options == true || options && options.$byLines var session = this.session; var selection = this.selection; var rangeList = selection.rangeList; var ranges = (keepOrder ? selection : rangeList).ranges; var result; if (!ranges.length) return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); var reg = selection._eventRegistry; selection._eventRegistry = {}; var tmpSel = new Selection(session); this.inVirtualSelectionMode = true; for (var i = ranges.length; i--;) { if ($byLines) { while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) i--; } tmpSel.fromOrientedRange(ranges[i]); tmpSel.index = i; this.selection = session.selection = tmpSel; var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); if (!result && cmdResult !== undefined) result = cmdResult; tmpSel.toOrientedRange(ranges[i]); } tmpSel.detach(); this.selection = session.selection = selection; this.inVirtualSelectionMode = false; selection._eventRegistry = reg; selection.mergeOverlappingRanges(); var anim = this.renderer.$scrollAnimation; this.onCursorChange(); this.onSelectionChange(); if (anim && anim.from == anim.to) this.renderer.animateScrolling(anim.from); return result; }; this.exitMultiSelectMode = function() { if (!this.inMultiSelectMode || this.inVirtualSelectionMode) return; this.multiSelect.toSingleRange(); }; this.getSelectedText = function() { var text = ""; if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var ranges = this.multiSelect.rangeList.ranges; var buf = []; for (var i = 0; i < ranges.length; i++) { buf.push(this.session.getTextRange(ranges[i])); } var nl = this.session.getDocument().getNewLineCharacter(); text = buf.join(nl); if (text.length == (buf.length - 1) * nl.length) text = ""; } else if (!this.selection.isEmpty()) { text = this.session.getTextRange(this.getSelectionRange()); } return text; }; this.$checkMultiselectChange = function(e, anchor) { if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var range = this.multiSelect.ranges[0]; if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) return; var pos = anchor == this.multiSelect.anchor ? range.cursor == range.start ? range.end : range.start : range.cursor; if (pos.row != anchor.row || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); } }; this.findAll = function(needle, options, additive) { options = options || {}; options.needle = needle || options.needle; if (options.needle == undefined) { var range = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange(); options.needle = this.session.getTextRange(range); } this.$search.set(options); var ranges = this.$search.findAll(this.session); if (!ranges.length) return 0; this.$blockScrolling += 1; var selection = this.multiSelect; if (!additive) selection.toSingleRange(ranges[0]); for (var i = ranges.length; i--; ) selection.addRange(ranges[i], true); if (range && selection.rangeList.rangeAtPoint(range.start)) selection.addRange(range, true); this.$blockScrolling -= 1; return ranges.length; }; this.selectMoreLines = function(dir, skip) { var range = this.selection.toOrientedRange(); var isBackwards = range.cursor == range.end; var screenLead = this.session.documentToScreenPosition(range.cursor); if (this.selection.$desiredColumn) screenLead.column = this.selection.$desiredColumn; var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); if (!range.isEmpty()) { var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); } else { var anchor = lead; } if (isBackwards) { var newRange = Range.fromPoints(lead, anchor); newRange.cursor = newRange.start; } else { var newRange = Range.fromPoints(anchor, lead); newRange.cursor = newRange.end; } newRange.desiredColumn = screenLead.column; if (!this.selection.inMultiSelectMode) { this.selection.addRange(range); } else { if (skip) var toRemove = range.cursor; } this.selection.addRange(newRange); if (toRemove) this.selection.substractPoint(toRemove); }; this.transposeSelections = function(dir) { var session = this.session; var sel = session.multiSelect; var all = sel.ranges; for (var i = all.length; i--; ) { var range = all[i]; if (range.isEmpty()) { var tmp = session.getWordRange(range.start.row, range.start.column); range.start.row = tmp.start.row; range.start.column = tmp.start.column; range.end.row = tmp.end.row; range.end.column = tmp.end.column; } } sel.mergeOverlappingRanges(); var words = []; for (var i = all.length; i--; ) { var range = all[i]; words.unshift(session.getTextRange(range)); } if (dir < 0) words.unshift(words.pop()); else words.push(words.shift()); for (var i = all.length; i--; ) { var range = all[i]; var tmp = range.clone(); session.replace(range, words[i]); range.start.row = tmp.start.row; range.start.column = tmp.start.column; } }; this.selectMore = function(dir, skip, stopAtFirst) { var session = this.session; var sel = session.multiSelect; var range = sel.toOrientedRange(); if (range.isEmpty()) { range = session.getWordRange(range.start.row, range.start.column); range.cursor = dir == -1 ? range.start : range.end; this.multiSelect.addRange(range); if (stopAtFirst) return; } var needle = session.getTextRange(range); var newRange = find(session, needle, dir); if (newRange) { newRange.cursor = dir == -1 ? newRange.start : newRange.end; this.$blockScrolling += 1; this.session.unfold(newRange); this.multiSelect.addRange(newRange); this.$blockScrolling -= 1; this.renderer.scrollCursorIntoView(null, 0.5); } if (skip) this.multiSelect.substractPoint(range.cursor); }; this.alignCursors = function() { var session = this.session; var sel = session.multiSelect; var ranges = sel.ranges; var row = -1; var sameRowRanges = ranges.filter(function(r) { if (r.cursor.row == row) return true; row = r.cursor.row; }); if (!ranges.length || sameRowRanges.length == ranges.length - 1) { var range = this.selection.getRange(); var fr = range.start.row, lr = range.end.row; var guessRange = fr == lr; if (guessRange) { var max = this.session.getLength(); var line; do { line = this.session.getLine(lr); } while (/[=:]/.test(line) && ++lr < max); do { line = this.session.getLine(fr); } while (/[=:]/.test(line) && --fr > 0); if (fr < 0) fr = 0; if (lr >= max) lr = max - 1; } var lines = this.session.doc.removeLines(fr, lr); lines = this.$reAlignText(lines, guessRange); this.session.doc.insert({row: fr, column: 0}, lines.join("\n") + "\n"); if (!guessRange) { range.start.column = 0; range.end.column = lines[lines.length - 1].length; } this.selection.setRange(range); } else { sameRowRanges.forEach(function(r) { sel.substractPoint(r.cursor); }); var maxCol = 0; var minSpace = Infinity; var spaceOffsets = ranges.map(function(r) { var p = r.cursor; var line = session.getLine(p.row); var spaceOffset = line.substr(p.column).search(/\S/g); if (spaceOffset == -1) spaceOffset = 0; if (p.column > maxCol) maxCol = p.column; if (spaceOffset < minSpace) minSpace = spaceOffset; return spaceOffset; }); ranges.forEach(function(r, i) { var p = r.cursor; var l = maxCol - p.column; var d = spaceOffsets[i] - minSpace; if (l > d) session.insert(p, lang.stringRepeat(" ", l - d)); else session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); r.start.column = r.end.column = maxCol; r.start.row = r.end.row = p.row; r.cursor = r.end; }); sel.fromOrientedRange(ranges[0]); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); } }; this.$reAlignText = function(lines, forceLeft) { var isLeftAligned = true, isRightAligned = true; var startW, textW, endW; return lines.map(function(line) { var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); if (!m) return [line]; if (startW == null) { startW = m[1].length; textW = m[2].length; endW = m[3].length; return m; } if (startW + textW + endW != m[1].length + m[2].length + m[3].length) isRightAligned = false; if (startW != m[1].length) isLeftAligned = false; if (startW > m[1].length) startW = m[1].length; if (textW < m[2].length) textW = m[2].length; if (endW > m[3].length) endW = m[3].length; return m; }).map(forceLeft ? alignLeft : isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); function spaces(n) { return lang.stringRepeat(" ", n); } function alignLeft(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(textW - m[2].length + endW) + m[4].replace(/^([=:])\s+/, "$1 "); } function alignRight(m) { return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + spaces(endW, " ") + m[4].replace(/^([=:])\s+/, "$1 "); } function unAlign(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(endW) + m[4].replace(/^([=:])\s+/, "$1 "); } }; }).call(Editor.prototype); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } exports.onSessionChange = function(e) { var session = e.session; if (session && !session.multiSelect) { session.$selectionMarkers = []; session.selection.$initRangeList(); session.multiSelect = session.selection; } this.multiSelect = session && session.multiSelect; var oldSession = e.oldSession; if (oldSession) { oldSession.multiSelect.off("addRange", this.$onAddRange); oldSession.multiSelect.off("removeRange", this.$onRemoveRange); oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); } if (session) { session.multiSelect.on("addRange", this.$onAddRange); session.multiSelect.on("removeRange", this.$onRemoveRange); session.multiSelect.on("multiSelect", this.$onMultiSelect); session.multiSelect.on("singleSelect", this.$onSingleSelect); session.multiSelect.lead.on("change", this.$checkMultiselectChange); session.multiSelect.anchor.on("change", this.$checkMultiselectChange); } if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { if (session.selection.inMultiSelectMode) this.$onMultiSelect(); else this.$onSingleSelect(); } }; function MultiSelect(editor) { if (editor.$multiselectOnSessionChange) return; editor.$onAddRange = editor.$onAddRange.bind(editor); editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); editor.$multiselectOnSessionChange(editor); editor.on("changeSession", editor.$multiselectOnSessionChange); editor.on("mousedown", onMouseDown); editor.commands.addCommands(commands.defaultCommands); addAltCursorListeners(editor); } function addAltCursorListeners(editor){ var el = editor.textInput.getElement(); var altCursor = false; event.addListener(el, "keydown", function(e) { if (e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey)) { if (!altCursor) { editor.renderer.setMouseCursor("crosshair"); altCursor = true; } } else if (altCursor) { reset(); } }); event.addListener(el, "keyup", reset); event.addListener(el, "blur", reset); function reset(e) { if (altCursor) { editor.renderer.setMouseCursor(""); altCursor = false; } } } exports.MultiSelect = MultiSelect; require("./config").defineOptions(Editor.prototype, "editor", { enableMultiselect: { set: function(val) { MultiSelect(this); if (val) { this.on("changeSession", this.$multiselectOnSessionChange); this.on("mousedown", onMouseDown); } else { this.off("changeSession", this.$multiselectOnSessionChange); this.off("mousedown", onMouseDown); } }, value: true } }); }); define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; (function() { this.foldingStartMarker = null; this.foldingStopMarker = null; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.foldingStartMarker.test(line)) return "start"; if (foldStyle == "markbeginend" && this.foldingStopMarker && this.foldingStopMarker.test(line)) return "end"; return ""; }; this.getFoldWidgetRange = function(session, foldStyle, row) { return null; }; this.indentationBlock = function(session, row, column) { var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1) return; var startColumn = column || line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { var level = session.getLine(row).search(re); if (level == -1) continue; if (level <= startLevel) break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.openingBracketBlock = function(session, bracket, row, column, typeRe) { var start = {row: row, column: column + 1}; var end = session.$findClosingBracket(bracket, start, typeRe); if (!end) return; var fw = session.foldWidgets[end.row]; if (fw == null) fw = session.getFoldWidget(end.row); if (fw == "start" && end.row > start.row) { end.row --; end.column = session.getLine(end.row).length; } return Range.fromPoints(start, end); }; this.closingBracketBlock = function(session, bracket, row, column, typeRe) { var end = {row: row, column: column}; var start = session.$findOpeningBracket(bracket, end); if (!start) return; start.column++; end.column--; return Range.fromPoints(start, end); }; }).call(FoldMode.prototype); }); define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; exports.cssClass = "ace-tm"; exports.cssText = ".ace-tm .ace_gutter {\ background: #f0f0f0;\ color: #333;\ }\ .ace-tm .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-tm .ace_fold {\ background-color: #6B72E6;\ }\ .ace-tm {\ background-color: #FFFFFF;\ color: black;\ }\ .ace-tm .ace_cursor {\ color: black;\ }\ .ace-tm .ace_invisible {\ color: rgb(191, 191, 191);\ }\ .ace-tm .ace_storage,\ .ace-tm .ace_keyword {\ color: blue;\ }\ .ace-tm .ace_constant {\ color: rgb(197, 6, 11);\ }\ .ace-tm .ace_constant.ace_buildin {\ color: rgb(88, 72, 246);\ }\ .ace-tm .ace_constant.ace_language {\ color: rgb(88, 92, 246);\ }\ .ace-tm .ace_constant.ace_library {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_invalid {\ background-color: rgba(255, 0, 0, 0.1);\ color: red;\ }\ .ace-tm .ace_support.ace_function {\ color: rgb(60, 76, 114);\ }\ .ace-tm .ace_support.ace_constant {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_support.ace_type,\ .ace-tm .ace_support.ace_class {\ color: rgb(109, 121, 222);\ }\ .ace-tm .ace_keyword.ace_operator {\ color: rgb(104, 118, 135);\ }\ .ace-tm .ace_string {\ color: rgb(3, 106, 7);\ }\ .ace-tm .ace_comment {\ color: rgb(76, 136, 107);\ }\ .ace-tm .ace_comment.ace_doc {\ color: rgb(0, 102, 255);\ }\ .ace-tm .ace_comment.ace_doc.ace_tag {\ color: rgb(128, 159, 191);\ }\ .ace-tm .ace_constant.ace_numeric {\ color: rgb(0, 0, 205);\ }\ .ace-tm .ace_variable {\ color: rgb(49, 132, 149);\ }\ .ace-tm .ace_xml-pe {\ color: rgb(104, 104, 91);\ }\ .ace-tm .ace_entity.ace_name.ace_function {\ color: #0000A2;\ }\ .ace-tm .ace_heading {\ color: rgb(12, 7, 255);\ }\ .ace-tm .ace_list {\ color:rgb(185, 6, 144);\ }\ .ace-tm .ace_meta.ace_tag {\ color:rgb(0, 22, 142);\ }\ .ace-tm .ace_string.ace_regex {\ color: rgb(255, 0, 0)\ }\ .ace-tm .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-tm.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px white;\ border-radius: 2px;\ }\ .ace-tm .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-tm .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-tm .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-tm .ace_marker-layer .ace_active-line {\ background: rgba(0, 0, 0, 0.07);\ }\ .ace-tm .ace_gutter-active-line {\ background-color : #dcdcdc;\ }\ .ace-tm .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-tm .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var Range = require("./range").Range; function LineWidgets(session) { this.session = session; this.session.widgetManager = this; this.session.getRowLength = this.getRowLength; this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; this.updateOnChange = this.updateOnChange.bind(this); this.renderWidgets = this.renderWidgets.bind(this); this.measureWidgets = this.measureWidgets.bind(this); this.session._changedWidgets = []; this.$onChangeEditor = this.$onChangeEditor.bind(this); this.session.on("change", this.updateOnChange); this.session.on("changeEditor", this.$onChangeEditor); } (function() { this.getRowLength = function(row) { var h; if (this.lineWidgets) h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0; if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.$getWidgetScreenLength = function() { var screenRows = 0; this.lineWidgets.forEach(function(w){ if (w && w.rowCount) screenRows +=w.rowCount; }); return screenRows; }; this.$onChangeEditor = function(e) { this.attach(e.editor); }; this.attach = function(editor) { if (editor && editor.widgetManager && editor.widgetManager != this) editor.widgetManager.detach(); if (this.editor == editor) return; this.detach(); this.editor = editor; if (editor) { editor.widgetManager = this; editor.renderer.on("beforeRender", this.measureWidgets); editor.renderer.on("afterRender", this.renderWidgets); } }; this.detach = function(e) { var editor = this.editor; if (!editor) return; this.editor = null; editor.widgetManager = null; editor.renderer.off("beforeRender", this.measureWidgets); editor.renderer.off("afterRender", this.renderWidgets); var lineWidgets = this.session.lineWidgets; lineWidgets && lineWidgets.forEach(function(w) { if (w && w.el && w.el.parentNode) { w._inDocument = false; w.el.parentNode.removeChild(w.el); } }); }; this.updateOnChange = function(e) { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var delta = e.data; var range = delta.range; var startRow = range.start.row; var len = range.end.row - startRow; if (len === 0) { } else if (delta.action == "removeText" || delta.action == "removeLines") { var removed = lineWidgets.splice(startRow + 1, len); removed.forEach(function(w) { w && this.removeLineWidget(w); }, this); this.$updateRows(); } else { var args = new Array(len); args.unshift(startRow, 0); lineWidgets.splice.apply(lineWidgets, args); this.$updateRows(); } }; this.$updateRows = function() { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var noWidgets = true; lineWidgets.forEach(function(w, i) { if (w) { noWidgets = false; w.row = i; } }); if (noWidgets) this.session.lineWidgets = null; }; this.addLineWidget = function(w) { if (!this.session.lineWidgets) this.session.lineWidgets = new Array(this.session.getLength()); this.session.lineWidgets[w.row] = w; var renderer = this.editor.renderer; if (w.html && !w.el) { w.el = dom.createElement("div"); w.el.innerHTML = w.html; } if (w.el) { dom.addCssClass(w.el, "ace_lineWidgetContainer"); w.el.style.position = "absolute"; w.el.style.zIndex = 5; renderer.container.appendChild(w.el); w._inDocument = true; } if (!w.coverGutter) { w.el.style.zIndex = 3; } if (!w.pixelHeight) { w.pixelHeight = w.el.offsetHeight; } if (w.rowCount == null) w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); this.renderWidgets(null, renderer); return w; }; this.removeLineWidget = function(w) { w._inDocument = false; if (w.el && w.el.parentNode) w.el.parentNode.removeChild(w.el); if (w.editor && w.editor.destroy) try { w.editor.destroy(); } catch(e){} if (this.session.lineWidgets) this.session.lineWidgets[w.row] = undefined; this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); }; this.onWidgetChanged = function(w) { this.session._changedWidgets.push(w); this.editor && this.editor.renderer.updateFull(); }; this.measureWidgets = function(e, renderer) { var changedWidgets = this.session._changedWidgets; var config = renderer.layerConfig; if (!changedWidgets || !changedWidgets.length) return; var min = Infinity; for (var i = 0; i < changedWidgets.length; i++) { var w = changedWidgets[i]; if (!w._inDocument) { w._inDocument = true; renderer.container.appendChild(w.el); } w.h = w.el.offsetHeight; if (!w.fixedWidth) { w.w = w.el.offsetWidth; w.screenWidth = Math.ceil(w.w / config.characterWidth); } var rowCount = w.h / config.lineHeight; if (w.coverLine) { rowCount -= this.session.getRowLineCount(w.row); if (rowCount < 0) rowCount = 0; } if (w.rowCount != rowCount) { w.rowCount = rowCount; if (w.row < min) min = w.row; } } if (min != Infinity) { this.session._emit("changeFold", {data:{start:{row: min}}}); this.session.lineWidgetWidth = null; } this.session._changedWidgets = []; }; this.renderWidgets = function(e, renderer) { var config = renderer.layerConfig; var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var first = Math.min(this.firstRow, config.firstRow); var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); while (first > 0 && !lineWidgets[first]) first--; this.firstRow = config.firstRow; this.lastRow = config.lastRow; renderer.$cursorLayer.config = config; for (var i = first; i <= last; i++) { var w = lineWidgets[i]; if (!w || !w.el) continue; if (!w._inDocument) { w._inDocument = true; renderer.container.appendChild(w.el); } var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top; if (!w.coverLine) top += config.lineHeight * this.session.getRowLineCount(w.row); w.el.style.top = top - config.offset + "px"; var left = w.coverGutter ? 0 : renderer.gutterWidth; if (!w.fixedWidth) left -= renderer.scrollLeft; w.el.style.left = left + "px"; if (w.fixedWidth) { w.el.style.right = renderer.scrollBar.getWidth() + "px"; } else { w.el.style.right = ""; } } }; }).call(LineWidgets.prototype); exports.LineWidgets = LineWidgets; }); define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var LineWidgets = require("../line_widgets").LineWidgets; var dom = require("../lib/dom"); var Range = require("../range").Range; function binarySearch(array, needle, comparator) { var first = 0; var last = array.length - 1; while (first <= last) { var mid = (first + last) >> 1; var c = comparator(needle, array[mid]); if (c > 0) first = mid + 1; else if (c < 0) last = mid - 1; else return mid; } return -(first + 1); } function findAnnotations(session, row, dir) { var annotations = session.getAnnotations().sort(Range.comparePoints); if (!annotations.length) return; var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints); if (i < 0) i = -i - 1; if (i >= annotations.length) i = dir > 0 ? 0 : annotations.length - 1; else if (i === 0 && dir < 0) i = annotations.length - 1; var annotation = annotations[i]; if (!annotation || !dir) return; if (annotation.row === row) { do { annotation = annotations[i += dir]; } while (annotation && annotation.row === row); if (!annotation) return annotations.slice(); } var matched = []; row = annotation.row; do { matched[dir < 0 ? "unshift" : "push"](annotation); annotation = annotations[i += dir]; } while (annotation && annotation.row == row); return matched.length && matched; } exports.showErrorMarker = function(editor, dir) { var session = editor.session; if (!session.widgetManager) { session.widgetManager = new LineWidgets(session); session.widgetManager.attach(editor); } var pos = editor.getCursorPosition(); var row = pos.row; var oldWidget = session.lineWidgets && session.lineWidgets[row]; if (oldWidget) { oldWidget.destroy(); } else { row -= dir; } var annotations = findAnnotations(session, row, dir); var gutterAnno; if (annotations) { var annotation = annotations[0]; pos.column = (annotation.pos && typeof annotation.column != "number" ? annotation.pos.sc : annotation.column) || 0; pos.row = annotation.row; gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; } else if (oldWidget) { return; } else { gutterAnno = { text: ["Looks good!"], className: "ace_ok" }; } editor.session.unfold(pos.row); editor.selection.moveToPosition(pos); var w = { row: pos.row, fixedWidth: true, coverGutter: true, el: dom.createElement("div") }; var el = w.el.appendChild(dom.createElement("div")); var arrow = w.el.appendChild(dom.createElement("div")); arrow.className = "error_widget_arrow " + gutterAnno.className; var left = editor.renderer.$cursorLayer .getPixelPosition(pos).left; arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; w.el.className = "error_widget_wrapper"; el.className = "error_widget " + gutterAnno.className; el.innerHTML = gutterAnno.text.join("
    "); el.appendChild(dom.createElement("div")); var kb = function(_, hashId, keyString) { if (hashId === 0 && (keyString === "esc" || keyString === "return")) { w.destroy(); return {command: "null"}; } }; w.destroy = function() { if (editor.$mouseHandler.isMousePressed) return; editor.keyBinding.removeKeyboardHandler(kb); session.widgetManager.removeLineWidget(w); editor.off("changeSelection", w.destroy); editor.off("changeSession", w.destroy); editor.off("mouseup", w.destroy); editor.off("change", w.destroy); }; editor.keyBinding.addKeyboardHandler(kb); editor.on("changeSelection", w.destroy); editor.on("changeSession", w.destroy); editor.on("mouseup", w.destroy); editor.on("change", w.destroy); editor.session.widgetManager.addLineWidget(w); w.el.onmousedown = editor.focus.bind(editor); editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight}); }; dom.importCssString("\ .error_widget_wrapper {\ background: inherit;\ color: inherit;\ border:none\ }\ .error_widget {\ border-top: solid 2px;\ border-bottom: solid 2px;\ margin: 5px 0;\ padding: 10px 40px;\ white-space: pre-wrap;\ }\ .error_widget.ace_error, .error_widget_arrow.ace_error{\ border-color: #ff5a5a\ }\ .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ border-color: #F1D817\ }\ .error_widget.ace_info, .error_widget_arrow.ace_info{\ border-color: #5a5a5a\ }\ .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ border-color: #5aaa5a\ }\ .error_widget_arrow {\ position: absolute;\ border: solid 5px;\ border-top-color: transparent!important;\ border-right-color: transparent!important;\ border-left-color: transparent!important;\ top: -5px;\ }\ ", ""); }); define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var dom = require("./lib/dom"); var event = require("./lib/event"); var Editor = require("./editor").Editor; var EditSession = require("./edit_session").EditSession; var UndoManager = require("./undomanager").UndoManager; var Renderer = require("./virtual_renderer").VirtualRenderer; require("./worker/worker_client"); require("./keyboard/hash_handler"); require("./placeholder"); require("./multi_select"); require("./mode/folding/fold_mode"); require("./theme/textmate"); require("./ext/error_marker"); exports.config = require("./config"); exports.require = require; exports.edit = function(el) { if (typeof(el) == "string") { var _id = el; el = document.getElementById(_id); if (!el) throw new Error("ace.edit can't find div #" + _id); } if (el && el.env && el.env.editor instanceof Editor) return el.env.editor; var value = ""; if (el && /input|textarea/i.test(el.tagName)) { var oldNode = el; value = oldNode.value; el = dom.createElement("pre"); oldNode.parentNode.replaceChild(el, oldNode); } else { value = dom.getInnerText(el); el.innerHTML = ''; } var doc = exports.createEditSession(value); var editor = new Editor(new Renderer(el)); editor.setSession(doc); var env = { document: doc, editor: editor, onResize: editor.resize.bind(editor, null) }; if (oldNode) env.textarea = oldNode; event.addListener(window, "resize", env.onResize); editor.on("destroy", function() { event.removeListener(window, "resize", env.onResize); env.editor.container.env = null; // prevent memory leak on old ie }); editor.container.env = editor.env = env; return editor; }; exports.createEditSession = function(text, mode) { var doc = new EditSession(text, mode); doc.setUndoManager(new UndoManager()); return doc; } exports.EditSession = EditSession; exports.UndoManager = UndoManager; }); (function() { window.require(["ace/ace"], function(a) { a && a.config.init(true); if (!window.ace) window.ace = a; for (var key in a) if (a.hasOwnProperty(key)) window.ace[key] = a[key]; }); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-assembly_x86.js0000644000076400007640000002660612554155240024510 0ustar pravipravidefine("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var AssemblyX86HighlightRules = function() { this.$rules = { start: [ { token: 'keyword.control.assembly', regex: '\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b', caseInsensitive: true }, { token: 'variable.parameter.register.assembly', regex: '\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:Y|X)MM(?:[0-9]|10|11|12|13|14|15)|(?:A|B|C|D)(?:X|H|L)|CR(?:[0-4]|DR(?:[0-7]|TR6|TR7|EFER)))\\b', caseInsensitive: true }, { token: 'constant.character.decimal.assembly', regex: '\\b[0-9]+\\b' }, { token: 'constant.character.hexadecimal.assembly', regex: '\\b0x[A-F0-9]+\\b', caseInsensitive: true }, { token: 'constant.character.hexadecimal.assembly', regex: '\\b[A-F0-9]+h\\b', caseInsensitive: true }, { token: 'string.assembly', regex: /'([^\\']|\\.)*'/ }, { token: 'string.assembly', regex: /"([^\\"]|\\.)*"/ }, { token: 'support.function.directive.assembly', regex: '^\\[', push: [ { token: 'support.function.directive.assembly', regex: '\\]$', next: 'pop' }, { defaultToken: 'support.function.directive.assembly' } ] }, { token: [ 'support.function.directive.assembly', 'support.function.directive.assembly', 'entity.name.function.assembly' ], regex: '(^struc)( )([_a-zA-Z][_a-zA-Z0-9]*)' }, { token: 'support.function.directive.assembly', regex: '^endstruc\\b' }, { token: [ 'support.function.directive.assembly', 'entity.name.function.assembly', 'support.function.directive.assembly', 'constant.character.assembly' ], regex: '^(%macro )([_a-zA-Z][_a-zA-Z0-9]*)( )([0-9]+)' }, { token: 'support.function.directive.assembly', regex: '^%endmacro' }, { token: [ 'text', 'support.function.directive.assembly', 'text', 'entity.name.function.assembly' ], regex: '(\\s*)(%define|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(?:el)?ifdef|%(?:el)?ifmacro|%(?:el)?ifctx|%(?:el)?ifidn|%(?:el)?ifidni|%(?:el)?ifid|%(?:el)?ifnum|%(?:el)?ifstr|%(?:el)?iftoken|%(?:el)?ifempty|%(?:el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b( ?)((?:[_a-zA-Z][_a-zA-Z0-9]*)?)', caseInsensitive: true }, { token: 'support.function.directive.assembly', regex: '\\b(?:d[bwdqtoy]|res[bwdqto]|equ|times|align|alignb|sectalign|section|ptr|byte|word|dword|qword|incbin)\\b', caseInsensitive: true }, { token: 'entity.name.function.assembly', regex: '^\\s*%%[\\w.]+?:$' }, { token: 'entity.name.function.assembly', regex: '^\\s*%\\$[\\w.]+?:$' }, { token: 'entity.name.function.assembly', regex: '^[\\w.]+?:' }, { token: 'entity.name.function.assembly', regex: '^[\\w.]+?\\b' }, { token: 'comment.assembly', regex: ';.*$' } ] } this.normalizeRules(); }; AssemblyX86HighlightRules.metaData = { fileTypes: [ 'asm' ], name: 'Assembly x86', scopeName: 'source.assembly' } oop.inherits(AssemblyX86HighlightRules, TextHighlightRules); exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = AssemblyX86HighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ";"; this.$id = "ace/mode/assembly_x86"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-properties.js0000644000076400007640000000373312554155240024354 0ustar pravipravidefine("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var PropertiesHighlightRules = function() { var escapeRe = /\\u[0-9a-fA-F]{4}|\\/; this.$rules = { "start" : [ { token : "comment", regex : /[!#].*$/ }, { token : "keyword", regex : /[=:]$/ }, { token : "keyword", regex : /[=:]/, next : "value" }, { token : "constant.language.escape", regex : escapeRe }, { defaultToken: "variable" } ], "value" : [ { regex : /\\$/, token : "string", next : "value" }, { regex : /$/, token : "string", next : "start" }, { token : "constant.language.escape", regex : escapeRe }, { defaultToken: "string" } ] }; }; oop.inherits(PropertiesHighlightRules, TextHighlightRules); exports.PropertiesHighlightRules = PropertiesHighlightRules; }); define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules; var Mode = function() { this.HighlightRules = PropertiesHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/properties"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-vibrant_ink.js0000644000076400007640000000465112554155240024644 0ustar pravipravidefine("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-vibrant-ink"; exports.cssText = ".ace-vibrant-ink .ace_gutter {\ background: #1a1a1a;\ color: #BEBEBE\ }\ .ace-vibrant-ink .ace_print-margin {\ width: 1px;\ background: #1a1a1a\ }\ .ace-vibrant-ink {\ background-color: #0F0F0F;\ color: #FFFFFF\ }\ .ace-vibrant-ink .ace_cursor {\ color: #FFFFFF\ }\ .ace-vibrant-ink .ace_marker-layer .ace_selection {\ background: #6699CC\ }\ .ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #0F0F0F;\ border-radius: 2px\ }\ .ace-vibrant-ink .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-vibrant-ink .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #404040\ }\ .ace-vibrant-ink .ace_marker-layer .ace_active-line {\ background: #333333\ }\ .ace-vibrant-ink .ace_gutter-active-line {\ background-color: #333333\ }\ .ace-vibrant-ink .ace_marker-layer .ace_selected-word {\ border: 1px solid #6699CC\ }\ .ace-vibrant-ink .ace_invisible {\ color: #404040\ }\ .ace-vibrant-ink .ace_keyword,\ .ace-vibrant-ink .ace_meta {\ color: #FF6600\ }\ .ace-vibrant-ink .ace_constant,\ .ace-vibrant-ink .ace_constant.ace_character,\ .ace-vibrant-ink .ace_constant.ace_character.ace_escape,\ .ace-vibrant-ink .ace_constant.ace_other {\ color: #339999\ }\ .ace-vibrant-ink .ace_constant.ace_numeric {\ color: #99CC99\ }\ .ace-vibrant-ink .ace_invalid,\ .ace-vibrant-ink .ace_invalid.ace_deprecated {\ color: #CCFF33;\ background-color: #000000\ }\ .ace-vibrant-ink .ace_fold {\ background-color: #FFCC00;\ border-color: #FFFFFF\ }\ .ace-vibrant-ink .ace_entity.ace_name.ace_function,\ .ace-vibrant-ink .ace_support.ace_function,\ .ace-vibrant-ink .ace_variable {\ color: #FFCC00\ }\ .ace-vibrant-ink .ace_variable.ace_parameter {\ font-style: italic\ }\ .ace-vibrant-ink .ace_string {\ color: #66FF00\ }\ .ace-vibrant-ink .ace_string.ace_regexp {\ color: #44B4CC\ }\ .ace-vibrant-ink .ace_comment {\ color: #9933CC\ }\ .ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\ font-style: italic;\ color: #99CC99\ }\ .ace-vibrant-ink .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-ftl.js0000644000076400007640000013167512554155240022754 0ustar pravipravidefine("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var FtlLangHighlightRules = function () { var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|" + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|" + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|" + "upper_case|word_list|xhtml|xml"; var numberBuiltIns = "c|round|floor|ceiling"; var dateBuiltIns = "iso_[a-z_]+"; var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk"; var hashBuiltIns = "keys|values"; var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace"; var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|" + "eval|has_content|interpret|is_[a-z_]+|namespacenew"; var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns + xmlBuiltIns + expertBuiltIns; var deprecatedBuiltIns = "default|exists|if_exists|web_safe"; var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|" + "now|output_encoding|template_name|url_escaping_charset|vars|version"; var operators = "gt|gte|lt|lte|as|in|using"; var reserved = "true|false"; var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|" + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|" + "attributes"; this.$rules = { "start" : [{ token : "constant.character.entity", regex : /&[^;]+;/ }, { token : "support.function", regex : "\\?("+allBuiltIns+")" }, { token : "support.function.deprecated", regex : "\\?("+deprecatedBuiltIns+")" }, { token : "language.variable", regex : "\\.(?:"+variables+")" }, { token : "constant.language", regex : "\\b("+reserved+")\\b" }, { token : "keyword.operator", regex : "\\b(?:"+operators+")\\b" }, { token : "entity.other.attribute-name", regex : attributes }, { token : "string", // regex : /['"]/, next : "qstring" }, { token : function(value) { if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) { return "constant.numeric"; } else { return "variable"; } }, regex : /[\w.+\-]+/ }, { token : "keyword.operator", regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" }], "qstring" : [{ token : "constant.character.escape", regex : '\\\\[nrtvef\\\\"$]' }, { token : "string", regex : /['"]/, next : "start" }, { defaultToken : "string" }] }; }; oop.inherits(FtlLangHighlightRules, TextHighlightRules); var FtlHighlightRules = function() { HtmlHighlightRules.call(this); var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|" + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|" + "setting|stop|switch|t|visit"; var startRules = [ { token : "comment", regex : "<#--", next : "ftl-dcomment" }, { token : "string.interpolated", regex : "\\${", push : "ftl-start" }, { token : "keyword.function", regex : "", next : "pop" }, { token : "string.interpolated", regex : "}", next : "pop" } ]; for (var key in this.$rules) this.$rules[key].unshift.apply(this.$rules[key], startRules); this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]); this.addRules({ "ftl-dcomment" : [{ token : "comment", regex : ".*?-->", next : "pop" }, { token : "comment", regex : ".+" }] }); this.normalizeRules(); }; oop.inherits(FtlHighlightRules, HtmlHighlightRules); exports.FtlHighlightRules = FtlHighlightRules; }); define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules; var Mode = function() { this.HighlightRules = FtlHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/ftl"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-lucene.js0000644000076400007640000000402612554155240023427 0ustar pravipravidefine("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LuceneHighlightRules = function() { this.$rules = { "start" : [ { token : "constant.character.negation", regex : "[\\-]" }, { token : "constant.character.interro", regex : "[\\?]" }, { token : "constant.character.asterisk", regex : "[\\*]" }, { token: 'constant.character.proximity', regex: '~[0-9]+\\b' }, { token : 'keyword.operator', regex: '(?:AND|OR|NOT)\\b' }, { token : "paren.lparen", regex : "[\\(]" }, { token : "paren.rparen", regex : "[\\)]" }, { token : "keyword", regex : "[\\S]+:" }, { token : "string", // " string regex : '".*?"' }, { token : "text", regex : "\\s+" } ] }; }; oop.inherits(LuceneHighlightRules, TextHighlightRules); exports.LuceneHighlightRules = LuceneHighlightRules; }); define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) { 'use strict'; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; var Mode = function() { this.HighlightRules = LuceneHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/lucene"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-text.js0000644000076400007640000000000112554155240023125 0ustar pravipravi ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-sjs.js0000644000076400007640000013704712554155240022765 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var SJSHighlightRules = function() { var parent = new JavaScriptHighlightRules({noES6: true}); var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; var contextAware = function(f) { f.isContextAware = true; return f; }; var ctxBegin = function(opts) { return { token: opts.token, regex: opts.regex, next: contextAware(function(currentState, stack) { if (stack.length === 0) stack.unshift(currentState); stack.unshift(opts.next); return opts.next; }), }; }; var ctxEnd = function(opts) { return { token: opts.token, regex: opts.regex, next: contextAware(function(currentState, stack) { stack.shift(); return stack[0] || "start"; }), }; }; this.$rules = parent.$rules; this.$rules.no_regex = [ { token: "keyword", regex: "(waitfor|or|and|collapse|spawn|retract)\\b" }, { token: "keyword.operator", regex: "(->|=>|\\.\\.)" }, { token: "variable.language", regex: "(hold|default)\\b" }, ctxBegin({ token: "string", regex: "`", next: "bstring" }), ctxBegin({ token: "string", regex: '"', next: "qqstring" }), ctxBegin({ token: "string", regex: '"', next: "qqstring" }), { token: ["paren.lparen", "text", "paren.rparen"], regex: "(\\{)(\\s*)(\\|)", next: "block_arguments", } ].concat(this.$rules.no_regex); this.$rules.block_arguments = [ { token: "paren.rparen", regex: "\\|", next: "no_regex", } ].concat(this.$rules.function_arguments); this.$rules.bstring = [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next: "bstring" }, ctxBegin({ token : "paren.lparen", regex : "\\$\\{", next: "string_interp" }), ctxBegin({ token : "paren.lparen", regex : "\\$", next: "bstring_interp_single" }), ctxEnd({ token : "string", regex : "`", }), { defaultToken: "string" } ]; this.$rules.qqstring = [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next: "qqstring", }, ctxBegin({ token : "paren.lparen", regex : "#\\{", next: "string_interp" }), ctxEnd({ token : "string", regex : '"', }), { defaultToken: "string" } ]; var embeddableRules = []; for (var i=0; i < this.$rules.no_regex.length; i++) { var rule = this.$rules.no_regex[i]; var token = String(rule.token); if (token.indexOf('paren') == -1 && (!rule.next || rule.next.isContextAware)) { embeddableRules.push(rule); } }; this.$rules.string_interp = [ ctxEnd({ token: "paren.rparen", regex: "\\}" }), ctxBegin({ token: "paren.lparen", regex: '{', next: "string_interp" }) ].concat(embeddableRules); this.$rules.bstring_interp_single = [ { token: ["identifier", "paren.lparen"], regex: '(\\w+)(\\()', next: 'bstring_interp_single_call' }, ctxEnd({ token : "identifier", regex : "\\w*", }) ]; this.$rules.bstring_interp_single_call = [ ctxBegin({ token: "paren.lparen", regex: "\\(", next: "bstring_interp_single_call" }), ctxEnd({ token: "paren.rparen", regex: "\\)" }) ].concat(embeddableRules); } oop.inherits(SJSHighlightRules, TextHighlightRules); exports.SJSHighlightRules = SJSHighlightRules; }); define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JSMode = require("./javascript").Mode; var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = SJSHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, JSMode); (function() { this.createWorker = function(session) { return null; } this.$id = "ace/mode/sjs"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-kuroir.js0000644000076400007640000000432312554155240023645 0ustar pravipravidefine("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-kuroir"; exports.cssText = "\ .ace-kuroir .ace_gutter {\ background: #e8e8e8;\ color: #333;\ }\ .ace-kuroir .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-kuroir {\ background-color: #E8E9E8;\ color: #363636;\ }\ .ace-kuroir .ace_cursor {\ color: #202020;\ }\ .ace-kuroir .ace_marker-layer .ace_selection {\ background: rgba(245, 170, 0, 0.57);\ }\ .ace-kuroir.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #E8E9E8;\ border-radius: 2px;\ }\ .ace-kuroir .ace_marker-layer .ace_step {\ background: rgb(198, 219, 174);\ }\ .ace-kuroir .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgba(0, 0, 0, 0.29);\ }\ .ace-kuroir .ace_marker-layer .ace_active-line {\ background: rgba(203, 220, 47, 0.22);\ }\ .ace-kuroir .ace_gutter-active-line {\ background-color: rgba(203, 220, 47, 0.22);\ }\ .ace-kuroir .ace_marker-layer .ace_selected-word {\ border: 1px solid rgba(245, 170, 0, 0.57);\ }\ .ace-kuroir .ace_invisible {\ color: #BFBFBF\ }\ .ace-kuroir .ace_fold {\ border-color: #363636;\ }\ .ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\ background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\ font-style:italic;\ color:#FD1732;\ background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\ background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\ background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\ background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\ "; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-asciidoc.js0000644000076400007640000003273212554155240023737 0ustar pravipravidefine("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var AsciidocHighlightRules = function() { var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b"; this.$rules = { "start": [ {token: "empty", regex: /$/}, {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"}, {token: "literal", regex: /^-{4,}\s*$/, next: "literalBlock"}, {token: "string", regex: /^\+{4,}\s*$/, next: "passthroughBlock"}, {token: "keyword", regex: /^={4,}\s*$/}, {token: "text", regex: /^\s*$/}, {token: "empty", regex: "", next: "dissallowDelimitedBlock"} ], "dissallowDelimitedBlock": [ {include: "paragraphEnd"}, {token: "comment", regex: '^//.+$'}, {token: "keyword", regex: "^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"}, {include: "listStart"}, {token: "literal", regex: /^\s+.+$/, next: "indentedBlock"}, {token: "empty", regex: "", next: "text"} ], "paragraphEnd": [ {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "commentBlock"}, {token: "tableBlock", regex: /^\s*[|!]=+\s*$/, next: "tableBlock"}, {token: "keyword", regex: /^(?:--|''')\s*$/, next: "start"}, {token: "option", regex: /^\[.*\]\s*$/, next: "start"}, {token: "pageBreak", regex: /^>{3,}$/, next: "start"}, {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"}, {token: "titleUnderline", regex: /^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/, next: "start"}, {token: "singleLineTitle", regex: /^={1,5}\s+\S.*$/, next: "start"}, {token: "otherBlock", regex: /^(?:\*{2,}|_{2,})\s*$/, next: "start"}, {token: "optionalTitle", regex: /^\.[^.\s].+$/, next: "start"} ], "listStart": [ {token: "keyword", regex: /^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/, next: "listText"}, {token: "meta.tag", regex: /^.+(?::{2,4}|;;)(?: |$)/, next: "listText"}, {token: "support.function.list.callout", regex: /^(?:<\d+>|\d+>|>) /, next: "text"}, {token: "keyword", regex: /^\+\s*$/, next: "start"} ], "text": [ {token: ["link", "variable.language"], regex: /((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/}, {token: "link", regex: /(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/}, {token: "link", regex: /\b[\w\.\/\-]+@[\w\.\/\-]+\b/}, {include: "macros"}, {include: "paragraphEnd"}, {token: "literal", regex:/\+{3,}/, next:"smallPassthrough"}, {token: "escape", regex: /\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/}, {token: "escape", regex: /\\[_*'`+#]|\\{2}[_*'`+#]{2}/}, {token: "keyword", regex: /\s\+$/}, {token: "text", regex: identifierRe}, {token: ["keyword", "string", "keyword"], regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/}, {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/}, {token: "constant.character", regex: /\({2,3}.*?\){2,3}/}, {token: "keyword", regex: /\[\[.+?\]\]/}, {token: "support", regex: /^\[{3}[\w\d =\-]+\]{3}/}, {include: "quotes"}, {token: "empty", regex: /^\s*$/, next: "start"} ], "listText": [ {include: "listStart"}, {include: "text"} ], "indentedBlock": [ {token: "literal", regex: /^[\s\w].+$/, next: "indentedBlock"}, {token: "literal", regex: "", next: "start"} ], "listingBlock": [ {token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "constant.numeric", regex: '<\\d+>'}, {token: "literal", regex: '[^<]+'}, {token: "literal", regex: '<'} ], "literalBlock": [ {token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "constant.numeric", regex: '<\\d+>'}, {token: "literal", regex: '[^<]+'}, {token: "literal", regex: '<'} ], "passthroughBlock": [ {token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "literal", regex: identifierRe + "|\\d+"}, {include: "macros"}, {token: "literal", regex: "."} ], "smallPassthrough": [ {token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"}, {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"}, {token: "literal", regex: identifierRe + "|\\d+"}, {include: "macros"} ], "commentBlock": [ {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "doc.comment", regex: '^.*$'} ], "tableBlock": [ {token: "tableBlock", regex: /^\s*\|={3,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "innerTableBlock"}, {token: "tableBlock", regex: /\|/}, {include: "text", noEscape: true} ], "innerTableBlock": [ {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "tableBlock"}, {token: "tableBlock", regex: /^\s*|={3,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "tableBlock", regex: /\!/} ], "macros": [ {token: "macro", regex: /{[\w\-$]+}/}, {token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/}, {token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/}, {token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/}, {token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/}, {token: "keyword", regex: /^:.+?:(?= |$)/} ], "quotes": [ {token: "string.italic", regex: /__[^_\s].*?__/}, {token: "string.italic", regex: quoteRule("_")}, {token: "keyword.bold", regex: /\*\*[^*\s].*?\*\*/}, {token: "keyword.bold", regex: quoteRule("\\*")}, {token: "literal", regex: quoteRule("\\+")}, {token: "literal", regex: /\+\+[^+\s].*?\+\+/}, {token: "literal", regex: /\$\$.+?\$\$/}, {token: "literal", regex: quoteRule("`")}, {token: "keyword", regex: quoteRule("^")}, {token: "keyword", regex: quoteRule("~")}, {token: "keyword", regex: /##?/}, {token: "keyword", regex: /(?:\B|^)``|\b''/} ] }; function quoteRule(ch) { var prefix = /\w/.test(ch) ? "\\b" : "(?:\\B|^)"; return prefix + ch + "[^" + ch + "].*?" + ch + "(?![\\w*])"; } var tokenMap = { macro: "constant.character", tableBlock: "doc.comment", titleUnderline: "markup.heading", singleLineTitle: "markup.heading", pageBreak: "string", option: "string.regexp", otherBlock: "markup.list", literal: "support.function", optionalTitle: "constant.numeric", escape: "constant.language.escape", link: "markup.underline.list" }; for (var state in this.$rules) { var stateRules = this.$rules[state]; for (var i = stateRules.length; i--; ) { var rule = stateRules[i]; if (rule.include || typeof rule == "string") { var args = [i, 1].concat(this.$rules[rule.include || rule]); if (rule.noEscape) { args = args.filter(function(x) { return !x.next; }); } stateRules.splice.apply(stateRules, args); } else if (rule.token in tokenMap) { rule.token = tokenMap[rule.token]; } } } }; oop.inherits(AsciidocHighlightRules, TextHighlightRules); exports.AsciidocHighlightRules = AsciidocHighlightRules; }); define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/; this.singleLineHeadingRe = /^={1,5}(?=\s+\S)/; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (!this.foldingStartMarker.test(line)) return "" if (line[0] == "=") { if (this.singleLineHeadingRe.test(line)) return "start"; if (session.getLine(row - 1).length != session.getLine(row).length) return ""; return "start"; } if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock") return "end"; return "start"; }; this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.getLine(row); var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; if (!line.match(this.foldingStartMarker)) return; var token; function getTokenType(row) { token = session.getTokens(row)[0]; return token && token.type; } var levels = ["=","-","~","^","+"]; var heading = "markup.heading"; var singleLineHeadingRe = this.singleLineHeadingRe; function getLevel() { var match = token.value.match(singleLineHeadingRe); if (match) return match[0].length; var level = levels.indexOf(token.value[0]) + 1; if (level == 1) { if (session.getLine(row - 1).length != session.getLine(row).length) return Infinity; } return level; } if (getTokenType(row) == heading) { var startHeadingLevel = getLevel(); while (++row < maxRow) { if (getTokenType(row) != heading) continue; var level = getLevel(); if (level <= startHeadingLevel) break; } var isSingleLineHeading = token && token.value.match(this.singleLineHeadingRe); endRow = isSingleLineHeading ? row - 1 : row - 2; if (endRow > startRow) { while (endRow > startRow && (!getTokenType(endRow) || token.value[0] == "[")) endRow--; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } } else { var state = session.bgTokenizer.getState(row); if (state == "dissallowDelimitedBlock") { while (row -- > 0) { if (session.bgTokenizer.getState(row).lastIndexOf("Block") == -1) break; } endRow = row + 1; if (endRow < startRow) { var endColumn = session.getLine(row).length; return new Range(endRow, 5, startRow, startColumn - 5); } } else { while (++row < maxRow) { if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock") break; } endRow = row; if (endRow > startRow) { var endColumn = session.getLine(row).length; return new Range(startRow, 5, endRow, endColumn - 5); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules; var AsciidocFoldMode = require("./folding/asciidoc").FoldMode; var Mode = function() { this.HighlightRules = AsciidocHighlightRules; this.foldingRules = new AsciidocFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.type = "text"; this.getNextLineIndent = function(state, line, tab) { if (state == "listblock") { var match = /^((?:.+)?)([-+*][ ]+)/.exec(line); if (match) { return new Array(match[1].length + 1).join(" ") + match[2]; } else { return ""; } } else { return this.$getIndent(line); } }; this.$id = "ace/mode/asciidoc"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-terminal.js0000644000076400007640000000622612554155240024151 0ustar pravipravidefine("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-terminal-theme"; exports.cssText = ".ace-terminal-theme .ace_gutter {\ background: #1a0005;\ color: steelblue\ }\ .ace-terminal-theme .ace_print-margin {\ width: 1px;\ background: #1a1a1a\ }\ .ace-terminal-theme {\ background-color: black;\ color: #DEDEDE\ }\ .ace-terminal-theme .ace_cursor {\ color: #9F9F9F\ }\ .ace-terminal-theme .ace_marker-layer .ace_selection {\ background: #424242\ }\ .ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px black;\ border-radius: 2px\ }\ .ace-terminal-theme .ace_marker-layer .ace_step {\ background: rgb(0, 0, 0)\ }\ .ace-terminal-theme .ace_marker-layer .ace_bracket {\ background: #090;\ }\ .ace-terminal-theme .ace_marker-layer .ace_bracket-start {\ background: #090;\ }\ .ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {\ margin: -1px 0 0 -1px;\ border: 1px solid #900\ }\ .ace-terminal-theme .ace_marker-layer .ace_active-line {\ background: #2A2A2A\ }\ .ace-terminal-theme .ace_gutter-active-line {\ background-color: #2A112A\ }\ .ace-terminal-theme .ace_marker-layer .ace_selected-word {\ border: 1px solid #424242\ }\ .ace-terminal-theme .ace_invisible {\ color: #343434\ }\ .ace-terminal-theme .ace_keyword,\ .ace-terminal-theme .ace_meta,\ .ace-terminal-theme .ace_storage,\ .ace-terminal-theme .ace_storage.ace_type,\ .ace-terminal-theme .ace_support.ace_type {\ color: tomato\ }\ .ace-terminal-theme .ace_keyword.ace_operator {\ color: deeppink\ }\ .ace-terminal-theme .ace_constant.ace_character,\ .ace-terminal-theme .ace_constant.ace_language,\ .ace-terminal-theme .ace_constant.ace_numeric,\ .ace-terminal-theme .ace_keyword.ace_other.ace_unit,\ .ace-terminal-theme .ace_support.ace_constant,\ .ace-terminal-theme .ace_variable.ace_parameter {\ color: #E78C45\ }\ .ace-terminal-theme .ace_constant.ace_other {\ color: gold\ }\ .ace-terminal-theme .ace_invalid {\ color: yellow;\ background-color: red\ }\ .ace-terminal-theme .ace_invalid.ace_deprecated {\ color: #CED2CF;\ background-color: #B798BF\ }\ .ace-terminal-theme .ace_fold {\ background-color: #7AA6DA;\ border-color: #DEDEDE\ }\ .ace-terminal-theme .ace_entity.ace_name.ace_function,\ .ace-terminal-theme .ace_support.ace_function,\ .ace-terminal-theme .ace_variable {\ color: #7AA6DA\ }\ .ace-terminal-theme .ace_support.ace_class,\ .ace-terminal-theme .ace_support.ace_type {\ color: #E7C547\ }\ .ace-terminal-theme .ace_heading,\ .ace-terminal-theme .ace_string {\ color: #B9CA4A\ }\ .ace-terminal-theme .ace_entity.ace_name.ace_tag,\ .ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,\ .ace-terminal-theme .ace_meta.ace_tag,\ .ace-terminal-theme .ace_string.ace_regexp,\ .ace-terminal-theme .ace_variable {\ color: #D54E53\ }\ .ace-terminal-theme .ace_comment {\ color: orangered\ }\ .ace-terminal-theme .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;\ }\ "; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-github.js0000644000076400007640000000465312554155240023622 0ustar pravipravidefine("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-github"; exports.cssText = "\ .ace-github .ace_gutter {\ background: #e8e8e8;\ color: #AAA;\ }\ .ace-github {\ background: #fff;\ color: #000;\ }\ .ace-github .ace_keyword {\ font-weight: bold;\ }\ .ace-github .ace_string {\ color: #D14;\ }\ .ace-github .ace_variable.ace_class {\ color: teal;\ }\ .ace-github .ace_constant.ace_numeric {\ color: #099;\ }\ .ace-github .ace_constant.ace_buildin {\ color: #0086B3;\ }\ .ace-github .ace_support.ace_function {\ color: #0086B3;\ }\ .ace-github .ace_comment {\ color: #998;\ font-style: italic;\ }\ .ace-github .ace_variable.ace_language {\ color: #0086B3;\ }\ .ace-github .ace_paren {\ font-weight: bold;\ }\ .ace-github .ace_boolean {\ font-weight: bold;\ }\ .ace-github .ace_string.ace_regexp {\ color: #009926;\ font-weight: normal;\ }\ .ace-github .ace_variable.ace_instance {\ color: teal;\ }\ .ace-github .ace_constant.ace_language {\ font-weight: bold;\ }\ .ace-github .ace_cursor {\ color: black;\ }\ .ace-github.ace_focus .ace_marker-layer .ace_active-line {\ background: rgb(255, 255, 204);\ }\ .ace-github .ace_marker-layer .ace_active-line {\ background: rgb(245, 245, 245);\ }\ .ace-github .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-github.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px white;\ border-radius: 2px;\ }\ .ace-github.ace_nobold .ace_line > span {\ font-weight: normal !important;\ }\ .ace-github .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-github .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-github .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-github .ace_gutter-active-line {\ background-color : rgba(0, 0, 0, 0.07);\ }\ .ace-github .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-github .ace_invisible {\ color: #BFBFBF\ }\ .ace-github .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-github .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-curly.js0000644000076400007640000027644612554155240023333 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var CurlyHighlightRules = function() { HtmlHighlightRules.call(this); this.$rules["start"].unshift({ token: "variable", regex: "{{", push: "curly-start" }); this.$rules["curly-start"] = [{ token: "variable", regex: "}}", next: "pop" }]; this.normalizeRules(); }; oop.inherits(CurlyHighlightRules, HtmlHighlightRules); exports.CurlyHighlightRules = CurlyHighlightRules; }); define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/html_highlight_rules","ace/mode/folding/html","ace/mode/curly_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var HtmlFoldMode = require("./folding/html").FoldMode; var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules; var Mode = function() { HtmlMode.call(this); this.HighlightRules = CurlyHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.foldingRules = new HtmlFoldMode(); }; oop.inherits(Mode, HtmlMode); (function() { this.$id = "ace/mode/curly"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-groovy.js0000644000076400007640000014120112554155240023476 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var GroovyHighlightRules = function() { var keywords = ( "assert|with|abstract|continue|for|new|switch|" + "assert|default|goto|package|synchronized|" + "boolean|do|if|private|this|" + "break|double|implements|protected|throw|" + "byte|else|import|public|throws|" + "case|enum|instanceof|return|transient|" + "catch|extends|int|short|try|" + "char|final|interface|static|void|" + "class|finally|long|strictfp|volatile|" + "def|float|native|super|while" ); var buildinConstants = ( "null|Infinity|NaN|undefined" ); var langClasses = ( "AbstractMethodError|AssertionError|ClassCircularityError|"+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ "ExceptionInInitializerError|IllegalAccessError|"+ "IllegalThreadStateException|InstantiationError|InternalError|"+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ "InstantiationException|IndexOutOfBoundsException|"+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ "ArrayStoreException|ClassCastException|LinkageError|"+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ "Cloneable|Class|CharSequence|Comparable|String|Object" ); var keywordMapper = this.createKeywordMapper({ "variable.language": "this", "keyword": keywords, "support.function": langClasses, "constant.language": buildinConstants }, "identifier"); this.$rules = { "start" : [ { token : "comment", regex : "\\/\\/.*$" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", regex : '"""', next : "qqstring" }, { token : "string", regex : "'''", next : "qstring" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" }, { token : "lparen", regex : "[[({]" }, { token : "rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "qqstring" : [ { token : "constant.language.escape", regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/ }, { token : "constant.language.escape", regex : /\$[\w\d]+/ }, { token : "constant.language.escape", regex : /\$\{[^"\}]+\}?/ }, { token : "string", regex : '"{3,5}', next : "start" }, { token : "string", regex : '.+?' } ], "qstring" : [ { token : "constant.language.escape", regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/ }, { token : "string", regex : "'{3,5}", next : "start" }, { token : "string", regex : ".+?" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(GroovyHighlightRules, TextHighlightRules); exports.GroovyHighlightRules = GroovyHighlightRules; }); define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules; var Mode = function() { JavaScriptMode.call(this); this.HighlightRules = GroovyHighlightRules; }; oop.inherits(Mode, JavaScriptMode); (function() { this.createWorker = function(session) { return null; }; this.$id = "ace/mode/groovy"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-coffee.js0000644000076400007640000123523512554155240024001 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i= 0) { levels += 1; } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) { levels -= 1; } i += 1; } return i - 1; }; Rewriter.prototype.removeLeadingNewlines = function() { var i, tag, _i, _len, _ref; _ref = this.tokens; for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { tag = _ref[i][0]; if (tag !== 'TERMINATOR') { break; } } if (i) { return this.tokens.splice(0, i); } }; Rewriter.prototype.closeOpenCalls = function() { var action, condition; condition = function(token, i) { var _ref; return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; }; action = function(token, i) { return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; }; return this.scanTokens(function(token, i) { if (token[0] === 'CALL_START') { this.detectEnd(i + 1, condition, action); } return 1; }); }; Rewriter.prototype.closeOpenIndexes = function() { var action, condition; condition = function(token, i) { var _ref; return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; }; action = function(token, i) { return token[0] = 'INDEX_END'; }; return this.scanTokens(function(token, i) { if (token[0] === 'INDEX_START') { this.detectEnd(i + 1, condition, action); } return 1; }); }; Rewriter.prototype.matchTags = function() { var fuzz, i, j, pattern, _i, _ref, _ref1; i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; fuzz = 0; for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) { while (this.tag(i + j + fuzz) === 'HERECOMMENT') { fuzz += 2; } if (pattern[j] == null) { continue; } if (typeof pattern[j] === 'string') { pattern[j] = [pattern[j]]; } if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) { return false; } } return true; }; Rewriter.prototype.looksObjectish = function(j) { return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':'); }; Rewriter.prototype.findTagsBackwards = function(i, tags) { var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; backStack = []; while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) { backStack.push(this.tag(i)); } if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) { backStack.pop(); } i -= 1; } return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0; }; Rewriter.prototype.addImplicitBracesAndParens = function() { var stack; stack = []; return this.scanTokens(function(token, i, tokens) { var endAllImplicitCalls, endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, prevToken, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; tag = token[0]; prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0]; nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; stackTop = function() { return stack[stack.length - 1]; }; startIdx = i; forward = function(n) { return i - startIdx + n; }; inImplicit = function() { var _ref, _ref1; return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; }; inImplicitCall = function() { var _ref; return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; }; inImplicitObject = function() { var _ref; return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; }; inImplicitControl = function() { var _ref; return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; }; startImplicitCall = function(j) { var idx; idx = j != null ? j : i; stack.push([ '(', idx, { ours: true } ]); tokens.splice(idx, 0, generate('CALL_START', '(')); if (j == null) { return i += 1; } }; endImplicitCall = function() { stack.pop(); tokens.splice(i, 0, generate('CALL_END', ')')); return i += 1; }; endAllImplicitCalls = function() { while (inImplicitCall()) { endImplicitCall(); } }; startImplicitObject = function(j, startsLine) { var idx; if (startsLine == null) { startsLine = true; } idx = j != null ? j : i; stack.push([ '{', idx, { sameLine: true, startsLine: startsLine, ours: true } ]); tokens.splice(idx, 0, generate('{', generate(new String('{')))); if (j == null) { return i += 1; } }; endImplicitObject = function(j) { j = j != null ? j : i; stack.pop(); tokens.splice(j, 0, generate('}', '}')); return i += 1; }; if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { stack.push([ 'CONTROL', i, { ours: true } ]); return forward(1); } if (tag === 'INDENT' && inImplicit()) { if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { while (inImplicitCall()) { endImplicitCall(); } } if (inImplicitControl()) { stack.pop(); } stack.push([tag, i]); return forward(1); } if (__indexOf.call(EXPRESSION_START, tag) >= 0) { stack.push([tag, i]); return forward(1); } if (__indexOf.call(EXPRESSION_END, tag) >= 0) { while (inImplicit()) { if (inImplicitCall()) { endImplicitCall(); } else if (inImplicitObject()) { endImplicitObject(); } else { stack.pop(); } } stack.pop(); } if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { if (tag === '?') { tag = token[0] = 'FUNC_EXIST'; } startImplicitCall(i + 1); return forward(2); } if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { startImplicitCall(i + 1); stack.push(['INDENT', i + 2]); return forward(3); } if (tag === ':') { if (this.tag(i - 2) === '@') { s = i - 2; } else { s = i - 1; } while (this.tag(s - 2) === 'HERECOMMENT') { s -= 2; } startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine; if (stackTop()) { _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1]; if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { return forward(1); } } startImplicitObject(s, !!startsLine); return forward(2); } if (inImplicitCall() && __indexOf.call(CALL_CLOSERS, tag) >= 0) { if (prevTag === 'OUTDENT') { endImplicitCall(); return forward(1); } if (prevToken.newLine) { endAllImplicitCalls(); return forward(1); } } if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) { stackTop()[2].sameLine = false; } if (__indexOf.call(IMPLICIT_END, tag) >= 0) { while (inImplicit()) { _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine); if (inImplicitCall() && prevTag !== ',') { endImplicitCall(); } else if (inImplicitObject() && sameLine && !startsLine) { endImplicitObject(); } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { endImplicitObject(); } else { break; } } } if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { offset = nextTag === 'OUTDENT' ? 1 : 0; while (inImplicitObject()) { endImplicitObject(i + offset); } } return forward(1); }); }; Rewriter.prototype.addLocationDataToGeneratedTokens = function() { return this.scanTokens(function(token, i, tokens) { var column, line, nextLocation, prevLocation, _ref, _ref1; if (token[2]) { return 1; } if (!(token.generated || token.explicit)) { return 1; } if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { line = nextLocation.first_line, column = nextLocation.first_column; } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { line = prevLocation.last_line, column = prevLocation.last_column; } else { line = column = 0; } token[2] = { first_line: line, first_column: column, last_line: line, last_column: column }; return 1; }); }; Rewriter.prototype.normalizeLines = function() { var action, condition, indent, outdent, starter; starter = indent = outdent = null; condition = function(token, i) { var _ref, _ref1, _ref2, _ref3; return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'TERMINATOR' && (_ref1 = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref2 = token[0]) === 'CATCH' || _ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (_ref3 = token[0], __indexOf.call(CALL_CLOSERS, _ref3) >= 0) && this.tokens[i - 1].newLine; }; action = function(token, i) { return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); }; return this.scanTokens(function(token, i, tokens) { var j, tag, _i, _ref, _ref1, _ref2; tag = token[0]; if (tag === 'TERMINATOR') { if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { tokens.splice.apply(tokens, [i, 1].concat(__slice.call(this.indentation()))); return 1; } if (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0) { tokens.splice(i, 1); return 0; } } if (tag === 'CATCH') { for (j = _i = 1; _i <= 2; j = ++_i) { if (!((_ref1 = this.tag(i + j)) === 'OUTDENT' || _ref1 === 'TERMINATOR' || _ref1 === 'FINALLY')) { continue; } tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); return 2 + j; } } if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { starter = tag; _ref2 = this.indentation(true), indent = _ref2[0], outdent = _ref2[1]; if (starter === 'THEN') { indent.fromThen = true; } tokens.splice(i + 1, 0, indent); this.detectEnd(i + 2, condition, action); if (tag === 'THEN') { tokens.splice(i, 1); } return 1; } return 1; }); }; Rewriter.prototype.tagPostfixConditionals = function() { var action, condition, original; original = null; condition = function(token, i) { var prevTag, tag; tag = token[0]; prevTag = this.tokens[i - 1][0]; return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); }; action = function(token, i) { if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { return original[0] = 'POST_' + original[0]; } }; return this.scanTokens(function(token, i) { if (token[0] !== 'IF') { return 1; } original = token; this.detectEnd(i + 1, condition, action); return 1; }); }; Rewriter.prototype.indentation = function(implicit) { var indent, outdent; if (implicit == null) { implicit = false; } indent = ['INDENT', 2]; outdent = ['OUTDENT', 2]; if (implicit) { indent.generated = outdent.generated = true; } if (!implicit) { indent.explicit = outdent.explicit = true; } return [indent, outdent]; }; Rewriter.prototype.generate = generate; Rewriter.prototype.tag = function(i) { var _ref; return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; }; return Rewriter; })(); BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; exports.INVERSES = INVERSES = {}; EXPRESSION_START = []; EXPRESSION_END = []; for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; EXPRESSION_START.push(INVERSES[rite] = left); EXPRESSION_END.push(INVERSES[left] = rite); } EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; IMPLICIT_UNSPACED_CALL = ['+', '-']; IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; CALL_CLOSERS = ['.', '?.', '::', '?::']; }); define("ace/mode/coffee/helpers",["require","exports","module"], function(require, exports, module) { var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref; exports.starts = function(string, literal, start) { return literal === string.substr(start, literal.length); }; exports.ends = function(string, literal, back) { var len; len = literal.length; return literal === string.substr(string.length - len - (back || 0), len); }; exports.repeat = repeat = function(str, n) { var res; res = ''; while (n > 0) { if (n & 1) { res += str; } n >>>= 1; str += str; } return res; }; exports.compact = function(array) { var item, _i, _len, _results; _results = []; for (_i = 0, _len = array.length; _i < _len; _i++) { item = array[_i]; if (item) { _results.push(item); } } return _results; }; exports.count = function(string, substr) { var num, pos; num = pos = 0; if (!substr.length) { return 1 / 0; } while (pos = 1 + string.indexOf(substr, pos)) { num++; } return num; }; exports.merge = function(options, overrides) { return extend(extend({}, options), overrides); }; extend = exports.extend = function(object, properties) { var key, val; for (key in properties) { val = properties[key]; object[key] = val; } return object; }; exports.flatten = flatten = function(array) { var element, flattened, _i, _len; flattened = []; for (_i = 0, _len = array.length; _i < _len; _i++) { element = array[_i]; if (element instanceof Array) { flattened = flattened.concat(flatten(element)); } else { flattened.push(element); } } return flattened; }; exports.del = function(obj, key) { var val; val = obj[key]; delete obj[key]; return val; }; exports.last = last = function(array, back) { return array[array.length - (back || 0) - 1]; }; exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { var e, _i, _len; for (_i = 0, _len = this.length; _i < _len; _i++) { e = this[_i]; if (fn(e)) { return true; } } return false; }; exports.invertLiterate = function(code) { var line, lines, maybe_code; maybe_code = true; lines = (function() { var _i, _len, _ref1, _results; _ref1 = code.split('\n'); _results = []; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { line = _ref1[_i]; if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { _results.push(line); } else if (maybe_code = /^\s*$/.test(line)) { _results.push(line); } else { _results.push('# ' + line); } } return _results; })(); return lines.join('\n'); }; buildLocationData = function(first, last) { if (!last) { return first; } else { return { first_line: first.first_line, first_column: first.first_column, last_line: last.last_line, last_column: last.last_column }; } }; exports.addLocationDataFn = function(first, last) { return function(obj) { if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { obj.updateLocationDataIfMissing(buildLocationData(first, last)); } return obj; }; }; exports.locationDataToString = function(obj) { var locationData; if (("2" in obj) && ("first_line" in obj[2])) { locationData = obj[2]; } else if ("first_line" in obj) { locationData = obj; } if (locationData) { return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1)); } else { return "No location data"; } }; exports.baseFileName = function(file, stripExt, useWinPathSep) { var parts, pathSep; if (stripExt == null) { stripExt = false; } if (useWinPathSep == null) { useWinPathSep = false; } pathSep = useWinPathSep ? /\\|\// : /\//; parts = file.split(pathSep); file = parts[parts.length - 1]; if (!(stripExt && file.indexOf('.') >= 0)) { return file; } parts = file.split('.'); parts.pop(); if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { parts.pop(); } return parts.join('.'); }; exports.isCoffee = function(file) { return /\.((lit)?coffee|coffee\.md)$/.test(file); }; exports.isLiterate = function(file) { return /\.(litcoffee|coffee\.md)$/.test(file); }; exports.throwSyntaxError = function(message, location) { var error; if (location.last_line == null) { location.last_line = location.first_line; } if (location.last_column == null) { location.last_column = location.first_column; } error = new SyntaxError(message); error.location = location; error.toString = syntaxErrorToString; error.stack = error.toString(); throw error; }; exports.updateSyntaxError = function(error, code, filename) { if (error.toString === syntaxErrorToString) { error.code || (error.code = code); error.filename || (error.filename = filename); error.stack = error.toString(); } return error; }; syntaxErrorToString = function() { var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2; if (!(this.code && this.location)) { return Error.prototype.toString.call(this); } _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; if (last_line == null) { last_line = first_line; } if (last_column == null) { last_column = first_column; } filename = this.filename || '[stdin]'; codeLine = this.code.split('\n')[first_line]; start = first_column; end = first_line === last_line ? last_column + 1 : codeLine.length; marker = repeat(' ', start) + repeat('^', end - start); if (typeof process !== "undefined" && process !== null) { colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; } if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) { colorize = function(str) { return "\x1B[1;31m" + str + "\x1B[0m"; }; codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); marker = colorize(marker); } return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker; }; }); define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"], function(require, exports, module) { var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; exports.Lexer = Lexer = (function() { function Lexer() {} Lexer.prototype.tokenize = function(code, opts) { var consumed, i, tag, _ref2; if (opts == null) { opts = {}; } this.literate = opts.literate; this.indent = 0; this.baseIndent = 0; this.indebt = 0; this.outdebt = 0; this.indents = []; this.ends = []; this.tokens = []; this.chunkLine = opts.line || 0; this.chunkColumn = opts.column || 0; code = this.clean(code); i = 0; while (this.chunk = code.slice(i)) { consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1]; i += consumed; } this.closeIndentation(); if (tag = this.ends.pop()) { this.error("missing " + tag); } if (opts.rewrite === false) { return this.tokens; } return (new Rewriter).rewrite(this.tokens); }; Lexer.prototype.clean = function(code) { if (code.charCodeAt(0) === BOM) { code = code.slice(1); } code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); if (WHITESPACE.test(code)) { code = "\n" + code; this.chunkLine--; } if (this.literate) { code = invertLiterate(code); } return code; }; Lexer.prototype.identifierToken = function() { var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; if (!(match = IDENTIFIER.exec(this.chunk))) { return 0; } input = match[0], id = match[1], colon = match[2]; idLength = id.length; poppedToken = void 0; if (id === 'own' && this.tag() === 'FOR') { this.token('OWN', id); return id.length; } forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@'); tag = 'IDENTIFIER'; if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { tag = id.toUpperCase(); if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { tag = 'LEADING_WHEN'; } else if (tag === 'FOR') { this.seenFor = true; } else if (tag === 'UNLESS') { tag = 'IF'; } else if (__indexOf.call(UNARY, tag) >= 0) { tag = 'UNARY'; } else if (__indexOf.call(RELATION, tag) >= 0) { if (tag !== 'INSTANCEOF' && this.seenFor) { tag = 'FOR' + tag; this.seenFor = false; } else { tag = 'RELATION'; if (this.value() === '!') { poppedToken = this.tokens.pop(); id = '!' + id; } } } } if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { if (forcedIdentifier) { tag = 'IDENTIFIER'; id = new String(id); id.reserved = true; } else if (__indexOf.call(RESERVED, id) >= 0) { this.error("reserved word \"" + id + "\""); } } if (!forcedIdentifier) { if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { id = COFFEE_ALIAS_MAP[id]; } tag = (function() { switch (id) { case '!': return 'UNARY'; case '==': case '!=': return 'COMPARE'; case '&&': case '||': return 'LOGIC'; case 'true': case 'false': return 'BOOL'; case 'break': case 'continue': return 'STATEMENT'; default: return tag; } })(); } tagToken = this.token(tag, id, 0, idLength); if (poppedToken) { _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1]; } if (colon) { colonOffset = input.lastIndexOf(':'); this.token(':', ':', colonOffset, colon.length); } return input.length; }; Lexer.prototype.numberToken = function() { var binaryLiteral, lexedLength, match, number, octalLiteral; if (!(match = NUMBER.exec(this.chunk))) { return 0; } number = match[0]; if (/^0[BOX]/.test(number)) { this.error("radix prefix '" + number + "' must be lowercase"); } else if (/E/.test(number) && !/^0x/.test(number)) { this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'"); } else if (/^0\d*[89]/.test(number)) { this.error("decimal literal '" + number + "' must not be prefixed with '0'"); } else if (/^0\d+/.test(number)) { this.error("octal literal '" + number + "' must be prefixed with '0o'"); } lexedLength = number.length; if (octalLiteral = /^0o([0-7]+)/.exec(number)) { number = '0x' + parseInt(octalLiteral[1], 8).toString(16); } if (binaryLiteral = /^0b([01]+)/.exec(number)) { number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); } this.token('NUMBER', number, 0, lexedLength); return lexedLength; }; Lexer.prototype.stringToken = function() { var octalEsc, quote, string, trimmed; switch (quote = this.chunk.charAt(0)) { case "'": string = SIMPLESTR.exec(this.chunk)[0]; break; case '"': string = this.balancedString(this.chunk, '"'); } if (!string) { return 0; } trimmed = this.removeNewlines(string.slice(1, -1)); if (quote === '"' && 0 < string.indexOf('#{', 1)) { this.interpolateString(trimmed, { strOffset: 1, lexedLength: string.length }); } else { this.token('STRING', quote + this.escapeLines(trimmed) + quote, 0, string.length); } if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) { this.error("octal escape sequences " + string + " are not allowed"); } return string.length; }; Lexer.prototype.heredocToken = function() { var doc, heredoc, match, quote; if (!(match = HEREDOC.exec(this.chunk))) { return 0; } heredoc = match[0]; quote = heredoc.charAt(0); doc = this.sanitizeHeredoc(match[2], { quote: quote, indent: null }); if (quote === '"' && 0 <= doc.indexOf('#{')) { this.interpolateString(doc, { heredoc: true, strOffset: 3, lexedLength: heredoc.length }); } else { this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length); } return heredoc.length; }; Lexer.prototype.commentToken = function() { var comment, here, match; if (!(match = this.chunk.match(COMMENT))) { return 0; } comment = match[0], here = match[1]; if (here) { this.token('HERECOMMENT', this.sanitizeHeredoc(here, { herecomment: true, indent: repeat(' ', this.indent) }), 0, comment.length); } return comment.length; }; Lexer.prototype.jsToken = function() { var match, script; if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { return 0; } this.token('JS', (script = match[0]).slice(1, -1), 0, script.length); return script.length; }; Lexer.prototype.regexToken = function() { var flags, length, match, prev, regex, _ref2, _ref3; if (this.chunk.charAt(0) !== '/') { return 0; } if (match = HEREGEX.exec(this.chunk)) { length = this.heregexToken(match); return length; } prev = last(this.tokens); if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { return 0; } if (!(match = REGEX.exec(this.chunk))) { return 0; } _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2]; if (regex.slice(0, 2) === '/*') { this.error('regular expressions cannot begin with `*`'); } if (regex === '//') { regex = '/(?:)/'; } this.token('REGEX', "" + regex + flags, 0, match.length); return match.length; }; Lexer.prototype.heregexToken = function(match) { var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; heregex = match[0], body = match[1], flags = match[2]; if (0 > body.indexOf('#{')) { re = this.escapeLines(body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), true); if (re.match(/^\*/)) { this.error('regular expressions cannot begin with `*`'); } this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length); return heregex.length; } this.token('IDENTIFIER', 'RegExp', 0, 0); this.token('CALL_START', '(', 0, 0); tokens = []; _ref2 = this.interpolateString(body, { regex: true }); for (_i = 0, _len = _ref2.length; _i < _len; _i++) { token = _ref2[_i]; tag = token[0], value = token[1]; if (tag === 'TOKENS') { tokens.push.apply(tokens, value); } else if (tag === 'NEOSTRING') { if (!(value = value.replace(HEREGEX_OMIT, '$1$2'))) { continue; } value = value.replace(/\\/g, '\\\\'); token[0] = 'STRING'; token[1] = this.makeString(value, '"', true); tokens.push(token); } else { this.error("Unexpected " + tag); } prev = last(this.tokens); plusToken = ['+', '+']; plusToken[2] = prev[2]; tokens.push(plusToken); } tokens.pop(); if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') { this.token('STRING', '""', 0, 0); this.token('+', '+', 0, 0); } (_ref4 = this.tokens).push.apply(_ref4, tokens); if (flags) { flagsOffset = heregex.lastIndexOf(flags); this.token(',', ',', flagsOffset, 0); this.token('STRING', '"' + flags + '"', flagsOffset, flags.length); } this.token(')', ')', heregex.length - 1, 0); return heregex.length; }; Lexer.prototype.lineToken = function() { var diff, indent, match, noNewlines, size; if (!(match = MULTI_DENT.exec(this.chunk))) { return 0; } indent = match[0]; this.seenFor = false; size = indent.length - 1 - indent.lastIndexOf('\n'); noNewlines = this.unfinished(); if (size - this.indebt === this.indent) { if (noNewlines) { this.suppressNewlines(); } else { this.newlineToken(0); } return indent.length; } if (size > this.indent) { if (noNewlines) { this.indebt = size - this.indent; this.suppressNewlines(); return indent.length; } if (!this.tokens.length) { this.baseIndent = this.indent = size; return indent.length; } diff = size - this.indent + this.outdebt; this.token('INDENT', diff, indent.length - size, size); this.indents.push(diff); this.ends.push('OUTDENT'); this.outdebt = this.indebt = 0; } else if (size < this.baseIndent) { this.error('missing indentation', indent.length); } else { this.indebt = 0; this.outdentToken(this.indent - size, noNewlines, indent.length); } this.indent = size; return indent.length; }; Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { var dent, len; while (moveOut > 0) { len = this.indents.length - 1; if (this.indents[len] === void 0) { moveOut = 0; } else if (this.indents[len] === this.outdebt) { moveOut -= this.outdebt; this.outdebt = 0; } else if (this.indents[len] < this.outdebt) { this.outdebt -= this.indents[len]; moveOut -= this.indents[len]; } else { dent = this.indents.pop() + this.outdebt; moveOut -= dent; this.outdebt = 0; this.pair('OUTDENT'); this.token('OUTDENT', dent, 0, outdentLength); } } if (dent) { this.outdebt -= moveOut; } while (this.value() === ';') { this.tokens.pop(); } if (!(this.tag() === 'TERMINATOR' || noNewlines)) { this.token('TERMINATOR', '\n', outdentLength, 0); } return this; }; Lexer.prototype.whitespaceToken = function() { var match, nline, prev; if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { return 0; } prev = last(this.tokens); if (prev) { prev[match ? 'spaced' : 'newLine'] = true; } if (match) { return match[0].length; } else { return 0; } }; Lexer.prototype.newlineToken = function(offset) { while (this.value() === ';') { this.tokens.pop(); } if (this.tag() !== 'TERMINATOR') { this.token('TERMINATOR', '\n', offset, 0); } return this; }; Lexer.prototype.suppressNewlines = function() { if (this.value() === '\\') { this.tokens.pop(); } return this; }; Lexer.prototype.literalToken = function() { var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; if (match = OPERATOR.exec(this.chunk)) { value = match[0]; if (CODE.test(value)) { this.tagParameters(); } } else { value = this.chunk.charAt(0); } tag = value; prev = last(this.tokens); if (value === '=' && prev) { if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { this.error("reserved word \"" + (this.value()) + "\" can't be assigned"); } if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { prev[0] = 'COMPOUND_ASSIGN'; prev[1] += '='; return value.length; } } if (value === ';') { this.seenFor = false; tag = 'TERMINATOR'; } else if (__indexOf.call(MATH, value) >= 0) { tag = 'MATH'; } else if (__indexOf.call(COMPARE, value) >= 0) { tag = 'COMPARE'; } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { tag = 'COMPOUND_ASSIGN'; } else if (__indexOf.call(UNARY, value) >= 0) { tag = 'UNARY'; } else if (__indexOf.call(SHIFT, value) >= 0) { tag = 'SHIFT'; } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { tag = 'LOGIC'; } else if (prev && !prev.spaced) { if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { if (prev[0] === '?') { prev[0] = 'FUNC_EXIST'; } tag = 'CALL_START'; } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { tag = 'INDEX_START'; switch (prev[0]) { case '?': prev[0] = 'INDEX_SOAK'; } } } switch (value) { case '(': case '{': case '[': this.ends.push(INVERSES[value]); break; case ')': case '}': case ']': this.pair(value); } this.token(tag, value); return value.length; }; Lexer.prototype.sanitizeHeredoc = function(doc, options) { var attempt, herecomment, indent, match, _ref2; indent = options.indent, herecomment = options.herecomment; if (herecomment) { if (HEREDOC_ILLEGAL.test(doc)) { this.error("block comment cannot contain \"*/\", starting"); } if (doc.indexOf('\n') < 0) { return doc; } } else { while (match = HEREDOC_INDENT.exec(doc)) { attempt = match[1]; if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { indent = attempt; } } } if (indent) { doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); } if (!herecomment) { doc = doc.replace(/^\n/, ''); } return doc; }; Lexer.prototype.tagParameters = function() { var i, stack, tok, tokens; if (this.tag() !== ')') { return this; } stack = []; tokens = this.tokens; i = tokens.length; tokens[--i][0] = 'PARAM_END'; while (tok = tokens[--i]) { switch (tok[0]) { case ')': stack.push(tok); break; case '(': case 'CALL_START': if (stack.length) { stack.pop(); } else if (tok[0] === '(') { tok[0] = 'PARAM_START'; return this; } else { return this; } } } return this; }; Lexer.prototype.closeIndentation = function() { return this.outdentToken(this.indent); }; Lexer.prototype.balancedString = function(str, end) { var continueCount, i, letter, match, prev, stack, _i, _ref2; continueCount = 0; stack = [end]; for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) { if (continueCount) { --continueCount; continue; } switch (letter = str.charAt(i)) { case '\\': ++continueCount; continue; case end: stack.pop(); if (!stack.length) { return str.slice(0, +i + 1 || 9e9); } end = stack[stack.length - 1]; continue; } if (end === '}' && (letter === '"' || letter === "'")) { stack.push(end = letter); } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { continueCount += match[0].length - 1; } else if (end === '}' && letter === '{') { stack.push(end = '}'); } else if (end === '"' && prev === '#' && letter === '{') { stack.push(end = '}'); } prev = letter; } return this.error("missing " + (stack.pop()) + ", starting"); }; Lexer.prototype.interpolateString = function(str, options) { var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; if (options == null) { options = {}; } heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength; offsetInChunk = offsetInChunk || 0; strOffset = strOffset || 0; lexedLength = lexedLength || str.length; tokens = []; pi = 0; i = -1; while (letter = str.charAt(i += 1)) { if (letter === '\\') { i += 1; continue; } if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { continue; } if (pi < i) { tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi)); } inner = expr.slice(1, -1); if (inner.length) { _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1]; nested = new Lexer().tokenize(inner, { line: line, column: column, rewrite: false }); popped = nested.pop(); if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') { popped = nested.shift(); } if (len = nested.length) { if (len > 1) { nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0)); nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0)); } tokens.push(['TOKENS', nested]); } } i += expr.length; pi = i + 1; } if ((i > pi && pi < str.length)) { tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi)); } if (regex) { return tokens; } if (!tokens.length) { return this.token('STRING', '""', offsetInChunk, lexedLength); } if (tokens[0][0] !== 'NEOSTRING') { tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk)); } if (interpolated = tokens.length > 1) { this.token('(', '(', offsetInChunk, 0); } for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) { token = tokens[i]; tag = token[0], value = token[1]; if (i) { if (i) { plusToken = this.token('+', '+'); } locationToken = tag === 'TOKENS' ? value[0] : token; plusToken[2] = { first_line: locationToken[2].first_line, first_column: locationToken[2].first_column, last_line: locationToken[2].first_line, last_column: locationToken[2].first_column }; } if (tag === 'TOKENS') { (_ref4 = this.tokens).push.apply(_ref4, value); } else if (tag === 'NEOSTRING') { token[0] = 'STRING'; token[1] = this.makeString(value, '"', heredoc); this.tokens.push(token); } else { this.error("Unexpected " + tag); } } if (interpolated) { rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); rparen.stringEnd = true; this.tokens.push(rparen); } return tokens; }; Lexer.prototype.pair = function(tag) { var size, wanted; if (tag !== (wanted = last(this.ends))) { if ('OUTDENT' !== wanted) { this.error("unmatched " + tag); } this.indent -= size = last(this.indents); this.outdentToken(size, true); return this.pair(tag); } return this.ends.pop(); }; Lexer.prototype.getLineAndColumnFromChunk = function(offset) { var column, lineCount, lines, string; if (offset === 0) { return [this.chunkLine, this.chunkColumn]; } if (offset >= this.chunk.length) { string = this.chunk; } else { string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); } lineCount = count(string, '\n'); column = this.chunkColumn; if (lineCount > 0) { lines = string.split('\n'); column = last(lines).length; } else { column += string.length; } return [this.chunkLine + lineCount, column]; }; Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { var lastCharacter, locationData, token, _ref2, _ref3; if (offsetInChunk == null) { offsetInChunk = 0; } if (length == null) { length = value.length; } locationData = {}; _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; lastCharacter = Math.max(0, length - 1); _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; token = [tag, value, locationData]; return token; }; Lexer.prototype.token = function(tag, value, offsetInChunk, length) { var token; token = this.makeToken(tag, value, offsetInChunk, length); this.tokens.push(token); return token; }; Lexer.prototype.tag = function(index, tag) { var tok; return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); }; Lexer.prototype.value = function(index, val) { var tok; return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); }; Lexer.prototype.unfinished = function() { var _ref2; return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); }; Lexer.prototype.removeNewlines = function(str) { return str.replace(/^\s*\n\s*/, '').replace(/([^\\]|\\\\)\s*\n\s*$/, '$1'); }; Lexer.prototype.escapeLines = function(str, heredoc) { str = str.replace(/\\[^\S\n]*(\n|\\)\s*/g, function(escaped, character) { if (character === '\n') { return ''; } else { return escaped; } }); if (heredoc) { return str.replace(MULTILINER, '\\n'); } else { return str.replace(/\s*\n\s*/g, ' '); } }; Lexer.prototype.makeString = function(body, quote, heredoc) { if (!body) { return quote + quote; } body = body.replace(RegExp("\\\\(" + quote + "|\\\\)", "g"), function(match, contents) { if (contents === quote) { return contents; } else { return match; } }); body = body.replace(RegExp("" + quote, "g"), '\\$&'); return quote + this.escapeLines(body, heredoc) + quote; }; Lexer.prototype.error = function(message, offset) { var first_column, first_line, _ref2; if (offset == null) { offset = 0; } _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1]; return throwSyntaxError(message, { first_line: first_line, first_column: first_column }); }; return Lexer; })(); JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; COFFEE_ALIAS_MAP = { and: '&&', or: '||', is: '==', isnt: '!=', not: '!', yes: 'true', no: 'false', on: 'true', off: 'false' }; COFFEE_ALIASES = (function() { var _results; _results = []; for (key in COFFEE_ALIAS_MAP) { _results.push(key); } return _results; })(); COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield']; STRICT_PROSCRIBED = ['arguments', 'eval']; JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED); exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED; BOM = 65279; IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; HEREDOC = /^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/; OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/; WHITESPACE = /^[^\n\S]+/; COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/; CODE = /^[-=]>/; MULTI_DENT = /^(?:\n[^\n\S]*)+/; SIMPLESTR = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/; JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/; HEREGEX = /^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/; HEREGEX_OMIT = /((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g; MULTILINER = /\n/g; HEREDOC_INDENT = /\n+([^\n\S]*)/g; HEREDOC_ILLEGAL = /\*\//; LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; TRAILING_SPACES = /\s+$/; COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']; LOGIC = ['&&', '||', '&', '|', '^']; SHIFT = ['<<', '>>', '>>>']; COMPARE = ['==', '!=', '<', '>', '<=', '>=']; MATH = ['*', '/', '%']; RELATION = ['IN', 'OF', 'INSTANCEOF']; BOOL = ['TRUE', 'FALSE']; NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED'); LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; }); define("ace/mode/coffee/parser",["require","exports","module"], function(require, exports, module) { var parser = {trace: function trace() { }, yy: {}, symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { var $0 = $$.length - 1; switch (yystate) { case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); break; case 2:return this.$ = $$[$0]; break; case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); break; case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); break; case 5:this.$ = $$[$0-1]; break; case 6:this.$ = $$[$0]; break; case 7:this.$ = $$[$0]; break; case 8:this.$ = $$[$0]; break; case 9:this.$ = $$[$0]; break; case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 11:this.$ = $$[$0]; break; case 12:this.$ = $$[$0]; break; case 13:this.$ = $$[$0]; break; case 14:this.$ = $$[$0]; break; case 15:this.$ = $$[$0]; break; case 16:this.$ = $$[$0]; break; case 17:this.$ = $$[$0]; break; case 18:this.$ = $$[$0]; break; case 19:this.$ = $$[$0]; break; case 20:this.$ = $$[$0]; break; case 21:this.$ = $$[$0]; break; case 22:this.$ = $$[$0]; break; case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); break; case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); break; case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 28:this.$ = $$[$0]; break; case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); break; case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined); break; case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null); break; case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0])); break; case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); break; case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); break; case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); break; case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object')); break; case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object')); break; case 41:this.$ = $$[$0]; break; case 42:this.$ = $$[$0]; break; case 43:this.$ = $$[$0]; break; case 44:this.$ = $$[$0]; break; case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); break; case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); break; case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); break; case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); break; case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); break; case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); break; case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); break; case 52:this.$ = $$[$0]; break; case 53:this.$ = $$[$0]; break; case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); break; case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); break; case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); break; case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); break; case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); break; case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); break; case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); break; case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); break; case 62:this.$ = $$[$0]; break; case 63:this.$ = $$[$0]; break; case 64:this.$ = $$[$0]; break; case 65:this.$ = $$[$0]; break; case 66:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); break; case 67:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 68:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); break; case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); break; case 70:this.$ = $$[$0]; break; case 71:this.$ = $$[$0]; break; case 72:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 74:this.$ = $$[$0]; break; case 75:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 78:this.$ = $$[$0]; break; case 79:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); break; case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); break; case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); break; case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); break; case 83:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype'))); break; case 84:this.$ = $$[$0]; break; case 85:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); break; case 86:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { soak: true })); break; case 87:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); break; case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); break; case 89:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); break; case 90:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); break; case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); break; case 92:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); break; case 93:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); break; case 94:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); break; case 95:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); break; case 96:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); break; case 97:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); break; case 98:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); break; case 99:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); break; case 100:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); break; case 101:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); break; case 102:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); break; case 103:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); break; case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); break; case 105:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))])); break; case 106:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0])); break; case 107:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); break; case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); break; case 109:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); break; case 110:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); break; case 111:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); break; case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); break; case 113:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); break; case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); break; case 115:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); break; case 116:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); break; case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); break; case 118:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); break; case 119:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); break; case 120:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); break; case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); break; case 122:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); break; case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); break; case 124:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); break; case 125:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); break; case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); break; case 127:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); break; case 128:this.$ = $$[$0]; break; case 129:this.$ = $$[$0]; break; case 130:this.$ = $$[$0]; break; case 131:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); break; case 132:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); break; case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); break; case 134:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); break; case 135:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); break; case 136:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); break; case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); break; case 138:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); break; case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); break; case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); break; case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); break; case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); break; case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { guard: $$[$0] })); break; case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { invert: true })); break; case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { invert: true, guard: $$[$0] })); break; case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); break; case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); break; case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); break; case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); break; case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); break; case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); break; case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); break; case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); break; case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); break; case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) }); break; case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { $$[$0].own = $$[$0-1].own; $$[$0].name = $$[$0-1][0]; $$[$0].index = $$[$0-1][1]; return $$[$0]; }())); break; case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); break; case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { $$[$0].own = true; return $$[$0]; }())); break; case 159:this.$ = $$[$0]; break; case 160:this.$ = $$[$0]; break; case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); break; case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); break; case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); break; case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ source: $$[$0] }); break; case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ source: $$[$0], object: true }); break; case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ source: $$[$0-2], guard: $$[$0] }); break; case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ source: $$[$0-2], guard: $$[$0], object: true }); break; case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ source: $$[$0-2], step: $$[$0] }); break; case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ source: $$[$0-4], guard: $$[$0-2], step: $$[$0] }); break; case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ source: $$[$0-4], step: $$[$0-2], guard: $$[$0] }); break; case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); break; case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); break; case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); break; case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); break; case 176:this.$ = $$[$0]; break; case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); break; case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); break; case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); break; case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { type: $$[$0-2] })); break; case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { type: $$[$0-2] })))); break; case 182:this.$ = $$[$0]; break; case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); break; case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { type: $$[$0-1], statement: true })); break; case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { type: $$[$0-1], statement: true })); break; case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); break; case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); break; case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); break; case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); break; case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); break; case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); break; case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); break; case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); break; case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); break; case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); break; case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); break; case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); break; case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); break; case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); break; case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { if ($$[$0-1].charAt(0) === '!') { return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); } else { return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); } }())); break; case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); break; case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); break; case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); break; case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); break; } }, table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}], defaultActions: {58:[2,50],59:[2,51],89:[2,108],186:[2,88]}, parseError: function parseError(str, hash) { if (hash.recoverable) { this.trace(str); } else { var e = new Error(str) e.location = hash.loc throw e; } }, parse: function parse(input) { var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; this.lexer.setInput(input); this.lexer.yy = this.yy; this.yy.lexer = this.lexer; this.yy.parser = this; if (typeof this.lexer.yylloc == 'undefined') { this.lexer.yylloc = {}; } var yyloc = this.lexer.yylloc; lstack.push(yyloc); var ranges = this.lexer.options && this.lexer.options.ranges; if (typeof this.yy.parseError === 'function') { this.parseError = this.yy.parseError; } else { this.parseError = Object.getPrototypeOf(this).parseError; } function popStack(n) { stack.length = stack.length - 2 * n; vstack.length = vstack.length - n; lstack.length = lstack.length - n; } function lex() { var token; token = self.lexer.lex() || EOF; if (typeof token !== 'number') { token = self.symbols_[token] || token; } return token; } var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; while (true) { state = stack[stack.length - 1]; if (this.defaultActions[state]) { action = this.defaultActions[state]; } else { if (symbol === null || typeof symbol == 'undefined') { symbol = lex(); } action = table[state] && table[state][symbol]; } if (typeof action === 'undefined' || !action.length || !action[0]) { var errStr = ''; expected = []; for (p in table[state]) { if (this.terminals_[p] && p > TERROR) { expected.push('\'' + this.terminals_[p] + '\''); } } if (this.lexer.showPosition) { errStr = 'Expecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; } else { errStr = 'Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); } if (this.lexer.yylloc.first_line !== yyloc.first_line) yyloc = this.lexer.yylloc; this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); } if (action[0] instanceof Array && action.length > 1) { throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); } switch (action[0]) { case 1: stack.push(symbol); vstack.push(this.lexer.yytext); lstack.push(this.lexer.yylloc); stack.push(action[1]); symbol = null; if (!preErrorSymbol) { yyleng = this.lexer.yyleng; yytext = this.lexer.yytext; yylineno = this.lexer.yylineno; yyloc = this.lexer.yylloc; if (recovering > 0) { recovering--; } } else { symbol = preErrorSymbol; preErrorSymbol = null; } break; case 2: len = this.productions_[action[1]][1]; yyval.$ = vstack[vstack.length - len]; yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; if (ranges) { yyval._$.range = [ lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1] ]; } r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); if (typeof r !== 'undefined') { return r; } if (len) { stack = stack.slice(0, -1 * len * 2); vstack = vstack.slice(0, -1 * len); lstack = lstack.slice(0, -1 * len); } stack.push(this.productions_[action[1]][0]); vstack.push(yyval.$); lstack.push(yyval._$); newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; stack.push(newState); break; case 3: return true; } } return true; }}; undefined function Parser () { this.yy = {}; } Parser.prototype = parser;parser.Parser = Parser; module.exports = new Parser; }); define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"], function(require, exports, module) { var Scope, extend, last, _ref; _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; exports.Scope = Scope = (function() { Scope.root = null; function Scope(parent, expressions, method) { this.parent = parent; this.expressions = expressions; this.method = method; this.variables = [ { name: 'arguments', type: 'arguments' } ]; this.positions = {}; if (!this.parent) { Scope.root = this; } } Scope.prototype.add = function(name, type, immediate) { if (this.shared && !immediate) { return this.parent.add(name, type, immediate); } if (Object.prototype.hasOwnProperty.call(this.positions, name)) { return this.variables[this.positions[name]].type = type; } else { return this.positions[name] = this.variables.push({ name: name, type: type }) - 1; } }; Scope.prototype.namedMethod = function() { var _ref1; if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { return this.method; } return this.parent.namedMethod(); }; Scope.prototype.find = function(name) { if (this.check(name)) { return true; } this.add(name, 'var'); return false; }; Scope.prototype.parameter = function(name) { if (this.shared && this.parent.check(name, true)) { return; } return this.add(name, 'param'); }; Scope.prototype.check = function(name) { var _ref1; return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); }; Scope.prototype.temporary = function(name, index) { if (name.length > 1) { return '_' + name + (index > 1 ? index - 1 : ''); } else { return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); } }; Scope.prototype.type = function(name) { var v, _i, _len, _ref1; _ref1 = this.variables; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { v = _ref1[_i]; if (v.name === name) { return v.type; } } return null; }; Scope.prototype.freeVariable = function(name, reserve) { var index, temp; if (reserve == null) { reserve = true; } index = 0; while (this.check((temp = this.temporary(name, index)))) { index++; } if (reserve) { this.add(temp, 'var', true); } return temp; }; Scope.prototype.assign = function(name, value) { this.add(name, { value: value, assigned: true }, true); return this.hasAssignments = true; }; Scope.prototype.hasDeclarations = function() { return !!this.declaredVariables().length; }; Scope.prototype.declaredVariables = function() { var realVars, tempVars, v, _i, _len, _ref1; realVars = []; tempVars = []; _ref1 = this.variables; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { v = _ref1[_i]; if (v.type === 'var') { (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); } } return realVars.sort().concat(tempVars.sort()); }; Scope.prototype.assignedVariables = function() { var v, _i, _len, _ref1, _results; _ref1 = this.variables; _results = []; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { v = _ref1[_i]; if (v.type.assigned) { _results.push("" + v.name + " = " + v.type.value); } } return _results; }; return Scope; })(); }); define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"], function(require, exports, module) { var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __slice = [].slice; Error.stackTraceLimit = Infinity; Scope = require('./scope').Scope; _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; exports.extend = extend; exports.addLocationDataFn = addLocationDataFn; YES = function() { return true; }; NO = function() { return false; }; THIS = function() { return this; }; NEGATE = function() { this.negated = !this.negated; return this; }; exports.CodeFragment = CodeFragment = (function() { function CodeFragment(parent, code) { var _ref2; this.code = "" + code; this.locationData = parent != null ? parent.locationData : void 0; this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown'; } CodeFragment.prototype.toString = function() { return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); }; return CodeFragment; })(); fragmentsToText = function(fragments) { var fragment; return ((function() { var _i, _len, _results; _results = []; for (_i = 0, _len = fragments.length; _i < _len; _i++) { fragment = fragments[_i]; _results.push(fragment.code); } return _results; })()).join(''); }; exports.Base = Base = (function() { function Base() {} Base.prototype.compile = function(o, lvl) { return fragmentsToText(this.compileToFragments(o, lvl)); }; Base.prototype.compileToFragments = function(o, lvl) { var node; o = extend({}, o); if (lvl) { o.level = lvl; } node = this.unfoldSoak(o) || this; node.tab = o.indent; if (o.level === LEVEL_TOP || !node.isStatement(o)) { return node.compileNode(o); } else { return node.compileClosure(o); } }; Base.prototype.compileClosure = function(o) { var args, argumentsNode, func, jumpNode, meth; if (jumpNode = this.jumps()) { jumpNode.error('cannot use a pure statement in an expression'); } o.sharedScope = true; func = new Code([], Block.wrap([this])); args = []; if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) { args = [new Literal('this')]; if (argumentsNode) { meth = 'apply'; args.push(new Literal('arguments')); } else { meth = 'call'; } func = new Value(func, [new Access(new Literal(meth))]); } return (new Call(func, args)).compileNode(o); }; Base.prototype.cache = function(o, level, reused) { var ref, sub; if (!this.isComplex()) { ref = level ? this.compileToFragments(o, level) : this; return [ref, ref]; } else { ref = new Literal(reused || o.scope.freeVariable('ref')); sub = new Assign(ref, this); if (level) { return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; } else { return [sub, ref]; } } }; Base.prototype.cacheToCodeFragments = function(cacheValues) { return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; }; Base.prototype.makeReturn = function(res) { var me; me = this.unwrapAll(); if (res) { return new Call(new Literal("" + res + ".push"), [me]); } else { return new Return(me); } }; Base.prototype.contains = function(pred) { var node; node = void 0; this.traverseChildren(false, function(n) { if (pred(n)) { node = n; return false; } }); return node; }; Base.prototype.lastNonComment = function(list) { var i; i = list.length; while (i--) { if (!(list[i] instanceof Comment)) { return list[i]; } } return null; }; Base.prototype.toString = function(idt, name) { var tree; if (idt == null) { idt = ''; } if (name == null) { name = this.constructor.name; } tree = '\n' + idt + name; if (this.soak) { tree += '?'; } this.eachChild(function(node) { return tree += node.toString(idt + TAB); }); return tree; }; Base.prototype.eachChild = function(func) { var attr, child, _i, _j, _len, _len1, _ref2, _ref3; if (!this.children) { return this; } _ref2 = this.children; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { attr = _ref2[_i]; if (this[attr]) { _ref3 = flatten([this[attr]]); for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { child = _ref3[_j]; if (func(child) === false) { return this; } } } } return this; }; Base.prototype.traverseChildren = function(crossScope, func) { return this.eachChild(function(child) { var recur; recur = func(child); if (recur !== false) { return child.traverseChildren(crossScope, func); } }); }; Base.prototype.invert = function() { return new Op('!', this); }; Base.prototype.unwrapAll = function() { var node; node = this; while (node !== (node = node.unwrap())) { continue; } return node; }; Base.prototype.children = []; Base.prototype.isStatement = NO; Base.prototype.jumps = NO; Base.prototype.isComplex = YES; Base.prototype.isChainable = NO; Base.prototype.isAssignable = NO; Base.prototype.unwrap = THIS; Base.prototype.unfoldSoak = NO; Base.prototype.assigns = NO; Base.prototype.updateLocationDataIfMissing = function(locationData) { if (this.locationData) { return this; } this.locationData = locationData; return this.eachChild(function(child) { return child.updateLocationDataIfMissing(locationData); }); }; Base.prototype.error = function(message) { return throwSyntaxError(message, this.locationData); }; Base.prototype.makeCode = function(code) { return new CodeFragment(this, code); }; Base.prototype.wrapInBraces = function(fragments) { return [].concat(this.makeCode('('), fragments, this.makeCode(')')); }; Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { var answer, fragments, i, _i, _len; answer = []; for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { fragments = fragmentsList[i]; if (i) { answer.push(this.makeCode(joinStr)); } answer = answer.concat(fragments); } return answer; }; return Base; })(); exports.Block = Block = (function(_super) { __extends(Block, _super); function Block(nodes) { this.expressions = compact(flatten(nodes || [])); } Block.prototype.children = ['expressions']; Block.prototype.push = function(node) { this.expressions.push(node); return this; }; Block.prototype.pop = function() { return this.expressions.pop(); }; Block.prototype.unshift = function(node) { this.expressions.unshift(node); return this; }; Block.prototype.unwrap = function() { if (this.expressions.length === 1) { return this.expressions[0]; } else { return this; } }; Block.prototype.isEmpty = function() { return !this.expressions.length; }; Block.prototype.isStatement = function(o) { var exp, _i, _len, _ref2; _ref2 = this.expressions; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { exp = _ref2[_i]; if (exp.isStatement(o)) { return true; } } return false; }; Block.prototype.jumps = function(o) { var exp, jumpNode, _i, _len, _ref2; _ref2 = this.expressions; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { exp = _ref2[_i]; if (jumpNode = exp.jumps(o)) { return jumpNode; } } }; Block.prototype.makeReturn = function(res) { var expr, len; len = this.expressions.length; while (len--) { expr = this.expressions[len]; if (!(expr instanceof Comment)) { this.expressions[len] = expr.makeReturn(res); if (expr instanceof Return && !expr.expression) { this.expressions.splice(len, 1); } break; } } return this; }; Block.prototype.compileToFragments = function(o, level) { if (o == null) { o = {}; } if (o.scope) { return Block.__super__.compileToFragments.call(this, o, level); } else { return this.compileRoot(o); } }; Block.prototype.compileNode = function(o) { var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; this.tab = o.indent; top = o.level === LEVEL_TOP; compiledNodes = []; _ref2 = this.expressions; for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) { node = _ref2[index]; node = node.unwrapAll(); node = node.unfoldSoak(o) || node; if (node instanceof Block) { compiledNodes.push(node.compileNode(o)); } else if (top) { node.front = true; fragments = node.compileToFragments(o); if (!node.isStatement(o)) { fragments.unshift(this.makeCode("" + this.tab)); fragments.push(this.makeCode(";")); } compiledNodes.push(fragments); } else { compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); } } if (top) { if (this.spaced) { return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); } else { return this.joinFragmentArrays(compiledNodes, '\n'); } } if (compiledNodes.length) { answer = this.joinFragmentArrays(compiledNodes, ', '); } else { answer = [this.makeCode("void 0")]; } if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { return this.wrapInBraces(answer); } else { return answer; } }; Block.prototype.compileRoot = function(o) { var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; o.indent = o.bare ? '' : TAB; o.level = LEVEL_TOP; this.spaced = true; o.scope = new Scope(null, this, null); _ref2 = o.locals || []; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { name = _ref2[_i]; o.scope.parameter(name); } prelude = []; if (!o.bare) { preludeExps = (function() { var _j, _len1, _ref3, _results; _ref3 = this.expressions; _results = []; for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { exp = _ref3[i]; if (!(exp.unwrap() instanceof Comment)) { break; } _results.push(exp); } return _results; }).call(this); rest = this.expressions.slice(preludeExps.length); this.expressions = preludeExps; if (preludeExps.length) { prelude = this.compileNode(merge(o, { indent: '' })); prelude.push(this.makeCode("\n")); } this.expressions = rest; } fragments = this.compileWithDeclarations(o); if (o.bare) { return fragments; } return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); }; Block.prototype.compileWithDeclarations = function(o) { var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; fragments = []; post = []; _ref2 = this.expressions; for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { exp = _ref2[i]; exp = exp.unwrap(); if (!(exp instanceof Comment || exp instanceof Literal)) { break; } } o = merge(o, { level: LEVEL_TOP }); if (i) { rest = this.expressions.splice(i, 9e9); _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1]; _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1]; this.expressions = rest; } post = this.compileNode(o); scope = o.scope; if (scope.expressions === this) { declars = o.scope.hasDeclarations(); assigns = scope.hasAssignments; if (declars || assigns) { if (i) { fragments.push(this.makeCode('\n')); } fragments.push(this.makeCode("" + this.tab + "var ")); if (declars) { fragments.push(this.makeCode(scope.declaredVariables().join(', '))); } if (assigns) { if (declars) { fragments.push(this.makeCode(",\n" + (this.tab + TAB))); } fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); } fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); } else if (fragments.length && post.length) { fragments.push(this.makeCode("\n")); } } return fragments.concat(post); }; Block.wrap = function(nodes) { if (nodes.length === 1 && nodes[0] instanceof Block) { return nodes[0]; } return new Block(nodes); }; return Block; })(Base); exports.Literal = Literal = (function(_super) { __extends(Literal, _super); function Literal(value) { this.value = value; } Literal.prototype.makeReturn = function() { if (this.isStatement()) { return this; } else { return Literal.__super__.makeReturn.apply(this, arguments); } }; Literal.prototype.isAssignable = function() { return IDENTIFIER.test(this.value); }; Literal.prototype.isStatement = function() { var _ref2; return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; }; Literal.prototype.isComplex = NO; Literal.prototype.assigns = function(name) { return name === this.value; }; Literal.prototype.jumps = function(o) { if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { return this; } if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { return this; } }; Literal.prototype.compileNode = function(o) { var answer, code, _ref2; code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; answer = this.isStatement() ? "" + this.tab + code + ";" : code; return [this.makeCode(answer)]; }; Literal.prototype.toString = function() { return ' "' + this.value + '"'; }; return Literal; })(Base); exports.Undefined = (function(_super) { __extends(Undefined, _super); function Undefined() { return Undefined.__super__.constructor.apply(this, arguments); } Undefined.prototype.isAssignable = NO; Undefined.prototype.isComplex = NO; Undefined.prototype.compileNode = function(o) { return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; }; return Undefined; })(Base); exports.Null = (function(_super) { __extends(Null, _super); function Null() { return Null.__super__.constructor.apply(this, arguments); } Null.prototype.isAssignable = NO; Null.prototype.isComplex = NO; Null.prototype.compileNode = function() { return [this.makeCode("null")]; }; return Null; })(Base); exports.Bool = (function(_super) { __extends(Bool, _super); Bool.prototype.isAssignable = NO; Bool.prototype.isComplex = NO; Bool.prototype.compileNode = function() { return [this.makeCode(this.val)]; }; function Bool(val) { this.val = val; } return Bool; })(Base); exports.Return = Return = (function(_super) { __extends(Return, _super); function Return(expr) { if (expr && !expr.unwrap().isUndefined) { this.expression = expr; } } Return.prototype.children = ['expression']; Return.prototype.isStatement = YES; Return.prototype.makeReturn = THIS; Return.prototype.jumps = THIS; Return.prototype.compileToFragments = function(o, level) { var expr, _ref2; expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0; if (expr && !(expr instanceof Return)) { return expr.compileToFragments(o, level); } else { return Return.__super__.compileToFragments.call(this, o, level); } }; Return.prototype.compileNode = function(o) { var answer; answer = []; answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); if (this.expression) { answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); } answer.push(this.makeCode(";")); return answer; }; return Return; })(Base); exports.Value = Value = (function(_super) { __extends(Value, _super); function Value(base, props, tag) { if (!props && base instanceof Value) { return base; } this.base = base; this.properties = props || []; if (tag) { this[tag] = true; } return this; } Value.prototype.children = ['base', 'properties']; Value.prototype.add = function(props) { this.properties = this.properties.concat(props); return this; }; Value.prototype.hasProperties = function() { return !!this.properties.length; }; Value.prototype.bareLiteral = function(type) { return !this.properties.length && this.base instanceof type; }; Value.prototype.isArray = function() { return this.bareLiteral(Arr); }; Value.prototype.isRange = function() { return this.bareLiteral(Range); }; Value.prototype.isComplex = function() { return this.hasProperties() || this.base.isComplex(); }; Value.prototype.isAssignable = function() { return this.hasProperties() || this.base.isAssignable(); }; Value.prototype.isSimpleNumber = function() { return this.bareLiteral(Literal) && SIMPLENUM.test(this.base.value); }; Value.prototype.isString = function() { return this.bareLiteral(Literal) && IS_STRING.test(this.base.value); }; Value.prototype.isRegex = function() { return this.bareLiteral(Literal) && IS_REGEX.test(this.base.value); }; Value.prototype.isAtomic = function() { var node, _i, _len, _ref2; _ref2 = this.properties.concat(this.base); for (_i = 0, _len = _ref2.length; _i < _len; _i++) { node = _ref2[_i]; if (node.soak || node instanceof Call) { return false; } } return true; }; Value.prototype.isNotCallable = function() { return this.isSimpleNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject(); }; Value.prototype.isStatement = function(o) { return !this.properties.length && this.base.isStatement(o); }; Value.prototype.assigns = function(name) { return !this.properties.length && this.base.assigns(name); }; Value.prototype.jumps = function(o) { return !this.properties.length && this.base.jumps(o); }; Value.prototype.isObject = function(onlyGenerated) { if (this.properties.length) { return false; } return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); }; Value.prototype.isSplice = function() { return last(this.properties) instanceof Slice; }; Value.prototype.looksStatic = function(className) { var _ref2; return this.base.value === className && this.properties.length && ((_ref2 = this.properties[0].name) != null ? _ref2.value : void 0) !== 'prototype'; }; Value.prototype.unwrap = function() { if (this.properties.length) { return this; } else { return this.base; } }; Value.prototype.cacheReference = function(o) { var base, bref, name, nref; name = last(this.properties); if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { return [this, this]; } base = new Value(this.base, this.properties.slice(0, -1)); if (base.isComplex()) { bref = new Literal(o.scope.freeVariable('base')); base = new Value(new Parens(new Assign(bref, base))); } if (!name) { return [base, bref]; } if (name.isComplex()) { nref = new Literal(o.scope.freeVariable('name')); name = new Index(new Assign(nref, name.index)); nref = new Index(nref); } return [base.add(name), new Value(bref || base.base, [nref || name])]; }; Value.prototype.compileNode = function(o) { var fragments, prop, props, _i, _len; this.base.front = this.front; props = this.properties; fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) { fragments.push(this.makeCode('.')); } for (_i = 0, _len = props.length; _i < _len; _i++) { prop = props[_i]; fragments.push.apply(fragments, prop.compileToFragments(o)); } return fragments; }; Value.prototype.unfoldSoak = function(o) { return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) { return function() { var fst, i, ifn, prop, ref, snd, _i, _len, _ref2, _ref3; if (ifn = _this.base.unfoldSoak(o)) { (_ref2 = ifn.body.properties).push.apply(_ref2, _this.properties); return ifn; } _ref3 = _this.properties; for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) { prop = _ref3[i]; if (!prop.soak) { continue; } prop.soak = false; fst = new Value(_this.base, _this.properties.slice(0, i)); snd = new Value(_this.base, _this.properties.slice(i)); if (fst.isComplex()) { ref = new Literal(o.scope.freeVariable('ref')); fst = new Parens(new Assign(ref, fst)); snd.base = ref; } return new If(new Existence(fst), snd, { soak: true }); } return false; }; })(this)(); }; return Value; })(Base); exports.Comment = Comment = (function(_super) { __extends(Comment, _super); function Comment(comment) { this.comment = comment; } Comment.prototype.isStatement = YES; Comment.prototype.makeReturn = THIS; Comment.prototype.compileNode = function(o, level) { var code, comment; comment = this.comment.replace(/^(\s*)#/gm, "$1 *"); code = "/*" + (multident(comment, this.tab)) + (__indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */"; if ((level || o.level) === LEVEL_TOP) { code = o.indent + code; } return [this.makeCode("\n"), this.makeCode(code)]; }; return Comment; })(Base); exports.Call = Call = (function(_super) { __extends(Call, _super); function Call(variable, args, soak) { this.args = args != null ? args : []; this.soak = soak; this.isNew = false; this.isSuper = variable === 'super'; this.variable = this.isSuper ? null : variable; if (variable instanceof Value && variable.isNotCallable()) { variable.error("literal is not a function"); } } Call.prototype.children = ['variable', 'args']; Call.prototype.newInstance = function() { var base, _ref2; base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable; if (base instanceof Call && !base.isNew) { base.newInstance(); } else { this.isNew = true; } return this; }; Call.prototype.superReference = function(o) { var accesses, method; method = o.scope.namedMethod(); if (method != null ? method.klass : void 0) { accesses = [new Access(new Literal('__super__'))]; if (method["static"]) { accesses.push(new Access(new Literal('constructor'))); } accesses.push(new Access(new Literal(method.name))); return (new Value(new Literal(method.klass), accesses)).compile(o); } else if (method != null ? method.ctor : void 0) { return "" + method.name + ".__super__.constructor"; } else { return this.error('cannot call super outside of an instance method.'); } }; Call.prototype.superThis = function(o) { var method; method = o.scope.method; return (method && !method.klass && method.context) || "this"; }; Call.prototype.unfoldSoak = function(o) { var call, ifn, left, list, rite, _i, _len, _ref2, _ref3; if (this.soak) { if (this.variable) { if (ifn = unfoldSoak(o, this, 'variable')) { return ifn; } _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1]; } else { left = new Literal(this.superReference(o)); rite = new Value(left); } rite = new Call(rite, this.args); rite.isNew = this.isNew; left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); return new If(left, new Value(rite), { soak: true }); } call = this; list = []; while (true) { if (call.variable instanceof Call) { list.push(call); call = call.variable; continue; } if (!(call.variable instanceof Value)) { break; } list.push(call); if (!((call = call.variable.base) instanceof Call)) { break; } } _ref3 = list.reverse(); for (_i = 0, _len = _ref3.length; _i < _len; _i++) { call = _ref3[_i]; if (ifn) { if (call.variable instanceof Call) { call.variable = ifn; } else { call.variable.base = ifn; } } ifn = unfoldSoak(o, call, 'variable'); } return ifn; }; Call.prototype.compileNode = function(o) { var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3; if ((_ref2 = this.variable) != null) { _ref2.front = this.front; } compiledArray = Splat.compileSplattedArray(o, this.args, true); if (compiledArray.length) { return this.compileSplat(o, compiledArray); } compiledArgs = []; _ref3 = this.args; for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) { arg = _ref3[argIndex]; if (argIndex) { compiledArgs.push(this.makeCode(", ")); } compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); } fragments = []; if (this.isSuper) { preface = this.superReference(o) + (".call(" + (this.superThis(o))); if (compiledArgs.length) { preface += ", "; } fragments.push(this.makeCode(preface)); } else { if (this.isNew) { fragments.push(this.makeCode('new ')); } fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); fragments.push(this.makeCode("(")); } fragments.push.apply(fragments, compiledArgs); fragments.push(this.makeCode(")")); return fragments; }; Call.prototype.compileSplat = function(o, splatArgs) { var answer, base, fun, idt, name, ref; if (this.isSuper) { return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); } if (this.isNew) { idt = this.tab + TAB; return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); } answer = []; base = new Value(this.variable); if ((name = base.properties.pop()) && base.isComplex()) { ref = o.scope.freeVariable('ref'); answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); } else { fun = base.compileToFragments(o, LEVEL_ACCESS); if (SIMPLENUM.test(fragmentsToText(fun))) { fun = this.wrapInBraces(fun); } if (name) { ref = fragmentsToText(fun); fun.push.apply(fun, name.compileToFragments(o)); } else { ref = 'null'; } answer = answer.concat(fun); } return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); }; return Call; })(Base); exports.Extends = Extends = (function(_super) { __extends(Extends, _super); function Extends(child, parent) { this.child = child; this.parent = parent; } Extends.prototype.children = ['child', 'parent']; Extends.prototype.compileToFragments = function(o) { return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o); }; return Extends; })(Base); exports.Access = Access = (function(_super) { __extends(Access, _super); function Access(name, tag) { this.name = name; this.name.asKey = true; this.soak = tag === 'soak'; } Access.prototype.children = ['name']; Access.prototype.compileToFragments = function(o) { var name; name = this.name.compileToFragments(o); if (IDENTIFIER.test(fragmentsToText(name))) { name.unshift(this.makeCode(".")); } else { name.unshift(this.makeCode("[")); name.push(this.makeCode("]")); } return name; }; Access.prototype.isComplex = NO; return Access; })(Base); exports.Index = Index = (function(_super) { __extends(Index, _super); function Index(index) { this.index = index; } Index.prototype.children = ['index']; Index.prototype.compileToFragments = function(o) { return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); }; Index.prototype.isComplex = function() { return this.index.isComplex(); }; return Index; })(Base); exports.Range = Range = (function(_super) { __extends(Range, _super); Range.prototype.children = ['from', 'to']; function Range(from, to, tag) { this.from = from; this.to = to; this.exclusive = tag === 'exclusive'; this.equals = this.exclusive ? '' : '='; } Range.prototype.compileVariables = function(o) { var step, _ref2, _ref3, _ref4, _ref5; o = merge(o, { top: true }); _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1]; _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1]; if (step = del(o, 'step')) { _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1]; } _ref5 = [this.fromVar.match(NUMBER), this.toVar.match(NUMBER)], this.fromNum = _ref5[0], this.toNum = _ref5[1]; if (this.stepVar) { return this.stepNum = this.stepVar.match(NUMBER); } }; Range.prototype.compileNode = function(o) { var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3; if (!this.fromVar) { this.compileVariables(o); } if (!o.index) { return this.compileArray(o); } known = this.fromNum && this.toNum; idx = del(o, 'index'); idxName = del(o, 'name'); namedIndex = idxName && idxName !== idx; varPart = "" + idx + " = " + this.fromC; if (this.toC !== this.toVar) { varPart += ", " + this.toC; } if (this.step !== this.stepVar) { varPart += ", " + this.step; } _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1]; condPart = this.stepNum ? parseNum(this.stepNum[0]) > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [parseNum(this.fromNum[0]), parseNum(this.toNum[0])], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; if (namedIndex) { varPart = "" + idxName + " = " + varPart; } if (namedIndex) { stepPart = "" + idxName + " = " + stepPart; } return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)]; }; Range.prototype.compileArray = function(o) { var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results; if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { range = (function() { _results = []; for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); } return _results; }).apply(this); if (this.exclusive) { range.pop(); } return [this.makeCode("[" + (range.join(', ')) + "]")]; } idt = this.tab + TAB; i = o.scope.freeVariable('i'); result = o.scope.freeVariable('results'); pre = "\n" + idt + result + " = [];"; if (this.fromNum && this.toNum) { o.index = i; body = fragmentsToText(this.compileNode(o)); } else { vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); cond = "" + this.fromVar + " <= " + this.toVar; body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; } post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; hasArgs = function(node) { return node != null ? node.contains(isLiteralArguments) : void 0; }; if (hasArgs(this.from) || hasArgs(this.to)) { args = ', arguments'; } return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; }; return Range; })(Base); exports.Slice = Slice = (function(_super) { __extends(Slice, _super); Slice.prototype.children = ['range']; function Slice(range) { this.range = range; Slice.__super__.constructor.call(this); } Slice.prototype.compileNode = function(o) { var compiled, compiledText, from, fromCompiled, to, toStr, _ref2; _ref2 = this.range, to = _ref2.to, from = _ref2.from; fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; if (to) { compiled = to.compileToFragments(o, LEVEL_PAREN); compiledText = fragmentsToText(compiled); if (!(!this.range.exclusive && +compiledText === -1)) { toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); } } return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; }; return Slice; })(Base); exports.Obj = Obj = (function(_super) { __extends(Obj, _super); function Obj(props, generated) { this.generated = generated != null ? generated : false; this.objects = this.properties = props || []; } Obj.prototype.children = ['properties']; Obj.prototype.compileNode = function(o) { var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; props = this.properties; if (!props.length) { return [this.makeCode(this.front ? '({})' : '{}')]; } if (this.generated) { for (_i = 0, _len = props.length; _i < _len; _i++) { node = props[_i]; if (node instanceof Value) { node.error('cannot have an implicit value in an implicit object'); } } } idt = o.indent += TAB; lastNoncom = this.lastNonComment(this.properties); answer = []; for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) { prop = props[i]; join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; indent = prop instanceof Comment ? '' : idt; if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { prop.variable.error('Invalid object key'); } if (prop instanceof Value && prop["this"]) { prop = new Assign(prop.properties[0].name, prop, 'object'); } if (!(prop instanceof Comment)) { if (!(prop instanceof Assign)) { prop = new Assign(prop, prop, 'object'); } (prop.variable.base || prop.variable).asKey = true; } if (indent) { answer.push(this.makeCode(indent)); } answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); if (join) { answer.push(this.makeCode(join)); } } answer.unshift(this.makeCode("{" + (props.length && '\n'))); answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}")); if (this.front) { return this.wrapInBraces(answer); } else { return answer; } }; Obj.prototype.assigns = function(name) { var prop, _i, _len, _ref2; _ref2 = this.properties; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { prop = _ref2[_i]; if (prop.assigns(name)) { return true; } } return false; }; return Obj; })(Base); exports.Arr = Arr = (function(_super) { __extends(Arr, _super); function Arr(objs) { this.objects = objs || []; } Arr.prototype.children = ['objects']; Arr.prototype.compileNode = function(o) { var answer, compiledObjs, fragments, index, obj, _i, _len; if (!this.objects.length) { return [this.makeCode('[]')]; } o.indent += TAB; answer = Splat.compileSplattedArray(o, this.objects); if (answer.length) { return answer; } answer = []; compiledObjs = (function() { var _i, _len, _ref2, _results; _ref2 = this.objects; _results = []; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { obj = _ref2[_i]; _results.push(obj.compileToFragments(o, LEVEL_LIST)); } return _results; }).call(this); for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) { fragments = compiledObjs[index]; if (index) { answer.push(this.makeCode(", ")); } answer.push.apply(answer, fragments); } if (fragmentsToText(answer).indexOf('\n') >= 0) { answer.unshift(this.makeCode("[\n" + o.indent)); answer.push(this.makeCode("\n" + this.tab + "]")); } else { answer.unshift(this.makeCode("[")); answer.push(this.makeCode("]")); } return answer; }; Arr.prototype.assigns = function(name) { var obj, _i, _len, _ref2; _ref2 = this.objects; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { obj = _ref2[_i]; if (obj.assigns(name)) { return true; } } return false; }; return Arr; })(Base); exports.Class = Class = (function(_super) { __extends(Class, _super); function Class(variable, parent, body) { this.variable = variable; this.parent = parent; this.body = body != null ? body : new Block; this.boundFuncs = []; this.body.classBody = true; } Class.prototype.children = ['variable', 'parent', 'body']; Class.prototype.determineName = function() { var decl, tail; if (!this.variable) { return null; } decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { this.variable.error("class variable name may not be " + decl); } return decl && (decl = IDENTIFIER.test(decl) && decl); }; Class.prototype.setContext = function(name) { return this.body.traverseChildren(false, function(node) { if (node.classBody) { return false; } if (node instanceof Literal && node.value === 'this') { return node.value = name; } else if (node instanceof Code) { node.klass = name; if (node.bound) { return node.context = name; } } }); }; Class.prototype.addBoundFunctions = function(o) { var bvar, lhs, _i, _len, _ref2; _ref2 = this.boundFuncs; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { bvar = _ref2[_i]; lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); } }; Class.prototype.addProperties = function(node, name, o) { var assign, base, exprs, func, props; props = node.base.properties.slice(0); exprs = (function() { var _results; _results = []; while (assign = props.shift()) { if (assign instanceof Assign) { base = assign.variable.base; delete assign.context; func = assign.value; if (base.value === 'constructor') { if (this.ctor) { assign.error('cannot define more than one constructor in a class'); } if (func.bound) { assign.error('cannot define a constructor as a bound function'); } if (func instanceof Code) { assign = this.ctor = func; } else { this.externalCtor = o.classScope.freeVariable('class'); assign = new Assign(new Literal(this.externalCtor), func); } } else { if (assign.variable["this"]) { func["static"] = true; } else { assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); if (func instanceof Code && func.bound) { this.boundFuncs.push(base); func.bound = false; } } } } _results.push(assign); } return _results; }).call(this); return compact(exprs); }; Class.prototype.walkBody = function(name, o) { return this.traverseChildren(false, (function(_this) { return function(child) { var cont, exps, i, node, _i, _len, _ref2; cont = true; if (child instanceof Class) { return false; } if (child instanceof Block) { _ref2 = exps = child.expressions; for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { node = _ref2[i]; if (node instanceof Assign && node.variable.looksStatic(name)) { node.value["static"] = true; } else if (node instanceof Value && node.isObject(true)) { cont = false; exps[i] = _this.addProperties(node, name, o); } } child.expressions = exps = flatten(exps); } return cont && !(child instanceof Class); }; })(this)); }; Class.prototype.hoistDirectivePrologue = function() { var expressions, index, node; index = 0; expressions = this.body.expressions; while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { ++index; } return this.directives = expressions.splice(0, index); }; Class.prototype.ensureConstructor = function(name) { if (!this.ctor) { this.ctor = new Code; if (this.externalCtor) { this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)")); } else if (this.parent) { this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)")); } this.ctor.body.makeReturn(); this.body.expressions.unshift(this.ctor); } this.ctor.ctor = this.ctor.name = name; this.ctor.klass = null; return this.ctor.noReturn = true; }; Class.prototype.compileNode = function(o) { var args, argumentsNode, func, jumpNode, klass, lname, name, superClass, _ref2; if (jumpNode = this.body.jumps()) { jumpNode.error('Class bodies cannot contain pure statements'); } if (argumentsNode = this.body.contains(isLiteralArguments)) { argumentsNode.error("Class bodies shouldn't reference arguments"); } name = this.determineName() || '_Class'; if (name.reserved) { name = "_" + name; } lname = new Literal(name); func = new Code([], Block.wrap([this.body])); args = []; o.classScope = func.makeScope(o.scope); this.hoistDirectivePrologue(); this.setContext(name); this.walkBody(name, o); this.ensureConstructor(name); this.addBoundFunctions(o); this.body.spaced = true; this.body.expressions.push(lname); if (this.parent) { superClass = new Literal(o.classScope.freeVariable('super', false)); this.body.expressions.unshift(new Extends(lname, superClass)); func.params.push(new Param(superClass)); args.push(this.parent); } (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives); klass = new Parens(new Call(func, args)); if (this.variable) { klass = new Assign(this.variable, klass); } return klass.compileToFragments(o); }; return Class; })(Base); exports.Assign = Assign = (function(_super) { __extends(Assign, _super); function Assign(variable, value, context, options) { var forbidden, name, _ref2; this.variable = variable; this.value = value; this.context = context; this.param = options && options.param; this.subpattern = options && options.subpattern; forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0); if (forbidden && this.context !== 'object') { this.variable.error("variable name may not be \"" + name + "\""); } } Assign.prototype.children = ['variable', 'value']; Assign.prototype.isStatement = function(o) { return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; }; Assign.prototype.assigns = function(name) { return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); }; Assign.prototype.unfoldSoak = function(o) { return unfoldSoak(o, this, 'variable'); }; Assign.prototype.compileNode = function(o) { var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4; if (isValue = this.variable instanceof Value) { if (this.variable.isArray() || this.variable.isObject()) { return this.compilePatternMatch(o); } if (this.variable.isSplice()) { return this.compileSplice(o); } if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') { return this.compileConditional(o); } } compiledName = this.variable.compileToFragments(o, LEVEL_LIST); name = fragmentsToText(compiledName); if (!this.context) { varBase = this.variable.unwrapAll(); if (!varBase.isAssignable()) { this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); } if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { if (this.param) { o.scope.add(name, 'var'); } else { o.scope.find(name); } } } if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { if (match[2]) { this.value.klass = match[1]; } this.value.name = (_ref3 = (_ref4 = match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5]; } val = this.value.compileToFragments(o, LEVEL_LIST); if (this.context === 'object') { return compiledName.concat(this.makeCode(": "), val); } answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); if (o.level <= LEVEL_LIST) { return answer; } else { return this.wrapInBraces(answer); } }; Assign.prototype.compilePatternMatch = function(o) { var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; top = o.level === LEVEL_TOP; value = this.value; objects = this.variable.base.objects; if (!(olen = objects.length)) { code = value.compileToFragments(o); if (o.level >= LEVEL_OP) { return this.wrapInBraces(code); } else { return code; } } isObject = this.variable.isObject(); if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { if (obj instanceof Assign) { _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value; } else { idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); } acc = IDENTIFIER.test(idx.unwrap().value || 0); value = new Value(value); value.properties.push(new (acc ? Access : Index)(idx)); if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) { obj.error("assignment to a reserved word: " + (obj.compile(o))); } return new Assign(obj, value, null, { param: this.param }).compileToFragments(o, LEVEL_TOP); } vvar = value.compileToFragments(o, LEVEL_LIST); vvarText = fragmentsToText(vvar); assigns = []; splat = false; if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) { assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar))); vvar = [this.makeCode(ref)]; vvarText = ref; } for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) { obj = objects[i]; idx = i; if (isObject) { if (obj instanceof Assign) { _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value; } else { if (obj.base instanceof Parens) { _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1]; } else { idx = obj["this"] ? obj.properties[0].name : obj; } } } if (!splat && obj instanceof Splat) { name = obj.name.unwrap().value; obj = obj.unwrap(); val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i; if (rest = olen - i - 1) { ivar = o.scope.freeVariable('i'); val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; } else { val += ") : []"; } val = new Literal(val); splat = "" + ivar + "++"; } else { name = obj.unwrap().value; if (obj instanceof Splat) { obj.error("multiple splats are disallowed in an assignment"); } if (typeof idx === 'number') { idx = new Literal(splat || idx); acc = false; } else { acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); } val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); } if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { obj.error("assignment to a reserved word: " + (obj.compile(o))); } assigns.push(new Assign(obj, val, null, { param: this.param, subpattern: true }).compileToFragments(o, LEVEL_LIST)); } if (!(top || this.subpattern)) { assigns.push(vvar); } fragments = this.joinFragmentArrays(assigns, ', '); if (o.level < LEVEL_LIST) { return fragments; } else { return this.wrapInBraces(fragments); } }; Assign.prototype.compileConditional = function(o) { var fragments, left, right, _ref2; _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1]; if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); } if (__indexOf.call(this.context, "?") >= 0) { o.isExistentialEquals = true; return new If(new Existence(left), right, { type: 'if' }).addElse(new Assign(right, this.value, '=')).compileToFragments(o); } else { fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); if (o.level <= LEVEL_LIST) { return fragments; } else { return this.wrapInBraces(fragments); } } }; Assign.prototype.compileSplice = function(o) { var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4; _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive; name = this.variable.compile(o); if (from) { _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1]; } else { fromDecl = fromRef = '0'; } if (to) { if (from instanceof Value && from.isSimpleNumber() && to instanceof Value && to.isSimpleNumber()) { to = to.compile(o) - fromRef; if (!exclusive) { to += 1; } } else { to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; if (!exclusive) { to += ' + 1'; } } } else { to = "9e9"; } _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1]; answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); if (o.level > LEVEL_TOP) { return this.wrapInBraces(answer); } else { return answer; } }; return Assign; })(Base); exports.Code = Code = (function(_super) { __extends(Code, _super); function Code(params, body, tag) { this.params = params || []; this.body = body || new Block; this.bound = tag === 'boundfunc'; } Code.prototype.children = ['params', 'body']; Code.prototype.isStatement = function() { return !!this.ctor; }; Code.prototype.jumps = NO; Code.prototype.makeScope = function(parentScope) { return new Scope(parentScope, this.body, this); }; Code.prototype.compileNode = function(o) { var answer, boundfunc, code, exprs, i, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, wrapper, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; if (this.bound && ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0)) { this.context = o.scope.method.context; } if (this.bound && !this.context) { this.context = '_this'; wrapper = new Code([new Param(new Literal(this.context))], new Block([this])); boundfunc = new Call(wrapper, [new Literal('this')]); boundfunc.updateLocationDataIfMissing(this.locationData); return boundfunc.compileNode(o); } o.scope = del(o, 'classScope') || this.makeScope(o.scope); o.scope.shared = del(o, 'sharedScope'); o.indent += TAB; delete o.bare; delete o.isExistentialEquals; params = []; exprs = []; _ref3 = this.params; for (_i = 0, _len = _ref3.length; _i < _len; _i++) { param = _ref3[_i]; o.scope.parameter(param.asReference(o)); } _ref4 = this.params; for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { param = _ref4[_j]; if (!param.splat) { continue; } _ref5 = this.params; for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) { p = _ref5[_k].name; if (p["this"]) { p = p.properties[0].name; } if (p.value) { o.scope.add(p.value, 'var', true); } } splats = new Assign(new Value(new Arr((function() { var _l, _len3, _ref6, _results; _ref6 = this.params; _results = []; for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) { p = _ref6[_l]; _results.push(p.asReference(o)); } return _results; }).call(this))), new Value(new Literal('arguments'))); break; } _ref6 = this.params; for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) { param = _ref6[_l]; if (param.isComplex()) { val = ref = param.asReference(o); if (param.value) { val = new Op('?', ref, param.value); } exprs.push(new Assign(new Value(param.name), val, '=', { param: true })); } else { ref = param; if (param.value) { lit = new Literal(ref.name.value + ' == null'); val = new Assign(new Value(param.name), param.value, '='); exprs.push(new If(lit, val)); } } if (!splats) { params.push(ref); } } wasEmpty = this.body.isEmpty(); if (splats) { exprs.unshift(splats); } if (exprs.length) { (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); } for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { p = params[i]; params[i] = p.compileToFragments(o); o.scope.parameter(fragmentsToText(params[i])); } uniqs = []; this.eachParamName(function(name, node) { if (__indexOf.call(uniqs, name) >= 0) { node.error("multiple parameters named '" + name + "'"); } return uniqs.push(name); }); if (!(wasEmpty || this.noReturn)) { this.body.makeReturn(); } code = 'function'; if (this.ctor) { code += ' ' + this.name; } code += '('; answer = [this.makeCode(code)]; for (i = _n = 0, _len5 = params.length; _n < _len5; i = ++_n) { p = params[i]; if (i) { answer.push(this.makeCode(", ")); } answer.push.apply(answer, p); } answer.push(this.makeCode(') {')); if (!this.body.isEmpty()) { answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); } answer.push(this.makeCode('}')); if (this.ctor) { return [this.makeCode(this.tab)].concat(__slice.call(answer)); } if (this.front || (o.level >= LEVEL_ACCESS)) { return this.wrapInBraces(answer); } else { return answer; } }; Code.prototype.eachParamName = function(iterator) { var param, _i, _len, _ref2, _results; _ref2 = this.params; _results = []; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { param = _ref2[_i]; _results.push(param.eachName(iterator)); } return _results; }; Code.prototype.traverseChildren = function(crossScope, func) { if (crossScope) { return Code.__super__.traverseChildren.call(this, crossScope, func); } }; return Code; })(Base); exports.Param = Param = (function(_super) { __extends(Param, _super); function Param(name, value, splat) { var _ref2; this.name = name; this.value = value; this.splat = splat; if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) { this.name.error("parameter name \"" + name + "\" is not allowed"); } } Param.prototype.children = ['name', 'value']; Param.prototype.compileToFragments = function(o) { return this.name.compileToFragments(o, LEVEL_LIST); }; Param.prototype.asReference = function(o) { var node; if (this.reference) { return this.reference; } node = this.name; if (node["this"]) { node = node.properties[0].name; if (node.value.reserved) { node = new Literal(o.scope.freeVariable(node.value)); } } else if (node.isComplex()) { node = new Literal(o.scope.freeVariable('arg')); } node = new Value(node); if (this.splat) { node = new Splat(node); } node.updateLocationDataIfMissing(this.locationData); return this.reference = node; }; Param.prototype.isComplex = function() { return this.name.isComplex(); }; Param.prototype.eachName = function(iterator, name) { var atParam, node, obj, _i, _len, _ref2; if (name == null) { name = this.name; } atParam = function(obj) { var node; node = obj.properties[0].name; if (!node.value.reserved) { return iterator(node.value, node); } }; if (name instanceof Literal) { return iterator(name.value, name); } if (name instanceof Value) { return atParam(name); } _ref2 = name.objects; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { obj = _ref2[_i]; if (obj instanceof Assign) { this.eachName(iterator, obj.value.unwrap()); } else if (obj instanceof Splat) { node = obj.name.unwrap(); iterator(node.value, node); } else if (obj instanceof Value) { if (obj.isArray() || obj.isObject()) { this.eachName(iterator, obj.base); } else if (obj["this"]) { atParam(obj); } else { iterator(obj.base.value, obj.base); } } else { obj.error("illegal parameter " + (obj.compile())); } } }; return Param; })(Base); exports.Splat = Splat = (function(_super) { __extends(Splat, _super); Splat.prototype.children = ['name']; Splat.prototype.isAssignable = YES; function Splat(name) { this.name = name.compile ? name : new Literal(name); } Splat.prototype.assigns = function(name) { return this.name.assigns(name); }; Splat.prototype.compileToFragments = function(o) { return this.name.compileToFragments(o); }; Splat.prototype.unwrap = function() { return this.name; }; Splat.compileSplattedArray = function(o, list, apply) { var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; index = -1; while ((node = list[++index]) && !(node instanceof Splat)) { continue; } if (index >= list.length) { return []; } if (list.length === 1) { node = list[0]; fragments = node.compileToFragments(o, LEVEL_LIST); if (apply) { return fragments; } return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")")); } args = list.slice(index); for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { node = args[i]; compiledNode = node.compileToFragments(o, LEVEL_LIST); args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); } if (index === 0) { node = list[0]; concatPart = node.joinFragmentArrays(args.slice(1), ', '); return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); } base = (function() { var _j, _len1, _ref2, _results; _ref2 = list.slice(0, index); _results = []; for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { node = _ref2[_j]; _results.push(node.compileToFragments(o, LEVEL_LIST)); } return _results; })(); base = list[0].joinFragmentArrays(base, ', '); concatPart = list[index].joinFragmentArrays(args, ', '); return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")")); }; return Splat; })(Base); exports.While = While = (function(_super) { __extends(While, _super); function While(condition, options) { this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; this.guard = options != null ? options.guard : void 0; } While.prototype.children = ['condition', 'guard', 'body']; While.prototype.isStatement = YES; While.prototype.makeReturn = function(res) { if (res) { return While.__super__.makeReturn.apply(this, arguments); } else { this.returns = !this.jumps({ loop: true }); return this; } }; While.prototype.addBody = function(body) { this.body = body; return this; }; While.prototype.jumps = function() { var expressions, jumpNode, node, _i, _len; expressions = this.body.expressions; if (!expressions.length) { return false; } for (_i = 0, _len = expressions.length; _i < _len; _i++) { node = expressions[_i]; if (jumpNode = node.jumps({ loop: true })) { return jumpNode; } } return false; }; While.prototype.compileNode = function(o) { var answer, body, rvar, set; o.indent += TAB; set = ''; body = this.body; if (body.isEmpty()) { body = this.makeCode(''); } else { if (this.returns) { body.makeReturn(rvar = o.scope.freeVariable('results')); set = "" + this.tab + rvar + " = [];\n"; } if (this.guard) { if (body.expressions.length > 1) { body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); } else { if (this.guard) { body = Block.wrap([new If(this.guard, body)]); } } } body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); } answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); if (this.returns) { answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); } return answer; }; return While; })(Base); exports.Op = Op = (function(_super) { var CONVERSIONS, INVERSIONS; __extends(Op, _super); function Op(op, first, second, flip) { if (op === 'in') { return new In(first, second); } if (op === 'do') { return this.generateDo(first); } if (op === 'new') { if (first instanceof Call && !first["do"] && !first.isNew) { return first.newInstance(); } if (first instanceof Code && first.bound || first["do"]) { first = new Parens(first); } } this.operator = CONVERSIONS[op] || op; this.first = first; this.second = second; this.flip = !!flip; return this; } CONVERSIONS = { '==': '===', '!=': '!==', 'of': 'in' }; INVERSIONS = { '!==': '===', '===': '!==' }; Op.prototype.children = ['first', 'second']; Op.prototype.isSimpleNumber = NO; Op.prototype.isUnary = function() { return !this.second; }; Op.prototype.isComplex = function() { var _ref2; return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex(); }; Op.prototype.isChainable = function() { var _ref2; return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!=='; }; Op.prototype.invert = function() { var allInvertable, curr, fst, op, _ref2; if (this.isChainable() && this.first.isChainable()) { allInvertable = true; curr = this; while (curr && curr.operator) { allInvertable && (allInvertable = curr.operator in INVERSIONS); curr = curr.first; } if (!allInvertable) { return new Parens(this).invert(); } curr = this; while (curr && curr.operator) { curr.invert = !curr.invert; curr.operator = INVERSIONS[curr.operator]; curr = curr.first; } return this; } else if (op = INVERSIONS[this.operator]) { this.operator = op; if (this.first.unwrap() instanceof Op) { this.first.invert(); } return this; } else if (this.second) { return new Parens(this).invert(); } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) { return fst; } else { return new Op('!', this); } }; Op.prototype.unfoldSoak = function(o) { var _ref2; return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first'); }; Op.prototype.generateDo = function(exp) { var call, func, param, passedParams, ref, _i, _len, _ref2; passedParams = []; func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; _ref2 = func.params || []; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { param = _ref2[_i]; if (param.value) { passedParams.push(param.value); delete param.value; } else { passedParams.push(param); } } call = new Call(exp, passedParams); call["do"] = true; return call; }; Op.prototype.compileNode = function(o) { var answer, isChain, _ref2, _ref3; isChain = this.isChainable() && this.first.isChainable(); if (!isChain) { this.first.front = this.front; } if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { this.error('delete operand may not be argument or var'); } if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) { this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); } if (this.isUnary()) { return this.compileUnary(o); } if (isChain) { return this.compileChain(o); } if (this.operator === '?') { return this.compileExistence(o); } answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP)); if (o.level <= LEVEL_OP) { return answer; } else { return this.wrapInBraces(answer); } }; Op.prototype.compileChain = function(o) { var fragments, fst, shared, _ref2; _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1]; fst = this.first.compileToFragments(o, LEVEL_OP); fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); return this.wrapInBraces(fragments); }; Op.prototype.compileExistence = function(o) { var fst, ref; if (this.first.isComplex()) { ref = new Literal(o.scope.freeVariable('ref')); fst = new Parens(new Assign(ref, this.first)); } else { fst = this.first; ref = fst; } return new If(new Existence(fst), ref, { type: 'if' }).addElse(this.second).compileToFragments(o); }; Op.prototype.compileUnary = function(o) { var op, parts, plusMinus; parts = []; op = this.operator; parts.push([this.makeCode(op)]); if (op === '!' && this.first instanceof Existence) { this.first.negated = !this.first.negated; return this.first.compileToFragments(o); } if (o.level >= LEVEL_ACCESS) { return (new Parens(this)).compileToFragments(o); } plusMinus = op === '+' || op === '-'; if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { parts.push([this.makeCode(' ')]); } if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { this.first = new Parens(this.first); } parts.push(this.first.compileToFragments(o, LEVEL_OP)); if (this.flip) { parts.reverse(); } return this.joinFragmentArrays(parts, ''); }; Op.prototype.toString = function(idt) { return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); }; return Op; })(Base); exports.In = In = (function(_super) { __extends(In, _super); function In(object, array) { this.object = object; this.array = array; } In.prototype.children = ['object', 'array']; In.prototype.invert = NEGATE; In.prototype.compileNode = function(o) { var hasSplat, obj, _i, _len, _ref2; if (this.array instanceof Value && this.array.isArray()) { _ref2 = this.array.base.objects; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { obj = _ref2[_i]; if (!(obj instanceof Splat)) { continue; } hasSplat = true; break; } if (!hasSplat) { return this.compileOrTest(o); } } return this.compileLoopTest(o); }; In.prototype.compileOrTest = function(o) { var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4; if (this.array.base.objects.length === 0) { return [this.makeCode("" + (!!this.negated))]; } _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1]; _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1]; tests = []; _ref4 = this.array.base.objects; for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { item = _ref4[i]; if (i) { tests.push(this.makeCode(cnj)); } tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); } if (o.level < LEVEL_OP) { return tests; } else { return this.wrapInBraces(tests); } }; In.prototype.compileLoopTest = function(o) { var fragments, ref, sub, _ref2; _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1]; fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); if (fragmentsToText(sub) === fragmentsToText(ref)) { return fragments; } fragments = sub.concat(this.makeCode(', '), fragments); if (o.level < LEVEL_LIST) { return fragments; } else { return this.wrapInBraces(fragments); } }; In.prototype.toString = function(idt) { return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); }; return In; })(Base); exports.Try = Try = (function(_super) { __extends(Try, _super); function Try(attempt, errorVariable, recovery, ensure) { this.attempt = attempt; this.errorVariable = errorVariable; this.recovery = recovery; this.ensure = ensure; } Try.prototype.children = ['attempt', 'recovery', 'ensure']; Try.prototype.isStatement = YES; Try.prototype.jumps = function(o) { var _ref2; return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0); }; Try.prototype.makeReturn = function(res) { if (this.attempt) { this.attempt = this.attempt.makeReturn(res); } if (this.recovery) { this.recovery = this.recovery.makeReturn(res); } return this; }; Try.prototype.compileNode = function(o) { var catchPart, ensurePart, placeholder, tryPart; o.indent += TAB; tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); }; return Try; })(Base); exports.Throw = Throw = (function(_super) { __extends(Throw, _super); function Throw(expression) { this.expression = expression; } Throw.prototype.children = ['expression']; Throw.prototype.isStatement = YES; Throw.prototype.jumps = NO; Throw.prototype.makeReturn = THIS; Throw.prototype.compileNode = function(o) { return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); }; return Throw; })(Base); exports.Existence = Existence = (function(_super) { __extends(Existence, _super); function Existence(expression) { this.expression = expression; } Existence.prototype.children = ['expression']; Existence.prototype.invert = NEGATE; Existence.prototype.compileNode = function(o) { var cmp, cnj, code, _ref2; this.expression.front = this.front; code = this.expression.compile(o, LEVEL_OP); if (IDENTIFIER.test(code) && !o.scope.check(code)) { _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1]; code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; } else { code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; } return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; }; return Existence; })(Base); exports.Parens = Parens = (function(_super) { __extends(Parens, _super); function Parens(body) { this.body = body; } Parens.prototype.children = ['body']; Parens.prototype.unwrap = function() { return this.body; }; Parens.prototype.isComplex = function() { return this.body.isComplex(); }; Parens.prototype.compileNode = function(o) { var bare, expr, fragments; expr = this.body.unwrap(); if (expr instanceof Value && expr.isAtomic()) { expr.front = this.front; return expr.compileToFragments(o); } fragments = expr.compileToFragments(o, LEVEL_PAREN); bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); if (bare) { return fragments; } else { return this.wrapInBraces(fragments); } }; return Parens; })(Base); exports.For = For = (function(_super) { __extends(For, _super); function For(body, source) { var _ref2; this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; this.body = Block.wrap([body]); this.own = !!source.own; this.object = !!source.object; if (this.object) { _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1]; } if (this.index instanceof Value) { this.index.error('index cannot be a pattern matching expression'); } this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; this.pattern = this.name instanceof Value; if (this.range && this.index) { this.index.error('indexes do not apply to range loops'); } if (this.range && this.pattern) { this.name.error('cannot pattern match over range loops'); } if (this.own && !this.object) { this.name.error('cannot use own with for-in'); } this.returns = false; } For.prototype.children = ['body', 'source', 'guard', 'step']; For.prototype.compileNode = function(o) { var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3; body = Block.wrap([this.body]); lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0; if (lastJumps && lastJumps instanceof Return) { this.returns = false; } source = this.range ? this.source.base : this.source; scope = o.scope; name = this.name && (this.name.compile(o, LEVEL_LIST)); index = this.index && (this.index.compile(o, LEVEL_LIST)); if (name && !this.pattern) { scope.find(name); } if (index) { scope.find(index); } if (this.returns) { rvar = scope.freeVariable('results'); } ivar = (this.object && index) || scope.freeVariable('i'); kvar = (this.range && name) || index || ivar; kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; if (this.step && !this.range) { _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1]; stepNum = stepVar.match(NUMBER); } if (this.pattern) { name = ivar; } varPart = ''; guardPart = ''; defPart = ''; idt1 = this.tab + TAB; if (this.range) { forPartFragments = source.compileToFragments(merge(o, { index: ivar, name: name, step: this.step })); } else { svar = this.source.compile(o, LEVEL_LIST); if ((name || this.own) && !IDENTIFIER.test(svar)) { defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; svar = ref; } if (name && !this.pattern) { namePart = "" + name + " = " + svar + "[" + kvar + "]"; } if (!this.object) { if (step !== stepVar) { defPart += "" + this.tab + step + ";\n"; } if (!(this.step && stepNum && (down = parseNum(stepNum[0]) < 0))) { lvar = scope.freeVariable('len'); } declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; compare = "" + ivar + " < " + lvar; compareDown = "" + ivar + " >= 0"; if (this.step) { if (stepNum) { if (down) { compare = compareDown; declare = declareDown; } } else { compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown; declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; } increment = "" + ivar + " += " + stepVar; } else { increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++"); } forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)]; } } if (this.returns) { resultPart = "" + this.tab + rvar + " = [];\n"; returnResult = "\n" + this.tab + "return " + rvar + ";"; body.makeReturn(rvar); } if (this.guard) { if (body.expressions.length > 1) { body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); } else { if (this.guard) { body = Block.wrap([new If(this.guard, body)]); } } } if (this.pattern) { body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]"))); } defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); if (namePart) { varPart = "\n" + idt1 + namePart + ";"; } if (this.object) { forPartFragments = [this.makeCode("" + kvar + " in " + svar)]; if (this.own) { guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;"; } } bodyFragments = body.compileToFragments(merge(o, { indent: idt1 }), LEVEL_TOP); if (bodyFragments && (bodyFragments.length > 0)) { bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); } return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || ''))); }; For.prototype.pluckDirectCall = function(o, body) { var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8; defs = []; _ref2 = body.expressions; for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) { expr = _ref2[idx]; expr = expr.unwrapAll(); if (!(expr instanceof Call)) { continue; } val = (_ref3 = expr.variable) != null ? _ref3.unwrapAll() : void 0; if (!((val instanceof Code) || (val instanceof Value && ((_ref4 = val.base) != null ? _ref4.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref5 = (_ref6 = val.properties[0].name) != null ? _ref6.value : void 0) === 'call' || _ref5 === 'apply')))) { continue; } fn = ((_ref7 = val.base) != null ? _ref7.unwrapAll() : void 0) || val; ref = new Literal(o.scope.freeVariable('fn')); base = new Value(ref); if (val.base) { _ref8 = [base, val], val.base = _ref8[0], base = _ref8[1]; } body.expressions[idx] = new Call(base, expr.args); defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); } return defs; }; return For; })(While); exports.Switch = Switch = (function(_super) { __extends(Switch, _super); function Switch(subject, cases, otherwise) { this.subject = subject; this.cases = cases; this.otherwise = otherwise; } Switch.prototype.children = ['subject', 'cases', 'otherwise']; Switch.prototype.isStatement = YES; Switch.prototype.jumps = function(o) { var block, conds, jumpNode, _i, _len, _ref2, _ref3, _ref4; if (o == null) { o = { block: true }; } _ref2 = this.cases; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1]; if (jumpNode = block.jumps(o)) { return jumpNode; } } return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0; }; Switch.prototype.makeReturn = function(res) { var pair, _i, _len, _ref2, _ref3; _ref2 = this.cases; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { pair = _ref2[_i]; pair[1].makeReturn(res); } if (res) { this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); } if ((_ref3 = this.otherwise) != null) { _ref3.makeReturn(res); } return this; }; Switch.prototype.compileNode = function(o) { var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4; idt1 = o.indent + TAB; idt2 = o.indent = idt1 + TAB; fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); _ref2 = this.cases; for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1]; _ref4 = flatten([conditions]); for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { cond = _ref4[_j]; if (!this.subject) { cond = cond.invert(); } fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); } if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { fragments = fragments.concat(body, this.makeCode('\n')); } if (i === this.cases.length - 1 && !this.otherwise) { break; } expr = this.lastNonComment(block.expressions); if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { continue; } fragments.push(cond.makeCode(idt2 + 'break;\n')); } if (this.otherwise && this.otherwise.expressions.length) { fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); } fragments.push(this.makeCode(this.tab + '}')); return fragments; }; return Switch; })(Base); exports.If = If = (function(_super) { __extends(If, _super); function If(condition, body, options) { this.body = body; if (options == null) { options = {}; } this.condition = options.type === 'unless' ? condition.invert() : condition; this.elseBody = null; this.isChain = false; this.soak = options.soak; } If.prototype.children = ['condition', 'body', 'elseBody']; If.prototype.bodyNode = function() { var _ref2; return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0; }; If.prototype.elseBodyNode = function() { var _ref2; return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0; }; If.prototype.addElse = function(elseBody) { if (this.isChain) { this.elseBodyNode().addElse(elseBody); } else { this.isChain = elseBody instanceof If; this.elseBody = this.ensureBlock(elseBody); this.elseBody.updateLocationDataIfMissing(elseBody.locationData); } return this; }; If.prototype.isStatement = function(o) { var _ref2; return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0); }; If.prototype.jumps = function(o) { var _ref2; return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0); }; If.prototype.compileNode = function(o) { if (this.isStatement(o)) { return this.compileStatement(o); } else { return this.compileExpression(o); } }; If.prototype.makeReturn = function(res) { if (res) { this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); } this.body && (this.body = new Block([this.body.makeReturn(res)])); this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); return this; }; If.prototype.ensureBlock = function(node) { if (node instanceof Block) { return node; } else { return new Block([node]); } }; If.prototype.compileStatement = function(o) { var answer, body, child, cond, exeq, ifPart, indent; child = del(o, 'chainChild'); exeq = del(o, 'isExistentialEquals'); if (exeq) { return new If(this.condition.invert(), this.elseBodyNode(), { type: 'if' }).compileToFragments(o); } indent = o.indent + TAB; cond = this.condition.compileToFragments(o, LEVEL_PAREN); body = this.ensureBlock(this.body).compileToFragments(merge(o, { indent: indent })); ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); if (!child) { ifPart.unshift(this.makeCode(this.tab)); } if (!this.elseBody) { return ifPart; } answer = ifPart.concat(this.makeCode(' else ')); if (this.isChain) { o.chainChild = true; answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); } else { answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { indent: indent }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); } return answer; }; If.prototype.compileExpression = function(o) { var alt, body, cond, fragments; cond = this.condition.compileToFragments(o, LEVEL_COND); body = this.bodyNode().compileToFragments(o, LEVEL_LIST); alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); if (o.level >= LEVEL_COND) { return this.wrapInBraces(fragments); } else { return fragments; } }; If.prototype.unfoldSoak = function() { return this.soak && this; }; return If; })(Base); UTILITIES = { "extends": function() { return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"; }, bind: function() { return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }'; }, indexOf: function() { return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; }, hasProp: function() { return '{}.hasOwnProperty'; }, slice: function() { return '[].slice'; } }; LEVEL_TOP = 1; LEVEL_PAREN = 2; LEVEL_LIST = 3; LEVEL_COND = 4; LEVEL_OP = 5; LEVEL_ACCESS = 6; TAB = ' '; IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); SIMPLENUM = /^[+-]?\d+$/; HEXNUM = /^[+-]?0x[\da-f]+/i; NUMBER = /^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i; METHOD_DEF = RegExp("^(" + IDENTIFIER_STR + ")(\\.prototype)?(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$"); IS_STRING = /^['"]/; IS_REGEX = /^\//; utility = function(name) { var ref; ref = "__" + name; Scope.root.assign(ref, UTILITIES[name]()); return ref; }; multident = function(code, tab) { code = code.replace(/\n/g, '$&' + tab); return code.replace(/\s+$/, ''); }; parseNum = function(x) { if (x == null) { return 0; } else if (x.match(HEXNUM)) { return parseInt(x, 16); } else { return parseFloat(x); } }; isLiteralArguments = function(node) { return node instanceof Literal && node.value === 'arguments' && !node.asKey; }; isLiteralThis = function(node) { return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); }; unfoldSoak = function(o, parent, name) { var ifn; if (!(ifn = parent[name].unfoldSoak(o))) { return; } parent[name] = ifn.body; ifn.body = new Value(parent); return ifn; }; }); define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"], function(require, exports, module) { var Lexer = require("./lexer").Lexer; var parser = require("./parser"); var lexer = new Lexer(); parser.lexer = { lex: function() { var tag, token; token = this.tokens[this.pos++]; if (token) { tag = token[0], this.yytext = token[1], this.yylloc = token[2]; this.yylineno = this.yylloc.first_line; } else { tag = ''; } return tag; }, setInput: function(tokens) { this.tokens = tokens; return this.pos = 0; }, upcomingInput: function() { return ""; } }; parser.yy = require('./nodes'); exports.parse = function(code) { return parser.parse(lexer.tokenize(code)); }; }); define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var Mirror = require("../worker/mirror").Mirror; var coffee = require("../mode/coffee/coffee-script"); window.addEventListener = function() {}; var Worker = exports.Worker = function(sender) { Mirror.call(this, sender); this.setTimeout(250); }; oop.inherits(Worker, Mirror); (function() { this.onUpdate = function() { var value = this.doc.getValue(); var errors = []; try { coffee.parse(value).compile(); } catch(e) { var loc = e.location; if (loc) { errors.push({ row: loc.first_line, column: loc.first_column, endRow: loc.last_line, endColumn: loc.last_column, text: e.message, type: "error" }); } } this.sender.emit("annotate", errors); }; }).call(Worker.prototype); }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-makefile.js0000644000076400007640000002642012554155240023733 0ustar pravipravidefine("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var reservedKeywords = exports.reservedKeywords = ( '!|{|}|case|do|done|elif|else|'+ 'esac|fi|for|if|in|then|until|while|'+ '&|;|export|local|read|typeset|unset|'+ 'elif|select|set' ); var languageConstructs = exports.languageConstructs = ( '[|]|alias|bg|bind|break|builtin|'+ 'cd|command|compgen|complete|continue|'+ 'dirs|disown|echo|enable|eval|exec|'+ 'exit|fc|fg|getopts|hash|help|history|'+ 'jobs|kill|let|logout|popd|printf|pushd|'+ 'pwd|return|set|shift|shopt|source|'+ 'suspend|test|times|trap|type|ulimit|'+ 'umask|unalias|wait' ); var ShHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "keyword": reservedKeywords, "support.function.builtin": languageConstructs, "invalid.deprecated": "debugger" }, "identifier"); var integer = "(?:(?:[1-9]\\d*)|(?:0))"; var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)"; var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; var fileDescriptor = "(?:&" + intPart + ")"; var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; var func = "(?:" + variableName + "\\s*\\(\\))"; this.$rules = { "start" : [{ token : "constant", regex : /\\./ }, { token : ["text", "comment"], regex : /(^|\s)(#.*)$/ }, { token : "string", regex : '"', push : [{ token : "constant.language.escape", regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ }, { token : "constant", regex : /\$\w+/ }, { token : "string", regex : '"', next: "pop" }, { defaultToken: "string" }] }, { regex : "<<<", token : "keyword.operator" }, { stateName: "heredoc", regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", onMatch : function(value, currentState, stack) { var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; var tokens = value.split(this.splitRegex); stack.push(next, tokens[4]); return [ {type:"constant", value: tokens[1]}, {type:"text", value: tokens[2]}, {type:"string", value: tokens[3]}, {type:"support.class", value: tokens[4]}, {type:"string", value: tokens[5]} ]; }, rules: { heredoc: [{ onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }], indentedHeredoc: [{ token: "string", regex: "^\t+" }, { onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }] } }, { regex : "$", token : "empty", next : function(currentState, stack) { if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") return stack[0]; return currentState; } }, { token : "variable.language", regex : builtinVariable }, { token : "variable", regex : variable }, { token : "support.function", regex : func }, { token : "support.function", regex : fileDescriptor }, { token : "string", // ' string start : "'", end : "'" }, { token : "constant.numeric", // float regex : floatNumber }, { token : "constant.numeric", // integer regex : integer + "\\b" }, { token : keywordMapper, regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" }, { token : "paren.lparen", regex : "[\\[\\(\\{]" }, { token : "paren.rparen", regex : "[\\]\\)\\}]" } ] }; this.normalizeRules(); }; oop.inherits(ShHighlightRules, TextHighlightRules); exports.ShHighlightRules = ShHighlightRules; }); define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ShHighlightFile = require("./sh_highlight_rules"); var MakefileHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "keyword": ShHighlightFile.reservedKeywords, "support.function.builtin": ShHighlightFile.languageConstructs, "invalid.deprecated": "debugger" }, "string"); this.$rules = { "start": [ { token: "string.interpolated.backtick.makefile", regex: "`", next: "shell-start" }, { token: "punctuation.definition.comment.makefile", regex: /#(?=.)/, next: "comment" }, { token: [ "keyword.control.makefile"], regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)" }, {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.* token: ["entity.name.function.makefile", "text"], regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)" } ], "comment": [ { token : "punctuation.definition.comment.makefile", regex : /.+\\/ }, { token : "punctuation.definition.comment.makefile", regex : ".+", next : "start" } ], "shell-start": [ { token: keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token: "string", regex : "\\w+" }, { token : "string.interpolated.backtick.makefile", regex : "`", next : "start" } ] } }; oop.inherits(MakefileHighlightRules, TextHighlightRules); exports.MakefileHighlightRules = MakefileHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = MakefileHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.$indentWithTabs = true; this.$id = "ace/mode/makefile"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-stylus.js0000644000076400007640000004605212554155240023524 0ustar pravipravidefine("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var CssHighlightRules = require("./css_highlight_rules"); var StylusHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.type": CssHighlightRules.supportType, "support.function": CssHighlightRules.supportFunction, "support.constant": CssHighlightRules.supportConstant, "support.constant.color": CssHighlightRules.supportConstantColor, "support.constant.fonts": CssHighlightRules.supportConstantFonts }, "text", true); this.$rules = { start: [ { token : "comment", regex : /\/\/.*$/ }, { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token: ["entity.name.function.stylus", "text"], regex: "^([-a-zA-Z_][-\\w]*)?(\\()" }, { token: ["entity.other.attribute-name.class.stylus"], regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*" }, { token: ["entity.language.stylus"], regex: "^ *&" }, { token: ["variable.language.stylus"], regex: "(arguments)" }, { token: ["keyword.stylus"], regex: "@[-\\w]+" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : CssHighlightRules.pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : CssHighlightRules.pseudoClasses }, { token: ["entity.name.tag.stylus"], regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)" }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"], regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)" }, { token: "meta.vendor-prefix.stylus", regex: "-webkit-|-moz\\-|-ms-|-o-" }, { token: "keyword.control.stylus", regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b" }, { token: "keyword.operator.stylus", regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=" }, { token: "keyword.operator.stylus", regex: "(?:in|is(?:nt)?|not)\\b" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", regex : CssHighlightRules.numRe }, { token : "keyword", regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "qqstring" : [ { token : "string", regex : '[^"\\\\]+' }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "start" } ], "qstring" : [ { token : "string", regex : "[^'\\\\]+" }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "start" } ] } }; oop.inherits(StylusHighlightRules, TextHighlightRules); exports.StylusHighlightRules = StylusHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/stylus",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/stylus_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = StylusHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/stylus"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-mushcode.js0000644000076400007640000002737012554155240023772 0ustar pravipravidefine("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var MushCodeRules = function() { var keywords = ( "@if|"+ "@ifelse|"+ "@switch|"+ "@halt|"+ "@dolist|"+ "@create|"+ "@scent|"+ "@sound|"+ "@touch|"+ "@ataste|"+ "@osound|"+ "@ahear|"+ "@aahear|"+ "@amhear|"+ "@otouch|"+ "@otaste|"+ "@drop|"+ "@odrop|"+ "@adrop|"+ "@dropfail|"+ "@odropfail|"+ "@smell|"+ "@oemit|"+ "@emit|"+ "@pemit|"+ "@parent|"+ "@clone|"+ "@taste|"+ "whisper|"+ "page|"+ "say|"+ "pose|"+ "semipose|"+ "teach|"+ "touch|"+ "taste|"+ "smell|"+ "listen|"+ "look|"+ "move|"+ "go|"+ "home|"+ "follow|"+ "unfollow|"+ "desert|"+ "dismiss|"+ "@tel" ); var builtinConstants = ( "=#0" ); var builtinFunctions = ( "default|"+ "edefault|"+ "eval|"+ "get_eval|"+ "get|"+ "grep|"+ "grepi|"+ "hasattr|"+ "hasattrp|"+ "hasattrval|"+ "hasattrpval|"+ "lattr|"+ "nattr|"+ "poss|"+ "udefault|"+ "ufun|"+ "u|"+ "v|"+ "uldefault|"+ "xget|"+ "zfun|"+ "band|"+ "bnand|"+ "bnot|"+ "bor|"+ "bxor|"+ "shl|"+ "shr|"+ "and|"+ "cand|"+ "cor|"+ "eq|"+ "gt|"+ "gte|"+ "lt|"+ "lte|"+ "nand|"+ "neq|"+ "nor|"+ "not|"+ "or|"+ "t|"+ "xor|"+ "con|"+ "entrances|"+ "exit|"+ "followers|"+ "home|"+ "lcon|"+ "lexits|"+ "loc|"+ "locate|"+ "lparent|"+ "lsearch|"+ "next|"+ "num|"+ "owner|"+ "parent|"+ "pmatch|"+ "rloc|"+ "rnum|"+ "room|"+ "where|"+ "zone|"+ "worn|"+ "held|"+ "carried|"+ "acos|"+ "asin|"+ "atan|"+ "ceil|"+ "cos|"+ "e|"+ "exp|"+ "fdiv|"+ "fmod|"+ "floor|"+ "log|"+ "ln|"+ "pi|"+ "power|"+ "round|"+ "sin|"+ "sqrt|"+ "tan|"+ "aposs|"+ "andflags|"+ "conn|"+ "commandssent|"+ "controls|"+ "doing|"+ "elock|"+ "findable|"+ "flags|"+ "fullname|"+ "hasflag|"+ "haspower|"+ "hastype|"+ "hidden|"+ "idle|"+ "isbaker|"+ "lock|"+ "lstats|"+ "money|"+ "who|"+ "name|"+ "nearby|"+ "obj|"+ "objflags|"+ "photo|"+ "poll|"+ "powers|"+ "pendingtext|"+ "receivedtext|"+ "restarts|"+ "restarttime|"+ "subj|"+ "shortestpath|"+ "tmoney|"+ "type|"+ "visible|"+ "cat|"+ "element|"+ "elements|"+ "extract|"+ "filter|"+ "filterbool|"+ "first|"+ "foreach|"+ "fold|"+ "grab|"+ "graball|"+ "index|"+ "insert|"+ "itemize|"+ "items|"+ "iter|"+ "last|"+ "ldelete|"+ "map|"+ "match|"+ "matchall|"+ "member|"+ "mix|"+ "munge|"+ "pick|"+ "remove|"+ "replace|"+ "rest|"+ "revwords|"+ "setdiff|"+ "setinter|"+ "setunion|"+ "shuffle|"+ "sort|"+ "sortby|"+ "splice|"+ "step|"+ "wordpos|"+ "words|"+ "add|"+ "lmath|"+ "max|"+ "mean|"+ "median|"+ "min|"+ "mul|"+ "percent|"+ "sign|"+ "stddev|"+ "sub|"+ "val|"+ "bound|"+ "abs|"+ "inc|"+ "dec|"+ "dist2d|"+ "dist3d|"+ "div|"+ "floordiv|"+ "mod|"+ "modulo|"+ "remainder|"+ "vadd|"+ "vdim|"+ "vdot|"+ "vmag|"+ "vmax|"+ "vmin|"+ "vmul|"+ "vsub|"+ "vunit|"+ "regedit|"+ "regeditall|"+ "regeditalli|"+ "regediti|"+ "regmatch|"+ "regmatchi|"+ "regrab|"+ "regraball|"+ "regraballi|"+ "regrabi|"+ "regrep|"+ "regrepi|"+ "after|"+ "alphamin|"+ "alphamax|"+ "art|"+ "before|"+ "brackets|"+ "capstr|"+ "case|"+ "caseall|"+ "center|"+ "containsfansi|"+ "comp|"+ "decompose|"+ "decrypt|"+ "delete|"+ "edit|"+ "encrypt|"+ "escape|"+ "if|"+ "ifelse|"+ "lcstr|"+ "left|"+ "lit|"+ "ljust|"+ "merge|"+ "mid|"+ "ostrlen|"+ "pos|"+ "repeat|"+ "reverse|"+ "right|"+ "rjust|"+ "scramble|"+ "secure|"+ "space|"+ "spellnum|"+ "squish|"+ "strcat|"+ "strmatch|"+ "strinsert|"+ "stripansi|"+ "stripfansi|"+ "strlen|"+ "switch|"+ "switchall|"+ "table|"+ "tr|"+ "trim|"+ "ucstr|"+ "unsafe|"+ "wrap|"+ "ctitle|"+ "cwho|"+ "channels|"+ "clock|"+ "cflags|"+ "ilev|"+ "itext|"+ "inum|"+ "convsecs|"+ "convutcsecs|"+ "convtime|"+ "ctime|"+ "etimefmt|"+ "isdaylight|"+ "mtime|"+ "secs|"+ "msecs|"+ "starttime|"+ "time|"+ "timefmt|"+ "timestring|"+ "utctime|"+ "atrlock|"+ "clone|"+ "create|"+ "cook|"+ "dig|"+ "emit|"+ "lemit|"+ "link|"+ "oemit|"+ "open|"+ "pemit|"+ "remit|"+ "set|"+ "tel|"+ "wipe|"+ "zemit|"+ "fbcreate|"+ "fbdestroy|"+ "fbwrite|"+ "fbclear|"+ "fbcopy|"+ "fbcopyto|"+ "fbclip|"+ "fbdump|"+ "fbflush|"+ "fbhset|"+ "fblist|"+ "fbstats|"+ "qentries|"+ "qentry|"+ "play|"+ "ansi|"+ "break|"+ "c|"+ "asc|"+ "die|"+ "isdbref|"+ "isint|"+ "isnum|"+ "isletters|"+ "linecoords|"+ "localize|"+ "lnum|"+ "nameshort|"+ "null|"+ "objeval|"+ "r|"+ "rand|"+ "s|"+ "setq|"+ "setr|"+ "soundex|"+ "soundslike|"+ "valid|"+ "vchart|"+ "vchart2|"+ "vlabel|"+ "@@|"+ "bakerdays|"+ "bodybuild|"+ "box|"+ "capall|"+ "catalog|"+ "children|"+ "ctrailer|"+ "darttime|"+ "debt|"+ "detailbar|"+ "exploredroom|"+ "fansitoansi|"+ "fansitoxansi|"+ "fullbar|"+ "halfbar|"+ "isdarted|"+ "isnewbie|"+ "isword|"+ "lambda|"+ "lobjects|"+ "lplayers|"+ "lthings|"+ "lvexits|"+ "lvobjects|"+ "lvplayers|"+ "lvthings|"+ "newswrap|"+ "numsuffix|"+ "playerson|"+ "playersthisweek|"+ "randomad|"+ "randword|"+ "realrandword|"+ "replacechr|"+ "second|"+ "splitamount|"+ "strlenall|"+ "text|"+ "third|"+ "tofansi|"+ "totalac|"+ "unique|"+ "getaddressroom|"+ "listpropertycomm|"+ "listpropertyres|"+ "lotowner|"+ "lotrating|"+ "lotratingcount|"+ "lotvalue|"+ "boughtproduct|"+ "companyabb|"+ "companyicon|"+ "companylist|"+ "companyname|"+ "companyowners|"+ "companyvalue|"+ "employees|"+ "invested|"+ "productlist|"+ "productname|"+ "productowners|"+ "productrating|"+ "productratingcount|"+ "productsoldat|"+ "producttype|"+ "ratedproduct|"+ "soldproduct|"+ "topproducts|"+ "totalspentonproduct|"+ "totalstock|"+ "transfermoney|"+ "uniquebuyercount|"+ "uniqueproductsbought|"+ "validcompany|"+ "deletepicture|"+ "fbsave|"+ "getpicturesecurity|"+ "haspicture|"+ "listpictures|"+ "picturesize|"+ "replacecolor|"+ "rgbtocolor|"+ "savepicture|"+ "setpicturesecurity|"+ "showpicture|"+ "piechart|"+ "piechartlabel|"+ "createmaze|"+ "drawmaze|"+ "drawwireframe" ); var keywordMapper = this.createKeywordMapper({ "invalid.deprecated": "debugger", "support.function": builtinFunctions, "constant.language": builtinConstants, "keyword": keywords }, "identifier"); var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; var octInteger = "(?:0[oO]?[0-7]+)"; var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; var binInteger = "(?:0[bB][01]+)"; var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; var exponent = "(?:[eE][+-]?\\d+)"; var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)"; var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; this.$rules = { "start" : [ { token : "variable", // mush substitution register regex : "%[0-9]{1}" }, { token : "variable", // mush substitution register regex : "%q[0-9A-Za-z]{1}" }, { token : "variable", // mush special character register regex : "%[a-zA-Z]{1}" }, { token: "variable.language", regex: "%[a-z0-9-_]+" }, { token : "constant.numeric", // imaginary regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" }, { token : "constant.numeric", // float regex : floatNumber }, { token : "constant.numeric", // long integer regex : integer + "[lL]\\b" }, { token : "constant.numeric", // integer regex : integer + "\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" }, { token : "paren.lparen", regex : "[\\[\\(\\{]" }, { token : "paren.rparen", regex : "[\\]\\)\\}]" }, { token : "text", regex : "\\s+" } ] }; }; oop.inherits(MushCodeRules, TextHighlightRules); exports.MushCodeRules = MushCodeRules; }); define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(markers) { this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.getLine(row); var match = line.match(this.foldingStartMarker); if (match) { if (match[1]) return this.openingBracketBlock(session, match[1], row, match.index); if (match[2]) return this.indentationBlock(session, row, match.index + match[2].length); return this.indentationBlock(session, row); } } }).call(FoldMode.prototype); }); define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var MushCodeRules = require("./mushcode_highlight_rules").MushCodeRules; var PythonFoldMode = require("./folding/pythonic").FoldMode; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = MushCodeRules; this.foldingRules = new PythonFoldMode("\\:"); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[\:]\s*$/); if (match) { indent += tab; } } return indent; }; var outdents = { "pass": 1, "return": 1, "raise": 1, "break": 1, "continue": 1 }; this.checkOutdent = function(state, line, input) { if (input !== "\r\n" && input !== "\r" && input !== "\n") return false; var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; if (!tokens) return false; do { var last = tokens.pop(); } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); if (!last) return false; return (last.type == "keyword" && outdents[last.value]); }; this.autoOutdent = function(state, doc, row) { row += 1; var indent = this.$getIndent(doc.getLine(row)); var tab = doc.getTabString(); if (indent.slice(-tab.length) == tab) doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); }; this.$id = "ace/mode/mushcode"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-live_script.js0000644000076400007640000006530312554155240024504 0ustar pravipravidefine("ace/mode/live_script_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LiveScriptHighlightRules = function() { this.$rules = { start: [ { token: 'punctuation.definition.comment.livescript', regex: '\\/\\*', push: [ { token: 'punctuation.definition.comment.livescript', regex: '\\*\\/', next: 'pop' }, { token: 'storage.type.annotation.livescriptscript', regex: '@\\w*' }, { defaultToken: 'comment.block.livescript' } ] }, { token: [ 'punctuation.definition.comment.livescript', 'comment.line.number-sign.livescript' ], regex: '(#)(?!\\{)(.*$)' }, { token: [ 'variable.parameter.function.livescript', 'meta.inline.function.livescript', 'storage.type.function.livescript', 'meta.inline.function.livescript', 'variable.parameter.function.livescript', 'meta.inline.function.livescript', 'storage.type.function.livescript' ], regex: '(\\s*\\!?\\(\\s*[^()]*?\\))(\\s*)(!?[~-]{1,2}>)|(\\s*\\!?)(\\(?[^()]*?\\)?)(\\s*)(<[~-]{1,2}!?)', comment: 'match stuff like: a -> … ' }, { token: [ 'keyword.operator.new.livescript', 'meta.class.instance.constructor', 'entity.name.type.instance.livescript' ], regex: '(new)(\\s+)(\\w+(?:\\.\\w*)*)' }, { token: 'keyword.illegal.livescript', regex: '\\bp(?:ackage|r(?:ivate|otected)|ublic)|interface|enum|static|yield\\b' }, { token: 'punctuation.definition.string.begin.livescript', regex: '\'\'\'', push: [ { token: 'punctuation.definition.string.end.livescript', regex: '\'\'\'', next: 'pop' }, { defaultToken: 'string.quoted.heredoc.livescript' } ] }, { token: 'punctuation.definition.string.begin.livescript', regex: '"""', push: [ { token: 'punctuation.definition.string.end.livescript', regex: '"""', next: 'pop' }, { token: 'constant.character.escape.livescript', regex: '\\\\.' }, { include: '#interpolated_livescript' }, { defaultToken: 'string.quoted.double.heredoc.livescript' } ] }, { token: 'punctuation.definition.string.begin.livescript', regex: '``', push: [ { token: 'punctuation.definition.string.end.livescript', regex: '``', next: 'pop' }, { token: 'constant.character.escape.livescript', regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' }, { defaultToken: 'string.quoted.script.livescript' } ] }, { token: 'string.array-literal.livescript', regex: '<\\[', push: [ { token: 'string.array-literal.livescript', regex: '\\]>', next: 'pop' }, { defaultToken: 'string.array-literal.livescript' } ] }, { token: 'string.regexp.livescript', regex: '/{2}(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}' }, { token: 'string.regexp.livescript', regex: '/{2}$', push: [ { token: 'string.regexp.livescript', regex: '/{2}[imgy]{0,4}', next: 'pop' }, { include: '#embedded_spaced_comment' }, { include: '#interpolated_livescript' }, { defaultToken: 'string.regexp.livescript' } ] }, { token: 'string.regexp.livescript', regex: '/{2}', push: [ { token: 'string.regexp.livescript', regex: '/{2}[imgy]{0,4}', next: 'pop' }, { token: 'constant.character.escape.livescript', regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' }, { include: '#interpolated_livescript' }, { defaultToken: 'string.regexp.livescript' } ] }, { token: 'string.regexp.livescript', regex: '/(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])' }, { token: 'keyword.control.livescript', regex: '\\b(?)|\\+\\+|\\+|~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<(?!\\[)|(?|(?)|&&|\\.\\.(?:\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?)|\\+\\+|\\+|\n\t\t\t\t~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|\n\t\t\t\t>>>=|<>|<(?!\\[)|(?|(?)|&&|\\.\\.(\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?)' }, { token: 'keyword.operator.livescript', regex: '(?<=\\s|^)[\\[\\{](?=.*?[\\]\\}]\\s+[:=])', TODO: 'FIXME: regexp doesn\'t have js equivalent', originalRegex: '(?<=\\s|^)([\\[\\{])(?=.*?[\\]\\}]\\s+[:=])', push: [ { token: 'keyword.operator.livescript', regex: '[\\]\\}]\\s*[:=]', next: 'pop' }, { include: '#variable_name' }, { include: '#instance_variable' }, { include: '#single_quoted_string' }, { include: '#double_quoted_string' }, { include: '#numeric' }, { defaultToken: 'meta.variable.assignment.destructured.livescript' } ] }, { token: [ 'meta.function.livescript', 'entity.name.function.livescript', 'entity.name.function.livescript', 'entity.name.function.livescript', 'entity.name.function.livescript', 'variable.parameter.function.livescript', 'entity.name.function.livescript', 'storage.type.function.livescript' ], regex: '(\\s*)(?=[a-zA-Z\\$_])([a-zA-Z\\$_])((?:[\\w$.:-])*)(\\s*)([:=])((?:\\s*!?\\s*\\(.*\\))?)(\\s*)(!?[~-]{1,2}>)' }, { token: 'storage.type.function.livescript', regex: '!?[~-]{1,2}>' }, { token: 'constant.language.boolean.true.livescript', regex: '\\b(?|=>)\\s*$|.*[\\[{]\\s*$', foldingStopMarker: '^\\s*$|^\\s*[}\\]]\\s*$', keyEquivalent: '^~C', name: 'LiveScript', scopeName: 'source.livescript' } oop.inherits(LiveScriptHighlightRules, TextHighlightRules); exports.LiveScriptHighlightRules = LiveScriptHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/live_script",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/live_script_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LiveScriptHighlightRules = require("./live_script_highlight_rules").LiveScriptHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = LiveScriptHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/live_script" }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-markdown.js0000644000076400007640000032422012554155240023777 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var XmlFoldMode = require("./folding/xml").FoldMode; var WorkerClient = require("../worker/worker_client").WorkerClient; var Mode = function() { this.HighlightRules = XmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.foldingRules = new XmlFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.voidElements = lang.arrayToMap([]); this.blockComment = {start: ""}; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/xml"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(defaultMode, subModes) { this.defaultMode = defaultMode; this.subModes = subModes; }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.$getMode = function(state) { if (typeof state != "string") state = state[0]; for (var key in this.subModes) { if (state.indexOf(key) === 0) return this.subModes[key]; } return null; }; this.$tryMode = function(state, session, foldStyle, row) { var mode = this.$getMode(state); return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); }; this.getFoldWidget = function(session, foldStyle, row) { return ( this.$tryMode(session.getState(row-1), session, foldStyle, row) || this.$tryMode(session.getState(row), session, foldStyle, row) || this.defaultMode.getFoldWidget(session, foldStyle, row) ); }; this.getFoldWidgetRange = function(session, foldStyle, row) { var mode = this.$getMode(session.getState(row-1)); if (!mode || !mode.getFoldWidget(session, foldStyle, row)) mode = this.$getMode(session.getState(row)); if (!mode || !mode.getFoldWidget(session, foldStyle, row)) mode = this.defaultMode; return mode.getFoldWidgetRange(session, foldStyle, row); }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var escaped = function(ch) { return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; } function github_embed(tag, prefix) { return { // Github style block token : "support.function", regex : "^\\s*```" + tag + "\\s*$", push : prefix + "start" }; } var MarkdownHighlightRules = function() { HtmlHighlightRules.call(this); this.$rules["start"].unshift({ token : "empty_line", regex : '^$', next: "allowBlock" }, { // h1 token: "markup.heading.1", regex: "^=+(?=\\s*$)" }, { // h2 token: "markup.heading.2", regex: "^\\-+(?=\\s*$)" }, { token : function(value) { return "markup.heading." + value.length; }, regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, next : "header" }, github_embed("(?:javascript|js)", "jscode-"), github_embed("xml", "xmlcode-"), github_embed("html", "htmlcode-"), github_embed("css", "csscode-"), { // Github style block token : "support.function", regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", next : "githubblock" }, { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" }, { // HR * - _ token : "constant", regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", next: "allowBlock" }, { // list token : "markup.list", regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next : "listblock-start" }, { include : "basic" }); this.addRules({ "basic" : [{ token : "constant.language.escape", regex : /\\[\\`*_{}\[\]()#+\-.!]/ }, { // code span ` token : "support.function", regex : "(`+)(.*?[^`])(\\1)" }, { // reference token : ["text", "constant", "text", "url", "string", "text"], regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" }, { // link by reference token : ["text", "string", "text", "constant", "text"], regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" }, { // link by url token : ["text", "string", "text", "markup.underline", "string", "text"], regex : "(\\[)(" + // [ escaped("]") + // link text ")(\\]\\()"+ // ]( '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" "(\\))" // ) }, { // strong ** __ token : "string.strong", regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" }, { // emphasis * _ token : "string.emphasis", regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" }, { // token : ["text", "url", "text"], regex : "(<)("+ "(?:https?|ftp|dict):[^'\">\\s]+"+ "|"+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ ")(>)" }], "allowBlock": [ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, {token : "empty", regex : "", next : "start"} ], "header" : [{ regex: "$", next : "start" }, { include: "basic" }, { defaultToken : "heading" } ], "listblock-start" : [{ token : "support.variable", regex : /(?:\[[ x]\])?/, next : "listblock" }], "listblock" : [ { // Lists only escape on completely blank lines. token : "empty_line", regex : "^$", next : "start" }, { // list token : "markup.list", regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next : "listblock-start" }, { include : "basic", noEscape: true }, { // Github style block token : "support.function", regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", next : "githubblock" }, { defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly } ], "blockquote" : [ { // Blockquotes only escape on blank lines. token : "empty_line", regex : "^\\s*$", next : "start" }, { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" }, { include : "basic", noEscape: true }, { defaultToken : "string.blockquote" } ], "githubblock" : [ { token : "support.function", regex : "^\\s*```", next : "start" }, { token : "support.function", regex : ".+" } ] }); this.embedRules(JavaScriptHighlightRules, "jscode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.embedRules(HtmlHighlightRules, "htmlcode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.embedRules(CssHighlightRules, "csscode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.embedRules(XmlHighlightRules, "xmlcode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.normalizeRules(); }; oop.inherits(MarkdownHighlightRules, TextHighlightRules); exports.MarkdownHighlightRules = MarkdownHighlightRules; }); define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (!this.foldingStartMarker.test(line)) return ""; if (line[0] == "`") { if (session.bgTokenizer.getState(row) == "start") return "end"; return "start"; } return "start"; }; this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.getLine(row); var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; if (!line.match(this.foldingStartMarker)) return; if (line[0] == "`") { if (session.bgTokenizer.getState(row) !== "start") { while (++row < maxRow) { line = session.getLine(row); if (line[0] == "`" & line.substring(0, 3) == "```") break; } return new Range(startRow, startColumn, row, 0); } else { while (row -- > 0) { line = session.getLine(row); if (line[0] == "`" & line.substring(0, 3) == "```") break; } return new Range(row, line.length, startRow, 0); } } var token; function isHeading(row) { token = session.getTokens(row)[0]; return token && token.type.lastIndexOf(heading, 0) === 0; } var heading = "markup.heading"; function getLevel() { var ch = token.value[0]; if (ch == "=") return 6; if (ch == "-") return 5; return 7 - token.value.search(/[^#]/); } if (isHeading(row)) { var startHeadingLevel = getLevel(); while (++row < maxRow) { if (!isHeading(row)) continue; var level = getLevel(); if (level >= startHeadingLevel) break; } endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2); if (endRow > startRow) { while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) endRow--; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } } }; }).call(FoldMode.prototype); }); define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var XmlMode = require("./xml").Mode; var HtmlMode = require("./html").Mode; var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; var MarkdownFoldMode = require("./folding/markdown").FoldMode; var Mode = function() { this.HighlightRules = MarkdownHighlightRules; this.createModeDelegates({ "js-": JavaScriptMode, "xml-": XmlMode, "html-": HtmlMode }); this.foldingRules = new MarkdownFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.type = "text"; this.blockComment = {start: ""}; this.getNextLineIndent = function(state, line, tab) { if (state == "listblock") { var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line); if (!match) return ""; var marker = match[2]; if (!marker) marker = parseInt(match[3], 10) + 1 + "."; return match[1] + marker + match[4]; } else { return this.$getIndent(line); } }; this.$id = "ace/mode/markdown"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-abc.js0000644000076400007640000002145512554155240022706 0ustar pravipravidefine("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ABCHighlightRules = function () { this.$rules = { start: [ { token: ['zupfnoter.information.comment.line.percentage', 'information.keyword', 'in formation.keyword.embedded'], regex: '(%%%%)(hn\\.[a-z]*)(.*)', comment: 'Instruction Comment' }, { token: ['information.comment.line.percentage', 'information.keyword.embedded'], regex: '(%%)(.*)', comment: 'Instruction Comment' }, { token: 'comment.line.percentage', regex: '%.*', comment: 'Comments' }, { token: 'barline.keyword.operator', regex: '[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+', comment: 'Bar lines' }, { token: ['information.keyword.embedded', 'information.argument.string.unquoted'], regex: '(\\[[A-Za-z]:)([^\\]]*\\])', comment: 'embedded Header lines' }, { token: ['information.keyword', 'information.argument.string.unquoted'], regex: '^([A-Za-z]:)([^%\\\\]*)', comment: 'Header lines' }, { token: ['text', 'entity.name.function', 'string.unquoted', 'text'], regex: '(\\[)([A-Z]:)(.*?)(\\])', comment: 'Inline fields' }, { token: ['accent.constant.language', 'pitch.constant.numeric', 'duration.constant.numeric'], regex: '([\\^=_]*)([A-Ga-gz][,\']*)([0-9]*/*[><0-9]*)', comment: 'Notes' }, { token: 'zupfnoter.jumptarget.string.quoted', regex: '[\\"!]\\^\\:.*?[\\"!]', comment: 'Zupfnoter jumptarget' }, { token: 'zupfnoter.goto.string.quoted', regex: '[\\"!]\\^\\@.*?[\\"!]', comment: 'Zupfnoter goto' }, { token: 'zupfnoter.annotation.string.quoted', regex: '[\\"!]\\^\\!.*?[\\"!]', comment: 'Zupfnoter annoation' }, { token: 'zupfnoter.annotationref.string.quoted', regex: '[\\"!]\\^\\#.*?[\\"!]', comment: 'Zupfnoter annotation reference' }, { token: 'chordname.string.quoted', regex: '[\\"!]\\^.*?[\\"!]', comment: 'abc chord' }, { token: 'string.quoted', regex: '[\\"!].*?[\\"!]', comment: 'abc annotation' } ] }; this.normalizeRules(); }; ABCHighlightRules.metaData = { fileTypes: ['abc'], name: 'ABC', scopeName: 'text.abcnotation' }; oop.inherits(ABCHighlightRules, TextHighlightRules); exports.ABCHighlightRules = ABCHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ABCHighlightRules = require("./abc_highlight_rules").ABCHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function () { this.HighlightRules = ABCHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function () { this.$id = "ace/mode/abc" }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-merbivore_soft.js0000644000076400007640000000524112554155240025357 0ustar pravipravidefine("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-merbivore-soft"; exports.cssText = ".ace-merbivore-soft .ace_gutter {\ background: #262424;\ color: #E6E1DC\ }\ .ace-merbivore-soft .ace_print-margin {\ width: 1px;\ background: #262424\ }\ .ace-merbivore-soft {\ background-color: #1C1C1C;\ color: #E6E1DC\ }\ .ace-merbivore-soft .ace_cursor {\ color: #FFFFFF\ }\ .ace-merbivore-soft .ace_marker-layer .ace_selection {\ background: #494949\ }\ .ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #1C1C1C;\ border-radius: 2px\ }\ .ace-merbivore-soft .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-merbivore-soft .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #404040\ }\ .ace-merbivore-soft .ace_marker-layer .ace_active-line {\ background: #333435\ }\ .ace-merbivore-soft .ace_gutter-active-line {\ background-color: #333435\ }\ .ace-merbivore-soft .ace_marker-layer .ace_selected-word {\ border: 1px solid #494949\ }\ .ace-merbivore-soft .ace_invisible {\ color: #404040\ }\ .ace-merbivore-soft .ace_entity.ace_name.ace_tag,\ .ace-merbivore-soft .ace_keyword,\ .ace-merbivore-soft .ace_meta,\ .ace-merbivore-soft .ace_meta.ace_tag,\ .ace-merbivore-soft .ace_storage {\ color: #FC803A\ }\ .ace-merbivore-soft .ace_constant,\ .ace-merbivore-soft .ace_constant.ace_character,\ .ace-merbivore-soft .ace_constant.ace_character.ace_escape,\ .ace-merbivore-soft .ace_constant.ace_other,\ .ace-merbivore-soft .ace_support.ace_type {\ color: #68C1D8\ }\ .ace-merbivore-soft .ace_constant.ace_character.ace_escape {\ color: #B3E5B4\ }\ .ace-merbivore-soft .ace_constant.ace_language {\ color: #E1C582\ }\ .ace-merbivore-soft .ace_constant.ace_library,\ .ace-merbivore-soft .ace_string,\ .ace-merbivore-soft .ace_support.ace_constant {\ color: #8EC65F\ }\ .ace-merbivore-soft .ace_constant.ace_numeric {\ color: #7FC578\ }\ .ace-merbivore-soft .ace_invalid,\ .ace-merbivore-soft .ace_invalid.ace_deprecated {\ color: #FFFFFF;\ background-color: #FE3838\ }\ .ace-merbivore-soft .ace_fold {\ background-color: #FC803A;\ border-color: #E6E1DC\ }\ .ace-merbivore-soft .ace_comment,\ .ace-merbivore-soft .ace_meta {\ font-style: italic;\ color: #AC4BB8\ }\ .ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\ color: #EAF1A3\ }\ .ace-merbivore-soft .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-json.js0000644000076400007640000020617112554155240023517 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i= '0' && ch <= '9') { string += ch; next(); } if (ch === '.') { string += '.'; while (next() && ch >= '0' && ch <= '9') { string += ch; } } if (ch === 'e' || ch === 'E') { string += ch; next(); if (ch === '-' || ch === '+') { string += ch; next(); } while (ch >= '0' && ch <= '9') { string += ch; next(); } } number = +string; if (isNaN(number)) { error("Bad number"); } else { return number; } }, string = function () { var hex, i, string = '', uffff; if (ch === '"') { while (next()) { if (ch === '"') { next(); return string; } else if (ch === '\\') { next(); if (ch === 'u') { uffff = 0; for (i = 0; i < 4; i += 1) { hex = parseInt(next(), 16); if (!isFinite(hex)) { break; } uffff = uffff * 16 + hex; } string += String.fromCharCode(uffff); } else if (typeof escapee[ch] === 'string') { string += escapee[ch]; } else { break; } } else { string += ch; } } } error("Bad string"); }, white = function () { while (ch && ch <= ' ') { next(); } }, word = function () { switch (ch) { case 't': next('t'); next('r'); next('u'); next('e'); return true; case 'f': next('f'); next('a'); next('l'); next('s'); next('e'); return false; case 'n': next('n'); next('u'); next('l'); next('l'); return null; } error("Unexpected '" + ch + "'"); }, value, // Place holder for the value function. array = function () { var array = []; if (ch === '[') { next('['); white(); if (ch === ']') { next(']'); return array; // empty array } while (ch) { array.push(value()); white(); if (ch === ']') { next(']'); return array; } next(','); white(); } } error("Bad array"); }, object = function () { var key, object = {}; if (ch === '{') { next('{'); white(); if (ch === '}') { next('}'); return object; // empty object } while (ch) { key = string(); white(); next(':'); if (Object.hasOwnProperty.call(object, key)) { error('Duplicate key "' + key + '"'); } object[key] = value(); white(); if (ch === '}') { next('}'); return object; } next(','); white(); } } error("Bad object"); }; value = function () { white(); switch (ch) { case '{': return object(); case '[': return array(); case '"': return string(); case '-': return number(); default: return ch >= '0' && ch <= '9' ? number() : word(); } }; return function (source, reviver) { var result; text = source; at = 0; ch = ' '; result = value(); white(); if (ch) { error("Syntax error"); } return typeof reviver === 'function' ? function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === 'object') { for (k in value) { if (Object.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v; } else { delete value[k]; } } } } return reviver.call(holder, key, value); }({'': result}, '') : result; }; }); define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var Mirror = require("../worker/mirror").Mirror; var parse = require("./json/json_parse"); var JsonWorker = exports.JsonWorker = function(sender) { Mirror.call(this, sender); this.setTimeout(200); }; oop.inherits(JsonWorker, Mirror); (function() { this.onUpdate = function() { var value = this.doc.getValue(); var errors = []; try { if (value) parse(value); } catch (e) { var pos = this.doc.indexToPosition(e.at-1); errors.push({ row: pos.row, column: pos.column, text: e.message, type: "error" }); } this.sender.emit("annotate", errors); }; }).call(JsonWorker.prototype); }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-elm.js0000644000076400007640000002174712554155240022742 0ustar pravipravidefine("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ElmHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "keyword": "as|case|class|data|default|deriving|do|else|export|foreign|" + "hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|" + "module|newtype|of|open|then|type|where|_|port|\u03BB" }, "identifier"); var escapeRe = /\\(\d+|['"\\&trnbvf])/; var smallRe = /[a-z_]/.source; var largeRe = /[A-Z]/.source; var idRe = /[a-z_A-Z0-9\']/.source; this.$rules = { start: [{ token: "string.start", regex: '"', next: "string" }, { token: "string.character", regex: "'(?:" + escapeRe.source + "|.)'?" }, { regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/, token: "constant.numeric" }, { token : "keyword", regex : /\.\.|\||:|=|\\|\"|->|<-|\u2192/ }, { token : "keyword.operator", regex : /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/ }, { token : "operator.punctuation", regex : /[,;`]/ }, { regex : largeRe + idRe + "+\\.?", token : function(value) { if (value[value.length - 1] == ".") return "entity.name.function"; return "constant.language"; } }, { regex : "^" + smallRe + idRe + "+", token : function(value) { return "constant.language"; } }, { token : keywordMapper, regex : "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b" }, { regex: "{-#?", token: "comment.start", onMatch: function(value, currentState, stack) { this.next = value.length == 2 ? "blockComment" : "docComment"; return this.token; } }, { token: "variable.language", regex: /\[markdown\|/, next: "markdown" }, { token: "paren.lparen", regex: /[\[({]/ }, { token: "paren.rparen", regex: /[\])}]/ }, ], markdown: [{ regex: /\|\]/, next: "start" }, { defaultToken : "string" }], blockComment: [{ regex: "{-", token: "comment.start", push: "blockComment" }, { regex: "-}", token: "comment.end", next: "pop" }, { defaultToken: "comment" }], docComment: [{ regex: "{-", token: "comment.start", push: "docComment" }, { regex: "-}", token: "comment.end", next: "pop" }, { defaultToken: "doc.comment" }], string: [{ token: "constant.language.escape", regex: escapeRe, }, { token: "text", regex: /\\(\s|$)/, next: "stringGap" }, { token: "string.end", regex: '"', next: "start" }], stringGap: [{ token: "text", regex: /\\/, next: "string" }, { token: "error", regex: "", next: "start" }], }; this.normalizeRules(); }; oop.inherits(ElmHighlightRules, TextHighlightRules); exports.ElmHighlightRules = ElmHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = HighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.blockComment = {start: "{-", end: "-}"}; this.$id = "ace/mode/elm"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-jack.js0000644000076400007640000006233612554155240023074 0ustar pravipravidefine("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JackHighlightRules = function() { this.$rules = { "start" : [ { token : "string", regex : '"', next : "string2" }, { token : "string", regex : "'", next : "string1" }, { token : "constant.numeric", // hex regex: "-?0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "(?:0|[-+]?[1-9][0-9]*)\\b" }, { token : "constant.binary", regex : "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : "constant.language.null", regex : "null\\b" }, { token : "storage.type", regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b" }, { token : "keyword", regex : "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b" }, { token : "language.builtin", regex : "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b" }, { token : "comment", regex : "--.*$" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "storage.form", regex : "@[a-z]+" }, { token : "constant.other.symbol", regex : ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' }, { token : "variable", regex : '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' }, { token : "keyword.operator", regex : "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!" }, { token : "text", regex : "\\s+" } ], "string1" : [ { token : "constant.language.escape", regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ }, { token : "string", regex : "[^'\\\\]+" }, { token : "string", regex : "'", next : "start" }, { token : "string", regex : "", next : "start" } ], "string2" : [ { token : "constant.language.escape", regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ }, { token : "string", regex : '[^"\\\\]+' }, { token : "string", regex : '"', next : "start" }, { token : "string", regex : "", next : "start" } ] }; }; oop.inherits(JackHighlightRules, TextHighlightRules); exports.JackHighlightRules = JackHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var HighlightRules = require("./jack_highlight_rules").JackHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = HighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/jack"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-mask.js0000644000076400007640000023632112554155240023114 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var escaped = function(ch) { return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; } function github_embed(tag, prefix) { return { // Github style block token : "support.function", regex : "^\\s*```" + tag + "\\s*$", push : prefix + "start" }; } var MarkdownHighlightRules = function() { HtmlHighlightRules.call(this); this.$rules["start"].unshift({ token : "empty_line", regex : '^$', next: "allowBlock" }, { // h1 token: "markup.heading.1", regex: "^=+(?=\\s*$)" }, { // h2 token: "markup.heading.2", regex: "^\\-+(?=\\s*$)" }, { token : function(value) { return "markup.heading." + value.length; }, regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, next : "header" }, github_embed("(?:javascript|js)", "jscode-"), github_embed("xml", "xmlcode-"), github_embed("html", "htmlcode-"), github_embed("css", "csscode-"), { // Github style block token : "support.function", regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", next : "githubblock" }, { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" }, { // HR * - _ token : "constant", regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", next: "allowBlock" }, { // list token : "markup.list", regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next : "listblock-start" }, { include : "basic" }); this.addRules({ "basic" : [{ token : "constant.language.escape", regex : /\\[\\`*_{}\[\]()#+\-.!]/ }, { // code span ` token : "support.function", regex : "(`+)(.*?[^`])(\\1)" }, { // reference token : ["text", "constant", "text", "url", "string", "text"], regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" }, { // link by reference token : ["text", "string", "text", "constant", "text"], regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" }, { // link by url token : ["text", "string", "text", "markup.underline", "string", "text"], regex : "(\\[)(" + // [ escaped("]") + // link text ")(\\]\\()"+ // ]( '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" "(\\))" // ) }, { // strong ** __ token : "string.strong", regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" }, { // emphasis * _ token : "string.emphasis", regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" }, { // token : ["text", "url", "text"], regex : "(<)("+ "(?:https?|ftp|dict):[^'\">\\s]+"+ "|"+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ ")(>)" }], "allowBlock": [ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, {token : "empty", regex : "", next : "start"} ], "header" : [{ regex: "$", next : "start" }, { include: "basic" }, { defaultToken : "heading" } ], "listblock-start" : [{ token : "support.variable", regex : /(?:\[[ x]\])?/, next : "listblock" }], "listblock" : [ { // Lists only escape on completely blank lines. token : "empty_line", regex : "^$", next : "start" }, { // list token : "markup.list", regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next : "listblock-start" }, { include : "basic", noEscape: true }, { // Github style block token : "support.function", regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", next : "githubblock" }, { defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly } ], "blockquote" : [ { // Blockquotes only escape on blank lines. token : "empty_line", regex : "^\\s*$", next : "start" }, { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" }, { include : "basic", noEscape: true }, { defaultToken : "string.blockquote" } ], "githubblock" : [ { token : "support.function", regex : "^\\s*```", next : "start" }, { token : "support.function", regex : ".+" } ] }); this.embedRules(JavaScriptHighlightRules, "jscode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.embedRules(HtmlHighlightRules, "htmlcode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.embedRules(CssHighlightRules, "csscode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.embedRules(XmlHighlightRules, "xmlcode-", [{ token : "support.function", regex : "^\\s*```", next : "pop" }]); this.normalizeRules(); }; oop.inherits(MarkdownHighlightRules, TextHighlightRules); exports.MarkdownHighlightRules = MarkdownHighlightRules; }); define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; exports.MaskHighlightRules = MaskHighlightRules; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextRules = require("./text_highlight_rules").TextHighlightRules; var JSRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var CssRules = require("./css_highlight_rules").CssHighlightRules; var MDRules = require("./markdown_highlight_rules").MarkdownHighlightRules; var HTMLRules = require("./html_highlight_rules").HtmlHighlightRules; var token_TAG = "keyword.support.constant.language", token_COMPO = "support.function.markup.bold", token_KEYWORD = "keyword", token_LANG = "constant.language", token_UTIL = "keyword.control.markup.italic", token_ATTR = "support.variable.class", token_PUNKT = "keyword.operator", token_ITALIC = "markup.italic", token_BOLD = "markup.bold", token_LPARE = "paren.lparen", token_RPARE = "paren.rparen"; var const_FUNCTIONS, const_KEYWORDS, const_CONST, const_TAGS; (function(){ const_FUNCTIONS = lang.arrayToMap( ("log").split("|") ); const_CONST = lang.arrayToMap( (":dualbind|:bind|:import|slot|event|style|html|markdown|md").split("|") ); const_KEYWORDS = lang.arrayToMap( ("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import").split("|") ); const_TAGS = lang.arrayToMap( ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|") ); }()); function MaskHighlightRules () { this.$rules = { "start" : [ Token("comment", "\\/\\/.*$"), Token("comment", "\\/\\*", [ Token("comment", ".*?\\*\\/", "start"), Token("comment", ".+") ]), Blocks.string("'''"), Blocks.string('"""'), Blocks.string('"'), Blocks.string("'"), Blocks.syntax(/(markdown|md)\b/, "md-multiline", "multiline"), Blocks.syntax(/html\b/, "html-multiline", "multiline"), Blocks.syntax(/(slot|event)\b/, "js-block", "block"), Blocks.syntax(/style\b/, "css-block", "block"), Blocks.syntax(/var\b/, "js-statement", "attr"), Blocks.tag(), Token(token_LPARE, "[[({>]"), Token(token_RPARE, "[\\])};]", "start"), { caseInsensitive: true } ] }; var rules = this; addJavaScript("interpolation", /\]/, token_RPARE + "." + token_ITALIC); addJavaScript("statement", /\)|}|;/); addJavaScript("block", /\}/); addCss(); addMarkdown(); addHtml(); function addJavaScript(name, escape, closeType) { var prfx = "js-" + name + "-", rootTokens = name === "block" ? ["start"] : ["start", "no_regex"]; add( JSRules , prfx , escape , rootTokens , closeType ); } function addCss() { add(CssRules, "css-block-", /\}/); } function addMarkdown() { add(MDRules, "md-multiline-", /("""|''')/, []); } function addHtml() { add(HTMLRules, "html-multiline-", /("""|''')/); } function add(Rules, strPrfx, rgxEnd, rootTokens, closeType) { var next = "pop"; var tokens = rootTokens || [ "start" ]; if (tokens.length === 0) { tokens = null; } if (/block|multiline/.test(strPrfx)) { next = strPrfx + "end"; rules.$rules[next] = [ Token("empty", "", "start") ]; } rules.embedRules( Rules , strPrfx , [ Token(closeType || token_RPARE, rgxEnd, next) ] , tokens , tokens == null ? true : false ); } this.normalizeRules(); } oop.inherits(MaskHighlightRules, TextRules); var Blocks = { string: function(str, next){ var token = Token( "string.start" , str , [ Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()), Token("string.end", str, "pop"), { defaultToken: "string" } ] , next ); if (str.length === 1){ var escaped = Token("string.escape", "\\\\" + str); token.push.unshift(escaped); } return token; }, interpolation: function(){ return [ Token(token_UTIL, /\s*\w*\s*:/), "js-interpolation-start" ]; }, tagHead: function (rgx) { return Token(token_ATTR, rgx, [ Token(token_ATTR, /[\w\-_]+/), Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()), Blocks.goUp() ]); }, tag: function () { return { token: 'tag', onMatch : function(value) { if (void 0 !== const_KEYWORDS[value]) return token_KEYWORD; if (void 0 !== const_CONST[value]) return token_LANG; if (void 0 !== const_FUNCTIONS[value]) return "support.function"; if (void 0 !== const_TAGS[value.toLowerCase()]) return token_TAG; return token_COMPO; }, regex : /([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/, push: [ Blocks.tagHead(/\./) , Blocks.tagHead(/\#/) , Blocks.expression(), Blocks.attribute(), Token(token_LPARE, /[;>{]/, "pop") ] }; }, syntax: function(rgx, next, type){ return { token: token_LANG, regex : rgx, push: ({ "attr": [ next + "-start", Token(token_PUNKT, /;/, "start") ], "multiline": [ Blocks.tagHead(/\./) , Blocks.tagHead(/\#/) , Blocks.attribute(), Blocks.expression(), Token(token_LPARE, /[>\{]/), Token(token_PUNKT, /;/, "start"), Token(token_LPARE, /'''|"""/, [ next + "-start" ]) ], "block": [ Blocks.tagHead(/\./) , Blocks.tagHead(/\#/) , Blocks.attribute(), Blocks.expression(), Token(token_LPARE, /\{/, [ next + "-start" ]) ] })[type] }; }, attribute: function(){ return Token(function(value){ return /^x\-/.test(value) ? token_ATTR + "." + token_BOLD : token_ATTR; }, /[\w_-]+/, [ Token(token_PUNKT, /\s*=\s*/, [ Blocks.string('"'), Blocks.string("'"), Blocks.word(), Blocks.goUp() ]), Blocks.goUp() ]); }, expression: function(){ return Token(token_LPARE, /\(/, [ "js-statement-start" ]); }, word: function(){ return Token("string", /[\w-_]+/); }, goUp: function(){ return Token("text", "", "pop"); }, goStart: function(){ return Token("text", "", "start"); } }; function Token(token, rgx, mix) { var push, next, onMatch; if (arguments.length === 4) { push = mix; next = arguments[3]; } else if (typeof mix === "string") { next = mix; } else { push = mix; } if (typeof token === "function") { onMatch = token; token = "empty"; } return { token: token, regex: rgx, push: push, next: next, onMatch: onMatch }; } }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var MaskHighlightRules = require("./mask_highlight_rules").MaskHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = MaskHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/mask"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-scss.js0000644000076400007640000011063612554155240023134 0ustar pravipravidefine("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ScssHighlightRules = function() { var properties = lang.arrayToMap( (function () { var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + "background-size|binding|border-bottom-colors|border-left-colors|" + "border-right-colors|border-top-colors|border-end|border-end-color|" + "border-end-style|border-end-width|border-image|border-start|" + "border-start-color|border-start-style|border-start-width|box-align|" + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + "font-feature-settings|font-language-override|force-broken-image-icon|" + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + "outline-offset|outline-radius|outline-radius-bottomleft|" + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + "text-decoration-style|transform|transform-origin|transition|" + "transition-delay|transition-duration|transition-property|" + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + "window-shadow|border-radius").split("|"); var properties = ("azimuth|background-attachment|background-color|background-image|" + "background-position|background-repeat|background|border-bottom-color|" + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + "border-color|border-left-color|border-left-style|border-left-width|" + "border-left|border-right-color|border-right-style|border-right-width|" + "border-right|border-spacing|border-style|border-top-color|" + "border-top-style|border-top-width|border-top|border-width|border|bottom|" + "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + "letter-spacing|line-height|list-style-image|list-style-position|" + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + "min-width|opacity|orphans|outline-color|" + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + "padding-left|padding-right|padding-top|padding|page-break-after|" + "page-break-before|page-break-inside|page|pause-after|pause-before|" + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + "stress|table-layout|text-align|text-decoration|text-indent|" + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + "z-index").split("|"); var ret = []; for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" }, { caseInsensitive: true } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { token : "string", regex : '.+' } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { token : "string", regex : '.+' } ] }; }; oop.inherits(ScssHighlightRules, TextHighlightRules); exports.ScssHighlightRules = ScssHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = ScssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/scss"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-html.js0000644000076400007640000027321212554155240023125 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-textarea.js0000644000076400007640000004440412554155240023651 0ustar pravipravidefine("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; exports.cssClass = "ace-tm"; exports.cssText = ".ace-tm .ace_gutter {\ background: #f0f0f0;\ color: #333;\ }\ .ace-tm .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-tm .ace_fold {\ background-color: #6B72E6;\ }\ .ace-tm {\ background-color: #FFFFFF;\ color: black;\ }\ .ace-tm .ace_cursor {\ color: black;\ }\ .ace-tm .ace_invisible {\ color: rgb(191, 191, 191);\ }\ .ace-tm .ace_storage,\ .ace-tm .ace_keyword {\ color: blue;\ }\ .ace-tm .ace_constant {\ color: rgb(197, 6, 11);\ }\ .ace-tm .ace_constant.ace_buildin {\ color: rgb(88, 72, 246);\ }\ .ace-tm .ace_constant.ace_language {\ color: rgb(88, 92, 246);\ }\ .ace-tm .ace_constant.ace_library {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_invalid {\ background-color: rgba(255, 0, 0, 0.1);\ color: red;\ }\ .ace-tm .ace_support.ace_function {\ color: rgb(60, 76, 114);\ }\ .ace-tm .ace_support.ace_constant {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_support.ace_type,\ .ace-tm .ace_support.ace_class {\ color: rgb(109, 121, 222);\ }\ .ace-tm .ace_keyword.ace_operator {\ color: rgb(104, 118, 135);\ }\ .ace-tm .ace_string {\ color: rgb(3, 106, 7);\ }\ .ace-tm .ace_comment {\ color: rgb(76, 136, 107);\ }\ .ace-tm .ace_comment.ace_doc {\ color: rgb(0, 102, 255);\ }\ .ace-tm .ace_comment.ace_doc.ace_tag {\ color: rgb(128, 159, 191);\ }\ .ace-tm .ace_constant.ace_numeric {\ color: rgb(0, 0, 205);\ }\ .ace-tm .ace_variable {\ color: rgb(49, 132, 149);\ }\ .ace-tm .ace_xml-pe {\ color: rgb(104, 104, 91);\ }\ .ace-tm .ace_entity.ace_name.ace_function {\ color: #0000A2;\ }\ .ace-tm .ace_heading {\ color: rgb(12, 7, 255);\ }\ .ace-tm .ace_list {\ color:rgb(185, 6, 144);\ }\ .ace-tm .ace_meta.ace_tag {\ color:rgb(0, 22, 142);\ }\ .ace-tm .ace_string.ace_regex {\ color: rgb(255, 0, 0)\ }\ .ace-tm .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-tm.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px white;\ border-radius: 2px;\ }\ .ace-tm .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-tm .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-tm .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-tm .ace_marker-layer .ace_active-line {\ background: rgba(0, 0, 0, 0.07);\ }\ .ace-tm .ace_gutter-active-line {\ background-color : #dcdcdc;\ }\ .ace-tm .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-tm .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var dom = require("./lib/dom"); var event = require("./lib/event"); var Editor = require("./editor").Editor; var EditSession = require("./edit_session").EditSession; var UndoManager = require("./undomanager").UndoManager; var Renderer = require("./virtual_renderer").VirtualRenderer; require("./worker/worker_client"); require("./keyboard/hash_handler"); require("./placeholder"); require("./multi_select"); require("./mode/folding/fold_mode"); require("./theme/textmate"); require("./ext/error_marker"); exports.config = require("./config"); exports.require = require; exports.edit = function(el) { if (typeof(el) == "string") { var _id = el; el = document.getElementById(_id); if (!el) throw new Error("ace.edit can't find div #" + _id); } if (el && el.env && el.env.editor instanceof Editor) return el.env.editor; var value = ""; if (el && /input|textarea/i.test(el.tagName)) { var oldNode = el; value = oldNode.value; el = dom.createElement("pre"); oldNode.parentNode.replaceChild(el, oldNode); } else { value = dom.getInnerText(el); el.innerHTML = ''; } var doc = exports.createEditSession(value); var editor = new Editor(new Renderer(el)); editor.setSession(doc); var env = { document: doc, editor: editor, onResize: editor.resize.bind(editor, null) }; if (oldNode) env.textarea = oldNode; event.addListener(window, "resize", env.onResize); editor.on("destroy", function() { event.removeListener(window, "resize", env.onResize); env.editor.container.env = null; // prevent memory leak on old ie }); editor.container.env = editor.env = env; return editor; }; exports.createEditSession = function(text, mode) { var doc = new EditSession(text, mode); doc.setUndoManager(new UndoManager()); return doc; } exports.EditSession = EditSession; exports.UndoManager = UndoManager; }); define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); var UA = require("../lib/useragent"); var net = require("../lib/net"); var ace = require("../ace"); require("../theme/textmate"); module.exports = exports = ace; var getCSSProperty = function(element, container, property) { var ret = element.style[property]; if (!ret) { if (window.getComputedStyle) { ret = window.getComputedStyle(element, '').getPropertyValue(property); } else { ret = element.currentStyle[property]; } } if (!ret || ret == 'auto' || ret == 'intrinsic') { ret = container.style[property]; } return ret; }; function applyStyles(elm, styles) { for (var style in styles) { elm.style[style] = styles[style]; } } function setupContainer(element, getValue) { if (element.type != 'textarea') { throw new Error("Textarea required!"); } var parentNode = element.parentNode; var container = document.createElement('div'); var resizeEvent = function() { var style = 'position:relative;'; [ 'margin-top', 'margin-left', 'margin-right', 'margin-bottom' ].forEach(function(item) { style += item + ':' + getCSSProperty(element, container, item) + ';'; }); var width = getCSSProperty(element, container, 'width') || (element.clientWidth + "px"); var height = getCSSProperty(element, container, 'height') || (element.clientHeight + "px"); style += 'height:' + height + ';width:' + width + ';'; style += 'display:inline-block;'; container.setAttribute('style', style); }; event.addListener(window, 'resize', resizeEvent); resizeEvent(); parentNode.insertBefore(container, element.nextSibling); while (parentNode !== document) { if (parentNode.tagName.toUpperCase() === 'FORM') { var oldSumit = parentNode.onsubmit; parentNode.onsubmit = function(evt) { element.value = getValue(); if (oldSumit) { oldSumit.call(this, evt); } }; break; } parentNode = parentNode.parentNode; } return container; } exports.transformTextarea = function(element, options) { var session; var container = setupContainer(element, function() { return session.getValue(); }); element.style.display = 'none'; container.style.background = 'white'; var editorDiv = document.createElement("div"); applyStyles(editorDiv, { top: "0px", left: "0px", right: "0px", bottom: "0px", border: "1px solid gray", position: "absolute" }); container.appendChild(editorDiv); var settingOpener = document.createElement("div"); applyStyles(settingOpener, { position: "absolute", right: "0px", bottom: "0px", background: "red", cursor: "nw-resize", borderStyle: "solid", borderWidth: "9px 8px 10px 9px", width: "2px", borderColor: "lightblue gray gray lightblue", zIndex: 101 }); var settingDiv = document.createElement("div"); var settingDivStyles = { top: "0px", left: "20%", right: "0px", bottom: "0px", position: "absolute", padding: "5px", zIndex: 100, color: "white", display: "none", overflow: "auto", fontSize: "14px", boxShadow: "-5px 2px 3px gray" }; if (!UA.isOldIE) { settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)"; } else { settingDivStyles.backgroundColor = "#333"; } applyStyles(settingDiv, settingDivStyles); container.appendChild(settingDiv); options = options || exports.defaultOptions; var editor = ace.edit(editorDiv); session = editor.getSession(); session.setValue(element.value || element.innerHTML); editor.focus(); container.appendChild(settingOpener); setupApi(editor, editorDiv, settingDiv, ace, options, load); setupSettingPanel(settingDiv, settingOpener, editor); var state = ""; event.addListener(settingOpener, "mousemove", function(e) { var rect = this.getBoundingClientRect(); var x = e.clientX - rect.left, y = e.clientY - rect.top; if (x + y < (rect.width + rect.height)/2) { this.style.cursor = "pointer"; state = "toggle"; } else { state = "resize"; this.style.cursor = "nw-resize"; } }); event.addListener(settingOpener, "mousedown", function(e) { if (state == "toggle") { editor.setDisplaySettings(); return; } container.style.zIndex = 100000; var rect = container.getBoundingClientRect(); var startX = rect.width + rect.left - e.clientX; var startY = rect.height + rect.top - e.clientY; event.capture(settingOpener, function(e) { container.style.width = e.clientX - rect.left + startX + "px"; container.style.height = e.clientY - rect.top + startY + "px"; editor.resize(); }, function() {}); }); return editor; }; function load(url, module, callback) { net.loadScript(url, function() { require([module], callback); }); } function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { var session = editor.getSession(); var renderer = editor.renderer; loader = loader || load; function toBool(value) { return value === "true" || value == true; } editor.setDisplaySettings = function(display) { if (display == null) display = settingDiv.style.display == "none"; if (display) { settingDiv.style.display = "block"; settingDiv.hideButton.focus(); editor.on("focus", function onFocus() { editor.removeListener("focus", onFocus); settingDiv.style.display = "none"; }); } else { editor.focus(); } }; editor.$setOption = editor.setOption; editor.$getOption = editor.getOption; editor.setOption = function(key, value) { switch (key) { case "mode": editor.$setOption("mode", "ace/mode/" + value) break; case "theme": editor.$setOption("theme", "ace/theme/" + value) break; case "keybindings": switch (value) { case "vim": editor.setKeyboardHandler("ace/keyboard/vim"); break; case "emacs": editor.setKeyboardHandler("ace/keyboard/emacs"); break; default: editor.setKeyboardHandler(null); } break; case "softWrap": case "fontSize": editor.$setOption(key, value); break; default: editor.$setOption(key, toBool(value)); } }; editor.getOption = function(key) { switch (key) { case "mode": return editor.$getOption("mode").substr("ace/mode/".length) break; case "theme": return editor.$getOption("theme").substr("ace/theme/".length) break; case "keybindings": var value = editor.getKeyboardHandler() switch (value && value.$id) { case "ace/keyboard/vim": return "vim"; case "ace/keyboard/emacs": return "emacs"; default: return "ace"; } break; default: return editor.$getOption(key); } }; editor.setOptions(options); return editor; } function setupSettingPanel(settingDiv, settingOpener, editor) { var BOOL = null; var desc = { mode: "Mode:", wrap: "Soft Wrap:", theme: "Theme:", fontSize: "Font Size:", showGutter: "Display Gutter:", keybindings: "Keyboard", showPrintMargin: "Show Print Margin:", useSoftTabs: "Use Soft Tabs:", showInvisibles: "Show Invisibles" }; var optionValues = { mode: { text: "Plain", javascript: "JavaScript", xml: "XML", html: "HTML", css: "CSS", scss: "SCSS", python: "Python", php: "PHP", java: "Java", ruby: "Ruby", c_cpp: "C/C++", coffee: "CoffeeScript", json: "json", perl: "Perl", clojure: "Clojure", ocaml: "OCaml", csharp: "C#", haxe: "haXe", svg: "SVG", textile: "Textile", groovy: "Groovy", liquid: "Liquid", Scala: "Scala" }, theme: { clouds: "Clouds", clouds_midnight: "Clouds Midnight", cobalt: "Cobalt", crimson_editor: "Crimson Editor", dawn: "Dawn", eclipse: "Eclipse", idle_fingers: "Idle Fingers", kr_theme: "Kr Theme", merbivore: "Merbivore", merbivore_soft: "Merbivore Soft", mono_industrial: "Mono Industrial", monokai: "Monokai", pastel_on_dark: "Pastel On Dark", solarized_dark: "Solarized Dark", solarized_light: "Solarized Light", textmate: "Textmate", twilight: "Twilight", vibrant_ink: "Vibrant Ink" }, showGutter: BOOL, fontSize: { "10px": "10px", "11px": "11px", "12px": "12px", "14px": "14px", "16px": "16px" }, wrap: { off: "Off", 40: "40", 80: "80", free: "Free" }, keybindings: { ace: "ace", vim: "vim", emacs: "emacs" }, showPrintMargin: BOOL, useSoftTabs: BOOL, showInvisibles: BOOL }; var table = []; table.push(""); function renderOption(builder, option, obj, cValue) { if (!obj) { builder.push( "" ); return; } builder.push(""); } for (var option in exports.defaultOptions) { table.push(""); table.push(""); } table.push("
    SettingValue
    ", desc[option], ""); renderOption(table, option, optionValues[option], editor.getOption(option)); table.push("
    "); settingDiv.innerHTML = table.join(""); var onChange = function(e) { var select = e.currentTarget; editor.setOption(select.title, select.value); }; var onClick = function(e) { var cb = e.currentTarget; editor.setOption(cb.title, cb.checked); }; var selects = settingDiv.getElementsByTagName("select"); for (var i = 0; i < selects.length; i++) selects[i].onchange = onChange; var cbs = settingDiv.getElementsByTagName("input"); for (var i = 0; i < cbs.length; i++) cbs[i].onclick = onClick; var button = document.createElement("input"); button.type = "button"; button.value = "Hide"; event.addListener(button, "click", function() { editor.setDisplaySettings(false); }); settingDiv.appendChild(button); settingDiv.hideButton = button; } exports.defaultOptions = { mode: "javascript", theme: "textmate", wrap: "off", fontSize: "12px", showGutter: "false", keybindings: "ace", showPrintMargin: "false", useSoftTabs: "true", showInvisibles: "false" }; }); (function() { window.require(["ace/ext/textarea"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-jsoniq.js0000644000076400007640000123306512554155240023467 0ustar pravipravidefine("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) { module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 ? JSONiqTokenizer.TOKEN[o] : null; }; this.getExpectedTokenSet = function(e) { var expected; if (e.getExpected() < 0) { expected = JSONiqTokenizer.getTokenSet(- e.getState()); } else { expected = [JSONiqTokenizer.TOKEN[e.getExpected()]]; } return expected; }; this.getErrorMessage = function(e) { var tokenSet = this.getExpectedTokenSet(e); var found = this.getOffendingToken(e); var prefix = input.substring(0, e.getBegin()); var lines = prefix.split("\n"); var line = lines.length; var column = lines[line - 1].length + 1; var size = e.getEnd() - e.getBegin(); return e.getMessage() + (found == null ? "" : ", found " + found) + "\nwhile expecting " + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + "\n" + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + "at line " + line + ", column " + column + ":\n..." + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + "..."; }; this.parse_start = function() { eventHandler.startNonterminal("start", e0); lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | switch (l1) { case 58: // '' | '=' | '>' switch (l1) { case 61: // '>' shift(61); // '>' break; case 53: // '/>' shift(53); // '/>' break; case 29: // QName shift(29); // QName break; case 60: // '=' shift(60); // '=' break; case 37: // '"' shift(37); // '"' break; case 41: // "'" shift(41); // "'" break; default: shift(35); // EOF } eventHandler.endNonterminal("StartTag", e0); }; this.parse_TagContent = function() { eventHandler.startNonterminal("TagContent", e0); lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | switch (l1) { case 25: // ElementContentChar shift(25); // ElementContentChar break; case 9: // Tag shift(9); // Tag break; case 10: // EndTag shift(10); // EndTag break; case 58: // '' switch (l1) { case 14: // CDataSectionContents shift(14); // CDataSectionContents break; case 67: // ']]>' shift(67); // ']]>' break; default: shift(35); // EOF } eventHandler.endNonterminal("CData", e0); }; this.parse_XMLComment = function() { eventHandler.startNonterminal("XMLComment", e0); lookahead1(0); // DirCommentContents | EOF | '-->' switch (l1) { case 12: // DirCommentContents shift(12); // DirCommentContents break; case 50: // '-->' shift(50); // '-->' break; default: shift(35); // EOF } eventHandler.endNonterminal("XMLComment", e0); }; this.parse_PI = function() { eventHandler.startNonterminal("PI", e0); lookahead1(3); // DirPIContents | EOF | '?' | '?>' switch (l1) { case 13: // DirPIContents shift(13); // DirPIContents break; case 62: // '?' shift(62); // '?' break; case 63: // '?>' shift(63); // '?>' break; default: shift(35); // EOF } eventHandler.endNonterminal("PI", e0); }; this.parse_Pragma = function() { eventHandler.startNonterminal("Pragma", e0); lookahead1(2); // PragmaContents | EOF | '#' | '#)' switch (l1) { case 11: // PragmaContents shift(11); // PragmaContents break; case 38: // '#' shift(38); // '#' break; case 39: // '#)' shift(39); // '#)' break; default: shift(35); // EOF } eventHandler.endNonterminal("Pragma", e0); }; this.parse_Comment = function() { eventHandler.startNonterminal("Comment", e0); lookahead1(4); // CommentContents | EOF | '(:' | ':)' switch (l1) { case 55: // ':)' shift(55); // ':)' break; case 44: // '(:' shift(44); // '(:' break; case 32: // CommentContents shift(32); // CommentContents break; default: shift(35); // EOF } eventHandler.endNonterminal("Comment", e0); }; this.parse_CommentDoc = function() { eventHandler.startNonterminal("CommentDoc", e0); lookahead1(6); // DocTag | DocCommentContents | EOF | '(:' | ':)' switch (l1) { case 33: // DocTag shift(33); // DocTag break; case 34: // DocCommentContents shift(34); // DocCommentContents break; case 55: // ':)' shift(55); // ':)' break; case 44: // '(:' shift(44); // '(:' break; default: shift(35); // EOF } eventHandler.endNonterminal("CommentDoc", e0); }; this.parse_QuotString = function() { eventHandler.startNonterminal("QuotString", e0); lookahead1(5); // JSONChar | JSONCharRef | JSONPredefinedCharRef | EOF | '"' switch (l1) { case 3: // JSONPredefinedCharRef shift(3); // JSONPredefinedCharRef break; case 2: // JSONCharRef shift(2); // JSONCharRef break; case 1: // JSONChar shift(1); // JSONChar break; case 37: // '"' shift(37); // '"' break; default: shift(35); // EOF } eventHandler.endNonterminal("QuotString", e0); }; this.parse_AposString = function() { eventHandler.startNonterminal("AposString", e0); lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" switch (l1) { case 21: // PredefinedEntityRef shift(21); // PredefinedEntityRef break; case 31: // CharRef shift(31); // CharRef break; case 23: // EscapeApos shift(23); // EscapeApos break; case 24: // AposChar shift(24); // AposChar break; case 41: // "'" shift(41); // "'" break; default: shift(35); // EOF } eventHandler.endNonterminal("AposString", e0); }; this.parse_Prefix = function() { eventHandler.startNonterminal("Prefix", e0); lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | whitespace(); parse_NCName(); eventHandler.endNonterminal("Prefix", e0); }; this.parse__EQName = function() { eventHandler.startNonterminal("_EQName", e0); lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | whitespace(); parse_EQName(); eventHandler.endNonterminal("_EQName", e0); }; function parse_EQName() { eventHandler.startNonterminal("EQName", e0); switch (l1) { case 80: // 'attribute' shift(80); // 'attribute' break; case 94: // 'comment' shift(94); // 'comment' break; case 118: // 'document-node' shift(118); // 'document-node' break; case 119: // 'element' shift(119); // 'element' break; case 122: // 'empty-sequence' shift(122); // 'empty-sequence' break; case 143: // 'function' shift(143); // 'function' break; case 150: // 'if' shift(150); // 'if' break; case 163: // 'item' shift(163); // 'item' break; case 183: // 'namespace-node' shift(183); // 'namespace-node' break; case 189: // 'node' shift(189); // 'node' break; case 214: // 'processing-instruction' shift(214); // 'processing-instruction' break; case 224: // 'schema-attribute' shift(224); // 'schema-attribute' break; case 225: // 'schema-element' shift(225); // 'schema-element' break; case 241: // 'switch' shift(241); // 'switch' break; case 242: // 'text' shift(242); // 'text' break; case 251: // 'typeswitch' shift(251); // 'typeswitch' break; default: parse_FunctionName(); } eventHandler.endNonterminal("EQName", e0); } function parse_FunctionName() { eventHandler.startNonterminal("FunctionName", e0); switch (l1) { case 17: // EQName^Token shift(17); // EQName^Token break; case 68: // 'after' shift(68); // 'after' break; case 71: // 'ancestor' shift(71); // 'ancestor' break; case 72: // 'ancestor-or-self' shift(72); // 'ancestor-or-self' break; case 73: // 'and' shift(73); // 'and' break; case 77: // 'as' shift(77); // 'as' break; case 78: // 'ascending' shift(78); // 'ascending' break; case 82: // 'before' shift(82); // 'before' break; case 86: // 'case' shift(86); // 'case' break; case 87: // 'cast' shift(87); // 'cast' break; case 88: // 'castable' shift(88); // 'castable' break; case 91: // 'child' shift(91); // 'child' break; case 92: // 'collation' shift(92); // 'collation' break; case 101: // 'copy' shift(101); // 'copy' break; case 103: // 'count' shift(103); // 'count' break; case 106: // 'declare' shift(106); // 'declare' break; case 107: // 'default' shift(107); // 'default' break; case 108: // 'delete' shift(108); // 'delete' break; case 109: // 'descendant' shift(109); // 'descendant' break; case 110: // 'descendant-or-self' shift(110); // 'descendant-or-self' break; case 111: // 'descending' shift(111); // 'descending' break; case 116: // 'div' shift(116); // 'div' break; case 117: // 'document' shift(117); // 'document' break; case 120: // 'else' shift(120); // 'else' break; case 121: // 'empty' shift(121); // 'empty' break; case 124: // 'end' shift(124); // 'end' break; case 126: // 'eq' shift(126); // 'eq' break; case 127: // 'every' shift(127); // 'every' break; case 129: // 'except' shift(129); // 'except' break; case 132: // 'first' shift(132); // 'first' break; case 133: // 'following' shift(133); // 'following' break; case 134: // 'following-sibling' shift(134); // 'following-sibling' break; case 135: // 'for' shift(135); // 'for' break; case 144: // 'ge' shift(144); // 'ge' break; case 146: // 'group' shift(146); // 'group' break; case 148: // 'gt' shift(148); // 'gt' break; case 149: // 'idiv' shift(149); // 'idiv' break; case 151: // 'import' shift(151); // 'import' break; case 157: // 'insert' shift(157); // 'insert' break; case 158: // 'instance' shift(158); // 'instance' break; case 160: // 'intersect' shift(160); // 'intersect' break; case 161: // 'into' shift(161); // 'into' break; case 162: // 'is' shift(162); // 'is' break; case 168: // 'last' shift(168); // 'last' break; case 170: // 'le' shift(170); // 'le' break; case 172: // 'let' shift(172); // 'let' break; case 176: // 'lt' shift(176); // 'lt' break; case 178: // 'mod' shift(178); // 'mod' break; case 179: // 'modify' shift(179); // 'modify' break; case 180: // 'module' shift(180); // 'module' break; case 182: // 'namespace' shift(182); // 'namespace' break; case 184: // 'ne' shift(184); // 'ne' break; case 196: // 'only' shift(196); // 'only' break; case 198: // 'or' shift(198); // 'or' break; case 199: // 'order' shift(199); // 'order' break; case 200: // 'ordered' shift(200); // 'ordered' break; case 204: // 'parent' shift(204); // 'parent' break; case 210: // 'preceding' shift(210); // 'preceding' break; case 211: // 'preceding-sibling' shift(211); // 'preceding-sibling' break; case 216: // 'rename' shift(216); // 'rename' break; case 217: // 'replace' shift(217); // 'replace' break; case 218: // 'return' shift(218); // 'return' break; case 222: // 'satisfies' shift(222); // 'satisfies' break; case 227: // 'self' shift(227); // 'self' break; case 233: // 'some' shift(233); // 'some' break; case 234: // 'stable' shift(234); // 'stable' break; case 235: // 'start' shift(235); // 'start' break; case 246: // 'to' shift(246); // 'to' break; case 247: // 'treat' shift(247); // 'treat' break; case 248: // 'try' shift(248); // 'try' break; case 252: // 'union' shift(252); // 'union' break; case 254: // 'unordered' shift(254); // 'unordered' break; case 258: // 'validate' shift(258); // 'validate' break; case 264: // 'where' shift(264); // 'where' break; case 268: // 'with' shift(268); // 'with' break; case 272: // 'xquery' shift(272); // 'xquery' break; case 70: // 'allowing' shift(70); // 'allowing' break; case 79: // 'at' shift(79); // 'at' break; case 81: // 'base-uri' shift(81); // 'base-uri' break; case 83: // 'boundary-space' shift(83); // 'boundary-space' break; case 84: // 'break' shift(84); // 'break' break; case 89: // 'catch' shift(89); // 'catch' break; case 96: // 'construction' shift(96); // 'construction' break; case 99: // 'context' shift(99); // 'context' break; case 100: // 'continue' shift(100); // 'continue' break; case 102: // 'copy-namespaces' shift(102); // 'copy-namespaces' break; case 104: // 'decimal-format' shift(104); // 'decimal-format' break; case 123: // 'encoding' shift(123); // 'encoding' break; case 130: // 'exit' shift(130); // 'exit' break; case 131: // 'external' shift(131); // 'external' break; case 139: // 'ft-option' shift(139); // 'ft-option' break; case 152: // 'in' shift(152); // 'in' break; case 153: // 'index' shift(153); // 'index' break; case 159: // 'integrity' shift(159); // 'integrity' break; case 169: // 'lax' shift(169); // 'lax' break; case 190: // 'nodes' shift(190); // 'nodes' break; case 197: // 'option' shift(197); // 'option' break; case 201: // 'ordering' shift(201); // 'ordering' break; case 220: // 'revalidation' shift(220); // 'revalidation' break; case 223: // 'schema' shift(223); // 'schema' break; case 226: // 'score' shift(226); // 'score' break; case 232: // 'sliding' shift(232); // 'sliding' break; case 238: // 'strict' shift(238); // 'strict' break; case 249: // 'tumbling' shift(249); // 'tumbling' break; case 250: // 'type' shift(250); // 'type' break; case 255: // 'updating' shift(255); // 'updating' break; case 259: // 'value' shift(259); // 'value' break; case 260: // 'variable' shift(260); // 'variable' break; case 261: // 'version' shift(261); // 'version' break; case 265: // 'while' shift(265); // 'while' break; case 95: // 'constraint' shift(95); // 'constraint' break; case 174: // 'loop' shift(174); // 'loop' break; default: shift(219); // 'returning' } eventHandler.endNonterminal("FunctionName", e0); } function parse_NCName() { eventHandler.startNonterminal("NCName", e0); switch (l1) { case 28: // NCName^Token shift(28); // NCName^Token break; case 68: // 'after' shift(68); // 'after' break; case 73: // 'and' shift(73); // 'and' break; case 77: // 'as' shift(77); // 'as' break; case 78: // 'ascending' shift(78); // 'ascending' break; case 82: // 'before' shift(82); // 'before' break; case 86: // 'case' shift(86); // 'case' break; case 87: // 'cast' shift(87); // 'cast' break; case 88: // 'castable' shift(88); // 'castable' break; case 92: // 'collation' shift(92); // 'collation' break; case 103: // 'count' shift(103); // 'count' break; case 107: // 'default' shift(107); // 'default' break; case 111: // 'descending' shift(111); // 'descending' break; case 116: // 'div' shift(116); // 'div' break; case 120: // 'else' shift(120); // 'else' break; case 121: // 'empty' shift(121); // 'empty' break; case 124: // 'end' shift(124); // 'end' break; case 126: // 'eq' shift(126); // 'eq' break; case 129: // 'except' shift(129); // 'except' break; case 135: // 'for' shift(135); // 'for' break; case 144: // 'ge' shift(144); // 'ge' break; case 146: // 'group' shift(146); // 'group' break; case 148: // 'gt' shift(148); // 'gt' break; case 149: // 'idiv' shift(149); // 'idiv' break; case 158: // 'instance' shift(158); // 'instance' break; case 160: // 'intersect' shift(160); // 'intersect' break; case 161: // 'into' shift(161); // 'into' break; case 162: // 'is' shift(162); // 'is' break; case 170: // 'le' shift(170); // 'le' break; case 172: // 'let' shift(172); // 'let' break; case 176: // 'lt' shift(176); // 'lt' break; case 178: // 'mod' shift(178); // 'mod' break; case 179: // 'modify' shift(179); // 'modify' break; case 184: // 'ne' shift(184); // 'ne' break; case 196: // 'only' shift(196); // 'only' break; case 198: // 'or' shift(198); // 'or' break; case 199: // 'order' shift(199); // 'order' break; case 218: // 'return' shift(218); // 'return' break; case 222: // 'satisfies' shift(222); // 'satisfies' break; case 234: // 'stable' shift(234); // 'stable' break; case 235: // 'start' shift(235); // 'start' break; case 246: // 'to' shift(246); // 'to' break; case 247: // 'treat' shift(247); // 'treat' break; case 252: // 'union' shift(252); // 'union' break; case 264: // 'where' shift(264); // 'where' break; case 268: // 'with' shift(268); // 'with' break; case 71: // 'ancestor' shift(71); // 'ancestor' break; case 72: // 'ancestor-or-self' shift(72); // 'ancestor-or-self' break; case 80: // 'attribute' shift(80); // 'attribute' break; case 91: // 'child' shift(91); // 'child' break; case 94: // 'comment' shift(94); // 'comment' break; case 101: // 'copy' shift(101); // 'copy' break; case 106: // 'declare' shift(106); // 'declare' break; case 108: // 'delete' shift(108); // 'delete' break; case 109: // 'descendant' shift(109); // 'descendant' break; case 110: // 'descendant-or-self' shift(110); // 'descendant-or-self' break; case 117: // 'document' shift(117); // 'document' break; case 118: // 'document-node' shift(118); // 'document-node' break; case 119: // 'element' shift(119); // 'element' break; case 122: // 'empty-sequence' shift(122); // 'empty-sequence' break; case 127: // 'every' shift(127); // 'every' break; case 132: // 'first' shift(132); // 'first' break; case 133: // 'following' shift(133); // 'following' break; case 134: // 'following-sibling' shift(134); // 'following-sibling' break; case 143: // 'function' shift(143); // 'function' break; case 150: // 'if' shift(150); // 'if' break; case 151: // 'import' shift(151); // 'import' break; case 157: // 'insert' shift(157); // 'insert' break; case 163: // 'item' shift(163); // 'item' break; case 168: // 'last' shift(168); // 'last' break; case 180: // 'module' shift(180); // 'module' break; case 182: // 'namespace' shift(182); // 'namespace' break; case 183: // 'namespace-node' shift(183); // 'namespace-node' break; case 189: // 'node' shift(189); // 'node' break; case 200: // 'ordered' shift(200); // 'ordered' break; case 204: // 'parent' shift(204); // 'parent' break; case 210: // 'preceding' shift(210); // 'preceding' break; case 211: // 'preceding-sibling' shift(211); // 'preceding-sibling' break; case 214: // 'processing-instruction' shift(214); // 'processing-instruction' break; case 216: // 'rename' shift(216); // 'rename' break; case 217: // 'replace' shift(217); // 'replace' break; case 224: // 'schema-attribute' shift(224); // 'schema-attribute' break; case 225: // 'schema-element' shift(225); // 'schema-element' break; case 227: // 'self' shift(227); // 'self' break; case 233: // 'some' shift(233); // 'some' break; case 241: // 'switch' shift(241); // 'switch' break; case 242: // 'text' shift(242); // 'text' break; case 248: // 'try' shift(248); // 'try' break; case 251: // 'typeswitch' shift(251); // 'typeswitch' break; case 254: // 'unordered' shift(254); // 'unordered' break; case 258: // 'validate' shift(258); // 'validate' break; case 260: // 'variable' shift(260); // 'variable' break; case 272: // 'xquery' shift(272); // 'xquery' break; case 70: // 'allowing' shift(70); // 'allowing' break; case 79: // 'at' shift(79); // 'at' break; case 81: // 'base-uri' shift(81); // 'base-uri' break; case 83: // 'boundary-space' shift(83); // 'boundary-space' break; case 84: // 'break' shift(84); // 'break' break; case 89: // 'catch' shift(89); // 'catch' break; case 96: // 'construction' shift(96); // 'construction' break; case 99: // 'context' shift(99); // 'context' break; case 100: // 'continue' shift(100); // 'continue' break; case 102: // 'copy-namespaces' shift(102); // 'copy-namespaces' break; case 104: // 'decimal-format' shift(104); // 'decimal-format' break; case 123: // 'encoding' shift(123); // 'encoding' break; case 130: // 'exit' shift(130); // 'exit' break; case 131: // 'external' shift(131); // 'external' break; case 139: // 'ft-option' shift(139); // 'ft-option' break; case 152: // 'in' shift(152); // 'in' break; case 153: // 'index' shift(153); // 'index' break; case 159: // 'integrity' shift(159); // 'integrity' break; case 169: // 'lax' shift(169); // 'lax' break; case 190: // 'nodes' shift(190); // 'nodes' break; case 197: // 'option' shift(197); // 'option' break; case 201: // 'ordering' shift(201); // 'ordering' break; case 220: // 'revalidation' shift(220); // 'revalidation' break; case 223: // 'schema' shift(223); // 'schema' break; case 226: // 'score' shift(226); // 'score' break; case 232: // 'sliding' shift(232); // 'sliding' break; case 238: // 'strict' shift(238); // 'strict' break; case 249: // 'tumbling' shift(249); // 'tumbling' break; case 250: // 'type' shift(250); // 'type' break; case 255: // 'updating' shift(255); // 'updating' break; case 259: // 'value' shift(259); // 'value' break; case 261: // 'version' shift(261); // 'version' break; case 265: // 'while' shift(265); // 'while' break; case 95: // 'constraint' shift(95); // 'constraint' break; case 174: // 'loop' shift(174); // 'loop' break; default: shift(219); // 'returning' } eventHandler.endNonterminal("NCName", e0); } function shift(t) { if (l1 == t) { whitespace(); eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); b0 = b1; e0 = e1; l1 = 0; } else { error(b1, e1, 0, l1, t); } } function whitespace() { if (e0 != b1) { b0 = e0; e0 = b1; eventHandler.whitespace(b0, e0); } } function matchW(set) { var code; for (;;) { code = match(set); if (code != 30) // S^WS { break; } } return code; } function lookahead1W(set) { if (l1 == 0) { l1 = matchW(set); b1 = begin; e1 = end; } } function lookahead1(set) { if (l1 == 0) { l1 = match(set); b1 = begin; e1 = end; } } function error(b, e, s, l, t) { throw new self.ParseException(b, e, s, l, t); } var lk, b0, e0; var l1, b1, e1; var eventHandler; var input; var size; var begin; var end; function match(tokenSetId) { var nonbmp = false; begin = end; var current = end; var result = JSONiqTokenizer.INITIAL[tokenSetId]; var state = 0; for (var code = result & 4095; code != 0; ) { var charclass; var c0 = current < size ? input.charCodeAt(current) : 0; ++current; if (c0 < 0x80) { charclass = JSONiqTokenizer.MAP0[c0]; } else if (c0 < 0xd800) { var c1 = c0 >> 4; charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]]; } else { if (c0 < 0xdc00) { var c1 = current < size ? input.charCodeAt(current) : 0; if (c1 >= 0xdc00 && c1 < 0xe000) { ++current; c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; nonbmp = true; } } var lo = 0, hi = 5; for (var m = 3; ; m = (hi + lo) >> 1) { if (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1; else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1; else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;} if (lo > hi) {charclass = 0; break;} } } state = code; var i0 = (charclass << 12) + code - 1; code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]]; if (code > 4095) { result = code; code &= 4095; end = current; } } result >>= 12; if (result == 0) { end = current - 1; var c1 = end < size ? input.charCodeAt(end) : 0; if (c1 >= 0xdc00 && c1 < 0xe000) --end; return error(begin, end, state, -1, -1); } if (nonbmp) { for (var i = result >> 9; i > 0; --i) { --end; var c1 = end < size ? input.charCodeAt(end) : 0; if (c1 >= 0xdc00 && c1 < 0xe000) --end; } } else { end -= result >> 9; } return (result & 511) - 1; } } JSONiqTokenizer.getTokenSet = function(tokenSetId) { var set = []; var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; for (var i = 0; i < 279; i += 32) { var j = i; var i0 = (i >> 5) * 2066 + s - 1; var i1 = i0 >> 2; var i2 = i1 >> 2; var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]]; for ( ; f != 0; f >>>= 1, ++j) { if ((f & 1) != 0) { set.push(JSONiqTokenizer.TOKEN[j]); } } } return set; }; JSONiqTokenizer.MAP0 = [ 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37 ]; JSONiqTokenizer.MAP1 = [ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 ]; JSONiqTokenizer.MAP2 = [ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 31, 37, 31, 31, 37 ]; JSONiqTokenizer.INITIAL = [ 1, 2, 49155, 57348, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]; JSONiqTokenizer.TRANSITION = [ 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 17408, 19288, 17439, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19074, 36169, 17439, 36866, 17466, 36890, 36866, 22314, 19105, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22182, 19288, 19121, 36866, 17466, 18345, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19273, 19552, 19304, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19332, 17423, 19363, 36866, 17466, 17537, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 18614, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19391, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19427, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36154, 19288, 19457, 36866, 17466, 17740, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22780, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22375, 22197, 18469, 36866, 17466, 36890, 36866, 21991, 24018, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21331, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 19485, 19501, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19537, 22390, 19568, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19596, 19611, 19457, 36866, 17466, 36890, 36866, 18246, 19627, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22242, 20553, 19457, 36866, 17466, 36890, 36866, 18648, 30477, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36472, 19288, 19457, 36866, 17466, 17809, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21770, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19643, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19672, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20538, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17975, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22345, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19726, 19742, 21529, 24035, 23112, 26225, 23511, 27749, 27397, 24035, 34360, 24035, 24036, 23114, 35166, 23114, 23114, 19758, 23511, 35247, 23511, 23511, 28447, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 19821, 23511, 23511, 23511, 23511, 23512, 19441, 36539, 24035, 24035, 24035, 24035, 19846, 19869, 23114, 23114, 23114, 28618, 32187, 19892, 23511, 23511, 23511, 34585, 20402, 36647, 24035, 24035, 24036, 23114, 33757, 23114, 23114, 23029, 20271, 23511, 27070, 23511, 23511, 30562, 24035, 24035, 29274, 26576, 23114, 23114, 31118, 23036, 29695, 23511, 23511, 32431, 23634, 30821, 24035, 23110, 19913, 23114, 23467, 31261, 23261, 34299, 19932, 24035, 32609, 19965, 35389, 19984, 27689, 19830, 29391, 29337, 20041, 22643, 35619, 33728, 20062, 20121, 20166, 35100, 26145, 20211, 23008, 19876, 20208, 20227, 25670, 20132, 26578, 27685, 20141, 20243, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36094, 19288, 19457, 36866, 17466, 21724, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22735, 19552, 20287, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22750, 19288, 21529, 24035, 23112, 28056, 23511, 29483, 28756, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 20327, 23511, 23511, 23511, 23511, 31156, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 20371, 23511, 23511, 23511, 23511, 27443, 20395, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 29457, 29700, 23511, 23511, 23511, 23511, 33444, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 28350, 20421, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 20447, 20475, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20523, 22257, 20569, 20783, 21715, 17603, 20699, 20837, 20614, 20630, 21149, 20670, 21405, 17486, 17509, 17525, 18373, 19179, 20695, 20716, 20732, 20755, 19194, 18042, 21641, 20592, 20779, 20598, 21412, 17470, 17591, 20896, 17468, 17619, 20799, 20700, 21031, 20744, 20699, 20828, 18075, 21259, 20581, 20853, 18048, 20868, 20884, 17756, 17784, 17800, 17825, 17854, 21171, 21200, 20931, 20947, 21378, 20955, 20971, 18086, 20645, 21002, 20986, 18178, 17960, 18012, 18381, 18064, 29176, 21044, 21438, 21018, 21122, 21393, 21060, 21844, 21094, 20654, 17493, 18150, 18166, 18214, 25967, 20763, 21799, 21110, 21830, 21138, 21246, 21301, 18336, 18361, 21165, 21187, 20812, 21216, 21232, 21287, 21317, 18553, 21347, 21363, 21428, 21454, 21271, 21483, 21499, 21515, 21575, 21467, 18712, 21591, 21633, 21078, 18189, 18198, 20679, 21657, 21701, 21074, 21687, 21740, 21756, 21786, 21815, 21860, 21876, 21892, 21946, 21962, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36457, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 36813, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 21981, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 22151, 22007, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 27898, 17884, 18890, 17906, 17928, 22042, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 22070, 22112, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 22142, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36109, 19288, 18469, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22167, 19288, 19457, 36866, 17466, 17768, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22227, 36487, 22273, 36866, 17466, 36890, 36866, 19316, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18749, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 22304, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19580, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22330, 19089, 19457, 36866, 17466, 18721, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22765, 19347, 19457, 36866, 17466, 36890, 36866, 18114, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34541, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 22540, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29908, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22561, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 23837, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22584, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36442, 19288, 21605, 24035, 23112, 28137, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 31568, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22690, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 27584, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 22659, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22360, 19552, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22675, 22811, 19457, 36866, 17466, 36890, 36866, 19133, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22827, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36064, 19288, 22865, 22881, 32031, 22897, 22913, 22956, 29939, 24035, 24035, 24035, 23003, 23114, 23114, 23114, 23024, 22420, 23511, 23511, 23511, 23052, 29116, 23073, 29268, 24035, 25563, 26915, 23106, 23131, 23114, 23114, 23159, 23181, 23197, 23248, 23511, 23511, 23282, 23305, 22493, 32364, 24035, 33472, 30138, 26325, 31770, 33508, 27345, 33667, 23114, 23321, 23473, 23351, 35793, 36576, 23511, 23375, 22500, 24145, 24035, 29197, 20192, 24533, 23440, 23114, 19017, 23459, 22839, 23489, 23510, 23511, 33563, 23528, 32076, 25389, 24035, 26576, 23561, 23583, 23114, 32683, 22516, 23622, 23655, 23511, 23634, 35456, 37144, 23110, 23683, 34153, 20499, 32513, 25824, 23705, 24035, 24035, 23111, 23114, 19874, 27078, 33263, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 20507, 32241, 20150, 31862, 27464, 35108, 23727, 23007, 35895, 34953, 26578, 27685, 20141, 24569, 31691, 19787, 33967, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36427, 19552, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 27027, 26576, 23114, 23114, 23114, 31471, 23756, 22468, 23511, 23511, 23511, 34687, 23772, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 23788, 24035, 24035, 24035, 21559, 23828, 23114, 23114, 23114, 25086, 22839, 23853, 23511, 23511, 23511, 23876, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 31761, 23909, 23953, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36049, 19288, 21605, 30825, 23112, 23987, 23511, 24003, 31001, 27617, 24034, 24035, 24036, 24052, 24089, 23114, 23114, 22420, 24109, 24168, 23511, 23511, 29116, 24188, 27609, 20017, 29516, 24035, 26576, 24222, 19968, 23114, 24252, 33811, 22468, 24270, 33587, 23511, 24320, 27443, 22493, 24035, 24035, 24035, 24035, 24339, 23113, 23114, 23114, 23114, 28128, 28618, 29700, 23511, 23511, 23511, 28276, 34564, 20402, 24035, 24035, 32929, 24036, 23114, 23114, 23114, 24357, 23029, 22839, 23511, 23511, 23511, 24377, 25645, 24035, 34112, 24035, 26576, 23114, 26643, 23114, 32683, 22516, 23511, 25638, 23511, 23711, 24035, 24395, 27809, 23114, 24414, 20499, 24432, 30917, 23628, 24035, 30680, 23111, 23114, 30233, 27078, 25748, 24452, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 24475, 19829, 26577, 26597, 26154, 24519, 24556, 24596, 23007, 20046, 20132, 26578, 24634, 20141, 24569, 31691, 24679, 24727, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36412, 19288, 21605, 19943, 34861, 32618, 26027, 29483, 32016, 32050, 36233, 24776, 35574, 24801, 24819, 32671, 31289, 22420, 24868, 24886, 20087, 26849, 29116, 19803, 24035, 24035, 24035, 36228, 26576, 23114, 23114, 23114, 24981, 33811, 22468, 23511, 23511, 23511, 29028, 27443, 22493, 24923, 27965, 24035, 24035, 32797, 24946, 23443, 23114, 23114, 29636, 24997, 22849, 28252, 23511, 23511, 23511, 25042, 25110, 24035, 24035, 34085, 24036, 25133, 23114, 23114, 25152, 23029, 22839, 25169, 23511, 36764, 23511, 25645, 30403, 24035, 25186, 26576, 31806, 24093, 25212, 32683, 22516, 32713, 26245, 34293, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 32406, 23111, 23114, 28676, 30944, 27689, 25234, 24035, 23112, 19872, 37063, 23266, 24036, 23114, 30243, 20379, 26100, 29218, 20211, 30105, 25257, 25284, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 24834, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36034, 19288, 21671, 25314, 25072, 25330, 25346, 25362, 29939, 29951, 35288, 29984, 23812, 27216, 25405, 25424, 30456, 22584, 26292, 25461, 25480, 31592, 29116, 25516, 34963, 25545, 27007, 25579, 33937, 25614, 25661, 25686, 34872, 25702, 25718, 25734, 25769, 25795, 25811, 25840, 22493, 26533, 25856, 24035, 25876, 30763, 27481, 25909, 23114, 28987, 25936, 25954, 29700, 25983, 23511, 31412, 26043, 26063, 22568, 29241, 29592, 26116, 31216, 35383, 26170, 34783, 26194, 26221, 22839, 26241, 26261, 22477, 26283, 26308, 27306, 31035, 24655, 26576, 29854, 33386, 26341, 32683, 22516, 32153, 30926, 26361, 19996, 26381, 35463, 26397, 26424, 34646, 26478, 35605, 31386, 26494, 35567, 31964, 22940, 23689, 25218, 30309, 32289, 19830, 33605, 23112, 32109, 27733, 27084, 24496, 35886, 35221, 26525, 36602, 26549, 26558, 26574, 26594, 26613, 26629, 26666, 26700, 26578, 27685, 23740, 24285, 31691, 26733, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36397, 19552, 18991, 25887, 28117, 32618, 26776, 29483, 29939, 26802, 24035, 24035, 24036, 28664, 23114, 23114, 23114, 22420, 30297, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 25559, 26576, 23114, 23114, 23114, 30525, 33811, 22468, 23511, 23511, 23511, 28725, 27443, 22493, 24035, 24035, 27249, 24035, 24035, 23113, 23114, 23114, 26827, 23114, 28618, 29700, 23511, 23511, 26845, 23511, 34564, 20402, 24035, 24035, 26979, 24036, 23114, 23114, 23114, 24974, 23029, 22839, 23511, 23511, 23511, 26865, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 33305, 24035, 25598, 23114, 19874, 34253, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 26886, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 26931, 24569, 26439, 26947, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36019, 19288, 26995, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 27043, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 27061, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 29978, 24035, 24035, 23113, 23114, 33114, 23114, 23114, 30010, 29700, 23511, 35913, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 27155, 26576, 23114, 23114, 30447, 23036, 29695, 23511, 23511, 30935, 20099, 24152, 25529, 27100, 34461, 27121, 22625, 29156, 26009, 27137, 30422, 31903, 31655, 28870, 27171, 32439, 31731, 19830, 27232, 22612, 27265, 26786, 25494, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 20342, 27288, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 27322, 27339, 28020, 27361, 27382, 29939, 24035, 24035, 32581, 24036, 23114, 23114, 23114, 27425, 22420, 23511, 23511, 23511, 27442, 28306, 19803, 24035, 24035, 24035, 24035, 26710, 23114, 23114, 23114, 23114, 32261, 22468, 23511, 23511, 23511, 23511, 35719, 24694, 29510, 24035, 24035, 24035, 24035, 26717, 23114, 23114, 23114, 23114, 28618, 32217, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 27459, 23114, 23114, 23114, 36252, 23029, 20271, 23511, 23511, 23511, 28840, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 27480, 34483, 28401, 29761, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36382, 19288, 21605, 27497, 27517, 28504, 28898, 27569, 29939, 29401, 27600, 27323, 27633, 19025, 27662, 23114, 27705, 22420, 20483, 27721, 23511, 27765, 28306, 19803, 23540, 24035, 24610, 27781, 27805, 26650, 23114, 28573, 32990, 25920, 22468, 26870, 23511, 26684, 34262, 34737, 25057, 34622, 24035, 24035, 23971, 24206, 27825, 27847, 23114, 23114, 27865, 27885, 35766, 27914, 23511, 23511, 32766, 32844, 27934, 28795, 26909, 27955, 26092, 27988, 25445, 28005, 28036, 28052, 21965, 23511, 32196, 19897, 28072, 28102, 36534, 21541, 23801, 28153, 28180, 28197, 28221, 23036, 32695, 28251, 28268, 28292, 23667, 34825, 23930, 24580, 28322, 28344, 31627, 28366, 25996, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 35625, 33477, 33359, 27674, 28393, 33992, 24036, 23114, 30243, 19829, 28417, 28433, 28463, 23008, 19876, 20208, 23007, 20046, 20132, 28489, 28520, 20141, 24569, 31691, 19787, 28550, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 28589, 24035, 24035, 24035, 24035, 28608, 23114, 23114, 23114, 23114, 28618, 20431, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36004, 19288, 28634, 31951, 28565, 28702, 28718, 28741, 32544, 20175, 28792, 32086, 20105, 28811, 29059, 29862, 28856, 22420, 28886, 30354, 23359, 28922, 28306, 28952, 23888, 26320, 36506, 24035, 29331, 28968, 36609, 23114, 29003, 31661, 27061, 30649, 27366, 23511, 29023, 27918, 24694, 24035, 24035, 23893, 33094, 30867, 23113, 23114, 23114, 29044, 34184, 30010, 29700, 23511, 23511, 29081, 29102, 34585, 20402, 27789, 24035, 24035, 24036, 23114, 29132, 23114, 23114, 23029, 20271, 23511, 29153, 23511, 23511, 30562, 30174, 24035, 24035, 27409, 25438, 23114, 23114, 29172, 36668, 31332, 23511, 23511, 29192, 30144, 24035, 23110, 30203, 23114, 23467, 31544, 23261, 23628, 24035, 22545, 23111, 23114, 29213, 27078, 27689, 29234, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 29257, 23008, 19876, 20208, 28768, 29290, 29320, 34776, 29353, 20141, 22435, 29378, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36367, 19288, 21605, 34616, 19006, 32618, 31497, 31507, 36216, 20184, 24035, 34393, 29424, 34668, 23114, 34900, 29447, 22420, 30360, 23511, 37089, 29473, 28306, 19803, 29499, 24398, 24035, 24035, 26576, 31799, 29532, 29550, 23114, 33811, 22468, 32298, 29571, 31184, 23511, 23512, 37127, 36628, 29589, 24035, 24135, 24035, 23113, 29608, 23114, 27831, 29634, 28618, 29652, 30037, 23511, 24172, 29671, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 29555, 29690, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 29719, 24035, 23110, 29738, 23114, 23467, 34035, 29756, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 29777, 34364, 28181, 30243, 29799, 31920, 27272, 27185, 23008, 31126, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29828, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35989, 19552, 19687, 35139, 28649, 29878, 29894, 29924, 29939, 23224, 23085, 31969, 24036, 35173, 24752, 24803, 23114, 22420, 31190, 30318, 24870, 23511, 28306, 29967, 23967, 24035, 24035, 24035, 26576, 30000, 23114, 23114, 23114, 33811, 22468, 30026, 23511, 23511, 23511, 23512, 26078, 24035, 24035, 24035, 30053, 37137, 30071, 23114, 23114, 33368, 25136, 28618, 30723, 23511, 23511, 37096, 31356, 34585, 20402, 30092, 30127, 30160, 24036, 35740, 30219, 24960, 30259, 23029, 20271, 34042, 30285, 30342, 30376, 23289, 30055, 30400, 30419, 30438, 32640, 33532, 33514, 30472, 18792, 26267, 24323, 23057, 30493, 23639, 20008, 30196, 33188, 30517, 20075, 23511, 30541, 23628, 30578, 33928, 28776, 30594, 19874, 30610, 30637, 19830, 30677, 27646, 19872, 25779, 23266, 23232, 35016, 30243, 30696, 29812, 30712, 30746, 27206, 30779, 30807, 23007, 33395, 20132, 26578, 27685, 31703, 22928, 31691, 19787, 31079, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36352, 19288, 23335, 30841, 26131, 30888, 30904, 30986, 29939, 24035, 24704, 31017, 20025, 23114, 26178, 31051, 31095, 22420, 23511, 22524, 31142, 31172, 28534, 31206, 35497, 25196, 24035, 28592, 24503, 23114, 31239, 31285, 23114, 31305, 31321, 31355, 31372, 31407, 23511, 30556, 24694, 24035, 27501, 19805, 24035, 24035, 23113, 23114, 31428, 24066, 23114, 28618, 29700, 23511, 31837, 18809, 23511, 34585, 31448, 24035, 24035, 24035, 23090, 23114, 23114, 23114, 23114, 31619, 35038, 23511, 23511, 23511, 23511, 33714, 24035, 33085, 24035, 29431, 23114, 31467, 23114, 23143, 31487, 23511, 31523, 23511, 35195, 36783, 24035, 30111, 23567, 23114, 23467, 31543, 31560, 23628, 24035, 24035, 23111, 23114, 19874, 30953, 31584, 34508, 24035, 31608, 26345, 37055, 23266, 31643, 31677, 31719, 31747, 31786, 31822, 26898, 23008, 19876, 31859, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 31878, 31936, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35974, 19288, 21605, 27972, 35663, 31985, 29655, 32001, 36715, 24785, 25893, 23545, 31912, 19853, 19916, 25938, 24540, 22420, 31843, 29674, 29573, 32735, 28936, 19803, 24035, 24035, 32047, 24035, 26576, 23114, 23114, 27544, 23114, 33811, 22468, 23511, 23511, 32161, 23511, 23512, 32066, 24035, 33313, 24035, 24035, 24035, 23113, 27426, 32102, 23114, 23114, 28618, 32125, 23511, 32144, 23511, 23511, 33569, 20402, 24035, 27045, 24035, 24036, 23114, 23114, 28328, 23114, 30076, 32177, 23511, 23511, 30384, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23595, 32212, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 22635, 25753, 32233, 32257, 32277, 19829, 26577, 26597, 20211, 23008, 19876, 32322, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 32352, 35285, 32380, 34196, 33016, 30661, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 32404, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 32422, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 30269, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 19949, 24035, 23111, 32455, 19874, 31269, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36337, 19552, 19209, 21617, 26509, 32475, 32491, 32529, 29939, 24035, 32578, 25241, 32597, 23114, 32634, 29007, 32656, 22420, 23511, 32729, 26365, 32751, 28306, 32788, 32882, 24035, 24035, 32813, 36727, 23114, 33182, 23114, 27553, 33235, 32829, 23511, 32706, 23511, 28906, 28377, 26962, 32881, 32904, 32898, 32920, 24035, 32953, 23114, 32977, 26408, 23114, 28164, 33006, 23511, 33039, 35774, 23511, 32306, 20402, 33076, 30872, 24035, 24036, 25408, 33110, 28979, 23114, 23029, 20271, 35835, 33130, 33054, 23511, 30562, 33148, 24035, 24035, 33167, 23114, 23114, 33775, 23036, 20459, 23511, 23511, 25464, 24646, 24035, 24035, 22446, 23114, 23114, 25627, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 31391, 33204, 33220, 33251, 33287, 26577, 26597, 20211, 33329, 19876, 33345, 23007, 20046, 20132, 26578, 27685, 28473, 22599, 31691, 33411, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35959, 19288, 21907, 27243, 29843, 32618, 33427, 31507, 29939, 33460, 34090, 24035, 24036, 33493, 24416, 33530, 23114, 22420, 33548, 24379, 33585, 23511, 28306, 19803, 33603, 24202, 24035, 24035, 25593, 33749, 28205, 23114, 23114, 32388, 22468, 33853, 33060, 23511, 23511, 31339, 33621, 24035, 24035, 34397, 24618, 30757, 33663, 23114, 23114, 33683, 35684, 28618, 26678, 23511, 23511, 32506, 33699, 34585, 20402, 24035, 32562, 26973, 24036, 23114, 23114, 33377, 33773, 23029, 20271, 23511, 23511, 30621, 23511, 23860, 24035, 33791, 21553, 26576, 36558, 23114, 33809, 23036, 32857, 26047, 23511, 33827, 23634, 24035, 24035, 23110, 23114, 23114, 31252, 23511, 33845, 23628, 24035, 24459, 23111, 23114, 33869, 27078, 30791, 29783, 24035, 24742, 19872, 33895, 23266, 26462, 19710, 33879, 33919, 26577, 26597, 24123, 24930, 21930, 20208, 30501, 33953, 25268, 20252, 33983, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36322, 19552, 23390, 33634, 35154, 34008, 34024, 34058, 35544, 34106, 34128, 26811, 33151, 34144, 34169, 34212, 23114, 34228, 34244, 34278, 34315, 23511, 34331, 34347, 34380, 34413, 24035, 24663, 26576, 34429, 34453, 34477, 29534, 33811, 22468, 34499, 34524, 34557, 25170, 34580, 35436, 23937, 34601, 24035, 24341, 26453, 23113, 34638, 34662, 23114, 24236, 28618, 34684, 34703, 34729, 23511, 35352, 34753, 34799, 24035, 34815, 32558, 34848, 34888, 35814, 34923, 23165, 29137, 23606, 30326, 30730, 34939, 33023, 30562, 36848, 34979, 24035, 24847, 34996, 23114, 23114, 35032, 29695, 35054, 23511, 23511, 35091, 33296, 35124, 24296, 28235, 24361, 36276, 32772, 35067, 35189, 27301, 30855, 24852, 22452, 35211, 35237, 35316, 25500, 35270, 23405, 24304, 35304, 29362, 24036, 23114, 35332, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 35368, 28823, 23920, 32336, 35405, 20141, 24569, 31691, 35421, 35479, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35944, 22795, 21605, 33647, 35877, 35513, 30962, 35529, 34073, 35557, 24035, 24035, 20405, 31107, 23114, 23114, 23114, 35590, 34713, 23511, 23511, 23511, 35641, 19803, 29408, 32937, 25298, 24035, 35657, 23115, 27849, 24760, 35679, 26205, 22468, 23511, 35700, 24907, 24901, 35075, 31893, 34980, 24035, 24035, 24035, 24035, 23113, 35009, 23114, 23114, 23114, 28618, 35716, 30970, 23511, 23511, 23511, 34585, 23215, 24035, 24035, 24035, 24036, 35735, 23114, 23114, 23114, 27105, 35756, 35790, 23511, 23511, 23511, 35254, 35446, 24035, 24035, 31223, 35809, 23114, 23114, 23036, 36825, 35830, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 31031, 20355, 19872, 33903, 23266, 24036, 23114, 28686, 19829, 26577, 26597, 20211, 23008, 23424, 20208, 24711, 31065, 24486, 26578, 27685, 20141, 19773, 35851, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36307, 19288, 21605, 35494, 19702, 32618, 33437, 31507, 29939, 25117, 24035, 27939, 24036, 27869, 23114, 26829, 23114, 22420, 23494, 23511, 33132, 23511, 28306, 19803, 24035, 34832, 24035, 24035, 26576, 23114, 25153, 23114, 23114, 33811, 22468, 23511, 23511, 35911, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35929, 19288, 21605, 25860, 23112, 36185, 23511, 36201, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 26748, 24035, 24035, 24035, 24035, 24035, 36249, 23114, 23114, 23114, 23114, 28618, 28835, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 27151, 24035, 26760, 23114, 27989, 23114, 23114, 36268, 20271, 23511, 24436, 23511, 29703, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36292, 19288, 21605, 36503, 21922, 32618, 34534, 31507, 36522, 24035, 33793, 24035, 35864, 23114, 23114, 36555, 23417, 22420, 23511, 23511, 36574, 26020, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 36592, 24035, 24035, 36625, 24035, 24035, 23113, 23114, 32961, 23114, 23114, 29618, 29700, 23511, 29086, 23511, 23511, 34585, 20402, 36644, 24035, 24035, 24036, 29740, 23114, 23114, 23114, 29065, 36663, 31527, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 31451, 23112, 36684, 23511, 36700, 29939, 24035, 24035, 24035, 30185, 23114, 23114, 23114, 27526, 22420, 23511, 23511, 23511, 32865, 28306, 19803, 36743, 24035, 27017, 24035, 26576, 27535, 23114, 31432, 23114, 33811, 22468, 33271, 23511, 32128, 23511, 23512, 24694, 24035, 27196, 24035, 24035, 24035, 23113, 32459, 23114, 23114, 23114, 28618, 29700, 33829, 36762, 23511, 23511, 34585, 20402, 24035, 36746, 24035, 29722, 23114, 23114, 34437, 23114, 34907, 20271, 23511, 23511, 18801, 23511, 23206, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 36837, 24035, 24035, 33739, 23114, 23114, 25094, 23511, 23261, 23628, 24035, 36780, 23111, 24073, 19874, 27078, 35344, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22720, 19288, 36799, 36866, 17466, 36890, 36864, 21991, 22211, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17631, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22705, 19288, 19457, 36866, 17466, 36890, 36866, 19375, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36124, 19288, 36951, 36866, 17466, 36890, 36866, 21991, 22404, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18567, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36979, 36995, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18027, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 21529, 24035, 23112, 23033, 23511, 31507, 25377, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 37040, 23511, 23511, 23511, 23511, 28086, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 37079, 23511, 23511, 23511, 23511, 23512, 34766, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 37112, 37160, 18469, 36866, 17466, 36890, 36866, 17656, 37174, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18537, 22984, 17553, 17572, 22285, 18780, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 0, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 127011, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2576384, 2215936, 2215936, 2215936, 2416640, 2424832, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2543616, 2215936, 2215936, 2215936, 2215936, 2215936, 2629632, 2215936, 2617344, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2691072, 2215936, 2707456, 2215936, 2715648, 2215936, 2723840, 2764800, 2215936, 2215936, 2797568, 2215936, 2822144, 2215936, 2215936, 2854912, 2215936, 2215936, 2215936, 2912256, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 180224, 0, 0, 2174976, 0, 0, 2170880, 2617344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2691072, 2170880, 2707456, 2170880, 2715648, 2170880, 2723840, 2764800, 2170880, 2170880, 2797568, 2170880, 2170880, 2797568, 2170880, 2822144, 2170880, 2170880, 2854912, 2170880, 2170880, 2170880, 2912256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2609152, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2654208, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 184599, 280, 0, 2174976, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 544, 0, 546, 0, 0, 2179072, 0, 0, 0, 552, 0, 0, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2158592, 2158592, 2232320, 2232320, 0, 2240512, 2240512, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 2768896, 2789376, 2813952, 2170880, 2170880, 2170880, 2875392, 2904064, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 167936, 0, 0, 0, 0, 2174976, 0, 0, 2215936, 2215936, 2514944, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2592768, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 32768, 0, 0, 0, 0, 0, 2174976, 32768, 0, 2633728, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2711552, 2215936, 2215936, 2215936, 2215936, 2215936, 2760704, 2768896, 2789376, 2813952, 2215936, 2215936, 2215936, 2875392, 2904064, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 65819, 2215936, 2215936, 3031040, 2215936, 3055616, 2215936, 2215936, 2215936, 2215936, 3092480, 2215936, 2215936, 3125248, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2170880, 2170880, 2494464, 2170880, 2170880, 0, 0, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 2699264, 2170880, 2727936, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3026944, 2170880, 2170880, 3063808, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 2379776, 2215936, 2523136, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2596864, 2215936, 2621440, 2215936, 2215936, 2641920, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 548, 0, 0, 0, 0, 287, 2170880, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2699264, 2215936, 2727936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2879488, 2215936, 2916352, 2215936, 2215936, 0, 0, 0, 0, 188416, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 0, 2171019, 2171019, 2171019, 2400395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3031179, 2171019, 3055755, 2171019, 2171019, 2215936, 3133440, 2215936, 2215936, 2215936, 3162112, 2215936, 2215936, 3182592, 3186688, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2523275, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2597003, 2171019, 2621579, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 4337664, 28, 2170880, 2170880, 2170880, 2629632, 2170880, 2170880, 2170880, 2170880, 2719744, 2744320, 2170880, 2170880, 2170880, 2834432, 2838528, 2170880, 2908160, 2170880, 2170880, 2936832, 2215936, 2215936, 2215936, 2215936, 2719744, 2744320, 2215936, 2215936, 2215936, 2834432, 2838528, 2215936, 2908160, 2215936, 2215936, 2936832, 2215936, 2215936, 2985984, 2215936, 2994176, 2215936, 2215936, 3014656, 2215936, 3059712, 3076096, 3088384, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2445312, 2215936, 2465792, 2473984, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2171019, 2494603, 2171019, 2171019, 2215936, 2215936, 2215936, 3215360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3016168, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 124, 124, 0, 128, 128, 2170880, 2170880, 2170880, 3215360, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2535424, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 0, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2170880, 2170880, 3170304, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 2215936, 2215936, 2215936, 2535424, 2539520, 2215936, 2215936, 2588672, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 136, 0, 2215936, 2215936, 2920448, 2215936, 2215936, 2215936, 2990080, 2215936, 2215936, 2215936, 2215936, 3051520, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3108864, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3026944, 2215936, 2215936, 3063808, 2215936, 2215936, 3112960, 2215936, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2537049, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 1508, 2170880, 2170880, 2170880, 1512, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2686976, 2748416, 2170880, 2170880, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3121152, 2170880, 2170880, 3145728, 3158016, 3166208, 2170880, 2420736, 2428928, 2170880, 2478080, 2170880, 2170880, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 0, 0, 3145728, 3158016, 3166208, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 0, 2170880, 2215936, 2215936, 2580480, 2215936, 2605056, 2637824, 2215936, 2215936, 2686976, 2748416, 2215936, 2215936, 2215936, 2924544, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 286, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 1625, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 647, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2686976, 0, 0, 2748416, 2170880, 2170880, 0, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 0, 0, 28, 28, 2170880, 3141632, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2170880, 2420736, 2428928, 2752512, 2756608, 0, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2170880, 3141632, 2170880, 2170880, 2490368, 2215936, 2490368, 2215936, 2215936, 2215936, 2547712, 2555904, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 245760, 0, 3129344, 2170880, 2170880, 2490368, 2170880, 2170880, 2170880, 0, 0, 2547712, 2555904, 2170880, 2170880, 2170880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 45056, 0, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 97, 97, 97, 97, 97, 97, 97, 1354, 97, 97, 97, 97, 97, 97, 97, 97, 1148, 97, 97, 97, 97, 97, 97, 97, 2584576, 2170880, 2170880, 1512, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2170880, 2850816, 2170880, 2170880, 2170880, 3022848, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 2215936, 3022848, 2170880, 2441216, 2170880, 2527232, 0, 0, 2170880, 2600960, 2170880, 0, 2850816, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2596864, 2170880, 2621440, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 3022848, 2170880, 2519040, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2514944, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2519040, 0, 2024, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 2024, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 2170880, 2215936, 2650112, 2965504, 2215936, 0, 0, 2170880, 2650112, 2965504, 2170880, 2551808, 2170880, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 141, 45, 45, 67, 67, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 0, 2551808, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2977792, 2977792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 29, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 49172, 0, 0, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 4256099, 4256099, 24, 24, 0, 28, 28, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 0, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 2170880, 2547712, 2555904, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2215936, 2215936, 543, 543, 545, 545, 0, 0, 2179072, 0, 550, 551, 551, 0, 287, 2171166, 2171166, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 645, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 149, 2584576, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2519040, 0, 0, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 0, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 53264, 18, 49172, 57366, 24, 155648, 28, 102432, 155648, 155687, 114730, 106539, 0, 0, 155648, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 0, 0, 2220032, 0, 94208, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 208896, 18, 278528, 24, 24, 0, 28, 28, 53264, 18, 159765, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 139394, 28, 28, 102432, 131, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 32768, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 546, 0, 0, 2183168, 0, 0, 552, 832, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2654208, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 1084, 0, 1088, 0, 1092, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 937, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 644, 0, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 826, 0, 828, 0, 0, 2183168, 0, 0, 830, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2170880, 2170880, 2633728, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 53264, 18, 49172, 57366, 24, 8192, 28, 172066, 172032, 110630, 172066, 106539, 0, 0, 172032, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 102432, 0, 98304, 0, 0, 2220032, 110630, 0, 0, 0, 0, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 45056, 0, 0, 0, 53264, 18, 49172, 57366, 25, 8192, 30, 102432, 0, 110630, 114730, 106539, 0, 0, 176219, 53264, 18, 18, 49172, 0, 57366, 0, 124, 124, 124, 0, 128, 128, 128, 128, 102432, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 546, 0, 0, 2183168, 0, 65536, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 143, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1824, 67, 1826, 67, 67, 67, 67, 17, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 120, 121, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 2179072, 548, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2033, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 978, 0, 546, 70179, 0, 2183168, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1013, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 67, 67, 67, 483, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1359, 97, 97, 97, 67, 67, 1584, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 45, 45, 45, 45, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 774, 67, 67, 1713, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1723, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 45, 1559, 45, 45, 1561, 45, 45, 45, 45, 45, 45, 45, 687, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1771, 1772, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 1827, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 1614, 97, 97, 97, 97, 97, 603, 97, 97, 605, 97, 97, 608, 97, 97, 97, 97, 0, 1532, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 450, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 1839, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 1883, 97, 1885, 97, 0, 1888, 0, 97, 97, 0, 97, 97, 1848, 97, 97, 97, 97, 1852, 45, 45, 45, 45, 45, 45, 45, 384, 391, 45, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 45, 45, 45, 45, 1237, 45, 45, 45, 45, 45, 45, 67, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1951, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1963, 97, 2023, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 1994, 67, 1995, 67, 67, 67, 67, 67, 67, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 137, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2793472, 2805760, 2170880, 2830336, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 281, 549, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2031, 2032, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 0, 546, 70179, 549, 549, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1858, 45, 641, 0, 0, 0, 0, 41606, 926, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 456, 67, 0, 0, 0, 1313, 0, 0, 0, 1096, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1110, 97, 97, 97, 97, 67, 67, 67, 67, 1301, 1476, 0, 0, 0, 0, 1307, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1486, 97, 1487, 97, 1313, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 97, 45, 1853, 45, 1855, 45, 45, 45, 45, 53264, 18, 49172, 57366, 26, 8192, 31, 102432, 0, 110630, 114730, 106539, 0, 0, 225368, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 18, 49172, 163840, 57366, 0, 24, 24, 229376, 0, 28, 28, 28, 229376, 102432, 0, 0, 0, 0, 2220167, 110630, 0, 0, 0, 114730, 106539, 0, 2171019, 2171019, 2171019, 2171019, 2592907, 2171019, 2171019, 2171019, 2171019, 2633867, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2654347, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3117195, 2171019, 2171019, 2171019, 2171019, 2240641, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 140, 2171019, 2171019, 2171019, 2416779, 2424971, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2617483, 2171019, 2171019, 2642059, 2171019, 2171019, 2171019, 2699403, 2171019, 2728075, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3215499, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2171019, 2822283, 2171019, 2171019, 2855051, 2171019, 2171019, 2171019, 2912395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3002507, 2171019, 2171019, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2171166, 2171166, 2416926, 2425118, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2576670, 2171166, 2617630, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2691358, 2171166, 2707742, 2171166, 2715934, 2171166, 2724126, 2765086, 2171166, 2171166, 2797854, 2171166, 2822430, 2171166, 2171166, 2855198, 2171166, 2171166, 2171166, 2912542, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2793758, 2806046, 2171166, 2830622, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3109150, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2543902, 2171166, 2171166, 2171166, 2171166, 2171166, 2629918, 2793611, 2805899, 2171019, 2830475, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2171166, 2171166, 2171166, 2400542, 2171166, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 0, 2171166, 2920734, 2171166, 2171166, 2171166, 2990366, 2171166, 2171166, 2171166, 2171166, 3117342, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 53264, 0, 18, 18, 4329472, 2232445, 0, 2240641, 4337664, 2711691, 2171019, 2171019, 2171019, 2171019, 2171019, 2760843, 2769035, 2789515, 2814091, 2171019, 2171019, 2171019, 2875531, 2904203, 2171019, 2171019, 3092619, 2171019, 2171019, 3125387, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3199115, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2793472, 2805760, 2215936, 2830336, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2494464, 2170880, 2170880, 2171166, 2171166, 2634014, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2711838, 2171166, 2171166, 2171166, 2171166, 2171166, 2760990, 2769182, 2789662, 2814238, 2171166, 2171166, 2171166, 2875678, 2904350, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3199262, 2171166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379915, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2445451, 2171019, 2465931, 2474123, 2171019, 2171019, 3113099, 2171019, 2171019, 3133579, 2171019, 2171019, 2171019, 3162251, 2171019, 2171019, 3182731, 3186827, 2171019, 2379776, 2879627, 2171019, 2916491, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3027083, 2171019, 2171019, 3063947, 2699550, 2171166, 2728222, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2879774, 2171166, 2916638, 2171166, 2171166, 2171166, 2171166, 2171166, 2609438, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2654494, 2171166, 2171166, 2171166, 2171166, 2171166, 2445598, 2171166, 2466078, 2474270, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2523422, 2171019, 2437259, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2543755, 2171019, 2171019, 2171019, 2584715, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2908299, 2171019, 2171019, 2936971, 2171019, 2171019, 2986123, 2171019, 2994315, 2171019, 2171019, 3014795, 2171019, 3059851, 3076235, 3088523, 2171166, 2171166, 2986270, 2171166, 2994462, 2171166, 2171166, 3014942, 2171166, 3059998, 3076382, 3088670, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3027230, 2171166, 2171166, 3064094, 2171166, 2171166, 3113246, 2171166, 2171166, 3133726, 2506891, 2171019, 2171019, 2171019, 2535563, 2539659, 2171019, 2171019, 2588811, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2691211, 2171019, 2707595, 2171019, 2715787, 2171019, 2723979, 2764939, 2171019, 2171019, 2797707, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2453790, 2457886, 2171166, 2171166, 2171166, 2486558, 2171166, 2171166, 2507038, 2171166, 2171166, 2171166, 2535710, 2539806, 2171166, 2171166, 2588958, 2171166, 2171166, 2171166, 2171166, 2515230, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2593054, 2171166, 2171166, 2171166, 2171166, 3051806, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3170590, 0, 2388107, 2392203, 2171019, 2171019, 2433163, 2171019, 2461835, 2171019, 2171019, 2171019, 2510987, 2171019, 2171019, 2171019, 2171019, 2580619, 2171019, 2605195, 2637963, 2171019, 2171019, 2171019, 2920587, 2171019, 2171019, 2171019, 2990219, 2171019, 2171019, 2171019, 2171019, 3051659, 2171019, 2171019, 2171019, 2453643, 2457739, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2515083, 2171019, 2171019, 2171019, 2171019, 2646155, 2670731, 2752651, 2756747, 2846859, 2961547, 2171019, 2998411, 2171019, 3010699, 2171019, 2171019, 2687115, 2748555, 2171019, 2171019, 2171019, 2924683, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3121291, 2171019, 2171019, 2171019, 3170443, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 3145867, 3158155, 3166347, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 553, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2388254, 2392350, 2171166, 2171166, 2433310, 2171166, 2461982, 2171166, 2171166, 2171166, 2511134, 2171166, 2171166, 0, 2171166, 2171166, 2580766, 2171166, 2605342, 2638110, 2171166, 2171166, 2171166, 2171166, 3031326, 2171166, 3055902, 2171166, 2171166, 2171166, 2171166, 3092766, 2171166, 2171166, 3125534, 2171166, 2171166, 2171166, 3162398, 2171166, 2171166, 3182878, 3186974, 2171166, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 3109003, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2171166, 2687262, 0, 0, 2748702, 2171166, 2171166, 0, 2171166, 2924830, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2597150, 2171166, 2621726, 2171166, 2171166, 2642206, 2171166, 2171166, 2171166, 2171166, 3121438, 2171166, 2171166, 3146014, 3158302, 3166494, 2171019, 2420875, 2429067, 2171019, 2478219, 2171019, 2171019, 2171019, 2171019, 2547851, 2556043, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3129483, 2215936, 2171019, 3141771, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2171166, 2421022, 2429214, 2171166, 2478366, 2171166, 2171166, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2646302, 2670878, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 0, 45, 45, 45, 45, 45, 1405, 1406, 45, 45, 45, 45, 1409, 45, 45, 45, 45, 45, 1415, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1238, 45, 45, 45, 45, 67, 2752798, 2756894, 0, 2847006, 2961694, 2171166, 2998558, 2171166, 3010846, 2171166, 2171166, 2171166, 3141918, 2171019, 2171019, 2490507, 3129344, 2171166, 2171166, 2490654, 2171166, 2171166, 2171166, 0, 0, 2547998, 2556190, 2171166, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 167, 45, 45, 45, 45, 185, 187, 45, 45, 198, 45, 45, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3129630, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2576523, 2171019, 2171019, 2171019, 2171019, 2171019, 2609291, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2171166, 2171166, 2494750, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 147, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 3002654, 2171166, 2171166, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2175257, 0, 0, 2584862, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2441355, 2171019, 2527371, 2171019, 2601099, 2171019, 2850955, 2171019, 2171019, 2171019, 3022987, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 69632, 287, 2170880, 2215936, 3022848, 2171166, 2441502, 2171166, 2527518, 0, 0, 2171166, 2601246, 2171166, 0, 2851102, 2171166, 2171166, 2171166, 2171166, 2720030, 2744606, 2171166, 2171166, 2171166, 2834718, 2838814, 2171166, 2908446, 2171166, 2171166, 2937118, 3023134, 2171019, 2519179, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 3215646, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2486411, 2171019, 2171019, 2171019, 2629771, 2171019, 2171019, 2171019, 2171019, 2719883, 2744459, 2171019, 2171019, 2171019, 2834571, 2838667, 2171019, 2519326, 0, 0, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 2396299, 2171019, 2171019, 2171019, 2171019, 3018891, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396446, 0, 0, 2171166, 2171166, 2171166, 2171166, 3019038, 2171019, 2650251, 2965643, 2171019, 2215936, 2650112, 2965504, 2215936, 0, 0, 2171166, 2650398, 2965790, 2171166, 2551947, 2171019, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 144, 45, 45, 67, 67, 67, 67, 67, 228, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1929, 97, 97, 97, 97, 0, 0, 0, 2552094, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2977931, 2977792, 2978078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1321, 97, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 140, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2584576, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 140, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3215360, 544, 0, 0, 0, 544, 0, 546, 0, 0, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 0, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 552, 0, 0, 0, 552, 0, 287, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 644, 0, 2215936, 2215936, 3170304, 544, 0, 546, 0, 552, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 140, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 249856, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 151640, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 253952, 110630, 114730, 106539, 0, 0, 32856, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 192512, 53264, 18, 18, 49172, 0, 57366, 0, 2232445, 184320, 2232445, 0, 2240641, 2240641, 184320, 2240641, 102432, 0, 0, 0, 221184, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3108864, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 0, 0, 0, 45056, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 127, 127, 53264, 18, 49172, 258071, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 204800, 53264, 18, 49172, 57366, 24, 27, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 33, 0, 33, 33, 33, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2170880, 2170880, 2170880, 2416640, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2030, 45, 45, 45, 45, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1699, 67, 67, 67, 67, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 1358, 97, 97, 97, 641, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 45, 45, 45, 0, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1680, 45, 45, 45, 641, 0, 924, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 45, 45, 45, 45, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 282, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 2028, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1767, 67, 67, 67, 0, 0, 0, 0, 0, 0, 1612, 97, 97, 97, 97, 97, 97, 0, 1785, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1790, 97, 0, 0, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 241664, 2387968, 2392064, 2170880, 2170880, 2433024, 53264, 19, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 274432, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 270336, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 1134711, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 1126440, 1126440, 1126440, 0, 0, 1126400, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 36, 110630, 114730, 106539, 0, 0, 217088, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 94, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 96, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 24666, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 126, 28, 28, 28, 28, 102432, 53264, 122, 123, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 2170880, 2170880, 4256099, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1109, 97, 97, 97, 97, 1113, 132, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 146, 150, 45, 45, 45, 45, 45, 175, 45, 180, 45, 186, 45, 189, 45, 45, 203, 67, 256, 67, 67, 270, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 293, 297, 97, 97, 97, 97, 97, 322, 97, 327, 97, 333, 97, 0, 0, 97, 2026, 0, 2027, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 336, 97, 97, 350, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 2424832, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2617344, 2170880, 45, 439, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 525, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 622, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 1527, 369, 648, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1239, 45, 45, 45, 67, 729, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 762, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 0, 0, 0, 1477, 0, 1086, 0, 0, 0, 1479, 0, 1090, 67, 67, 796, 67, 67, 799, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 67, 811, 67, 67, 67, 67, 67, 816, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 833, 97, 97, 97, 97, 97, 97, 97, 97, 1380, 0, 0, 0, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 45, 45, 45, 45, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 97, 97, 97, 894, 97, 97, 897, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1382, 45, 45, 45, 97, 909, 97, 97, 97, 97, 97, 914, 97, 97, 97, 97, 97, 97, 97, 923, 67, 67, 1079, 67, 67, 67, 67, 67, 37689, 1085, 25403, 1089, 66365, 1093, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 148, 1114, 97, 97, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 97, 97, 606, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1173, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 145, 45, 45, 67, 67, 67, 67, 67, 1762, 67, 67, 67, 1766, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1934, 67, 67, 1255, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 67, 67, 67, 67, 1297, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 33344, 97, 97, 97, 1335, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1377, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 670, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 67, 67, 1438, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1322, 97, 97, 1491, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 1553, 45, 1504, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 97, 97, 0, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 1540, 45, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1700, 67, 67, 67, 97, 1648, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1541, 0, 97, 97, 97, 97, 0, 1940, 0, 97, 97, 97, 97, 97, 97, 45, 45, 2011, 45, 45, 45, 2015, 67, 67, 2017, 67, 67, 67, 2021, 97, 67, 67, 812, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 97, 97, 910, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 0, 0, 0, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 1188, 45, 45, 45, 45, 1414, 45, 45, 45, 1417, 45, 1419, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 453, 45, 45, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 1324, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 930, 45, 45, 45, 45, 97, 97, 97, 97, 1378, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 45, 67, 67, 1923, 67, 1925, 67, 67, 1927, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1985, 45, 45, 45, 45, 45, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 45, 946, 45, 45, 950, 45, 45, 45, 0, 97, 97, 97, 1939, 0, 0, 0, 97, 1943, 97, 97, 1945, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 990, 45, 45, 45, 67, 257, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 337, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 2170880, 2170880, 2170880, 2416640, 401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 459, 461, 67, 67, 67, 67, 67, 67, 67, 67, 475, 67, 480, 67, 67, 67, 67, 67, 67, 1054, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 484, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 67, 67, 97, 556, 558, 97, 97, 97, 97, 97, 97, 97, 97, 572, 97, 577, 97, 97, 0, 0, 1896, 97, 97, 97, 97, 97, 97, 1903, 45, 45, 45, 45, 983, 45, 45, 45, 45, 988, 45, 45, 45, 45, 45, 45, 1195, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1549, 45, 45, 45, 45, 45, 581, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1004, 45, 45, 45, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 761, 67, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 1071, 67, 67, 67, 67, 1076, 794, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 544, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 859, 97, 0, 0, 2025, 97, 20480, 97, 97, 2029, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1775, 67, 67, 67, 97, 97, 97, 97, 892, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1515, 97, 993, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 992, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1607, 67, 67, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 97, 45, 1556, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 696, 45, 1596, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 67, 97, 97, 97, 1621, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1346, 97, 97, 97, 97, 1740, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 45, 45, 67, 97, 97, 97, 97, 97, 97, 1836, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1984, 97, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 45, 45, 45, 45, 67, 739, 67, 67, 67, 67, 67, 744, 45, 45, 1909, 45, 45, 45, 45, 45, 45, 45, 67, 1917, 67, 1918, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 67, 67, 67, 67, 67, 97, 1930, 97, 1931, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 1580, 67, 67, 0, 97, 97, 1938, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 699, 45, 45, 45, 704, 45, 45, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 2006, 97, 97, 97, 97, 0, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 722, 723, 45, 45, 45, 45, 45, 45, 2045, 67, 67, 67, 2047, 0, 0, 97, 97, 97, 2051, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1957, 45, 67, 67, 67, 67, 67, 1836, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 67, 67, 1761, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 45, 45, 420, 45, 45, 422, 45, 45, 425, 45, 45, 45, 45, 45, 45, 45, 387, 45, 45, 45, 45, 397, 45, 45, 45, 67, 460, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 515, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 97, 0, 2039, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1426, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1689, 67, 67, 67, 97, 557, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 612, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 896, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 97, 45, 939, 45, 45, 45, 45, 943, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1916, 67, 67, 67, 67, 67, 45, 67, 67, 67, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 1019, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 804, 67, 67, 67, 67, 67, 1077, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2543616, 2170880, 2170880, 2170880, 2170880, 2170880, 2629632, 1169, 97, 1171, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 936, 45, 45, 67, 67, 214, 67, 220, 67, 67, 233, 67, 243, 67, 248, 67, 67, 67, 67, 67, 67, 1298, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1617, 97, 0, 0, 0, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 45, 45, 45, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 1281, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 776, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 907, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 690, 45, 45, 695, 45, 45, 67, 67, 67, 67, 67, 1465, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1712, 97, 97, 97, 97, 1741, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1924, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1983, 97, 97, 45, 45, 1987, 45, 1988, 45, 0, 97, 97, 97, 97, 0, 0, 0, 1942, 97, 97, 97, 97, 97, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 711, 45, 45, 153, 45, 45, 166, 45, 176, 45, 181, 45, 45, 188, 191, 196, 45, 204, 255, 258, 263, 67, 271, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 97, 97, 294, 97, 300, 97, 97, 313, 97, 323, 97, 328, 97, 97, 335, 338, 343, 97, 351, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1411, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 67, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1263, 67, 67, 67, 67, 67, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1526, 97, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 0, 97, 97, 1796, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1744, 45, 45, 45, 369, 0, 651, 45, 653, 45, 654, 45, 656, 45, 45, 45, 660, 45, 45, 45, 45, 1558, 45, 45, 45, 45, 45, 45, 45, 45, 1566, 45, 45, 681, 45, 683, 45, 45, 45, 45, 45, 45, 45, 45, 691, 692, 694, 45, 45, 45, 716, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 709, 45, 45, 712, 45, 714, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 726, 45, 45, 45, 733, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 747, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 1613, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 67, 764, 67, 67, 67, 67, 768, 67, 770, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1977, 67, 778, 779, 781, 67, 67, 67, 67, 67, 67, 788, 789, 67, 67, 792, 793, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 67, 67, 824, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 836, 97, 838, 97, 839, 97, 841, 97, 97, 97, 845, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 97, 97, 0, 1728, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1802, 45, 97, 97, 862, 97, 97, 97, 97, 866, 97, 868, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1788, 97, 97, 97, 0, 0, 97, 97, 876, 877, 879, 97, 97, 97, 97, 97, 97, 886, 887, 97, 97, 890, 891, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 97, 97, 922, 923, 45, 955, 45, 957, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 195, 45, 45, 45, 45, 45, 981, 982, 45, 45, 45, 45, 45, 45, 989, 45, 45, 45, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 67, 67, 1031, 67, 1033, 67, 67, 67, 67, 67, 67, 67, 817, 819, 67, 67, 67, 67, 67, 37689, 544, 67, 1065, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 1078, 67, 67, 1081, 1082, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2437406, 2171166, 2171166, 97, 1115, 97, 1117, 97, 97, 97, 97, 97, 97, 1125, 97, 1127, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 1644, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 1642, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1159, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1502, 97, 97, 97, 97, 97, 1172, 97, 97, 1175, 1176, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 935, 45, 45, 45, 1233, 45, 45, 45, 1236, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1873, 67, 67, 45, 45, 1218, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 1230, 45, 45, 67, 67, 215, 219, 222, 67, 230, 67, 67, 244, 246, 249, 67, 67, 67, 67, 67, 67, 1882, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1904, 45, 1905, 45, 67, 67, 67, 67, 67, 1258, 67, 1260, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 67, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 67, 818, 67, 67, 67, 67, 67, 67, 37689, 544, 67, 67, 1295, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 97, 97, 97, 1326, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 97, 97, 97, 97, 97, 1338, 97, 1340, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 1503, 97, 1363, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 578, 97, 1375, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 45, 45, 45, 45, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1778, 97, 97, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 97, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 1554, 45, 1570, 1571, 45, 67, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 67, 1061, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 1594, 67, 67, 67, 67, 67, 97, 2038, 0, 97, 97, 97, 97, 97, 2044, 45, 45, 45, 995, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 45, 45, 45, 1809, 45, 1811, 45, 45, 45, 45, 45, 67, 1610, 1611, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 1618, 1647, 1649, 97, 97, 97, 1652, 97, 1654, 1655, 97, 0, 45, 45, 45, 1658, 45, 45, 67, 67, 216, 67, 67, 67, 67, 234, 67, 67, 67, 67, 252, 254, 1845, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 947, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1881, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1902, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1921, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 0, 97, 1937, 97, 97, 1940, 0, 0, 97, 97, 97, 97, 97, 97, 1947, 1948, 1949, 45, 45, 45, 1952, 45, 1954, 45, 45, 45, 45, 1959, 1960, 1961, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 67, 67, 1964, 67, 1966, 67, 67, 67, 67, 1971, 1972, 1973, 97, 0, 0, 0, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 884, 97, 97, 97, 889, 97, 97, 1978, 97, 0, 0, 1981, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 736, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 45, 67, 67, 67, 67, 0, 2049, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 933, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 97, 97, 288, 97, 97, 97, 97, 97, 97, 317, 97, 97, 97, 97, 97, 97, 0, 0, 97, 1787, 97, 97, 97, 97, 0, 0, 45, 45, 378, 45, 45, 45, 45, 45, 390, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 431, 433, 45, 45, 45, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 67, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 632, 97, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 67, 97, 97, 97, 97, 97, 97, 1837, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1897, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 97, 2010, 45, 45, 45, 45, 45, 45, 2016, 67, 67, 67, 67, 67, 67, 2022, 45, 2046, 67, 67, 67, 0, 0, 2050, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 932, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 45, 45, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 701, 702, 45, 45, 705, 706, 45, 45, 45, 45, 45, 45, 703, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 45, 45, 45, 45, 45, 725, 45, 45, 45, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 834, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1799, 97, 97, 45, 45, 45, 1569, 45, 45, 45, 1572, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1306, 0, 67, 67, 67, 1598, 67, 67, 67, 67, 67, 67, 67, 67, 1606, 67, 67, 1609, 97, 97, 97, 1650, 97, 97, 1653, 97, 97, 97, 0, 45, 45, 1657, 45, 45, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1421, 45, 45, 45, 1703, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1711, 97, 97, 0, 1895, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 958, 45, 960, 45, 45, 45, 45, 45, 45, 45, 45, 1913, 45, 45, 1915, 67, 67, 67, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 481, 67, 45, 1749, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 45, 45, 45, 45, 173, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1773, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1886, 0, 0, 0, 97, 97, 67, 2035, 2036, 67, 67, 97, 0, 0, 97, 2041, 2042, 97, 97, 45, 45, 45, 45, 1662, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1397, 45, 45, 45, 45, 151, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 437, 205, 45, 67, 67, 67, 218, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 67, 97, 97, 97, 97, 298, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 97, 97, 97, 97, 97, 97, 352, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 365, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1427, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1435, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1037, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1919, 67, 1759, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 45, 154, 45, 162, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 964, 45, 45, 45, 206, 45, 67, 67, 67, 67, 221, 67, 229, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 67, 785, 67, 67, 67, 67, 67, 67, 67, 67, 802, 67, 67, 67, 807, 67, 67, 67, 97, 97, 97, 97, 353, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 402, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 45, 45, 674, 45, 45, 45, 45, 45, 45, 45, 45, 389, 45, 394, 45, 45, 398, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 447, 45, 45, 45, 454, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 488, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 67, 67, 67, 67, 67, 1774, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 67, 67, 523, 67, 67, 527, 67, 67, 67, 67, 67, 533, 67, 67, 67, 540, 97, 97, 97, 585, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 97, 97, 97, 97, 1784, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 620, 97, 97, 624, 97, 97, 97, 97, 97, 630, 97, 97, 97, 637, 713, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 45, 45, 45, 1197, 45, 45, 45, 45, 45, 45, 45, 45, 730, 732, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1581, 67, 45, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 775, 67, 67, 67, 67, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 67, 1080, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 287, 0, 2379776, 2170880, 2170880, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 920, 97, 97, 0, 0, 0, 0, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 45, 959, 45, 45, 45, 45, 45, 45, 45, 45, 45, 184, 45, 45, 45, 45, 202, 45, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1266, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1279, 67, 67, 67, 67, 67, 272, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1293, 67, 67, 67, 1296, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 281, 94, 0, 0, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 0, 97, 1376, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1384, 45, 45, 67, 208, 67, 67, 67, 67, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1069, 1070, 67, 67, 67, 67, 67, 67, 67, 0, 37140, 24854, 0, 0, 0, 0, 41098, 65821, 45, 1423, 45, 45, 45, 45, 45, 45, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1083, 37689, 0, 25403, 0, 66365, 0, 0, 0, 1436, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1830, 67, 1452, 1453, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 67, 67, 1461, 67, 67, 67, 1464, 67, 1466, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 1587, 67, 67, 67, 67, 67, 67, 67, 67, 1595, 1489, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 1505, 1506, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 1164, 97, 97, 97, 97, 97, 1516, 97, 97, 97, 1519, 97, 1521, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1301, 0, 0, 0, 1307, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 919, 97, 97, 97, 0, 97, 97, 97, 1781, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1792, 1860, 45, 1862, 1863, 45, 1865, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1875, 67, 1877, 1878, 67, 1880, 67, 97, 97, 97, 97, 97, 1887, 0, 1889, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 237568, 0, 367, 0, 97, 1893, 0, 0, 0, 97, 1898, 1899, 97, 1901, 97, 45, 45, 45, 45, 45, 2014, 45, 67, 67, 67, 67, 67, 2020, 67, 97, 1989, 45, 1990, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1996, 67, 1997, 67, 67, 67, 67, 67, 273, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 2005, 0, 97, 2007, 97, 97, 18, 0, 139621, 0, 0, 0, 642, 0, 133, 364, 0, 0, 367, 41606, 0, 97, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 209, 67, 67, 67, 223, 67, 67, 67, 67, 67, 67, 67, 67, 67, 786, 67, 67, 67, 791, 67, 67, 45, 45, 940, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1016, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 142, 45, 45, 67, 210, 67, 67, 67, 225, 67, 67, 239, 67, 67, 67, 250, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 476, 67, 67, 67, 67, 67, 67, 67, 1709, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1843, 0, 67, 259, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 289, 97, 97, 97, 303, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 97, 339, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 358, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1953, 45, 1955, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1687, 1688, 67, 67, 67, 67, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1203, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 477, 67, 67, 67, 67, 67, 67, 67, 1970, 97, 97, 97, 1974, 0, 0, 0, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1372, 97, 97, 97, 97, 67, 522, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 536, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 574, 97, 97, 97, 97, 97, 301, 97, 309, 97, 97, 97, 97, 97, 97, 97, 97, 97, 900, 97, 97, 97, 905, 97, 97, 97, 619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 633, 97, 97, 18, 0, 139621, 0, 0, 362, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 664, 67, 67, 67, 67, 750, 751, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1057, 1058, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 67, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 902, 97, 97, 97, 97, 67, 67, 1051, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1302, 0, 0, 0, 1308, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1139, 97, 97, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 1161, 97, 97, 97, 97, 97, 1166, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 1257, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 97, 97, 1337, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1630, 97, 67, 1474, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380062, 2171166, 2171166, 97, 1529, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 45, 45, 67, 67, 67, 67, 1707, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1891, 1739, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 1200, 45, 45, 45, 45, 97, 97, 1894, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 45, 45, 45, 67, 67, 1965, 67, 1967, 67, 67, 67, 97, 97, 97, 97, 0, 1976, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 97, 97, 1979, 0, 0, 97, 1982, 97, 97, 97, 1986, 45, 45, 45, 45, 45, 735, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 2000, 97, 97, 97, 2002, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1798, 97, 97, 97, 45, 45, 45, 2034, 67, 67, 67, 67, 97, 0, 0, 2040, 97, 97, 97, 97, 45, 45, 45, 45, 1752, 45, 45, 45, 1753, 1754, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 45, 45, 438, 45, 45, 45, 45, 45, 445, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1430, 67, 67, 67, 67, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 531, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1096, 97, 97, 97, 621, 97, 97, 97, 97, 97, 628, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 45, 942, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 708, 45, 45, 45, 45, 763, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 809, 810, 67, 67, 67, 67, 783, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1303, 0, 0, 0, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 45, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 67, 67, 67, 67, 1027, 67, 67, 67, 67, 1032, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1097, 1064, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 67, 1098, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 331, 97, 97, 97, 97, 1158, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 1309, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1374, 97, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1240, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1252, 67, 97, 97, 97, 1635, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1800, 97, 45, 45, 45, 97, 97, 1793, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1743, 45, 45, 45, 1746, 45, 0, 97, 97, 97, 97, 97, 1851, 97, 45, 45, 45, 45, 1856, 45, 45, 45, 45, 1864, 45, 45, 67, 67, 1869, 67, 67, 67, 67, 1874, 67, 0, 97, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 211, 67, 67, 67, 67, 67, 67, 240, 67, 67, 67, 67, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 67, 67, 268, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 290, 97, 97, 97, 305, 97, 97, 319, 97, 97, 97, 330, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 643, 367, 41606, 97, 97, 348, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 395, 45, 45, 45, 400, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 45, 972, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1086, 25403, 1090, 66365, 1094, 0, 0, 97, 843, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 1121, 97, 97, 97, 97, 1126, 97, 97, 97, 97, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1400, 45, 67, 67, 67, 1011, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1304, 0, 0, 0, 1190, 45, 45, 1193, 1194, 45, 45, 45, 45, 45, 1199, 45, 1201, 45, 45, 45, 45, 1911, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 67, 67, 45, 1205, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1217, 45, 45, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 1229, 45, 45, 45, 1388, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1574, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 1254, 67, 67, 67, 67, 67, 1259, 67, 1261, 67, 67, 67, 67, 1265, 67, 67, 67, 67, 67, 67, 1708, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 1289, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1087, 25403, 1091, 66365, 1095, 0, 0, 97, 97, 97, 97, 1339, 97, 1341, 97, 97, 97, 97, 1345, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 573, 97, 97, 97, 97, 97, 97, 1717, 97, 0, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1329, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 97, 97, 97, 1365, 97, 97, 97, 97, 1369, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1399, 45, 45, 45, 1413, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1669, 45, 1422, 45, 45, 1425, 45, 45, 1428, 45, 1429, 67, 67, 67, 67, 67, 67, 67, 67, 1468, 67, 67, 67, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 539, 67, 67, 1475, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 97, 97, 1530, 97, 0, 45, 45, 1534, 45, 45, 45, 45, 45, 45, 45, 45, 1956, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 67, 67, 1601, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 67, 1632, 97, 1634, 0, 97, 97, 97, 1640, 97, 97, 97, 1643, 97, 97, 1645, 97, 97, 97, 97, 97, 912, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1660, 1661, 45, 45, 45, 45, 1665, 1666, 45, 45, 45, 45, 45, 1670, 1692, 1693, 67, 67, 67, 67, 67, 1697, 67, 67, 67, 67, 67, 67, 67, 1702, 97, 97, 1714, 1715, 97, 97, 97, 97, 0, 1721, 1722, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 97, 97, 1362, 1726, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 1734, 97, 97, 97, 97, 97, 848, 849, 97, 97, 97, 97, 856, 97, 97, 97, 97, 97, 354, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 45, 45, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1681, 45, 0, 1846, 97, 97, 97, 97, 97, 97, 45, 45, 1854, 45, 45, 45, 45, 1859, 67, 67, 67, 1879, 67, 67, 97, 97, 1884, 97, 97, 0, 0, 0, 97, 97, 97, 1105, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 1347, 97, 1892, 97, 0, 0, 0, 97, 97, 97, 1900, 97, 97, 45, 45, 45, 45, 45, 997, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1002, 45, 45, 1005, 1006, 45, 67, 67, 67, 67, 67, 1926, 67, 67, 1928, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1737, 97, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1944, 97, 97, 1946, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 190, 45, 45, 45, 152, 155, 45, 163, 45, 45, 177, 179, 182, 45, 45, 45, 193, 197, 45, 45, 45, 1672, 45, 45, 45, 45, 45, 1677, 45, 1679, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 67, 260, 264, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 295, 299, 302, 97, 310, 97, 97, 324, 326, 329, 97, 97, 97, 0, 97, 97, 1639, 0, 1641, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 97, 1523, 97, 97, 97, 97, 97, 97, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 97, 97, 312, 97, 97, 97, 97, 97, 97, 97, 97, 1123, 97, 97, 97, 97, 97, 97, 97, 340, 344, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 373, 375, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 435, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1410, 45, 45, 45, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 67, 67, 67, 67, 1969, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 2064, 2065, 0, 2066, 45, 521, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 465, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1933, 0, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 18, 640, 139621, 358, 641, 0, 0, 0, 0, 364, 0, 0, 367, 0, 618, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 97, 97, 881, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 569, 97, 97, 97, 97, 97, 369, 0, 45, 652, 45, 45, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1432, 67, 67, 67, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 67, 0, 1305, 0, 1311, 0, 1317, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 1724, 97, 97, 97, 777, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 535, 67, 67, 67, 67, 67, 67, 67, 814, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 837, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 97, 97, 97, 0, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1168, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 97, 97, 0, 1637, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1801, 45, 45, 97, 875, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1151, 1152, 97, 97, 97, 67, 67, 67, 1040, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 790, 67, 67, 67, 1180, 0, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 200, 45, 45, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 67, 67, 67, 0, 0, 0, 1481, 0, 1094, 0, 0, 97, 1483, 97, 97, 97, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 1633, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1381, 0, 0, 45, 45, 45, 45, 97, 97, 1727, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 636, 45, 45, 1760, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 67, 67, 1299, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1616, 97, 97, 1803, 45, 45, 45, 45, 1807, 45, 45, 45, 45, 45, 1813, 45, 45, 45, 67, 67, 1684, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 822, 67, 67, 37689, 544, 67, 67, 1818, 67, 67, 67, 67, 1822, 67, 67, 67, 67, 67, 1828, 67, 67, 67, 67, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2012, 2013, 45, 45, 67, 67, 67, 2018, 2019, 67, 67, 97, 67, 97, 97, 97, 1833, 97, 97, 0, 0, 97, 97, 1840, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 1733, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 1849, 97, 97, 97, 45, 45, 45, 45, 45, 1857, 45, 45, 45, 1910, 45, 1912, 45, 45, 1914, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 67, 1020, 67, 45, 1861, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1446, 67, 67, 67, 67, 67, 1876, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1890, 97, 97, 97, 97, 97, 1134, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 97, 97, 97, 580, 1935, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1906, 45, 67, 67, 67, 67, 2048, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 931, 45, 45, 45, 45, 45, 45, 1674, 45, 1676, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1871, 67, 67, 67, 67, 0, 97, 97, 45, 67, 0, 97, 2060, 2061, 0, 2063, 45, 67, 0, 97, 45, 45, 156, 45, 45, 45, 45, 45, 45, 45, 45, 45, 192, 45, 45, 45, 45, 1673, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 429, 45, 45, 45, 45, 67, 67, 67, 269, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 349, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 374, 45, 45, 67, 67, 213, 217, 67, 67, 67, 67, 67, 242, 67, 247, 67, 253, 45, 45, 698, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 399, 45, 45, 0, 0, 0, 0, 925, 41606, 0, 929, 0, 0, 45, 45, 45, 45, 45, 45, 1391, 45, 45, 1395, 45, 45, 45, 45, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 436, 45, 67, 67, 67, 67, 1041, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1776, 67, 67, 97, 97, 97, 1099, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 888, 97, 97, 97, 1131, 97, 97, 97, 97, 1135, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 97, 97, 883, 97, 97, 97, 97, 97, 97, 1310, 0, 0, 0, 1316, 0, 0, 0, 0, 1100, 0, 0, 0, 97, 97, 97, 97, 97, 1107, 97, 97, 97, 97, 97, 97, 97, 97, 1343, 97, 97, 97, 97, 97, 97, 1348, 0, 0, 1317, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1868, 67, 1870, 67, 67, 67, 67, 67, 1817, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 823, 67, 37689, 544, 67, 97, 1832, 97, 97, 1834, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 1732, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1177, 0, 0, 925, 0, 0, 0, 0, 97, 97, 97, 97, 0, 0, 1941, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1991, 1992, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1998, 134, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 941, 45, 45, 944, 45, 45, 45, 45, 45, 45, 952, 45, 45, 207, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 67, 67, 67, 37689, 544, 369, 650, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1682, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 835, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1725, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 1036, 67, 67, 67, 265, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 296, 97, 97, 97, 97, 314, 97, 97, 97, 97, 332, 334, 97, 97, 97, 97, 97, 1146, 1147, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 97, 97, 345, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 372, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 45, 45, 404, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 451, 452, 45, 45, 45, 67, 1683, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 490, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 1450, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 537, 538, 67, 67, 67, 67, 67, 506, 67, 67, 508, 67, 67, 511, 67, 67, 67, 67, 0, 1476, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1484, 97, 97, 97, 97, 97, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1499, 97, 97, 97, 97, 97, 97, 97, 97, 97, 587, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 634, 635, 97, 97, 97, 97, 97, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 97, 97, 97, 369, 0, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 1001, 45, 45, 45, 45, 45, 45, 45, 45, 715, 45, 45, 45, 720, 45, 45, 45, 45, 45, 45, 45, 45, 728, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 840, 97, 97, 97, 97, 97, 1174, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 0, 0, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 97, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 680, 45, 968, 45, 970, 45, 973, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 962, 45, 45, 45, 45, 45, 979, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 688, 45, 45, 45, 45, 45, 45, 45, 1007, 1008, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 1044, 67, 1046, 67, 1049, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 808, 67, 67, 0, 0, 0, 1102, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 97, 97, 97, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 1138, 97, 1140, 97, 1143, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 45, 1191, 45, 45, 45, 45, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 991, 45, 67, 67, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1048, 67, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 97, 1386, 45, 1387, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 455, 45, 457, 45, 45, 1424, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1433, 67, 1434, 67, 67, 67, 67, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 1593, 67, 67, 45, 45, 1805, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1814, 45, 45, 1816, 67, 67, 67, 67, 1820, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1829, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 821, 67, 67, 67, 37689, 544, 67, 1831, 97, 97, 97, 97, 1835, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1850, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 961, 45, 45, 45, 45, 965, 45, 967, 1907, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1920, 0, 1936, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 28672, 97, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2054, 97, 97, 291, 97, 97, 97, 97, 97, 97, 320, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 926, 1179, 0, 45, 377, 45, 45, 45, 381, 45, 45, 392, 45, 45, 396, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 45, 45, 45, 67, 67, 67, 67, 463, 67, 67, 67, 467, 67, 67, 478, 67, 67, 482, 67, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 1472, 67, 502, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1460, 67, 97, 97, 97, 97, 560, 97, 97, 97, 564, 97, 97, 575, 97, 97, 579, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 930, 97, 599, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 872, 97, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1758, 0, 362, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 934, 45, 45, 45, 164, 168, 174, 178, 45, 45, 45, 45, 45, 194, 45, 45, 45, 165, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 45, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 1052, 1053, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1063, 97, 1157, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1167, 97, 97, 97, 97, 97, 1379, 97, 97, 97, 0, 0, 0, 45, 1383, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 1812, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1471, 67, 45, 1402, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 67, 1462, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 1517, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 1636, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1705, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1842, 0, 0, 1779, 97, 97, 97, 1782, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1789, 97, 97, 0, 0, 0, 97, 1847, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 45, 737, 738, 67, 740, 67, 741, 67, 743, 67, 67, 67, 67, 67, 67, 1968, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 2062, 97, 45, 67, 0, 97, 45, 67, 67, 97, 97, 2001, 97, 0, 0, 2004, 97, 97, 0, 97, 97, 97, 97, 1797, 97, 97, 97, 97, 97, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 292, 97, 97, 97, 97, 311, 315, 321, 325, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1330, 97, 97, 1333, 1334, 97, 341, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 363, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 416, 45, 376, 45, 45, 45, 45, 382, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 45, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 414, 45, 45, 45, 418, 67, 67, 67, 462, 67, 67, 67, 67, 468, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 1604, 67, 67, 67, 67, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 1067, 67, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 274, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 504, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 517, 519, 541, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 554, 97, 97, 97, 559, 97, 97, 97, 97, 565, 97, 97, 97, 97, 97, 97, 97, 1718, 0, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 906, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 597, 97, 97, 97, 97, 97, 1520, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 1656, 45, 45, 45, 97, 97, 601, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 614, 616, 638, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 661, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1815, 45, 67, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 678, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 977, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 697, 67, 67, 748, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1274, 67, 67, 67, 67, 67, 67, 67, 67, 765, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 780, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1777, 67, 97, 97, 97, 97, 97, 97, 846, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 97, 1742, 45, 45, 45, 45, 45, 45, 45, 1747, 97, 97, 97, 863, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 1178, 925, 0, 1179, 0, 97, 97, 97, 878, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 954, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 963, 45, 45, 966, 45, 45, 157, 45, 45, 171, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 1022, 67, 67, 1026, 67, 67, 67, 1030, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 1605, 67, 67, 67, 1608, 67, 67, 67, 1039, 67, 67, 1042, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 67, 0, 1100, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 97, 97, 97, 97, 1116, 97, 97, 1120, 97, 97, 97, 1124, 97, 97, 97, 97, 97, 97, 562, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1133, 97, 97, 1136, 97, 97, 97, 97, 97, 97, 97, 97, 915, 917, 97, 97, 97, 97, 97, 0, 97, 1170, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1993, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 1278, 67, 0, 0, 0, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1189, 1204, 45, 45, 45, 1207, 45, 45, 1209, 45, 1210, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 45, 689, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 805, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1249, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1300, 0, 0, 0, 0, 0, 1267, 67, 67, 1269, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 97, 1349, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 97, 0, 1980, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 677, 45, 45, 45, 45, 1401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 953, 67, 1437, 67, 1440, 67, 67, 67, 67, 1445, 67, 67, 67, 1448, 67, 67, 67, 67, 67, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 67, 67, 67, 1473, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 0, 834, 97, 97, 97, 97, 1490, 97, 1493, 97, 97, 97, 97, 1498, 97, 97, 97, 1501, 97, 97, 97, 0, 97, 1638, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 916, 97, 97, 97, 97, 97, 97, 0, 1528, 97, 97, 97, 0, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1932, 0, 0, 1555, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1567, 45, 45, 158, 45, 45, 172, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 67, 212, 67, 67, 67, 67, 231, 235, 241, 245, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 472, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1651, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 45, 67, 1704, 67, 1706, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1841, 97, 0, 1844, 97, 97, 97, 97, 1716, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1385, 1748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1757, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 97, 97, 1780, 97, 97, 97, 0, 0, 1786, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1730, 0, 97, 97, 97, 97, 97, 1736, 97, 1738, 67, 97, 97, 97, 97, 97, 97, 0, 1838, 97, 97, 97, 97, 97, 0, 0, 97, 1729, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 1165, 97, 97, 97, 45, 1950, 45, 45, 45, 45, 45, 45, 45, 45, 1958, 67, 67, 67, 1962, 67, 67, 67, 67, 67, 1246, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1710, 97, 97, 97, 1999, 67, 97, 97, 97, 97, 0, 2003, 97, 97, 97, 0, 97, 97, 2008, 2009, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 2052, 67, 2053, 0, 0, 0, 0, 925, 41606, 0, 0, 930, 0, 45, 45, 45, 45, 45, 45, 1392, 45, 1394, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 1565, 45, 45, 45, 1568, 0, 97, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 28672, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 679, 45, 45, 67, 67, 266, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 346, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 362, 0, 364, 0, 367, 41098, 369, 140, 371, 45, 45, 45, 379, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 449, 45, 45, 45, 45, 45, 67, 67, 542, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 97, 0, 1794, 1795, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 97, 639, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 45, 731, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 251, 67, 67, 67, 67, 67, 798, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1073, 67, 67, 67, 860, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 873, 0, 0, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 921, 97, 0, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1250, 67, 67, 1253, 0, 0, 1312, 0, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 97, 1155, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1141, 97, 97, 67, 67, 1439, 67, 1441, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 97, 97, 1492, 97, 1494, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 97, 67, 67, 67, 2037, 67, 97, 0, 0, 97, 97, 97, 2043, 97, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 232, 67, 67, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1975, 0, 0, 97, 874, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1142, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 65, 86, 117, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 63, 84, 115, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 61, 82, 113, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 59, 80, 111, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 57, 78, 109, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 55, 76, 107, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 53, 74, 105, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 51, 72, 103, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 49, 70, 101, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 47, 68, 99, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 45, 67, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 213085, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 0, 0, 44, 0, 0, 32863, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 41, 41, 41, 0, 0, 1138688, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 89, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 127, 127, 127, 127, 102432, 67, 262, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 342, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 360, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 45, 45, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1292, 67, 67, 1294, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1615, 97, 97, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 66, 87, 118, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 64, 85, 116, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 62, 83, 114, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 60, 81, 112, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 58, 79, 110, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 56, 77, 108, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 54, 75, 106, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 52, 73, 104, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 50, 71, 102, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 48, 69, 100, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 46, 67, 98, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 233472, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 69724, 53264, 18, 18, 49172, 0, 57366, 262144, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 45, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 28, 139621, 359, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1389, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 45, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1449, 67, 67, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1154, 97, 0, 0, 0, 0, 925, 41606, 927, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 67, 67, 45, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 951, 45, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 45, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1488, 67, 67, 267, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 347, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 361, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 734, 45, 45, 45, 67, 67, 67, 67, 67, 742, 67, 67, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1214, 45, 45, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1361, 97, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 45, 45, 0, 0, 0, 0, 2220032, 0, 0, 1130496, 0, 0, 0, 0, 2170880, 2171020, 2170880, 2170880, 18, 0, 0, 131072, 0, 0, 0, 90112, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1485, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1390, 45, 1393, 45, 45, 45, 45, 1398, 45, 45, 45, 2170880, 2171167, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2721252, 2744320, 2170880, 2170880, 2170880, 2834432, 2840040, 2170880, 2908160, 2170880, 2170880, 2936832, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3014656, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 0, 2220032, 0, 0, 0, 1142784, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3215360, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 543, 0, 545, 0, 0, 2183168, 0, 0, 831, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 2170880, 2170880, 3092480, 2170880, 2170880, 3125248, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 0, 0, 0, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 0, 0, 0, 65820, 65820, 0, 287, 97, 97, 97, 97, 97, 1783, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1791, 0, 0, 546, 70179, 0, 0, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 97, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 0, 0, 147456, 0, 0, 0, 0, 925, 41606, 0, 928, 0, 0, 45, 45, 45, 45, 45, 45, 998, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 1564, 45, 45, 45, 45, 0, 2158592, 2158592, 0, 0, 0, 0, 2232320, 2232320, 2232320, 0, 2240512, 2240512, 2240512, 2240512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640 ]; JSONiqTokenizer.EXPECTED = [ 291, 300, 304, 341, 315, 309, 305, 295, 319, 323, 327, 329, 296, 333, 337, 339, 342, 346, 350, 294, 356, 360, 312, 367, 352, 371, 363, 375, 379, 383, 387, 391, 395, 726, 399, 405, 518, 684, 405, 405, 405, 405, 808, 405, 405, 405, 512, 405, 405, 405, 431, 405, 405, 406, 405, 405, 404, 405, 405, 405, 405, 405, 405, 405, 908, 631, 410, 415, 405, 414, 419, 608, 405, 429, 602, 405, 435, 443, 405, 441, 641, 478, 405, 447, 451, 450, 456, 643, 461, 460, 762, 679, 465, 469, 741, 473, 477, 482, 486, 492, 932, 931, 523, 498, 504, 720, 405, 510, 596, 405, 516, 941, 580, 522, 929, 527, 590, 589, 897, 939, 534, 538, 547, 551, 555, 559, 563, 567, 571, 969, 575, 708, 690, 689, 579, 584, 634, 405, 594, 731, 405, 600, 882, 405, 606, 895, 786, 452, 612, 405, 615, 620, 876, 624, 628, 638, 647, 651, 655, 659, 663, 667, 676, 683, 688, 695, 694, 791, 405, 699, 437, 405, 706, 714, 405, 712, 825, 870, 405, 718, 724, 769, 768, 823, 730, 735, 745, 751, 422, 755, 759, 425, 766, 902, 810, 587, 775, 888, 887, 405, 773, 992, 405, 779, 962, 405, 785, 781, 986, 790, 795, 797, 506, 500, 499, 801, 805, 814, 820, 829, 833, 837, 841, 845, 849, 853, 857, 861, 616, 865, 869, 868, 488, 405, 874, 816, 405, 880, 738, 405, 886, 892, 543, 405, 901, 906, 913, 912, 918, 494, 541, 922, 926, 936, 945, 949, 953, 957, 530, 966, 973, 960, 702, 701, 405, 979, 981, 405, 985, 747, 405, 990, 998, 914, 405, 996, 1004, 672, 975, 974, 1014, 1002, 1008, 670, 1012, 405, 405, 405, 405, 405, 401, 1018, 1022, 1026, 1106, 1071, 1111, 1111, 1111, 1082, 1145, 1030, 1101, 1034, 1038, 1106, 1106, 1106, 1106, 1046, 1206, 1052, 1106, 1072, 1111, 1111, 1042, 1134, 1065, 1111, 1112, 1056, 1160, 1207, 1062, 1204, 1208, 1069, 1106, 1106, 1106, 1076, 1111, 1207, 1161, 1122, 1205, 1064, 1094, 1106, 1106, 1107, 1111, 1111, 1111, 1078, 1086, 1207, 1092, 1098, 1046, 1058, 1106, 1106, 1110, 1111, 1111, 1116, 1120, 1161, 1126, 1202, 1104, 1106, 1145, 1146, 1129, 1138, 1088, 1151, 1048, 1157, 1153, 1132, 1141, 1165, 1107, 1111, 1172, 1179, 1109, 1183, 1175, 1143, 1147, 1187, 1108, 1191, 1195, 1144, 1199, 1168, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1557, 1247, 1241, 1241, 1038, 1434, 1241, 1241, 1241, 1241, 1254, 1275, 1617, 1241, 1280, 1287, 1241, 1241, 1241, 1287, 1241, 2114, 1291, 1241, 1243, 1241, 2049, 1824, 2094, 2095, 1520, 1309, 1241, 1241, 1302, 1241, 1321, 1311, 1241, 1241, 1313, 1778, 1325, 1336, 1241, 1241, 1325, 1330, 1353, 1241, 1241, 1695, 1354, 1241, 1241, 1241, 1294, 1686, 1331, 1241, 1696, 1368, 1241, 1338, 1370, 1241, 1392, 1399, 1364, 2017, 1406, 2016, 1405, 1716, 1406, 1407, 1422, 1417, 1421, 1241, 1241, 1241, 1349, 1426, 1241, 1774, 1756, 1241, 1773, 1241, 1241, 1345, 1964, 1812, 1432, 1241, 1241, 1345, 1993, 1459, 1241, 1241, 1241, 1395, 1848, 1767, 1465, 1241, 1241, 1394, 1847, 1242, 1477, 1241, 1241, 1428, 1241, 1445, 1492, 1241, 1241, 1438, 1241, 1499, 1241, 1241, 1241, 1455, 1241, 1818, 1448, 1241, 1250, 1241, 2026, 1623, 1449, 1241, 1612, 1616, 1241, 1614, 1241, 1257, 1241, 1241, 1985, 1292, 1586, 1512, 1241, 1517, 2050, 1526, 1674, 1519, 1524, 1647, 2051, 1532, 1537, 1551, 1544, 1550, 1555, 1561, 1571, 1578, 1584, 1590, 1591, 1653, 1595, 1602, 1606, 1610, 1634, 1628, 1640, 1633, 1645, 1241, 1241, 1241, 1469, 1241, 1970, 1651, 1241, 1270, 1241, 1241, 1819, 1449, 1241, 1293, 1664, 1241, 1241, 1481, 1485, 1574, 1672, 1241, 1241, 1513, 1317, 1487, 1684, 1241, 1241, 1533, 1299, 1694, 1241, 1241, 1295, 1241, 1241, 1241, 1546, 1700, 1241, 1241, 1707, 1241, 1713, 1241, 1849, 1715, 1241, 1720, 1241, 1276, 1267, 1241, 1241, 2107, 1657, 1864, 1241, 1881, 1241, 1326, 1292, 1241, 1685, 1358, 1724, 1338, 1241, 1363, 1362, 1342, 1340, 1361, 1339, 1833, 1372, 1360, 1833, 1833, 1342, 1343, 1835, 1341, 1731, 1738, 1344, 1241, 1745, 1241, 1379, 1241, 1241, 2092, 1241, 1388, 1761, 1754, 1241, 1386, 1241, 1400, 1760, 1241, 1241, 1241, 1598, 1734, 1241, 1241, 1241, 1635, 1645, 1241, 1780, 1766, 1241, 1241, 1332, 1771, 1241, 1241, 1629, 2079, 1241, 1242, 1784, 1241, 1241, 1680, 1639, 2063, 1790, 1241, 1241, 1741, 1241, 1241, 1800, 1241, 1241, 1762, 1473, 1241, 1806, 1241, 1241, 1786, 1240, 1709, 1241, 1241, 1241, 1668, 1811, 1241, 1940, 1241, 1401, 1974, 1241, 1408, 1413, 1382, 1241, 1816, 1241, 1241, 1802, 2086, 1811, 1241, 1817, 1945, 1823, 2095, 2095, 2047, 2094, 2046, 2080, 1241, 1409, 1312, 1376, 2096, 2048, 1241, 1241, 1807, 1241, 1241, 1241, 2035, 1241, 1241, 1828, 1241, 2057, 2061, 1241, 1241, 1843, 1241, 2059, 1241, 1241, 1241, 1690, 1847, 1241, 1241, 1241, 1703, 2102, 1848, 1241, 1241, 1853, 1292, 1848, 1241, 2016, 1857, 1241, 2002, 1868, 1241, 1436, 1241, 1241, 1271, 1305, 1241, 1874, 1241, 1241, 1884, 2037, 1892, 1241, 1890, 1241, 1461, 1241, 1241, 1795, 1241, 1241, 1891, 1241, 1878, 1241, 1888, 1241, 1888, 1905, 1896, 2087, 1912, 1903, 1241, 1911, 1906, 1916, 1905, 2027, 1863, 1925, 2088, 1859, 1861, 1922, 1927, 1931, 1935, 1494, 1241, 1241, 1918, 1907, 1939, 1917, 1944, 1949, 1241, 1241, 1451, 1955, 1241, 1241, 1241, 1796, 1727, 2061, 1241, 1241, 1899, 1241, 1660, 1968, 1241, 1241, 1951, 1678, 1978, 1241, 1241, 1241, 1839, 1241, 1241, 1984, 1982, 1241, 1488, 1241, 1241, 1624, 1450, 1989, 1241, 1241, 1241, 1870, 1995, 1292, 1241, 1241, 1958, 1261, 1241, 1996, 1241, 1241, 1241, 2039, 2008, 1241, 1241, 1750, 2000, 1241, 1256, 2001, 1960, 1241, 1564, 1241, 1504, 1241, 1241, 1442, 1241, 1241, 1564, 1528, 1263, 1241, 1508, 1241, 1241, 1468, 1498, 2006, 1540, 2015, 1539, 2014, 1748, 2013, 1539, 1831, 2014, 2012, 1500, 1567, 2022, 2021, 1241, 1580, 1241, 1241, 2033, 2037, 1791, 2045, 2031, 1241, 1621, 1241, 1641, 2044, 1241, 1241, 1241, 2093, 1241, 1241, 2055, 1241, 1241, 2067, 1241, 1283, 1241, 1241, 1241, 2101, 2071, 1241, 1241, 1241, 2073, 1848, 2040, 1241, 1241, 1241, 2077, 1241, 1241, 2106, 1241, 1241, 2084, 1241, 2111, 1241, 1241, 1381, 1380, 1241, 1241, 1241, 2100, 1241, 2129, 2118, 2122, 2126, 2197, 2133, 3010, 2825, 2145, 2698, 2156, 2226, 2160, 2161, 2165, 2174, 2293, 2194, 2630, 2201, 2203, 2152, 3019, 2226, 2263, 2209, 2213, 2218, 2269, 2292, 2269, 2269, 2184, 2226, 2238, 2148, 2151, 3017, 2245, 2214, 2269, 2269, 2185, 2226, 2292, 2269, 2291, 2269, 2269, 2269, 2292, 2205, 3019, 2226, 2226, 2160, 2160, 2160, 2261, 2160, 2160, 2160, 2262, 2276, 2160, 2160, 2277, 2216, 2283, 2216, 2269, 2269, 2268, 2269, 2267, 2269, 2269, 2269, 2271, 2568, 2292, 2269, 2293, 2269, 2182, 2190, 2269, 2186, 2226, 2226, 2226, 2226, 2227, 2160, 2160, 2160, 2160, 2263, 2160, 2275, 2277, 2282, 2215, 2217, 2269, 2269, 2291, 2269, 2269, 2293, 2291, 2269, 2220, 2269, 2295, 2294, 2269, 2269, 2305, 2233, 2262, 2278, 2218, 2269, 2234, 2226, 2226, 2228, 2160, 2160, 2160, 2289, 2220, 2294, 2294, 2269, 2269, 2304, 2269, 2160, 2160, 2287, 2269, 2269, 2305, 2269, 2269, 2312, 2269, 2269, 2225, 2226, 2160, 2287, 2289, 2219, 2304, 2295, 2314, 2234, 2226, 2314, 2269, 2226, 2226, 2160, 2288, 2219, 2222, 2304, 2296, 2269, 2224, 2160, 2160, 2269, 2302, 2294, 2314, 2224, 2226, 2288, 2220, 2294, 2269, 2290, 2269, 2269, 2293, 2269, 2269, 2269, 2269, 2270, 2221, 2313, 2225, 2227, 2160, 2300, 2269, 2225, 2261, 2309, 2234, 2229, 2223, 2318, 2318, 2318, 2328, 2336, 2340, 2344, 2350, 2637, 2712, 2358, 2362, 2372, 2135, 2378, 2398, 2135, 2135, 2135, 2135, 2136, 2417, 2241, 2135, 2378, 2135, 2135, 2980, 2984, 2135, 3006, 2135, 2135, 2135, 2945, 2931, 2425, 2400, 2135, 2135, 2135, 2954, 2135, 2481, 2433, 2135, 2135, 2988, 2824, 2135, 2135, 2482, 2434, 2135, 2135, 2440, 2445, 2452, 2135, 2135, 2998, 3002, 2961, 2441, 2446, 2453, 2463, 2974, 2135, 2135, 2135, 2140, 2642, 2709, 2459, 2470, 2465, 2135, 2135, 3005, 2135, 2135, 2987, 2823, 2458, 2469, 2464, 2975, 2135, 2135, 2135, 2353, 2488, 2447, 2324, 2974, 2135, 2409, 2459, 2448, 2135, 2961, 2487, 2446, 2476, 2323, 2973, 2135, 2135, 2135, 2354, 2476, 2974, 2135, 2135, 2135, 2957, 2135, 2135, 2960, 2135, 2135, 2135, 2363, 2409, 2459, 2474, 2465, 2487, 2571, 2973, 2135, 2135, 2168, 2973, 2135, 2135, 2135, 2959, 2135, 2135, 2135, 2506, 2135, 2957, 2488, 2170, 2135, 2135, 2135, 2960, 2135, 2818, 2493, 2135, 2135, 3033, 2135, 2135, 2135, 2934, 2819, 2494, 2135, 2135, 2135, 2976, 2780, 2499, 2135, 2135, 2135, 3000, 2968, 2135, 2935, 2135, 2135, 2135, 2364, 2507, 2135, 2135, 2934, 2135, 2135, 2780, 2492, 2507, 2135, 2135, 2506, 2780, 2135, 2135, 2782, 2780, 2135, 2782, 2135, 2783, 2374, 2514, 2135, 2135, 2135, 3007, 2530, 2974, 2135, 2135, 2135, 3008, 2135, 2135, 2134, 2135, 2526, 2531, 2975, 2135, 2135, 3042, 2581, 2575, 2956, 2135, 2135, 2135, 2394, 2135, 2508, 2535, 2840, 2844, 2495, 2135, 2135, 2136, 2684, 2537, 2842, 2846, 2135, 2136, 2561, 2581, 2551, 2536, 2841, 2845, 2975, 3043, 2582, 2843, 2555, 2135, 3040, 3044, 2538, 2844, 2975, 2135, 2135, 2253, 2644, 2672, 2542, 2554, 2135, 2135, 2346, 2873, 2551, 2555, 2135, 2135, 2135, 2381, 2559, 2565, 2538, 2553, 2135, 2560, 2914, 2576, 2590, 2135, 2135, 2135, 2408, 2136, 2596, 2624, 2135, 2135, 2135, 2409, 2135, 2618, 2597, 3008, 2135, 2135, 2380, 2956, 2601, 2135, 2135, 2135, 2410, 2620, 2624, 2135, 2136, 2383, 2135, 2135, 2783, 2623, 2135, 2135, 2393, 2888, 2136, 2621, 3008, 2135, 2618, 2618, 2622, 2135, 2135, 2405, 2414, 2619, 2384, 2624, 2135, 2136, 2950, 2135, 2138, 2135, 2139, 2135, 2604, 2623, 2135, 2140, 2878, 2665, 2957, 2622, 2135, 2135, 2428, 2762, 2606, 2612, 2135, 2135, 2501, 2586, 2604, 3038, 2135, 2604, 3036, 2387, 2958, 2386, 2135, 2141, 2135, 2421, 2387, 2385, 2135, 2385, 2384, 2384, 2135, 2386, 2628, 2384, 2135, 2135, 2501, 2596, 2591, 2135, 2135, 2135, 2400, 2135, 2634, 2135, 2135, 2559, 2580, 2575, 2648, 2135, 2135, 2135, 2429, 2649, 2135, 2135, 2135, 2435, 2654, 2658, 2135, 2135, 2135, 2436, 2649, 2178, 2659, 2135, 2135, 2595, 2601, 2669, 2677, 2135, 2135, 2616, 2957, 2879, 2665, 2691, 2135, 2363, 2367, 2900, 2878, 2664, 2690, 2975, 2877, 2643, 2670, 2974, 2671, 2975, 2135, 2135, 2619, 2608, 2669, 2673, 2135, 2135, 2653, 2177, 2672, 2135, 2135, 2135, 2486, 2168, 2251, 2255, 2695, 2974, 2709, 2135, 2135, 2135, 2487, 2169, 2399, 2716, 2975, 2135, 2363, 2770, 2776, 2640, 2717, 2135, 2135, 2729, 2135, 2135, 2641, 2718, 2135, 2135, 2135, 2505, 2135, 2640, 2257, 2974, 2135, 2727, 2975, 2135, 2365, 2332, 2895, 2957, 2135, 2959, 2135, 2365, 2749, 2754, 2959, 2958, 2958, 2135, 2380, 2793, 2799, 2135, 2735, 2738, 2135, 2381, 2135, 2135, 2940, 2974, 2135, 2744, 2135, 2135, 2739, 2519, 2976, 2745, 2135, 2135, 2135, 2509, 2755, 2135, 2135, 2135, 2510, 2772, 2778, 2135, 2135, 2740, 2520, 2135, 2771, 2777, 2135, 2135, 2759, 2750, 2792, 2798, 2135, 2135, 2781, 2392, 2779, 2135, 2135, 2135, 2521, 2135, 2679, 2248, 2135, 2135, 2681, 2480, 2135, 2135, 2786, 3000, 2135, 2679, 2683, 2135, 2135, 2416, 2135, 2135, 2135, 2525, 2135, 2730, 2135, 2135, 2135, 2560, 2581, 2135, 2805, 2135, 2135, 2804, 2962, 2832, 2974, 2135, 2382, 2135, 2135, 2958, 2135, 2135, 2960, 2135, 2829, 2833, 2975, 2961, 2965, 2969, 2973, 2968, 2972, 2135, 2135, 2135, 2641, 2135, 2515, 2966, 2970, 2851, 2478, 2135, 2135, 2808, 2135, 2809, 2135, 2135, 2135, 2722, 2852, 2479, 2135, 2135, 2815, 2135, 2135, 2766, 2853, 2480, 2135, 2857, 2479, 2135, 2388, 2723, 2135, 2364, 2331, 2894, 2858, 2480, 2135, 2135, 2850, 2478, 2135, 2135, 2135, 2806, 2864, 2135, 2399, 2256, 2974, 2865, 2135, 2135, 2862, 2135, 2135, 2135, 2685, 2807, 2865, 2135, 2135, 2807, 2863, 2135, 2135, 2135, 2686, 2884, 2807, 2135, 2809, 2807, 2135, 2135, 2807, 2806, 2705, 2810, 2808, 2700, 2869, 2702, 2702, 2702, 2704, 2883, 2135, 2135, 2135, 2730, 2884, 2135, 2135, 2135, 2731, 2321, 2546, 2135, 2135, 2876, 2255, 2889, 2322, 2547, 2135, 2401, 2135, 2135, 2135, 2949, 2367, 2893, 2544, 2973, 2906, 2973, 2135, 2135, 2877, 2663, 2368, 2901, 2907, 2974, 2366, 2899, 2905, 2972, 2920, 2974, 2135, 2135, 2911, 2900, 2920, 2363, 2913, 2918, 2465, 2941, 2975, 2135, 2135, 2924, 2928, 2974, 2945, 2931, 2135, 2135, 2135, 2765, 2136, 2955, 2135, 2135, 2939, 2931, 2380, 2135, 2135, 2380, 2135, 2135, 2135, 2780, 2507, 2137, 2135, 2137, 2135, 2139, 2135, 2806, 2810, 2135, 2135, 2135, 2992, 2135, 2135, 2962, 2966, 2970, 2974, 2135, 2135, 2787, 3014, 2135, 2521, 2993, 2135, 2135, 2135, 2803, 2135, 2135, 2135, 2618, 2607, 2997, 3001, 2135, 2135, 2963, 2967, 2971, 2975, 2135, 2135, 2791, 2797, 2135, 3009, 2999, 3003, 2787, 3001, 2135, 2135, 2964, 2968, 2785, 2999, 3003, 2135, 2135, 2135, 2804, 2785, 2999, 3004, 2135, 2135, 2135, 2807, 2135, 2135, 3023, 2135, 2135, 2135, 2811, 2135, 2135, 3027, 2135, 2135, 2135, 2837, 2968, 3028, 2135, 2135, 2135, 2875, 2135, 2784, 3029, 2135, 2408, 2457, 2446, 0, 14, 0, -2120220672, 1610612736, -2074083328, -2002780160, -2111830528, 1073872896, 1342177280, 1075807216, 4096, 16384, 2048, 8192, 0, 8192, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, -2145386496, 8388608, 1073741824, 0, 0x80000000, 0x80000000, 2097152, 2097152, 2097152, 536870912, 0, 0, 134217728, 33554432, 1536, 268435456, 268435456, 268435456, 268435456, 128, 256, 32, 0, 65536, 131072, 524288, 16777216, 268435456, 0x80000000, 1572864, 1835008, 640, 32768, 65536, 262144, 1048576, 2097152, 196608, 196800, 196608, 196608, 0, 131072, 131072, 131072, 196608, 196624, 196608, 196624, 196608, 196608, 128, 4096, 16384, 16384, 2048, 0, 4, 0, 0, 0x80000000, 2097152, 0, 1024, 32, 32, 0, 65536, 1572864, 1048576, 32768, 32768, 32768, 32768, 196608, 196608, 196608, 64, 64, 196608, 196608, 131072, 131072, 131072, 131072, 268435456, 268435456, 64, 196736, 196608, 196608, 196608, 131072, 196608, 196608, 16384, 4, 4, 4, 2, 32, 32, 65536, 1048576, 12582912, 1073741824, 0, 0, 2, 8, 16, 96, 2048, 32768, 0, 0, 131072, 268435456, 268435456, 268435456, 256, 256, 196608, 196672, 196608, 196608, 196608, 196608, 4, 0, 256, 256, 256, 256, 32, 32, 32768, 32, 32, 32, 32, 32768, 268435456, 268435456, 268435456, 196608, 196608, 196608, 196624, 196608, 196608, 196608, 16, 16, 16, 268435456, 196608, 64, 64, 64, 196608, 196608, 196608, 196672, 268435456, 64, 64, 196608, 196608, 16, 196608, 196608, 196608, 268435456, 64, 196608, 131072, 262144, 4194304, 25165824, 33554432, 134217728, 268435456, 268435456, 196608, 262152, 8, 256, 512, 3072, 16384, 200, -1073741816, 8392713, 40, 8392718, 520, 807404072, 40, 520, 100663304, 0, 0, -540651761, -540651761, 257589048, 0, 262144, 0, 0, 3, 8, 256, 0, 4, 6, 4100, 8388612, 0, 0, 0, 3, 4, 8, 256, 512, 1024, 0, 2097152, 0, 0, -537854471, -537854471, 0, 100663296, 0, 0, 1, 2, 0, 0, 0, 16384, 0, 0, 0, 96, 14336, 0, 0, 0, 7, 8, 234881024, 0, 0, 0, 8, 0, 0, 0, 0, 262144, 0, 0, 16, 64, 384, 512, 0, 1, 1, 0, 12582912, 0, 0, 0, 0, 33554432, 67108864, -606084144, -606084144, -606084138, 0, 0, 28, 32, 768, 1966080, -608174080, 0, 0, 0, 14, 35056, 16, 64, 896, 24576, 98304, 98304, 131072, 262144, 524288, 1048576, 4194304, 25165824, 1048576, 62914560, 134217728, -805306368, 0, 384, 512, 16384, 65536, 131072, 262144, 29360128, 33554432, 134217728, 268435456, 1073741824, 0x80000000, 262144, 524288, 1048576, 29360128, 33554432, 524288, 1048576, 16777216, 33554432, 134217728, 268435456, 1073741824, 0, 0, 0, 123856, 1966080, 0, 64, 384, 16384, 65536, 131072, 16384, 65536, 524288, 268435456, 0x80000000, 0, 0, 524288, 0x80000000, 0, 0, 1, 16, 0, 256, 524288, 0, 0, 0, 25, 96, 128, -537854471, 0, 0, 0, 32, 7404800, -545259520, 0, 0, 0, 60, 0, 249, 64768, 1048576, 6291456, 6291456, 25165824, 100663296, 402653184, 1073741824, 96, 128, 1280, 2048, 4096, 57344, 6291456, 57344, 6291456, 8388608, 16777216, 33554432, 201326592, 1342177280, 0x80000000, 0, 57344, 6291456, 8388608, 100663296, 134217728, 0x80000000, 0, 0, 0, 1, 8, 16, 64, 128, 64, 128, 256, 1024, 131072, 131072, 131072, 262144, 524288, 16777216, 57344, 6291456, 8388608, 67108864, 134217728, 64, 256, 1024, 2048, 4096, 57344, 64, 256, 0, 24576, 32768, 6291456, 67108864, 134217728, 0, 1, 64, 256, 24576, 32768, 4194304, 32768, 4194304, 67108864, 0, 0, 64, 256, 0, 0, 24576, 32768, 0, 16384, 4194304, 67108864, 64, 16384, 0, 0, 1, 64, 256, 16384, 4194304, 67108864, 0, 0, 0, 16384, 0, 16384, 16384, 0, -470447874, -470447874, -470447874, 0, 0, 128, 0, 0, 8, 96, 2048, 32768, 262144, 8388608, 35056, 1376256, -471859200, 0, 0, 14, 16, 224, 2048, 32768, 2097152, 4194304, 8388608, -486539264, 0, 96, 128, 2048, 32768, 262144, 2097152, 262144, 2097152, 8388608, 33554432, 536870912, 1073741824, 0x80000000, 0, 1610612736, 0x80000000, 0, 0, 1, 524288, 1048576, 12582912, 0, 0, 0, 151311, 264503296, 2097152, 8388608, 33554432, 1610612736, 0x80000000, 262144, 8388608, 33554432, 536870912, 67108864, 4194304, 0, 4194304, 0, 4194304, 4194304, 0, 0, 524288, 8388608, 536870912, 1073741824, 0x80000000, 1, 4097, 8388609, 96, 2048, 32768, 1073741824, 0x80000000, 0, 96, 2048, 0x80000000, 0, 0, 96, 2048, 0, 0, 1, 12582912, 0, 0, 0, 0, 1641895695, 1641895695, 0, 0, 0, 249, 7404800, 15, 87808, 1835008, 1639972864, 0, 768, 5120, 16384, 65536, 1835008, 1835008, 12582912, 16777216, 1610612736, 0, 3, 4, 8, 768, 4096, 65536, 0, 0, 256, 512, 786432, 8, 256, 512, 4096, 16384, 1835008, 16384, 1835008, 12582912, 1610612736, 0, 0, 0, 256, 0, 0, 0, 4, 8, 16, 32, 1, 2, 8, 256, 16384, 524288, 16384, 524288, 1048576, 12582912, 1610612736, 0, 0, 0, 8388608, 0, 0, 0, 524288, 4194304, 0, 0, 0, 8388608, -548662288, -548662288, -548662288, 0, 0, 256, 16384, 65536, 520093696, -1073741824, 0, 0, 0, 16777216, 0, 16, 32, 960, 4096, 4980736, 520093696, 1073741824, 0, 32, 896, 4096, 57344, 1048576, 6291456, 8388608, 16777216, 100663296, 134217728, 268435456, 0x80000000, 0, 512, 786432, 4194304, 33554432, 134217728, 268435456, 0, 786432, 4194304, 134217728, 268435456, 0, 524288, 4194304, 268435456, 0, 0, 0, 0, 0, 4194304, 4194304, -540651761, 0, 0, 0, 2, 4, 8, 16, 96, 128, 264503296, -805306368, 0, 0, 0, 8, 256, 512, 19456, 131072, 3072, 16384, 131072, 262144, 8388608, 16777216, 512, 1024, 2048, 16384, 131072, 262144, 131072, 262144, 8388608, 33554432, 201326592, 268435456, 0, 3, 4, 256, 1024, 2048, 57344, 16384, 131072, 8388608, 33554432, 134217728, 268435456, 0, 3, 256, 1024, 16384, 131072, 33554432, 134217728, 1073741824, 0x80000000, 0, 0, 256, 524288, 0x80000000, 0, 3, 256, 33554432, 134217728, 1073741824, 0, 1, 2, 33554432, 1, 2, 134217728, 1073741824, 0, 1, 2, 134217728, 0, 0, 0, 64, 0, 0, 0, 16, 32, 896, 4096, 786432, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 0, 0, 0, 15, 0, 4980736, 4980736, 4980736, 70460, 70460, 3478332, 0, 0, 1008, 4984832, 520093696, 60, 4864, 65536, 0, 0, 0, 12, 16, 32, 256, 512, 4096, 65536, 0, 0, 0, 67108864, 0, 0, 0, 12, 0, 256, 512, 65536, 0, 0, 1024, 512, 131072, 131072, 4, 16, 32, 65536, 0, 4, 16, 32, 0, 0, 0, 4, 16, 0, 0, 16384, 67108864, 0, 0, 1, 24, 96, 128, 256, 1024 ]; JSONiqTokenizer.TOKEN = [ "(0)", "JSONChar", "JSONCharRef", "JSONPredefinedCharRef", "ModuleDecl", "Annotation", "OptionDecl", "Operator", "Variable", "Tag", "EndTag", "PragmaContents", "DirCommentContents", "DirPIContents", "CDataSectionContents", "AttrTest", "Wildcard", "EQName", "IntegerLiteral", "DecimalLiteral", "DoubleLiteral", "PredefinedEntityRef", "'\"\"'", "EscapeApos", "AposChar", "ElementContentChar", "QuotAttrContentChar", "AposAttrContentChar", "NCName", "QName", "S", "CharRef", "CommentContents", "DocTag", "DocCommentContents", "EOF", "'!'", "'\"'", "'#'", "'#)'", "'$$'", "''''", "'('", "'(#'", "'(:'", "'(:~'", "')'", "'*'", "'*'", "','", "'-->'", "'.'", "'/'", "'/>'", "':'", "':)'", "';'", "''), token: xmlcomment, next: function(stack){ stack.pop(); } } ], CData: [ { name: 'CDataSectionContents', token: cdata }, { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } } ], PI: [ { name: 'DirPIContents', token: pi }, { name: n('?'), token: pi }, { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } } ], AposString: [ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } }, { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, { name: 'CharRef', token: 'constant.language.escape' }, { name: 'EscapeApos', token: 'constant.language.escape' }, { name: 'AposChar', token: 'string' } ], QuotString: [ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } }, { name: 'JSONPredefinedCharRef', token: 'constant.language.escape' }, { name: 'JSONCharRef', token: 'constant.language.escape' }, { name: 'JSONChar', token: 'string' } ] }; exports.JSONiqLexer = function(){ return new Lexer(JSONiqTokenizer, Rules); }; }, {"./JSONiqTokenizer":1,"./lexer":3}], 3:[function(_dereq_,module,exports){ 'use strict'; var TokenHandler = function(code) { var input = code; this.tokens = []; this.reset = function() { input = input; this.tokens = []; }; this.startNonterminal = function() {}; this.endNonterminal = function() {}; this.terminal = function(name, begin, end) { this.tokens.push({ name: name, value: input.substring(begin, end) }); }; this.whitespace = function(begin, end) { this.tokens.push({ name: 'WS', value: input.substring(begin, end) }); }; }; exports.Lexer = function(Tokenizer, Rules) { this.tokens = []; this.getLineTokens = function(line, state) { state = (state === 'start' || !state) ? '["start"]' : state; var stack = JSON.parse(state); var h = new TokenHandler(line); var tokenizer = new Tokenizer(line, h); var tokens = []; while(true) { var currentState = stack[stack.length - 1]; try { h.tokens = []; tokenizer['parse_' + currentState](); var info = null; if(h.tokens.length > 1 && h.tokens[0].name === 'WS') { tokens.push({ type: 'text', value: h.tokens[0].value }); h.tokens.splice(0, 1); } var token = h.tokens[0]; var rules = Rules[currentState]; for(var k = 0; k < rules.length; k++) { var rule = Rules[currentState][k]; if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) { info = rule; break; } } if(token.name === 'EOF') { break; } if(token.value === '') { throw 'Encountered empty string lexical rule.'; } tokens.push({ type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token), value: token.value }); if(info && info.next) { info.next(stack); } } catch(e) { if(e instanceof tokenizer.ParseException) { var index = 0; for(var i=0; i < tokens.length; i++) { index += tokens[i].value.length; } tokens.push({ type: 'text', value: line.substring(index) }); return { tokens: tokens, state: JSON.stringify(['start']) }; } else { throw e; } } } return { tokens: tokens, state: JSON.stringify(stack) }; }; }; }, {}]},{},[2]) (2) }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === "') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken(); var atCursor = false; var state = JSON.parse(state).pop(); if ((token && token.value === '>') || state !== "StartTag") return; if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ do { token = iterator.stepBackward(); } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); } else { atCursor = true; } var previous = iterator.stepBackward(); if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { return } var tag = token.value.substring(1); if (atCursor){ var tag = tag.substring(0, position.column - token.start); } return { text: '>' + '', selection: [1, 1] } } }); } oop.inherits(XQueryBehaviour, Behaviour); exports.XQueryBehaviour = XQueryBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { "use strict"; var WorkerClient = require("../worker/worker_client").WorkerClient; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JSONiqLexer = require("./xquery/jsoniq_lexer").JSONiqLexer; var Range = require("../range").Range; var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Anchor = require("../anchor").Anchor; var Mode = function() { this.$tokenizer = new JSONiqLexer(); this.$behaviour = new XQueryBehaviour(); this.foldingRules = new CStyleFoldMode(); this.$highlightRules = new TextHighlightRules(); }; oop.inherits(Mode, TextMode); (function() { this.completer = { getCompletions: function(editor, session, pos, prefix, callback) { if (!session.$worker) return callback(); session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } }); session.$worker.on("complete", function(e){ callback(null, e.data); }); } }; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); if (match) indent += tab; return indent; }; this.checkOutdent = function(state, line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*[\}\)]/.test(input); }; this.autoOutdent = function(state, doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*[\}\)])/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.toggleCommentLines = function(state, doc, startRow, endRow) { var i, line; var outdent = true; var re = /^\s*\(:(.*):\)/; for (i=startRow; i<= endRow; i++) { if (!re.test(doc.getLine(i))) { outdent = false; break; } } var range = new Range(0, 0, 0, 0); for (i=startRow; i<= endRow; i++) { line = doc.getLine(i); range.start.row = i; range.end.row = i; range.end.column = line.length; doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); } }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); var that = this; worker.attachToDocument(session.getDocument()); worker.on("ok", function(e) { session.clearAnnotations(); }); worker.on("markers", function(e) { session.clearAnnotations(); that.addMarkers(e.data, session); }); return worker; }; this.removeMarkers = function(session) { var markers = session.getMarkers(false); for (var id in markers) { if (markers[id].clazz.indexOf('language_highlight_') === 0) { session.removeMarker(id); } } for (var i = 0; i < session.markerAnchors.length; i++) { session.markerAnchors[i].detach(); } session.markerAnchors = []; }; this.addMarkers = function(annos, mySession) { var _self = this; if (!mySession.markerAnchors) mySession.markerAnchors = []; this.removeMarkers(mySession); mySession.languageAnnos = []; annos.forEach(function(anno) { var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0); mySession.markerAnchors.push(anchor); var markerId; var colDiff = anno.pos.ec - anno.pos.sc; var rowDiff = anno.pos.el - anno.pos.sl; var gutterAnno = { guttertext: anno.message, type: anno.level || "warning", text: anno.message }; function updateFloat(single) { if (markerId) mySession.removeMarker(markerId); gutterAnno.row = anchor.row; if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) { var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec); markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default")); } if (single) mySession.setAnnotations(mySession.languageAnnos); } updateFloat(); anchor.on("change", function() { updateFloat(true); }); if (anno.message) mySession.languageAnnos.push(gutterAnno); }); mySession.setAnnotations(mySession.languageAnnos); }; this.$id = "ace/mode/jsoniq"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-less.js0000644000076400007640000010707612554155240023133 0ustar pravipravidefine("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LessHighlightRules = function() { var properties = lang.arrayToMap( (function () { var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + "background-size|binding|border-bottom-colors|border-left-colors|" + "border-right-colors|border-top-colors|border-end|border-end-color|" + "border-end-style|border-end-width|border-image|border-start|" + "border-start-color|border-start-style|border-start-width|box-align|" + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + "font-feature-settings|font-language-override|force-broken-image-icon|" + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + "outline-offset|outline-radius|outline-radius-bottomleft|" + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + "text-decoration-style|transform|transform-origin|transition|" + "transition-delay|transition-duration|transition-property|" + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + "window-shadow|border-radius").split("|"); var properties = ("azimuth|background-attachment|background-color|background-image|" + "background-position|background-repeat|background|border-bottom-color|" + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + "border-color|border-left-color|border-left-style|border-left-width|" + "border-left|border-right-color|border-right-style|border-right-width|" + "border-right|border-spacing|border-style|border-top-color|" + "border-top-style|border-top-width|border-top|border-width|border|" + "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + "letter-spacing|line-height|list-style-image|list-style-position|" + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + "min-width|opacity|orphans|outline-color|" + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + "padding-left|padding-right|padding-top|padding|page-break-after|" + "page-break-before|page-break-inside|page|pause-after|pause-before|" + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + "stress|table-layout|text-align|text-decoration|text-indent|" + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + "z-index").split("|"); var ret = []; for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" }, { caseInsensitive: true } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ] }; }; oop.inherits(LessHighlightRules, TextHighlightRules); exports.LessHighlightRules = LessHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = LessHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/less"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-ada.js0000644000076400007640000000532512554155240022704 0ustar pravipravidefine("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var AdaHighlightRules = function() { var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" + "access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" + "array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" + "body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" + "|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor"; var builtinConstants = ( "true|false|null" ); var builtinFunctions = ( "count|min|max|avg|sum|rank|now|coalesce|main" ); var keywordMapper = this.createKeywordMapper({ "support.function": builtinFunctions, "keyword": keywords, "constant.language": builtinConstants }, "identifier", true); this.$rules = { "start" : [ { token : "comment", regex : "--.*$" }, { token : "string", // " string regex : '".*?"' }, { token : "string", // ' string regex : "'.*?'" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" }, { token : "paren.lparen", regex : "[\\(]" }, { token : "paren.rparen", regex : "[\\)]" }, { token : "text", regex : "\\s+" } ] }; }; oop.inherits(AdaHighlightRules, TextHighlightRules); exports.AdaHighlightRules = AdaHighlightRules; }); define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = AdaHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.$id = "ace/mode/ada"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-vhdl.js0000644000076400007640000000677612554155240023127 0ustar pravipravidefine("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var VHDLHighlightRules = function() { var keywords = "access|after|ailas|all|architecture|assert|attribute|"+ "begin|block|buffer|bus|case|component|configuration|"+ "disconnect|downto|else|elsif|end|entity|file|for|function|"+ "generate|generic|guarded|if|impure|in|inertial|inout|is|"+ "label|linkage|literal|loop|mapnew|next|of|on|open|"+ "others|out|port|process|pure|range|record|reject|"+ "report|return|select|shared|subtype|then|to|transport|"+ "type|unaffected|united|until|wait|when|while|with"; var storageType = "bit|bit_vector|boolean|character|integer|line|natural|"+ "positive|real|register|severity|signal|signed|"+ "std_logic|std_logic_vector|string||text|time|unsigned|"+ "variable"; var storageModifiers = "array|constant"; var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra"+ "srl|xnor|xor"; var builtinConstants = ( "true|false|null" ); var keywordMapper = this.createKeywordMapper({ "keyword.operator": keywordOperators, "keyword": keywords, "constant.language": builtinConstants, "storage.modifier": storageModifiers, "storage.type": storageType }, "identifier", true); this.$rules = { "start" : [ { token : "comment", regex : "--.*$" }, { token : "string", // " string regex : '".*?"' }, { token : "string", // ' string regex : "'.*?'" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "keyword", // pre-compiler directives regex : "\\s*(?:library|package|use)\\b", }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>" }, { token : "punctuation.operator", regex : "\\'|\\:|\\,|\\;|\\." },{ token : "paren.lparen", regex : "[[(]" }, { token : "paren.rparen", regex : "[\\])]" }, { token : "text", regex : "\\s+" } ], }; }; oop.inherits(VHDLHighlightRules, TextHighlightRules); exports.VHDLHighlightRules = VHDLHighlightRules; }); define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = VHDLHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.$id = "ace/mode/vhdl"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-diff.js0000644000076400007640000001054612554155240023070 0ustar pravipravidefine("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DiffHighlightRules = function() { this.$rules = { "start" : [{ regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$", token: "punctuation.definition.separator.diff", "name": "keyword" }, { //diff.range.unified regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$", token: [ "constant", "constant.numeric", "constant", "comment.doc.tag" ] }, { //diff.range.normal regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$", token: [ "constant.numeric", "punctuation.definition.range.diff", "constant.function", "constant.numeric", "punctuation.definition.range.diff", "invalid" ], "name": "meta." }, { regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$", token: [ "constant.numeric", "meta.tag" ] }, { // added regex: "^([!+>])(.*?)(\\s*)$", token: [ "support.constant", "text", "invalid" ] }, { // removed regex: "^([<\\-])(.*?)(\\s*)$", token: [ "support.function", "string", "invalid" ] }, { regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", token: ["variable", "variable", "keyword", "variable"] }, { regex: "^Index.+$", token: "variable" }, { regex: "^\\s+$", token: "text" }, { regex: "\\s*$", token: "invalid" }, { defaultToken: "invisible", caseInsensitive: true } ] }; }; oop.inherits(DiffHighlightRules, TextHighlightRules); exports.DiffHighlightRules = DiffHighlightRules; }); define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function(levels, flag) { this.regExpList = levels; this.flag = flag; this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag); }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.getLine(row); var start = {row: row, column: line.length}; var regList = this.regExpList; for (var i = 1; i <= regList.length; i++) { var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag); if (re.test(line)) break; } for (var l = session.getLength(); ++row < l; ) { line = session.getLine(row); if (re.test(line)) break; } if (row == start.row + 1) return; return Range.fromPoints(start, {row: row - 1, column: line.length}); }; }).call(FoldMode.prototype); }); define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules; var FoldMode = require("./folding/diff").FoldMode; var Mode = function() { this.HighlightRules = HighlightRules; this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i"); }; oop.inherits(Mode, TextMode); (function() { this.$id = "ace/mode/diff"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js0000644000076400007640000000735312554155240026760 0ustar pravipravidefine("ace/theme/tomorrow_night_bright",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night-bright"; exports.cssText = ".ace-tomorrow-night-bright .ace_gutter {\ background: #1a1a1a;\ color: #DEDEDE\ }\ .ace-tomorrow-night-bright .ace_print-margin {\ width: 1px;\ background: #1a1a1a\ }\ .ace-tomorrow-night-bright {\ background-color: #000000;\ color: #DEDEDE\ }\ .ace-tomorrow-night-bright .ace_cursor {\ color: #9F9F9F\ }\ .ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\ background: #424242\ }\ .ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #000000;\ border-radius: 2px\ }\ .ace-tomorrow-night-bright .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #888888\ }\ .ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\ border: 1px solid rgb(110, 119, 0);\ border-bottom: 0;\ box-shadow: inset 0 -1px rgb(110, 119, 0);\ margin: -1px 0 0 -1px;\ background: rgba(255, 235, 0, 0.1)\ }\ .ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\ background: #2A2A2A\ }\ .ace-tomorrow-night-bright .ace_gutter-active-line {\ background-color: #2A2A2A\ }\ .ace-tomorrow-night-bright .ace_stack {\ background-color: rgb(66, 90, 44)\ }\ .ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\ border: 1px solid #888888\ }\ .ace-tomorrow-night-bright .ace_invisible {\ color: #343434\ }\ .ace-tomorrow-night-bright .ace_keyword,\ .ace-tomorrow-night-bright .ace_meta,\ .ace-tomorrow-night-bright .ace_storage,\ .ace-tomorrow-night-bright .ace_storage.ace_type,\ .ace-tomorrow-night-bright .ace_support.ace_type {\ color: #C397D8\ }\ .ace-tomorrow-night-bright .ace_keyword.ace_operator {\ color: #70C0B1\ }\ .ace-tomorrow-night-bright .ace_constant.ace_character,\ .ace-tomorrow-night-bright .ace_constant.ace_language,\ .ace-tomorrow-night-bright .ace_constant.ace_numeric,\ .ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,\ .ace-tomorrow-night-bright .ace_support.ace_constant,\ .ace-tomorrow-night-bright .ace_variable.ace_parameter {\ color: #E78C45\ }\ .ace-tomorrow-night-bright .ace_constant.ace_other {\ color: #EEEEEE\ }\ .ace-tomorrow-night-bright .ace_invalid {\ color: #CED2CF;\ background-color: #DF5F5F\ }\ .ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\ color: #CED2CF;\ background-color: #B798BF\ }\ .ace-tomorrow-night-bright .ace_fold {\ background-color: #7AA6DA;\ border-color: #DEDEDE\ }\ .ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,\ .ace-tomorrow-night-bright .ace_support.ace_function,\ .ace-tomorrow-night-bright .ace_variable {\ color: #7AA6DA\ }\ .ace-tomorrow-night-bright .ace_support.ace_class,\ .ace-tomorrow-night-bright .ace_support.ace_type {\ color: #E7C547\ }\ .ace-tomorrow-night-bright .ace_heading,\ .ace-tomorrow-night-bright .ace_markup.ace_heading,\ .ace-tomorrow-night-bright .ace_string {\ color: #B9CA4A\ }\ .ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,\ .ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,\ .ace-tomorrow-night-bright .ace_meta.ace_tag,\ .ace-tomorrow-night-bright .ace_string.ace_regexp,\ .ace-tomorrow-night-bright .ace_variable {\ color: #D54E53\ }\ .ace-tomorrow-night-bright .ace_comment {\ color: #969896\ }\ .ace-tomorrow-night-bright .ace_c9searchresults.ace_keyword {\ color: #C2C280\ }\ .ace-tomorrow-night-bright .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-lean.js0000644000076400007640000002270712554155240023101 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/lean_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var leanHighlightRules = function() { var keywordControls = ( [ "add_rewrite", "alias", "as", "assume", "attribute", "begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check", "classes", "coercions", "conjecture", "constants", "context", "corollary", "else", "end", "environment", "eval", "example", "exists", "exit", "export", "exposing", "extends", "fields", "find_decl", "forall", "from", "fun", "have", "help", "hiding", "if", "import", "in", "infix", "infixl", "infixr", "instances", "let", "local", "match", "namespace", "notation", "obtain", "obtains", "omit", "opaque", "open", "options", "parameter", "parameters", "postfix", "precedence", "prefix", "premise", "premises", "print", "private", "proof", "protected", "qed", "raw", "renaming", "section", "set_option", "show", "tactic_hint", "take", "then", "universe", "universes", "using", "variable", "variables", "with"].join("|") ); var nameProviders = ( ["inductive", "structure", "record", "theorem", "axiom", "axioms", "lemma", "hypothesis", "definition", "constant"].join("|") ); var storageType = ( ["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|") ); var storageModifiers = ( "\\[(" + ["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion", "coercions", "declarations", "decls", "instance", "irreducible", "multiple-instances", "notation", "notations", "parsing-only", "persistent", "reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf" ].join("|") + ")\\]" ); var keywordOperators = ( [].join("|") ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword.control" : keywordControls, "storage.type" : storageType, "keyword.operator" : keywordOperators, "variable.language": "sorry", }, "identifier"); var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*"; var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->", "/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬", "<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/", "λ", "→", "∃", "∀", ":="].join("|")); this.$rules = { "start" : [ { token : "comment", // single line comment "--" regex : "--.*$" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment "/-" regex : "\\/-", next : "comment" }, { stateName: "qqstring", token : "string.start", regex : '"', next : [ {token : "string.end", regex : '"', next : "start"}, {token : "constant.language.escape", regex : /\\[n"\\]/}, {defaultToken: "string"} ] }, { token : "keyword.control", regex : nameProviders, next : [ {token : "variable.language", regex : identifierRe, next : "start"} ] }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "storage.modifier", regex : storageModifiers }, { token : keywordMapper, regex : identifierRe }, { token : "operator", regex : operatorRe }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ {token: "comment", regex: "-/", next: "start"}, {defaultToken: "comment"} ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); this.normalizeRules(); }; oop.inherits(leanHighlightRules, TextHighlightRules); exports.leanHighlightRules = leanHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/lean",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lean_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = leanHighlightRules; this.$outdent = new MatchingBraceOutdent(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.blockComment = {start: "/-", end: "-/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "- "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/lean"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-html.js0000644000076400007640000121462412554155240023515 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) { "use strict"; var Document = require("../document").Document; var lang = require("../lib/lang"); var Mirror = exports.Mirror = function(sender) { this.sender = sender; var doc = this.doc = new Document(""); var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); var _self = this; sender.on("change", function(e) { doc.applyDeltas(e.data); if (_self.$timeout) return deferredUpdate.schedule(_self.$timeout); _self.onUpdate(); }); }; (function() { this.$timeout = 500; this.setTimeout = function(timeout) { this.$timeout = timeout; }; this.setValue = function(value) { this.doc.setValue(value); this.deferredUpdate.schedule(this.$timeout); }; this.getValue = function(callbackId) { this.sender.callback(this.doc.getValue(), callbackId); }; this.onUpdate = function() { }; this.isPending = function() { return this.deferredUpdate.isPending(); }; }).call(Mirror.prototype); }); define("ace/mode/html/saxparser",["require","exports","module"], function(require, exports, module) { module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0; i--) { var node = this.elements[i]; if (node.localName === localName) return true; if (isMarker(node)) return false; } }; ElementStack.prototype.push = function(item) { this.elements.push(item); }; ElementStack.prototype.pushHtmlElement = function(item) { this.rootNode = item.node; this.push(item); }; ElementStack.prototype.pushHeadElement = function(item) { this.headElement = item.node; this.push(item); }; ElementStack.prototype.pushBodyElement = function(item) { this.bodyElement = item.node; this.push(item); }; ElementStack.prototype.pop = function() { return this.elements.pop(); }; ElementStack.prototype.remove = function(item) { this.elements.splice(this.elements.indexOf(item), 1); }; ElementStack.prototype.popUntilPopped = function(localName) { var element; do { element = this.pop(); } while (element.localName != localName); }; ElementStack.prototype.popUntilTableScopeMarker = function() { while (!isTableScopeMarker(this.top)) this.pop(); }; ElementStack.prototype.popUntilTableBodyScopeMarker = function() { while (!isTableBodyScopeMarker(this.top)) this.pop(); }; ElementStack.prototype.popUntilTableRowScopeMarker = function() { while (!isTableRowScopeMarker(this.top)) this.pop(); }; ElementStack.prototype.item = function(index) { return this.elements[index]; }; ElementStack.prototype.contains = function(element) { return this.elements.indexOf(element) !== -1; }; ElementStack.prototype.inScope = function(localName) { return this._inScope(localName, isScopeMarker); }; ElementStack.prototype.inListItemScope = function(localName) { return this._inScope(localName, isListItemScopeMarker); }; ElementStack.prototype.inTableScope = function(localName) { return this._inScope(localName, isTableScopeMarker); }; ElementStack.prototype.inButtonScope = function(localName) { return this._inScope(localName, isButtonScopeMarker); }; ElementStack.prototype.inSelectScope = function(localName) { return this._inScope(localName, isSelectScopeMarker); }; ElementStack.prototype.hasNumberedHeaderElementInScope = function() { for (var i = this.elements.length - 1; i >= 0; i--) { var node = this.elements[i]; if (node.isNumberedHeader()) return true; if (isScopeMarker(node)) return false; } }; ElementStack.prototype.furthestBlockForFormattingElement = function(element) { var furthestBlock = null; for (var i = this.elements.length - 1; i >= 0; i--) { var node = this.elements[i]; if (node.node === element) break; if (node.isSpecial()) furthestBlock = node; } return furthestBlock; }; ElementStack.prototype.findIndex = function(localName) { for (var i = this.elements.length - 1; i >= 0; i--) { if (this.elements[i].localName == localName) return i; } return -1; }; ElementStack.prototype.remove_openElements_until = function(callback) { var finished = false; var element; while (!finished) { element = this.elements.pop(); finished = callback(element); } return element; }; Object.defineProperty(ElementStack.prototype, 'top', { get: function() { return this.elements[this.elements.length - 1]; } }); Object.defineProperty(ElementStack.prototype, 'length', { get: function() { return this.elements.length; } }); exports.ElementStack = ElementStack; }, {}], 2:[function(_dereq_,module,exports){ var entities = _dereq_('html5-entities'); var InputStream = _dereq_('./InputStream').InputStream; var namedEntityPrefixes = {}; Object.keys(entities).forEach(function (entityKey) { for (var i = 0; i < entityKey.length; i++) { namedEntityPrefixes[entityKey.substring(0, i + 1)] = true; } }); function isAlphaNumeric(c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } function isHexDigit(c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } function isDecimalDigit(c) { return (c >= '0' && c <= '9'); } var EntityParser = {}; EntityParser.consumeEntity = function(buffer, tokenizer, additionalAllowedCharacter) { var decodedCharacter = ''; var consumedCharacters = ''; var ch = buffer.char(); if (ch === InputStream.EOF) return false; consumedCharacters += ch; if (ch == '\t' || ch == '\n' || ch == '\v' || ch == ' ' || ch == '<' || ch == '&') { buffer.unget(consumedCharacters); return false; } if (additionalAllowedCharacter === ch) { buffer.unget(consumedCharacters); return false; } if (ch == '#') { ch = buffer.shift(1); if (ch === InputStream.EOF) { tokenizer._parseError("expected-numeric-entity-but-got-eof"); buffer.unget(consumedCharacters); return false; } consumedCharacters += ch; var radix = 10; var isDigit = isDecimalDigit; if (ch == 'x' || ch == 'X') { radix = 16; isDigit = isHexDigit; ch = buffer.shift(1); if (ch === InputStream.EOF) { tokenizer._parseError("expected-numeric-entity-but-got-eof"); buffer.unget(consumedCharacters); return false; } consumedCharacters += ch; } if (isDigit(ch)) { var code = ''; while (ch !== InputStream.EOF && isDigit(ch)) { code += ch; ch = buffer.char(); } code = parseInt(code, radix); var replacement = this.replaceEntityNumbers(code); if (replacement) { tokenizer._parseError("invalid-numeric-entity-replaced"); code = replacement; } if (code > 0xFFFF && code <= 0x10FFFF) { code -= 0x10000; var first = ((0xffc00 & code) >> 10) + 0xD800; var second = (0x3ff & code) + 0xDC00; decodedCharacter = String.fromCharCode(first, second); } else decodedCharacter = String.fromCharCode(code); if (ch !== ';') { tokenizer._parseError("numeric-entity-without-semicolon"); buffer.unget(ch); } return decodedCharacter; } buffer.unget(consumedCharacters); tokenizer._parseError("expected-numeric-entity"); return false; } if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { var mostRecentMatch = ''; while (namedEntityPrefixes[consumedCharacters]) { if (entities[consumedCharacters]) { mostRecentMatch = consumedCharacters; } if (ch == ';') break; ch = buffer.char(); if (ch === InputStream.EOF) break; consumedCharacters += ch; } if (!mostRecentMatch) { tokenizer._parseError("expected-named-entity"); buffer.unget(consumedCharacters); return false; } decodedCharacter = entities[mostRecentMatch]; if (ch === ';' || !additionalAllowedCharacter || !(isAlphaNumeric(ch) || ch === '=')) { if (consumedCharacters.length > mostRecentMatch.length) { buffer.unget(consumedCharacters.substring(mostRecentMatch.length)); } if (ch !== ';') { tokenizer._parseError("named-entity-without-semicolon"); } return decodedCharacter; } buffer.unget(consumedCharacters); return false; } }; EntityParser.replaceEntityNumbers = function(c) { switch(c) { case 0x00: return 0xFFFD; // REPLACEMENT CHARACTER case 0x13: return 0x0010; // Carriage return case 0x80: return 0x20AC; // EURO SIGN case 0x81: return 0x0081; // case 0x82: return 0x201A; // SINGLE LOW-9 QUOTATION MARK case 0x83: return 0x0192; // LATIN SMALL LETTER F WITH HOOK case 0x84: return 0x201E; // DOUBLE LOW-9 QUOTATION MARK case 0x85: return 0x2026; // HORIZONTAL ELLIPSIS case 0x86: return 0x2020; // DAGGER case 0x87: return 0x2021; // DOUBLE DAGGER case 0x88: return 0x02C6; // MODIFIER LETTER CIRCUMFLEX ACCENT case 0x89: return 0x2030; // PER MILLE SIGN case 0x8A: return 0x0160; // LATIN CAPITAL LETTER S WITH CARON case 0x8B: return 0x2039; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK case 0x8C: return 0x0152; // LATIN CAPITAL LIGATURE OE case 0x8D: return 0x008D; // case 0x8E: return 0x017D; // LATIN CAPITAL LETTER Z WITH CARON case 0x8F: return 0x008F; // case 0x90: return 0x0090; // case 0x91: return 0x2018; // LEFT SINGLE QUOTATION MARK case 0x92: return 0x2019; // RIGHT SINGLE QUOTATION MARK case 0x93: return 0x201C; // LEFT DOUBLE QUOTATION MARK case 0x94: return 0x201D; // RIGHT DOUBLE QUOTATION MARK case 0x95: return 0x2022; // BULLET case 0x96: return 0x2013; // EN DASH case 0x97: return 0x2014; // EM DASH case 0x98: return 0x02DC; // SMALL TILDE case 0x99: return 0x2122; // TRADE MARK SIGN case 0x9A: return 0x0161; // LATIN SMALL LETTER S WITH CARON case 0x9B: return 0x203A; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK case 0x9C: return 0x0153; // LATIN SMALL LIGATURE OE case 0x9D: return 0x009D; // case 0x9E: return 0x017E; // LATIN SMALL LETTER Z WITH CARON case 0x9F: return 0x0178; // LATIN CAPITAL LETTER Y WITH DIAERESIS default: if ((c >= 0xD800 && c <= 0xDFFF) || c > 0x10FFFF) { return 0xFFFD; } else if ((c >= 0x0001 && c <= 0x0008) || (c >= 0x000E && c <= 0x001F) || (c >= 0x007F && c <= 0x009F) || (c >= 0xFDD0 && c <= 0xFDEF) || c == 0x000B || c == 0xFFFE || c == 0x1FFFE || c == 0x2FFFFE || c == 0x2FFFF || c == 0x3FFFE || c == 0x3FFFF || c == 0x4FFFE || c == 0x4FFFF || c == 0x5FFFE || c == 0x5FFFF || c == 0x6FFFE || c == 0x6FFFF || c == 0x7FFFE || c == 0x7FFFF || c == 0x8FFFE || c == 0x8FFFF || c == 0x9FFFE || c == 0x9FFFF || c == 0xAFFFE || c == 0xAFFFF || c == 0xBFFFE || c == 0xBFFFF || c == 0xCFFFE || c == 0xCFFFF || c == 0xDFFFE || c == 0xDFFFF || c == 0xEFFFE || c == 0xEFFFF || c == 0xFFFFE || c == 0xFFFFF || c == 0x10FFFE || c == 0x10FFFF) { return c; } } }; exports.EntityParser = EntityParser; }, {"./InputStream":3,"html5-entities":12}], 3:[function(_dereq_,module,exports){ function InputStream() { this.data = ''; this.start = 0; this.committed = 0; this.eof = false; this.lastLocation = {line: 0, column: 0}; } InputStream.EOF = -1; InputStream.DRAIN = -2; InputStream.prototype = { slice: function() { if(this.start >= this.data.length) { if(!this.eof) throw InputStream.DRAIN; return InputStream.EOF; } return this.data.slice(this.start, this.data.length); }, char: function() { if(!this.eof && this.start >= this.data.length - 1) throw InputStream.DRAIN; if(this.start >= this.data.length) { return InputStream.EOF; } var ch = this.data[this.start++]; if (ch === '\r') ch = '\n'; return ch; }, advance: function(amount) { this.start += amount; if(this.start >= this.data.length) { if(!this.eof) throw InputStream.DRAIN; return InputStream.EOF; } else { if(this.committed > this.data.length / 2) { this.lastLocation = this.location(); this.data = this.data.slice(this.committed); this.start = this.start - this.committed; this.committed = 0; } } }, matchWhile: function(re) { if(this.eof && this.start >= this.data.length ) return ''; var r = new RegExp("^"+re+"+"); var m = r.exec(this.slice()); if(m) { if(!this.eof && m[0].length == this.data.length - this.start) throw InputStream.DRAIN; this.advance(m[0].length); return m[0]; } else { return ''; } }, matchUntil: function(re) { var m, s; s = this.slice(); if(s === InputStream.EOF) { return ''; } else if(m = new RegExp(re + (this.eof ? "|$" : "")).exec(s)) { var t = this.data.slice(this.start, this.start + m.index); this.advance(m.index); return t.replace(/\r/g, '\n').replace(/\n{2,}/g, '\n'); } else { throw InputStream.DRAIN; } }, append: function(data) { this.data += data; }, shift: function(n) { if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN; if(this.eof && this.start >= this.data.length) return InputStream.EOF; var d = this.data.slice(this.start, this.start + n).toString(); this.advance(Math.min(n, this.data.length - this.start)); return d; }, peek: function(n) { if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN; if(this.eof && this.start >= this.data.length) return InputStream.EOF; return this.data.slice(this.start, Math.min(this.start + n, this.data.length)).toString(); }, length: function() { return this.data.length - this.start - 1; }, unget: function(d) { if(d === InputStream.EOF) return; this.start -= (d.length); }, undo: function() { this.start = this.committed; }, commit: function() { this.committed = this.start; }, location: function() { var lastLine = this.lastLocation.line; var lastColumn = this.lastLocation.column; var read = this.data.slice(0, this.committed); var newlines = read.match(/\n/g); var line = newlines ? lastLine + newlines.length : lastLine; var column = newlines ? read.length - read.lastIndexOf('\n') - 1 : lastColumn + read.length; return {line: line, column: column}; } }; exports.InputStream = InputStream; }, {}], 4:[function(_dereq_,module,exports){ var SpecialElements = { "http://www.w3.org/1999/xhtml": [ 'address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp' ], "http://www.w3.org/1998/Math/MathML": [ 'mi', 'mo', 'mn', 'ms', 'mtext', 'annotation-xml' ], "http://www.w3.org/2000/svg": [ 'foreignObject', 'desc', 'title' ] }; function StackItem(namespaceURI, localName, attributes, node) { this.localName = localName; this.namespaceURI = namespaceURI; this.attributes = attributes; this.node = node; } StackItem.prototype.isSpecial = function() { return this.namespaceURI in SpecialElements && SpecialElements[this.namespaceURI].indexOf(this.localName) > -1; }; StackItem.prototype.isFosterParenting = function() { if (this.namespaceURI === "http://www.w3.org/1999/xhtml") { return this.localName === 'table' || this.localName === 'tbody' || this.localName === 'tfoot' || this.localName === 'thead' || this.localName === 'tr'; } return false; }; StackItem.prototype.isNumberedHeader = function() { if (this.namespaceURI === "http://www.w3.org/1999/xhtml") { return this.localName === 'h1' || this.localName === 'h2' || this.localName === 'h3' || this.localName === 'h4' || this.localName === 'h5' || this.localName === 'h6'; } return false; }; StackItem.prototype.isForeign = function() { return this.namespaceURI != "http://www.w3.org/1999/xhtml"; }; function getAttribute(item, name) { for (var i = 0; i < item.attributes.length; i++) { if (item.attributes[i].nodeName == name) return item.attributes[i].nodeValue; } return null; } StackItem.prototype.isHtmlIntegrationPoint = function() { if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") { if (this.localName !== "annotation-xml") return false; var encoding = getAttribute(this, 'encoding'); if (!encoding) return false; encoding = encoding.toLowerCase(); return encoding === "text/html" || encoding === "application/xhtml+xml"; } if (this.namespaceURI === "http://www.w3.org/2000/svg") { return this.localName === "foreignObject" || this.localName === "desc" || this.localName === "title"; } return false; }; StackItem.prototype.isMathMLTextIntegrationPoint = function() { if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") { return this.localName === "mi" || this.localName === "mo" || this.localName === "mn" || this.localName === "ms" || this.localName === "mtext"; } return false; }; exports.StackItem = StackItem; }, {}], 5:[function(_dereq_,module,exports){ var InputStream = _dereq_('./InputStream').InputStream; var EntityParser = _dereq_('./EntityParser').EntityParser; function isWhitespace(c){ return c === " " || c === "\n" || c === "\t" || c === "\r" || c === "\f"; } function isAlpha(c) { return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); } function Tokenizer(tokenHandler) { this._tokenHandler = tokenHandler; this._state = Tokenizer.DATA; this._inputStream = new InputStream(); this._currentToken = null; this._temporaryBuffer = ''; this._additionalAllowedCharacter = ''; } Tokenizer.prototype._parseError = function(code, args) { this._tokenHandler.parseError(code, args); }; Tokenizer.prototype._emitToken = function(token) { if (token.type === 'StartTag') { for (var i = 1; i < token.data.length; i++) { if (!token.data[i].nodeName) token.data.splice(i--, 1); } } else if (token.type === 'EndTag') { if (token.selfClosing) { this._parseError('self-closing-flag-on-end-tag'); } if (token.data.length !== 0) { this._parseError('attributes-in-end-tag'); } } this._tokenHandler.processToken(token); if (token.type === 'StartTag' && token.selfClosing && !this._tokenHandler.isSelfClosingFlagAcknowledged()) { this._parseError('non-void-element-with-trailing-solidus', {name: token.name}); } }; Tokenizer.prototype._emitCurrentToken = function() { this._state = Tokenizer.DATA; this._emitToken(this._currentToken); }; Tokenizer.prototype._currentAttribute = function() { return this._currentToken.data[this._currentToken.data.length - 1]; }; Tokenizer.prototype.setState = function(state) { this._state = state; }; Tokenizer.prototype.tokenize = function(source) { Tokenizer.DATA = data_state; Tokenizer.RCDATA = rcdata_state; Tokenizer.RAWTEXT = rawtext_state; Tokenizer.SCRIPT_DATA = script_data_state; Tokenizer.PLAINTEXT = plaintext_state; this._state = Tokenizer.DATA; this._inputStream.append(source); this._tokenHandler.startTokenization(this); this._inputStream.eof = true; var tokenizer = this; while (this._state.call(this, this._inputStream)); function data_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._emitToken({type: 'EOF', data: null}); return false; } else if (data === '&') { tokenizer.setState(character_reference_in_data_state); } else if (data === '<') { tokenizer.setState(tag_open_state); } else if (data === '\u0000') { tokenizer._emitToken({type: 'Characters', data: data}); buffer.commit(); } else { var chars = buffer.matchUntil("&|<|\u0000"); tokenizer._emitToken({type: 'Characters', data: data + chars}); buffer.commit(); } return true; } function character_reference_in_data_state(buffer) { var character = EntityParser.consumeEntity(buffer, tokenizer); tokenizer.setState(data_state); tokenizer._emitToken({type: 'Characters', data: character || '&'}); return true; } function rcdata_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._emitToken({type: 'EOF', data: null}); return false; } else if (data === '&') { tokenizer.setState(character_reference_in_rcdata_state); } else if (data === '<') { tokenizer.setState(rcdata_less_than_sign_state); } else if (data === "\u0000") { tokenizer._parseError("invalid-codepoint"); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); buffer.commit(); } else { var chars = buffer.matchUntil("&|<|\u0000"); tokenizer._emitToken({type: 'Characters', data: data + chars}); buffer.commit(); } return true; } function character_reference_in_rcdata_state(buffer) { var character = EntityParser.consumeEntity(buffer, tokenizer); tokenizer.setState(rcdata_state); tokenizer._emitToken({type: 'Characters', data: character || '&'}); return true; } function rawtext_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._emitToken({type: 'EOF', data: null}); return false; } else if (data === '<') { tokenizer.setState(rawtext_less_than_sign_state); } else if (data === "\u0000") { tokenizer._parseError("invalid-codepoint"); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); buffer.commit(); } else { var chars = buffer.matchUntil("<|\u0000"); tokenizer._emitToken({type: 'Characters', data: data + chars}); } return true; } function plaintext_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._emitToken({type: 'EOF', data: null}); return false; } else if (data === "\u0000") { tokenizer._parseError("invalid-codepoint"); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); buffer.commit(); } else { var chars = buffer.matchUntil("\u0000"); tokenizer._emitToken({type: 'Characters', data: data + chars}); } return true; } function script_data_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._emitToken({type: 'EOF', data: null}); return false; } else if (data === '<') { tokenizer.setState(script_data_less_than_sign_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); buffer.commit(); } else { var chars = buffer.matchUntil("<|\u0000"); tokenizer._emitToken({type: 'Characters', data: data + chars}); } return true; } function rcdata_less_than_sign_state(buffer) { var data = buffer.char(); if (data === "/") { this._temporaryBuffer = ''; tokenizer.setState(rcdata_end_tag_open_state); } else { tokenizer._emitToken({type: 'Characters', data: '<'}); buffer.unget(data); tokenizer.setState(rcdata_state); } return true; } function rcdata_end_tag_open_state(buffer) { var data = buffer.char(); if (isAlpha(data)) { this._temporaryBuffer += data; tokenizer.setState(rcdata_end_tag_name_state); } else { tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false}; tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else if (isAlpha(data)) { this._temporaryBuffer += data; buffer.commit(); } else { tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false}; tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else if (isAlpha(data)) { this._temporaryBuffer += data; buffer.commit(); } else { tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false}; tokenizer._emitCurrentToken(); } else if (isAlpha(data)) { this._temporaryBuffer += data; buffer.commit(); } else { tokenizer._emitToken({type: 'Characters', data: '') { tokenizer._emitToken({type: 'Characters', data: '>'}); tokenizer.setState(script_data_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); tokenizer.setState(script_data_escaped_state); } else { tokenizer._emitToken({type: 'Characters', data: data}); tokenizer.setState(script_data_escaped_state); } return true; } function script_data_escaped_less_then_sign_state(buffer) { var data = buffer.char(); if (data === '/') { this._temporaryBuffer = ''; tokenizer.setState(script_data_escaped_end_tag_open_state); } else if (isAlpha(data)) { tokenizer._emitToken({type: 'Characters', data: '<' + data}); this._temporaryBuffer = data; tokenizer.setState(script_data_double_escape_start_state); } else { tokenizer._emitToken({type: 'Characters', data: '<'}); buffer.unget(data); tokenizer.setState(script_data_escaped_state); } return true; } function script_data_escaped_end_tag_open_state(buffer) { var data = buffer.char(); if (isAlpha(data)) { this._temporaryBuffer = data; tokenizer.setState(script_data_escaped_end_tag_name_state); } else { tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false}; tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isAlpha(data)) { this._temporaryBuffer += data; buffer.commit(); } else { tokenizer._emitToken({type: 'Characters', data: '') { tokenizer._emitToken({type: 'Characters', data: data}); if (this._temporaryBuffer.toLowerCase() === 'script') tokenizer.setState(script_data_double_escaped_state); else tokenizer.setState(script_data_escaped_state); } else if (isAlpha(data)) { tokenizer._emitToken({type: 'Characters', data: data}); this._temporaryBuffer += data; buffer.commit(); } else { buffer.unget(data); tokenizer.setState(script_data_escaped_state); } return true; } function script_data_double_escaped_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError('eof-in-script'); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer._emitToken({type: 'Characters', data: '-'}); tokenizer.setState(script_data_double_escaped_dash_state); } else if (data === '<') { tokenizer._emitToken({type: 'Characters', data: '<'}); tokenizer.setState(script_data_double_escaped_less_than_sign_state); } else if (data === '\u0000') { tokenizer._parseError('invalid-codepoint'); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); buffer.commit(); } else { tokenizer._emitToken({type: 'Characters', data: data}); buffer.commit(); } return true; } function script_data_double_escaped_dash_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError('eof-in-script'); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer._emitToken({type: 'Characters', data: '-'}); tokenizer.setState(script_data_double_escaped_dash_dash_state); } else if (data === '<') { tokenizer._emitToken({type: 'Characters', data: '<'}); tokenizer.setState(script_data_double_escaped_less_than_sign_state); } else if (data === '\u0000') { tokenizer._parseError('invalid-codepoint'); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); tokenizer.setState(script_data_double_escaped_state); } else { tokenizer._emitToken({type: 'Characters', data: data}); tokenizer.setState(script_data_double_escaped_state); } return true; } function script_data_double_escaped_dash_dash_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError('eof-in-script'); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer._emitToken({type: 'Characters', data: '-'}); buffer.commit(); } else if (data === '<') { tokenizer._emitToken({type: 'Characters', data: '<'}); tokenizer.setState(script_data_double_escaped_less_than_sign_state); } else if (data === '>') { tokenizer._emitToken({type: 'Characters', data: '>'}); tokenizer.setState(script_data_state); } else if (data === '\u0000') { tokenizer._parseError('invalid-codepoint'); tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); tokenizer.setState(script_data_double_escaped_state); } else { tokenizer._emitToken({type: 'Characters', data: data}); tokenizer.setState(script_data_double_escaped_state); } return true; } function script_data_double_escaped_less_than_sign_state(buffer) { var data = buffer.char(); if (data === '/') { tokenizer._emitToken({type: 'Characters', data: '/'}); this._temporaryBuffer = ''; tokenizer.setState(script_data_double_escape_end_state); } else { buffer.unget(data); tokenizer.setState(script_data_double_escaped_state); } return true; } function script_data_double_escape_end_state(buffer) { var data = buffer.char(); if (isWhitespace(data) || data === '/' || data === '>') { tokenizer._emitToken({type: 'Characters', data: data}); if (this._temporaryBuffer.toLowerCase() === 'script') tokenizer.setState(script_data_escaped_state); else tokenizer.setState(script_data_double_escaped_state); } else if (isAlpha(data)) { tokenizer._emitToken({type: 'Characters', data: data}); this._temporaryBuffer += data; buffer.commit(); } else { buffer.unget(data); tokenizer.setState(script_data_double_escaped_state); } return true; } function tag_open_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("bare-less-than-sign-at-eof"); tokenizer._emitToken({type: 'Characters', data: '<'}); buffer.unget(data); tokenizer.setState(data_state); } else if (isAlpha(data)) { tokenizer._currentToken = {type: 'StartTag', name: data.toLowerCase(), data: []}; tokenizer.setState(tag_name_state); } else if (data === '!') { tokenizer.setState(markup_declaration_open_state); } else if (data === '/') { tokenizer.setState(close_tag_open_state); } else if (data === '>') { tokenizer._parseError("expected-tag-name-but-got-right-bracket"); tokenizer._emitToken({type: 'Characters', data: "<>"}); tokenizer.setState(data_state); } else if (data === '?') { tokenizer._parseError("expected-tag-name-but-got-question-mark"); buffer.unget(data); tokenizer.setState(bogus_comment_state); } else { tokenizer._parseError("expected-tag-name"); tokenizer._emitToken({type: 'Characters', data: "<"}); buffer.unget(data); tokenizer.setState(data_state); } return true; } function close_tag_open_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("expected-closing-tag-but-got-eof"); tokenizer._emitToken({type: 'Characters', data: '') { tokenizer._parseError("expected-closing-tag-but-got-right-bracket"); tokenizer.setState(data_state); } else { tokenizer._parseError("expected-closing-tag-but-got-char", {data: data}); // param 1 is datavars: buffer.unget(data); tokenizer.setState(bogus_comment_state); } return true; } function tag_name_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError('eof-in-tag-name'); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { tokenizer.setState(before_attribute_name_state); } else if (isAlpha(data)) { tokenizer._currentToken.name += data.toLowerCase(); } else if (data === '>') { tokenizer._emitCurrentToken(); } else if (data === '/') { tokenizer.setState(self_closing_tag_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.name += "\uFFFD"; } else { tokenizer._currentToken.name += data; } buffer.commit(); return true; } function before_attribute_name_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("expected-attribute-name-but-got-eof"); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { return true; } else if (isAlpha(data)) { tokenizer._currentToken.data.push({nodeName: data.toLowerCase(), nodeValue: ""}); tokenizer.setState(attribute_name_state); } else if (data === '>') { tokenizer._emitCurrentToken(); } else if (data === '/') { tokenizer.setState(self_closing_tag_state); } else if (data === "'" || data === '"' || data === '=' || data === '<') { tokenizer._parseError("invalid-character-in-attribute-name"); tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); tokenizer.setState(attribute_name_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""}); } else { tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); tokenizer.setState(attribute_name_state); } return true; } function attribute_name_state(buffer) { var data = buffer.char(); var leavingThisState = true; var shouldEmit = false; if (data === InputStream.EOF) { tokenizer._parseError("eof-in-attribute-name"); buffer.unget(data); tokenizer.setState(data_state); shouldEmit = true; } else if (data === '=') { tokenizer.setState(before_attribute_value_state); } else if (isAlpha(data)) { tokenizer._currentAttribute().nodeName += data.toLowerCase(); leavingThisState = false; } else if (data === '>') { shouldEmit = true; } else if (isWhitespace(data)) { tokenizer.setState(after_attribute_name_state); } else if (data === '/') { tokenizer.setState(self_closing_tag_state); } else if (data === "'" || data === '"') { tokenizer._parseError("invalid-character-in-attribute-name"); tokenizer._currentAttribute().nodeName += data; leavingThisState = false; } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentAttribute().nodeName += "\uFFFD"; } else { tokenizer._currentAttribute().nodeName += data; leavingThisState = false; } if (leavingThisState) { var attributes = tokenizer._currentToken.data; var currentAttribute = attributes[attributes.length - 1]; for (var i = attributes.length - 2; i >= 0; i--) { if (currentAttribute.nodeName === attributes[i].nodeName) { tokenizer._parseError("duplicate-attribute", {name: currentAttribute.nodeName}); currentAttribute.nodeName = null; break; } } if (shouldEmit) tokenizer._emitCurrentToken(); } else { buffer.commit(); } return true; } function after_attribute_name_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("expected-end-of-tag-but-got-eof"); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { return true; } else if (data === '=') { tokenizer.setState(before_attribute_value_state); } else if (data === '>') { tokenizer._emitCurrentToken(); } else if (isAlpha(data)) { tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); tokenizer.setState(attribute_name_state); } else if (data === '/') { tokenizer.setState(self_closing_tag_state); } else if (data === "'" || data === '"' || data === '<') { tokenizer._parseError("invalid-character-after-attribute-name"); tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); tokenizer.setState(attribute_name_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""}); } else { tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); tokenizer.setState(attribute_name_state); } return true; } function before_attribute_value_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("expected-attribute-value-but-got-eof"); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { return true; } else if (data === '"') { tokenizer.setState(attribute_value_double_quoted_state); } else if (data === '&') { tokenizer.setState(attribute_value_unquoted_state); buffer.unget(data); } else if (data === "'") { tokenizer.setState(attribute_value_single_quoted_state); } else if (data === '>') { tokenizer._parseError("expected-attribute-value-but-got-right-bracket"); tokenizer._emitCurrentToken(); } else if (data === '=' || data === '<' || data === '`') { tokenizer._parseError("unexpected-character-in-unquoted-attribute-value"); tokenizer._currentAttribute().nodeValue += data; tokenizer.setState(attribute_value_unquoted_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentAttribute().nodeValue += "\uFFFD"; } else { tokenizer._currentAttribute().nodeValue += data; tokenizer.setState(attribute_value_unquoted_state); } return true; } function attribute_value_double_quoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-attribute-value-double-quote"); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '"') { tokenizer.setState(after_attribute_value_state); } else if (data === '&') { this._additionalAllowedCharacter = '"'; tokenizer.setState(character_reference_in_attribute_value_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentAttribute().nodeValue += "\uFFFD"; } else { var s = buffer.matchUntil('[\0"&]'); data = data + s; tokenizer._currentAttribute().nodeValue += data; } return true; } function attribute_value_single_quoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-attribute-value-single-quote"); buffer.unget(data); tokenizer.setState(data_state); } else if (data === "'") { tokenizer.setState(after_attribute_value_state); } else if (data === '&') { this._additionalAllowedCharacter = "'"; tokenizer.setState(character_reference_in_attribute_value_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentAttribute().nodeValue += "\uFFFD"; } else { tokenizer._currentAttribute().nodeValue += data + buffer.matchUntil("\u0000|['&]"); } return true; } function attribute_value_unquoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-after-attribute-value"); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { tokenizer.setState(before_attribute_name_state); } else if (data === '&') { this._additionalAllowedCharacter = ">"; tokenizer.setState(character_reference_in_attribute_value_state); } else if (data === '>') { tokenizer._emitCurrentToken(); } else if (data === '"' || data === "'" || data === '=' || data === '`' || data === '<') { tokenizer._parseError("unexpected-character-in-unquoted-attribute-value"); tokenizer._currentAttribute().nodeValue += data; buffer.commit(); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentAttribute().nodeValue += "\uFFFD"; } else { var o = buffer.matchUntil("\u0000|["+ "\t\n\v\f\x20\r" + "&<>\"'=`" +"]"); if (o === InputStream.EOF) { tokenizer._parseError("eof-in-attribute-value-no-quotes"); tokenizer._emitCurrentToken(); } buffer.commit(); tokenizer._currentAttribute().nodeValue += data + o; } return true; } function character_reference_in_attribute_value_state(buffer) { var character = EntityParser.consumeEntity(buffer, tokenizer, this._additionalAllowedCharacter); this._currentAttribute().nodeValue += character || '&'; if (this._additionalAllowedCharacter === '"') tokenizer.setState(attribute_value_double_quoted_state); else if (this._additionalAllowedCharacter === '\'') tokenizer.setState(attribute_value_single_quoted_state); else if (this._additionalAllowedCharacter === '>') tokenizer.setState(attribute_value_unquoted_state); return true; } function after_attribute_value_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-after-attribute-value"); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { tokenizer.setState(before_attribute_name_state); } else if (data === '>') { tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (data === '/') { tokenizer.setState(self_closing_tag_state); } else { tokenizer._parseError("unexpected-character-after-attribute-value"); buffer.unget(data); tokenizer.setState(before_attribute_name_state); } return true; } function self_closing_tag_state(buffer) { var c = buffer.char(); if (c === InputStream.EOF) { tokenizer._parseError("unexpected-eof-after-solidus-in-tag"); buffer.unget(c); tokenizer.setState(data_state); } else if (c === '>') { tokenizer._currentToken.selfClosing = true; tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { tokenizer._parseError("unexpected-character-after-solidus-in-tag"); buffer.unget(c); tokenizer.setState(before_attribute_name_state); } return true; } function bogus_comment_state(buffer) { var data = buffer.matchUntil('>'); data = data.replace(/\u0000/g, "\uFFFD"); buffer.char(); tokenizer._emitToken({type: 'Comment', data: data}); tokenizer.setState(data_state); return true; } function markup_declaration_open_state(buffer) { var chars = buffer.shift(2); if (chars === '--') { tokenizer._currentToken = {type: 'Comment', data: ''}; tokenizer.setState(comment_start_state); } else { var newchars = buffer.shift(5); if (newchars === InputStream.EOF || chars === InputStream.EOF) { tokenizer._parseError("expected-dashes-or-doctype"); tokenizer.setState(bogus_comment_state); buffer.unget(chars); return true; } chars += newchars; if (chars.toUpperCase() === 'DOCTYPE') { tokenizer._currentToken = {type: 'Doctype', name: '', publicId: null, systemId: null, forceQuirks: false}; tokenizer.setState(doctype_state); } else if (tokenizer._tokenHandler.isCdataSectionAllowed() && chars === '[CDATA[') { tokenizer.setState(cdata_section_state); } else { tokenizer._parseError("expected-dashes-or-doctype"); buffer.unget(chars); tokenizer.setState(bogus_comment_state); } } return true; } function cdata_section_state(buffer) { var data = buffer.matchUntil(']]>'); buffer.shift(3); if (data) { tokenizer._emitToken({type: 'Characters', data: data}); } tokenizer.setState(data_state); return true; } function comment_start_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-comment"); tokenizer._emitToken(tokenizer._currentToken); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer.setState(comment_start_dash_state); } else if (data === '>') { tokenizer._parseError("incorrect-comment"); tokenizer._emitToken(tokenizer._currentToken); tokenizer.setState(data_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data += "\uFFFD"; } else { tokenizer._currentToken.data += data; tokenizer.setState(comment_state); } return true; } function comment_start_dash_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-comment"); tokenizer._emitToken(tokenizer._currentToken); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer.setState(comment_end_state); } else if (data === '>') { tokenizer._parseError("incorrect-comment"); tokenizer._emitToken(tokenizer._currentToken); tokenizer.setState(data_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data += "\uFFFD"; } else { tokenizer._currentToken.data += '-' + data; tokenizer.setState(comment_state); } return true; } function comment_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-comment"); tokenizer._emitToken(tokenizer._currentToken); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer.setState(comment_end_dash_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data += "\uFFFD"; } else { tokenizer._currentToken.data += data; buffer.commit(); } return true; } function comment_end_dash_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-comment-end-dash"); tokenizer._emitToken(tokenizer._currentToken); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '-') { tokenizer.setState(comment_end_state); } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data += "-\uFFFD"; tokenizer.setState(comment_state); } else { tokenizer._currentToken.data += '-' + data + buffer.matchUntil('\u0000|-'); buffer.char(); } return true; } function comment_end_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-comment-double-dash"); tokenizer._emitToken(tokenizer._currentToken); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '>') { tokenizer._emitToken(tokenizer._currentToken); tokenizer.setState(data_state); } else if (data === '!') { tokenizer._parseError("unexpected-bang-after-double-dash-in-comment"); tokenizer.setState(comment_end_bang_state); } else if (data === '-') { tokenizer._parseError("unexpected-dash-after-double-dash-in-comment"); tokenizer._currentToken.data += data; } else if (data === '\u0000') { tokenizer._parseError("invalid-codepoint"); tokenizer._currentToken.data += "--\uFFFD"; tokenizer.setState(comment_state); } else { tokenizer._parseError("unexpected-char-in-comment"); tokenizer._currentToken.data += '--' + data; tokenizer.setState(comment_state); } return true; } function comment_end_bang_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-comment-end-bang-state"); tokenizer._emitToken(tokenizer._currentToken); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '>') { tokenizer._emitToken(tokenizer._currentToken); tokenizer.setState(data_state); } else if (data === '-') { tokenizer._currentToken.data += '--!'; tokenizer.setState(comment_end_dash_state); } else { tokenizer._currentToken.data += '--!' + data; tokenizer.setState(comment_state); } return true; } function doctype_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("expected-doctype-name-but-got-eof"); tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isWhitespace(data)) { tokenizer.setState(before_doctype_name_state); } else { tokenizer._parseError("need-space-after-doctype"); buffer.unget(data); tokenizer.setState(before_doctype_name_state); } return true; } function before_doctype_name_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("expected-doctype-name-but-got-eof"); tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isWhitespace(data)) { } else if (data === '>') { tokenizer._parseError("expected-doctype-name-but-got-right-bracket"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { if (isAlpha(data)) data = data.toLowerCase(); tokenizer._currentToken.name = data; tokenizer.setState(doctype_name_state); } return true; } function doctype_name_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer._parseError("eof-in-doctype-name"); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isWhitespace(data)) { tokenizer.setState(after_doctype_name_state); } else if (data === '>') { tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { if (isAlpha(data)) data = data.toLowerCase(); tokenizer._currentToken.name += data; buffer.commit(); } return true; } function after_doctype_name_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer._parseError("eof-in-doctype"); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isWhitespace(data)) { } else if (data === '>') { tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { if (['p', 'P'].indexOf(data) > -1) { var expected = [['u', 'U'], ['b', 'B'], ['l', 'L'], ['i', 'I'], ['c', 'C']]; var matched = expected.every(function(expected){ data = buffer.char(); return expected.indexOf(data) > -1; }); if (matched) { tokenizer.setState(after_doctype_public_keyword_state); return true; } } else if (['s', 'S'].indexOf(data) > -1) { var expected = [['y', 'Y'], ['s', 'S'], ['t', 'T'], ['e', 'E'], ['m', 'M']]; var matched = expected.every(function(expected){ data = buffer.char(); return expected.indexOf(data) > -1; }); if (matched) { tokenizer.setState(after_doctype_system_keyword_state); return true; } } buffer.unget(data); tokenizer._currentToken.forceQuirks = true; if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { tokenizer._parseError("expected-space-or-right-bracket-in-doctype", {data: data}); tokenizer.setState(bogus_doctype_state); } } return true; } function after_doctype_public_keyword_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isWhitespace(data)) { tokenizer.setState(before_doctype_public_identifier_state); } else if (data === "'" || data === '"') { tokenizer._parseError("unexpected-char-in-doctype"); buffer.unget(data); tokenizer.setState(before_doctype_public_identifier_state); } else { buffer.unget(data); tokenizer.setState(before_doctype_public_identifier_state); } return true; } function before_doctype_public_identifier_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (isWhitespace(data)) { } else if (data === '"') { tokenizer._currentToken.publicId = ''; tokenizer.setState(doctype_public_identifier_double_quoted_state); } else if (data === "'") { tokenizer._currentToken.publicId = ''; tokenizer.setState(doctype_public_identifier_single_quoted_state); } else if (data === '>') { tokenizer._parseError("unexpected-end-of-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(bogus_doctype_state); } return true; } function doctype_public_identifier_double_quoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (data === '"') { tokenizer.setState(after_doctype_public_identifier_state); } else if (data === '>') { tokenizer._parseError("unexpected-end-of-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { tokenizer._currentToken.publicId += data; } return true; } function doctype_public_identifier_single_quoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; buffer.unget(data); tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (data === "'") { tokenizer.setState(after_doctype_public_identifier_state); } else if (data === '>') { tokenizer._parseError("unexpected-end-of-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else { tokenizer._currentToken.publicId += data; } return true; } function after_doctype_public_identifier_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { tokenizer.setState(between_doctype_public_and_system_identifiers_state); } else if (data === '>') { tokenizer.setState(data_state); tokenizer._emitCurrentToken(); } else if (data === '"') { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer._currentToken.systemId = ''; tokenizer.setState(doctype_system_identifier_double_quoted_state); } else if (data === "'") { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer._currentToken.systemId = ''; tokenizer.setState(doctype_system_identifier_single_quoted_state); } else { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(bogus_doctype_state); } return true; } function between_doctype_public_and_system_identifiers_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { } else if (data === '>') { tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else if (data === '"') { tokenizer._currentToken.systemId = ''; tokenizer.setState(doctype_system_identifier_double_quoted_state); } else if (data === "'") { tokenizer._currentToken.systemId = ''; tokenizer.setState(doctype_system_identifier_single_quoted_state); } else { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(bogus_doctype_state); } return true; } function after_doctype_system_keyword_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { tokenizer.setState(before_doctype_system_identifier_state); } else if (data === "'" || data === '"') { tokenizer._parseError("unexpected-char-in-doctype"); buffer.unget(data); tokenizer.setState(before_doctype_system_identifier_state); } else { buffer.unget(data); tokenizer.setState(before_doctype_system_identifier_state); } return true; } function before_doctype_system_identifier_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { } else if (data === '"') { tokenizer._currentToken.systemId = ''; tokenizer.setState(doctype_system_identifier_double_quoted_state); } else if (data === "'") { tokenizer._currentToken.systemId = ''; tokenizer.setState(doctype_system_identifier_single_quoted_state); } else if (data === '>') { tokenizer._parseError("unexpected-end-of-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer.setState(bogus_doctype_state); } return true; } function doctype_system_identifier_double_quoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (data === '"') { tokenizer.setState(after_doctype_system_identifier_state); } else if (data === '>') { tokenizer._parseError("unexpected-end-of-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else { tokenizer._currentToken.systemId += data; } return true; } function doctype_system_identifier_single_quoted_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (data === "'") { tokenizer.setState(after_doctype_system_identifier_state); } else if (data === '>') { tokenizer._parseError("unexpected-end-of-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else { tokenizer._currentToken.systemId += data; } return true; } function after_doctype_system_identifier_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { tokenizer._parseError("eof-in-doctype"); tokenizer._currentToken.forceQuirks = true; tokenizer._emitCurrentToken(); buffer.unget(data); tokenizer.setState(data_state); } else if (isWhitespace(data)) { } else if (data === '>') { tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else { tokenizer._parseError("unexpected-char-in-doctype"); tokenizer.setState(bogus_doctype_state); } return true; } function bogus_doctype_state(buffer) { var data = buffer.char(); if (data === InputStream.EOF) { buffer.unget(data); tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } else if (data === '>') { tokenizer._emitCurrentToken(); tokenizer.setState(data_state); } return true; } }; Object.defineProperty(Tokenizer.prototype, 'lineNumber', { get: function() { return this._inputStream.location().line; } }); Object.defineProperty(Tokenizer.prototype, 'columnNumber', { get: function() { return this._inputStream.location().column; } }); exports.Tokenizer = Tokenizer; }, {"./EntityParser":2,"./InputStream":3}], 6:[function(_dereq_,module,exports){ var assert = _dereq_('assert'); var messages = _dereq_('./messages.json'); var constants = _dereq_('./constants'); var EventEmitter = _dereq_('events').EventEmitter; var Tokenizer = _dereq_('./Tokenizer').Tokenizer; var ElementStack = _dereq_('./ElementStack').ElementStack; var StackItem = _dereq_('./StackItem').StackItem; var Marker = {}; function isWhitespace(ch) { return ch === " " || ch === "\n" || ch === "\t" || ch === "\r" || ch === "\f"; } function isWhitespaceOrReplacementCharacter(ch) { return isWhitespace(ch) || ch === '\uFFFD'; } function isAllWhitespace(characters) { for (var i = 0; i < characters.length; i++) { var ch = characters[i]; if (!isWhitespace(ch)) return false; } return true; } function isAllWhitespaceOrReplacementCharacters(characters) { for (var i = 0; i < characters.length; i++) { var ch = characters[i]; if (!isWhitespaceOrReplacementCharacter(ch)) return false; } return true; } function getAttribute(node, name) { for (var i = 0; i < node.attributes.length; i++) { var attribute = node.attributes[i]; if (attribute.nodeName === name) { return attribute; } } return null; } function CharacterBuffer(characters) { this.characters = characters; this.current = 0; this.end = this.characters.length; } CharacterBuffer.prototype.skipAtMostOneLeadingNewline = function() { if (this.characters[this.current] === '\n') this.current++; }; CharacterBuffer.prototype.skipLeadingWhitespace = function() { while (isWhitespace(this.characters[this.current])) { if (++this.current == this.end) return; } }; CharacterBuffer.prototype.skipLeadingNonWhitespace = function() { while (!isWhitespace(this.characters[this.current])) { if (++this.current == this.end) return; } }; CharacterBuffer.prototype.takeRemaining = function() { return this.characters.substring(this.current); }; CharacterBuffer.prototype.takeLeadingWhitespace = function() { var start = this.current; this.skipLeadingWhitespace(); if (start === this.current) return ""; return this.characters.substring(start, this.current - start); }; Object.defineProperty(CharacterBuffer.prototype, 'length', { get: function(){ return this.end - this.current; } }); function TreeBuilder() { this.tokenizer = null; this.errorHandler = null; this.scriptingEnabled = false; this.document = null; this.head = null; this.form = null; this.openElements = new ElementStack(); this.activeFormattingElements = []; this.insertionMode = null; this.insertionModeName = ""; this.originalInsertionMode = ""; this.inQuirksMode = false; // TODO quirks mode this.compatMode = "no quirks"; this.framesetOk = true; this.redirectAttachToFosterParent = false; this.selfClosingFlagAcknowledged = false; this.context = ""; this.pendingTableCharacters = []; this.shouldSkipLeadingNewline = false; var tree = this; var modes = this.insertionModes = {}; modes.base = { end_tag_handlers: {"-default": 'endTagOther'}, start_tag_handlers: {"-default": 'startTagOther'}, processEOF: function() { tree.generateImpliedEndTags(); if (tree.openElements.length > 2) { tree.parseError('expected-closing-tag-but-got-eof'); } else if (tree.openElements.length == 2 && tree.openElements.item(1).localName != 'body') { tree.parseError('expected-closing-tag-but-got-eof'); } else if (tree.context && tree.openElements.length > 1) { } }, processComment: function(data) { tree.insertComment(data, tree.currentStackItem().node); }, processDoctype: function(name, publicId, systemId, forceQuirks) { tree.parseError('unexpected-doctype'); }, processStartTag: function(name, attributes, selfClosing) { if (this[this.start_tag_handlers[name]]) { this[this.start_tag_handlers[name]](name, attributes, selfClosing); } else if (this[this.start_tag_handlers["-default"]]) { this[this.start_tag_handlers["-default"]](name, attributes, selfClosing); } else { throw(new Error("No handler found for "+name)); } }, processEndTag: function(name) { if (this[this.end_tag_handlers[name]]) { this[this.end_tag_handlers[name]](name); } else if (this[this.end_tag_handlers["-default"]]) { this[this.end_tag_handlers["-default"]](name); } else { throw(new Error("No handler found for "+name)); } }, startTagHtml: function(name, attributes) { modes.inBody.startTagHtml(name, attributes); } }; modes.initial = Object.create(modes.base); modes.initial.processEOF = function() { tree.parseError("expected-doctype-but-got-eof"); this.anythingElse(); tree.insertionMode.processEOF(); }; modes.initial.processComment = function(data) { tree.insertComment(data, tree.document); }; modes.initial.processDoctype = function(name, publicId, systemId, forceQuirks) { tree.insertDoctype(name || '', publicId || '', systemId || ''); if (forceQuirks || name != 'html' || (publicId != null && ([ "+//silmaril//dtd html pro v0r11 19970101//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//as//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html strict//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//ietf//dtd html//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//spyglass//dtd html 2.0 extended//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//", "html" ].some(publicIdStartsWith) || [ "-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html" ].indexOf(publicId.toLowerCase()) > -1 || (systemId == null && [ "-//w3c//dtd html 4.01 transitional//", "-//w3c//dtd html 4.01 frameset//" ].some(publicIdStartsWith))) ) || (systemId != null && (systemId.toLowerCase() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd")) ) { tree.compatMode = "quirks"; tree.parseError("quirky-doctype"); } else if (publicId != null && ([ "-//w3c//dtd xhtml 1.0 transitional//", "-//w3c//dtd xhtml 1.0 frameset//" ].some(publicIdStartsWith) || (systemId != null && [ "-//w3c//dtd html 4.01 transitional//", "-//w3c//dtd html 4.01 frameset//" ].indexOf(publicId.toLowerCase()) > -1)) ) { tree.compatMode = "limited quirks"; tree.parseError("almost-standards-doctype"); } else { if ((publicId == "-//W3C//DTD HTML 4.0//EN" && (systemId == null || systemId == "http://www.w3.org/TR/REC-html40/strict.dtd")) || (publicId == "-//W3C//DTD HTML 4.01//EN" && (systemId == null || systemId == "http://www.w3.org/TR/html4/strict.dtd")) || (publicId == "-//W3C//DTD XHTML 1.0 Strict//EN" && (systemId == "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd")) || (publicId == "-//W3C//DTD XHTML 1.1//EN" && (systemId == "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd")) ) { } else if (!((systemId == null || systemId == "about:legacy-compat") && publicId == null)) { tree.parseError("unknown-doctype"); } } tree.setInsertionMode('beforeHTML'); function publicIdStartsWith(string) { return publicId.toLowerCase().indexOf(string) === 0; } }; modes.initial.processCharacters = function(buffer) { buffer.skipLeadingWhitespace(); if (!buffer.length) return; tree.parseError('expected-doctype-but-got-chars'); this.anythingElse(); tree.insertionMode.processCharacters(buffer); }; modes.initial.processStartTag = function(name, attributes, selfClosing) { tree.parseError('expected-doctype-but-got-start-tag', {name: name}); this.anythingElse(); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.initial.processEndTag = function(name) { tree.parseError('expected-doctype-but-got-end-tag', {name: name}); this.anythingElse(); tree.insertionMode.processEndTag(name); }; modes.initial.anythingElse = function() { tree.compatMode = 'quirks'; tree.setInsertionMode('beforeHTML'); }; modes.beforeHTML = Object.create(modes.base); modes.beforeHTML.start_tag_handlers = { html: 'startTagHtml', '-default': 'startTagOther' }; modes.beforeHTML.processEOF = function() { this.anythingElse(); tree.insertionMode.processEOF(); }; modes.beforeHTML.processComment = function(data) { tree.insertComment(data, tree.document); }; modes.beforeHTML.processCharacters = function(buffer) { buffer.skipLeadingWhitespace(); if (!buffer.length) return; this.anythingElse(); tree.insertionMode.processCharacters(buffer); }; modes.beforeHTML.startTagHtml = function(name, attributes, selfClosing) { tree.insertHtmlElement(attributes); tree.setInsertionMode('beforeHead'); }; modes.beforeHTML.startTagOther = function(name, attributes, selfClosing) { this.anythingElse(); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.beforeHTML.processEndTag = function(name) { this.anythingElse(); tree.insertionMode.processEndTag(name); }; modes.beforeHTML.anythingElse = function() { tree.insertHtmlElement(); tree.setInsertionMode('beforeHead'); }; modes.afterAfterBody = Object.create(modes.base); modes.afterAfterBody.start_tag_handlers = { html: 'startTagHtml', '-default': 'startTagOther' }; modes.afterAfterBody.processComment = function(data) { tree.insertComment(data, tree.document); }; modes.afterAfterBody.processDoctype = function(data) { modes.inBody.processDoctype(data); }; modes.afterAfterBody.startTagHtml = function(data, attributes) { modes.inBody.startTagHtml(data, attributes); }; modes.afterAfterBody.startTagOther = function(name, attributes, selfClosing) { tree.parseError('unexpected-start-tag', {name: name}); tree.setInsertionMode('inBody'); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.afterAfterBody.endTagOther = function(name) { tree.parseError('unexpected-end-tag', {name: name}); tree.setInsertionMode('inBody'); tree.insertionMode.processEndTag(name); }; modes.afterAfterBody.processCharacters = function(data) { if (!isAllWhitespace(data.characters)) { tree.parseError('unexpected-char-after-body'); tree.setInsertionMode('inBody'); return tree.insertionMode.processCharacters(data); } modes.inBody.processCharacters(data); }; modes.afterBody = Object.create(modes.base); modes.afterBody.end_tag_handlers = { html: 'endTagHtml', '-default': 'endTagOther' }; modes.afterBody.processComment = function(data) { tree.insertComment(data, tree.openElements.rootNode); }; modes.afterBody.processCharacters = function(data) { if (!isAllWhitespace(data.characters)) { tree.parseError('unexpected-char-after-body'); tree.setInsertionMode('inBody'); return tree.insertionMode.processCharacters(data); } modes.inBody.processCharacters(data); }; modes.afterBody.processStartTag = function(name, attributes, selfClosing) { tree.parseError('unexpected-start-tag-after-body', {name: name}); tree.setInsertionMode('inBody'); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.afterBody.endTagHtml = function(name) { if (tree.context) { tree.parseError('end-html-in-innerhtml'); } else { tree.setInsertionMode('afterAfterBody'); } }; modes.afterBody.endTagOther = function(name) { tree.parseError('unexpected-end-tag-after-body', {name: name}); tree.setInsertionMode('inBody'); tree.insertionMode.processEndTag(name); }; modes.afterFrameset = Object.create(modes.base); modes.afterFrameset.start_tag_handlers = { html: 'startTagHtml', noframes: 'startTagNoframes', '-default': 'startTagOther' }; modes.afterFrameset.end_tag_handlers = { html: 'endTagHtml', '-default': 'endTagOther' }; modes.afterFrameset.processCharacters = function(buffer) { var characters = buffer.takeRemaining(); var whitespace = ""; for (var i = 0; i < characters.length; i++) { var ch = characters[i]; if (isWhitespace(ch)) whitespace += ch; } if (whitespace) { tree.insertText(whitespace); } if (whitespace.length < characters.length) tree.parseError('expected-eof-but-got-char'); }; modes.afterFrameset.startTagNoframes = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; modes.afterFrameset.startTagOther = function(name, attributes) { tree.parseError("unexpected-start-tag-after-frameset", {name: name}); }; modes.afterFrameset.endTagHtml = function(name) { tree.setInsertionMode('afterAfterFrameset'); }; modes.afterFrameset.endTagOther = function(name) { tree.parseError("unexpected-end-tag-after-frameset", {name: name}); }; modes.beforeHead = Object.create(modes.base); modes.beforeHead.start_tag_handlers = { html: 'startTagHtml', head: 'startTagHead', '-default': 'startTagOther' }; modes.beforeHead.end_tag_handlers = { html: 'endTagImplyHead', head: 'endTagImplyHead', body: 'endTagImplyHead', br: 'endTagImplyHead', '-default': 'endTagOther' }; modes.beforeHead.processEOF = function() { this.startTagHead('head', []); tree.insertionMode.processEOF(); }; modes.beforeHead.processCharacters = function(buffer) { buffer.skipLeadingWhitespace(); if (!buffer.length) return; this.startTagHead('head', []); tree.insertionMode.processCharacters(buffer); }; modes.beforeHead.startTagHead = function(name, attributes) { tree.insertHeadElement(attributes); tree.setInsertionMode('inHead'); }; modes.beforeHead.startTagOther = function(name, attributes, selfClosing) { this.startTagHead('head', []); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.beforeHead.endTagImplyHead = function(name) { this.startTagHead('head', []); tree.insertionMode.processEndTag(name); }; modes.beforeHead.endTagOther = function(name) { tree.parseError('end-tag-after-implied-root', {name: name}); }; modes.inHead = Object.create(modes.base); modes.inHead.start_tag_handlers = { html: 'startTagHtml', head: 'startTagHead', title: 'startTagTitle', script: 'startTagScript', style: 'startTagNoFramesStyle', noscript: 'startTagNoScript', noframes: 'startTagNoFramesStyle', base: 'startTagBaseBasefontBgsoundLink', basefont: 'startTagBaseBasefontBgsoundLink', bgsound: 'startTagBaseBasefontBgsoundLink', link: 'startTagBaseBasefontBgsoundLink', meta: 'startTagMeta', "-default": 'startTagOther' }; modes.inHead.end_tag_handlers = { head: 'endTagHead', html: 'endTagHtmlBodyBr', body: 'endTagHtmlBodyBr', br: 'endTagHtmlBodyBr', "-default": 'endTagOther' }; modes.inHead.processEOF = function() { var name = tree.currentStackItem().localName; if (['title', 'style', 'script'].indexOf(name) != -1) { tree.parseError("expected-named-closing-tag-but-got-eof", {name: name}); tree.popElement(); } this.anythingElse(); tree.insertionMode.processEOF(); }; modes.inHead.processCharacters = function(buffer) { var leadingWhitespace = buffer.takeLeadingWhitespace(); if (leadingWhitespace) tree.insertText(leadingWhitespace); if (!buffer.length) return; this.anythingElse(); tree.insertionMode.processCharacters(buffer); }; modes.inHead.startTagHtml = function(name, attributes) { modes.inBody.processStartTag(name, attributes); }; modes.inHead.startTagHead = function(name, attributes) { tree.parseError('two-heads-are-not-better-than-one'); }; modes.inHead.startTagTitle = function(name, attributes) { tree.processGenericRCDATAStartTag(name, attributes); }; modes.inHead.startTagNoScript = function(name, attributes) { if (tree.scriptingEnabled) return tree.processGenericRawTextStartTag(name, attributes); tree.insertElement(name, attributes); tree.setInsertionMode('inHeadNoscript'); }; modes.inHead.startTagNoFramesStyle = function(name, attributes) { tree.processGenericRawTextStartTag(name, attributes); }; modes.inHead.startTagScript = function(name, attributes) { tree.insertElement(name, attributes); tree.tokenizer.setState(Tokenizer.SCRIPT_DATA); tree.originalInsertionMode = tree.insertionModeName; tree.setInsertionMode('text'); }; modes.inHead.startTagBaseBasefontBgsoundLink = function(name, attributes) { tree.insertSelfClosingElement(name, attributes); }; modes.inHead.startTagMeta = function(name, attributes) { tree.insertSelfClosingElement(name, attributes); }; modes.inHead.startTagOther = function(name, attributes, selfClosing) { this.anythingElse(); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.inHead.endTagHead = function(name) { if (tree.openElements.item(tree.openElements.length - 1).localName == 'head') { tree.openElements.pop(); } else { tree.parseError('unexpected-end-tag', {name: 'head'}); } tree.setInsertionMode('afterHead'); }; modes.inHead.endTagHtmlBodyBr = function(name) { this.anythingElse(); tree.insertionMode.processEndTag(name); }; modes.inHead.endTagOther = function(name) { tree.parseError('unexpected-end-tag', {name: name}); }; modes.inHead.anythingElse = function() { this.endTagHead('head'); }; modes.afterHead = Object.create(modes.base); modes.afterHead.start_tag_handlers = { html: 'startTagHtml', head: 'startTagHead', body: 'startTagBody', frameset: 'startTagFrameset', base: 'startTagFromHead', link: 'startTagFromHead', meta: 'startTagFromHead', script: 'startTagFromHead', style: 'startTagFromHead', title: 'startTagFromHead', "-default": 'startTagOther' }; modes.afterHead.end_tag_handlers = { body: 'endTagBodyHtmlBr', html: 'endTagBodyHtmlBr', br: 'endTagBodyHtmlBr', "-default": 'endTagOther' }; modes.afterHead.processEOF = function() { this.anythingElse(); tree.insertionMode.processEOF(); }; modes.afterHead.processCharacters = function(buffer) { var leadingWhitespace = buffer.takeLeadingWhitespace(); if (leadingWhitespace) tree.insertText(leadingWhitespace); if (!buffer.length) return; this.anythingElse(); tree.insertionMode.processCharacters(buffer); }; modes.afterHead.startTagHtml = function(name, attributes) { modes.inBody.processStartTag(name, attributes); }; modes.afterHead.startTagBody = function(name, attributes) { tree.framesetOk = false; tree.insertBodyElement(attributes); tree.setInsertionMode('inBody'); }; modes.afterHead.startTagFrameset = function(name, attributes) { tree.insertElement(name, attributes); tree.setInsertionMode('inFrameset'); }; modes.afterHead.startTagFromHead = function(name, attributes, selfClosing) { tree.parseError("unexpected-start-tag-out-of-my-head", {name: name}); tree.openElements.push(tree.head); modes.inHead.processStartTag(name, attributes, selfClosing); tree.openElements.remove(tree.head); }; modes.afterHead.startTagHead = function(name, attributes, selfClosing) { tree.parseError('unexpected-start-tag', {name: name}); }; modes.afterHead.startTagOther = function(name, attributes, selfClosing) { this.anythingElse(); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.afterHead.endTagBodyHtmlBr = function(name) { this.anythingElse(); tree.insertionMode.processEndTag(name); }; modes.afterHead.endTagOther = function(name) { tree.parseError('unexpected-end-tag', {name: name}); }; modes.afterHead.anythingElse = function() { tree.insertBodyElement([]); tree.setInsertionMode('inBody'); tree.framesetOk = true; } modes.inBody = Object.create(modes.base); modes.inBody.start_tag_handlers = { html: 'startTagHtml', head: 'startTagMisplaced', base: 'startTagProcessInHead', basefont: 'startTagProcessInHead', bgsound: 'startTagProcessInHead', link: 'startTagProcessInHead', meta: 'startTagProcessInHead', noframes: 'startTagProcessInHead', script: 'startTagProcessInHead', style: 'startTagProcessInHead', title: 'startTagProcessInHead', body: 'startTagBody', form: 'startTagForm', plaintext: 'startTagPlaintext', a: 'startTagA', button: 'startTagButton', xmp: 'startTagXmp', table: 'startTagTable', hr: 'startTagHr', image: 'startTagImage', input: 'startTagInput', textarea: 'startTagTextarea', select: 'startTagSelect', isindex: 'startTagIsindex', applet: 'startTagAppletMarqueeObject', marquee: 'startTagAppletMarqueeObject', object: 'startTagAppletMarqueeObject', li: 'startTagListItem', dd: 'startTagListItem', dt: 'startTagListItem', address: 'startTagCloseP', article: 'startTagCloseP', aside: 'startTagCloseP', blockquote: 'startTagCloseP', center: 'startTagCloseP', details: 'startTagCloseP', dir: 'startTagCloseP', div: 'startTagCloseP', dl: 'startTagCloseP', fieldset: 'startTagCloseP', figcaption: 'startTagCloseP', figure: 'startTagCloseP', footer: 'startTagCloseP', header: 'startTagCloseP', hgroup: 'startTagCloseP', main: 'startTagCloseP', menu: 'startTagCloseP', nav: 'startTagCloseP', ol: 'startTagCloseP', p: 'startTagCloseP', section: 'startTagCloseP', summary: 'startTagCloseP', ul: 'startTagCloseP', listing: 'startTagPreListing', pre: 'startTagPreListing', b: 'startTagFormatting', big: 'startTagFormatting', code: 'startTagFormatting', em: 'startTagFormatting', font: 'startTagFormatting', i: 'startTagFormatting', s: 'startTagFormatting', small: 'startTagFormatting', strike: 'startTagFormatting', strong: 'startTagFormatting', tt: 'startTagFormatting', u: 'startTagFormatting', nobr: 'startTagNobr', area: 'startTagVoidFormatting', br: 'startTagVoidFormatting', embed: 'startTagVoidFormatting', img: 'startTagVoidFormatting', keygen: 'startTagVoidFormatting', wbr: 'startTagVoidFormatting', param: 'startTagParamSourceTrack', source: 'startTagParamSourceTrack', track: 'startTagParamSourceTrack', iframe: 'startTagIFrame', noembed: 'startTagRawText', noscript: 'startTagRawText', h1: 'startTagHeading', h2: 'startTagHeading', h3: 'startTagHeading', h4: 'startTagHeading', h5: 'startTagHeading', h6: 'startTagHeading', caption: 'startTagMisplaced', col: 'startTagMisplaced', colgroup: 'startTagMisplaced', frame: 'startTagMisplaced', frameset: 'startTagFrameset', tbody: 'startTagMisplaced', td: 'startTagMisplaced', tfoot: 'startTagMisplaced', th: 'startTagMisplaced', thead: 'startTagMisplaced', tr: 'startTagMisplaced', option: 'startTagOptionOptgroup', optgroup: 'startTagOptionOptgroup', math: 'startTagMath', svg: 'startTagSVG', rt: 'startTagRpRt', rp: 'startTagRpRt', "-default": 'startTagOther' }; modes.inBody.end_tag_handlers = { p: 'endTagP', body: 'endTagBody', html: 'endTagHtml', address: 'endTagBlock', article: 'endTagBlock', aside: 'endTagBlock', blockquote: 'endTagBlock', button: 'endTagBlock', center: 'endTagBlock', details: 'endTagBlock', dir: 'endTagBlock', div: 'endTagBlock', dl: 'endTagBlock', fieldset: 'endTagBlock', figcaption: 'endTagBlock', figure: 'endTagBlock', footer: 'endTagBlock', header: 'endTagBlock', hgroup: 'endTagBlock', listing: 'endTagBlock', main: 'endTagBlock', menu: 'endTagBlock', nav: 'endTagBlock', ol: 'endTagBlock', pre: 'endTagBlock', section: 'endTagBlock', summary: 'endTagBlock', ul: 'endTagBlock', form: 'endTagForm', applet: 'endTagAppletMarqueeObject', marquee: 'endTagAppletMarqueeObject', object: 'endTagAppletMarqueeObject', dd: 'endTagListItem', dt: 'endTagListItem', li: 'endTagListItem', h1: 'endTagHeading', h2: 'endTagHeading', h3: 'endTagHeading', h4: 'endTagHeading', h5: 'endTagHeading', h6: 'endTagHeading', a: 'endTagFormatting', b: 'endTagFormatting', big: 'endTagFormatting', code: 'endTagFormatting', em: 'endTagFormatting', font: 'endTagFormatting', i: 'endTagFormatting', nobr: 'endTagFormatting', s: 'endTagFormatting', small: 'endTagFormatting', strike: 'endTagFormatting', strong: 'endTagFormatting', tt: 'endTagFormatting', u: 'endTagFormatting', br: 'endTagBr', "-default": 'endTagOther' }; modes.inBody.processCharacters = function(buffer) { if (tree.shouldSkipLeadingNewline) { tree.shouldSkipLeadingNewline = false; buffer.skipAtMostOneLeadingNewline(); } tree.reconstructActiveFormattingElements(); var characters = buffer.takeRemaining(); characters = characters.replace(/\u0000/g, function(match, index){ tree.parseError("invalid-codepoint"); return ''; }); if (!characters) return; tree.insertText(characters); if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters)) tree.framesetOk = false; }; modes.inBody.startTagHtml = function(name, attributes) { tree.parseError('non-html-root'); tree.addAttributesToElement(tree.openElements.rootNode, attributes); }; modes.inBody.startTagProcessInHead = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; modes.inBody.startTagBody = function(name, attributes) { tree.parseError('unexpected-start-tag', {name: 'body'}); if (tree.openElements.length == 1 || tree.openElements.item(1).localName != 'body') { assert.ok(tree.context); } else { tree.framesetOk = false; tree.addAttributesToElement(tree.openElements.bodyElement, attributes); } }; modes.inBody.startTagFrameset = function(name, attributes) { tree.parseError('unexpected-start-tag', {name: 'frameset'}); if (tree.openElements.length == 1 || tree.openElements.item(1).localName != 'body') { assert.ok(tree.context); } else if (tree.framesetOk) { tree.detachFromParent(tree.openElements.bodyElement); while (tree.openElements.length > 1) tree.openElements.pop(); tree.insertElement(name, attributes); tree.setInsertionMode('inFrameset'); } }; modes.inBody.startTagCloseP = function(name, attributes) { if (tree.openElements.inButtonScope('p')) this.endTagP('p'); tree.insertElement(name, attributes); }; modes.inBody.startTagPreListing = function(name, attributes) { if (tree.openElements.inButtonScope('p')) this.endTagP('p'); tree.insertElement(name, attributes); tree.framesetOk = false; tree.shouldSkipLeadingNewline = true; }; modes.inBody.startTagForm = function(name, attributes) { if (tree.form) { tree.parseError('unexpected-start-tag', {name: name}); } else { if (tree.openElements.inButtonScope('p')) this.endTagP('p'); tree.insertElement(name, attributes); tree.form = tree.currentStackItem(); } }; modes.inBody.startTagRpRt = function(name, attributes) { if (tree.openElements.inScope('ruby')) { tree.generateImpliedEndTags(); if (tree.currentStackItem().localName != 'ruby') { tree.parseError('unexpected-start-tag', {name: name}); } } tree.insertElement(name, attributes); }; modes.inBody.startTagListItem = function(name, attributes) { var stopNames = {li: ['li'], dd: ['dd', 'dt'], dt: ['dd', 'dt']}; var stopName = stopNames[name]; var els = tree.openElements; for (var i = els.length - 1; i >= 0; i--) { var node = els.item(i); if (stopName.indexOf(node.localName) != -1) { tree.insertionMode.processEndTag(node.localName); break; } if (node.isSpecial() && node.localName !== 'p' && node.localName !== 'address' && node.localName !== 'div') break; } if (tree.openElements.inButtonScope('p')) this.endTagP('p'); tree.insertElement(name, attributes); tree.framesetOk = false; }; modes.inBody.startTagPlaintext = function(name, attributes) { if (tree.openElements.inButtonScope('p')) this.endTagP('p'); tree.insertElement(name, attributes); tree.tokenizer.setState(Tokenizer.PLAINTEXT); }; modes.inBody.startTagHeading = function(name, attributes) { if (tree.openElements.inButtonScope('p')) this.endTagP('p'); if (tree.currentStackItem().isNumberedHeader()) { tree.parseError('unexpected-start-tag', {name: name}); tree.popElement(); } tree.insertElement(name, attributes); }; modes.inBody.startTagA = function(name, attributes) { var activeA = tree.elementInActiveFormattingElements('a'); if (activeA) { tree.parseError("unexpected-start-tag-implies-end-tag", {startName: "a", endName: "a"}); tree.adoptionAgencyEndTag('a'); if (tree.openElements.contains(activeA)) tree.openElements.remove(activeA); tree.removeElementFromActiveFormattingElements(activeA); } tree.reconstructActiveFormattingElements(); tree.insertFormattingElement(name, attributes); }; modes.inBody.startTagFormatting = function(name, attributes) { tree.reconstructActiveFormattingElements(); tree.insertFormattingElement(name, attributes); }; modes.inBody.startTagNobr = function(name, attributes) { tree.reconstructActiveFormattingElements(); if (tree.openElements.inScope('nobr')) { tree.parseError("unexpected-start-tag-implies-end-tag", {startName: 'nobr', endName: 'nobr'}); this.processEndTag('nobr'); tree.reconstructActiveFormattingElements(); } tree.insertFormattingElement(name, attributes); }; modes.inBody.startTagButton = function(name, attributes) { if (tree.openElements.inScope('button')) { tree.parseError('unexpected-start-tag-implies-end-tag', {startName: 'button', endName: 'button'}); this.processEndTag('button'); tree.insertionMode.processStartTag(name, attributes); } else { tree.framesetOk = false; tree.reconstructActiveFormattingElements(); tree.insertElement(name, attributes); } }; modes.inBody.startTagAppletMarqueeObject = function(name, attributes) { tree.reconstructActiveFormattingElements(); tree.insertElement(name, attributes); tree.activeFormattingElements.push(Marker); tree.framesetOk = false; }; modes.inBody.endTagAppletMarqueeObject = function(name) { if (!tree.openElements.inScope(name)) { tree.parseError("unexpected-end-tag", {name: name}); } else { tree.generateImpliedEndTags(); if (tree.currentStackItem().localName != name) { tree.parseError('end-tag-too-early', {name: name}); } tree.openElements.popUntilPopped(name); tree.clearActiveFormattingElements(); } }; modes.inBody.startTagXmp = function(name, attributes) { if (tree.openElements.inButtonScope('p')) this.processEndTag('p'); tree.reconstructActiveFormattingElements(); tree.processGenericRawTextStartTag(name, attributes); tree.framesetOk = false; }; modes.inBody.startTagTable = function(name, attributes) { if (tree.compatMode !== "quirks") if (tree.openElements.inButtonScope('p')) this.processEndTag('p'); tree.insertElement(name, attributes); tree.setInsertionMode('inTable'); tree.framesetOk = false; }; modes.inBody.startTagVoidFormatting = function(name, attributes) { tree.reconstructActiveFormattingElements(); tree.insertSelfClosingElement(name, attributes); tree.framesetOk = false; }; modes.inBody.startTagParamSourceTrack = function(name, attributes) { tree.insertSelfClosingElement(name, attributes); }; modes.inBody.startTagHr = function(name, attributes) { if (tree.openElements.inButtonScope('p')) this.endTagP('p'); tree.insertSelfClosingElement(name, attributes); tree.framesetOk = false; }; modes.inBody.startTagImage = function(name, attributes) { tree.parseError('unexpected-start-tag-treated-as', {originalName: 'image', newName: 'img'}); this.processStartTag('img', attributes); }; modes.inBody.startTagInput = function(name, attributes) { var currentFramesetOk = tree.framesetOk; this.startTagVoidFormatting(name, attributes); for (var key in attributes) { if (attributes[key].nodeName == 'type') { if (attributes[key].nodeValue.toLowerCase() == 'hidden') tree.framesetOk = currentFramesetOk; break; } } }; modes.inBody.startTagIsindex = function(name, attributes) { tree.parseError('deprecated-tag', {name: 'isindex'}); tree.selfClosingFlagAcknowledged = true; if (tree.form) return; var formAttributes = []; var inputAttributes = []; var prompt = "This is a searchable index. Enter search keywords: "; for (var key in attributes) { switch (attributes[key].nodeName) { case 'action': formAttributes.push({nodeName: 'action', nodeValue: attributes[key].nodeValue}); break; case 'prompt': prompt = attributes[key].nodeValue; break; case 'name': break; default: inputAttributes.push({nodeName: attributes[key].nodeName, nodeValue: attributes[key].nodeValue}); } } inputAttributes.push({nodeName: 'name', nodeValue: 'isindex'}); this.processStartTag('form', formAttributes); this.processStartTag('hr'); this.processStartTag('label'); this.processCharacters(new CharacterBuffer(prompt)); this.processStartTag('input', inputAttributes); this.processEndTag('label'); this.processStartTag('hr'); this.processEndTag('form'); }; modes.inBody.startTagTextarea = function(name, attributes) { tree.insertElement(name, attributes); tree.tokenizer.setState(Tokenizer.RCDATA); tree.originalInsertionMode = tree.insertionModeName; tree.shouldSkipLeadingNewline = true; tree.framesetOk = false; tree.setInsertionMode('text'); }; modes.inBody.startTagIFrame = function(name, attributes) { tree.framesetOk = false; this.startTagRawText(name, attributes); }; modes.inBody.startTagRawText = function(name, attributes) { tree.processGenericRawTextStartTag(name, attributes); }; modes.inBody.startTagSelect = function(name, attributes) { tree.reconstructActiveFormattingElements(); tree.insertElement(name, attributes); tree.framesetOk = false; var insertionModeName = tree.insertionModeName; if (insertionModeName == 'inTable' || insertionModeName == 'inCaption' || insertionModeName == 'inColumnGroup' || insertionModeName == 'inTableBody' || insertionModeName == 'inRow' || insertionModeName == 'inCell') { tree.setInsertionMode('inSelectInTable'); } else { tree.setInsertionMode('inSelect'); } }; modes.inBody.startTagMisplaced = function(name, attributes) { tree.parseError('unexpected-start-tag-ignored', {name: name}); }; modes.inBody.endTagMisplaced = function(name) { tree.parseError("unexpected-end-tag", {name: name}); }; modes.inBody.endTagBr = function(name) { tree.parseError("unexpected-end-tag-treated-as", {originalName: "br", newName: "br element"}); tree.reconstructActiveFormattingElements(); tree.insertElement(name, []); tree.popElement(); }; modes.inBody.startTagOptionOptgroup = function(name, attributes) { if (tree.currentStackItem().localName == 'option') tree.popElement(); tree.reconstructActiveFormattingElements(); tree.insertElement(name, attributes); }; modes.inBody.startTagOther = function(name, attributes) { tree.reconstructActiveFormattingElements(); tree.insertElement(name, attributes); }; modes.inBody.endTagOther = function(name) { var node; for (var i = tree.openElements.length - 1; i > 0; i--) { node = tree.openElements.item(i); if (node.localName == name) { tree.generateImpliedEndTags(name); if (tree.currentStackItem().localName != name) tree.parseError('unexpected-end-tag', {name: name}); tree.openElements.remove_openElements_until(function(x) {return x === node;}); break; } if (node.isSpecial()) { tree.parseError('unexpected-end-tag', {name: name}); break; } } }; modes.inBody.startTagMath = function(name, attributes, selfClosing) { tree.reconstructActiveFormattingElements(); attributes = tree.adjustMathMLAttributes(attributes); attributes = tree.adjustForeignAttributes(attributes); tree.insertForeignElement(name, attributes, "http://www.w3.org/1998/Math/MathML", selfClosing); }; modes.inBody.startTagSVG = function(name, attributes, selfClosing) { tree.reconstructActiveFormattingElements(); attributes = tree.adjustSVGAttributes(attributes); attributes = tree.adjustForeignAttributes(attributes); tree.insertForeignElement(name, attributes, "http://www.w3.org/2000/svg", selfClosing); }; modes.inBody.endTagP = function(name) { if (!tree.openElements.inButtonScope('p')) { tree.parseError('unexpected-end-tag', {name: 'p'}); this.startTagCloseP('p', []); this.endTagP('p'); } else { tree.generateImpliedEndTags('p'); if (tree.currentStackItem().localName != 'p') tree.parseError('unexpected-implied-end-tag', {name: 'p'}); tree.openElements.popUntilPopped(name); } }; modes.inBody.endTagBody = function(name) { if (!tree.openElements.inScope('body')) { tree.parseError('unexpected-end-tag', {name: name}); return; } if (tree.currentStackItem().localName != 'body') { tree.parseError('expected-one-end-tag-but-got-another', { expectedName: tree.currentStackItem().localName, gotName: name }); } tree.setInsertionMode('afterBody'); }; modes.inBody.endTagHtml = function(name) { if (!tree.openElements.inScope('body')) { tree.parseError('unexpected-end-tag', {name: name}); return; } if (tree.currentStackItem().localName != 'body') { tree.parseError('expected-one-end-tag-but-got-another', { expectedName: tree.currentStackItem().localName, gotName: name }); } tree.setInsertionMode('afterBody'); tree.insertionMode.processEndTag(name); }; modes.inBody.endTagBlock = function(name) { if (!tree.openElements.inScope(name)) { tree.parseError('unexpected-end-tag', {name: name}); } else { tree.generateImpliedEndTags(); if (tree.currentStackItem().localName != name) { tree.parseError('end-tag-too-early', {name: name}); } tree.openElements.popUntilPopped(name); } }; modes.inBody.endTagForm = function(name) { var node = tree.form; tree.form = null; if (!node || !tree.openElements.inScope(name)) { tree.parseError('unexpected-end-tag', {name: name}); } else { tree.generateImpliedEndTags(); if (tree.currentStackItem() != node) { tree.parseError('end-tag-too-early-ignored', {name: 'form'}); } tree.openElements.remove(node); } }; modes.inBody.endTagListItem = function(name) { if (!tree.openElements.inListItemScope(name)) { tree.parseError('unexpected-end-tag', {name: name}); } else { tree.generateImpliedEndTags(name); if (tree.currentStackItem().localName != name) tree.parseError('end-tag-too-early', {name: name}); tree.openElements.popUntilPopped(name); } }; modes.inBody.endTagHeading = function(name) { if (!tree.openElements.hasNumberedHeaderElementInScope()) { tree.parseError('unexpected-end-tag', {name: name}); return; } tree.generateImpliedEndTags(); if (tree.currentStackItem().localName != name) tree.parseError('end-tag-too-early', {name: name}); tree.openElements.remove_openElements_until(function(e) { return e.isNumberedHeader(); }); }; modes.inBody.endTagFormatting = function(name, attributes) { if (!tree.adoptionAgencyEndTag(name)) this.endTagOther(name, attributes); }; modes.inCaption = Object.create(modes.base); modes.inCaption.start_tag_handlers = { html: 'startTagHtml', caption: 'startTagTableElement', col: 'startTagTableElement', colgroup: 'startTagTableElement', tbody: 'startTagTableElement', td: 'startTagTableElement', tfoot: 'startTagTableElement', thead: 'startTagTableElement', tr: 'startTagTableElement', '-default': 'startTagOther' }; modes.inCaption.end_tag_handlers = { caption: 'endTagCaption', table: 'endTagTable', body: 'endTagIgnore', col: 'endTagIgnore', colgroup: 'endTagIgnore', html: 'endTagIgnore', tbody: 'endTagIgnore', td: 'endTagIgnore', tfood: 'endTagIgnore', thead: 'endTagIgnore', tr: 'endTagIgnore', '-default': 'endTagOther' }; modes.inCaption.processCharacters = function(data) { modes.inBody.processCharacters(data); }; modes.inCaption.startTagTableElement = function(name, attributes) { tree.parseError('unexpected-end-tag', {name: name}); var ignoreEndTag = !tree.openElements.inTableScope('caption'); tree.insertionMode.processEndTag('caption'); if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes); }; modes.inCaption.startTagOther = function(name, attributes, selfClosing) { modes.inBody.processStartTag(name, attributes, selfClosing); }; modes.inCaption.endTagCaption = function(name) { if (!tree.openElements.inTableScope('caption')) { assert.ok(tree.context); tree.parseError('unexpected-end-tag', {name: name}); } else { tree.generateImpliedEndTags(); if (tree.currentStackItem().localName != 'caption') { tree.parseError('expected-one-end-tag-but-got-another', { gotName: "caption", expectedName: tree.currentStackItem().localName }); } tree.openElements.popUntilPopped('caption'); tree.clearActiveFormattingElements(); tree.setInsertionMode('inTable'); } }; modes.inCaption.endTagTable = function(name) { tree.parseError("unexpected-end-table-in-caption"); var ignoreEndTag = !tree.openElements.inTableScope('caption'); tree.insertionMode.processEndTag('caption'); if (!ignoreEndTag) tree.insertionMode.processEndTag(name); }; modes.inCaption.endTagIgnore = function(name) { tree.parseError('unexpected-end-tag', {name: name}); }; modes.inCaption.endTagOther = function(name) { modes.inBody.processEndTag(name); }; modes.inCell = Object.create(modes.base); modes.inCell.start_tag_handlers = { html: 'startTagHtml', caption: 'startTagTableOther', col: 'startTagTableOther', colgroup: 'startTagTableOther', tbody: 'startTagTableOther', td: 'startTagTableOther', tfoot: 'startTagTableOther', th: 'startTagTableOther', thead: 'startTagTableOther', tr: 'startTagTableOther', '-default': 'startTagOther' }; modes.inCell.end_tag_handlers = { td: 'endTagTableCell', th: 'endTagTableCell', body: 'endTagIgnore', caption: 'endTagIgnore', col: 'endTagIgnore', colgroup: 'endTagIgnore', html: 'endTagIgnore', table: 'endTagImply', tbody: 'endTagImply', tfoot: 'endTagImply', thead: 'endTagImply', tr: 'endTagImply', '-default': 'endTagOther' }; modes.inCell.processCharacters = function(data) { modes.inBody.processCharacters(data); }; modes.inCell.startTagTableOther = function(name, attributes, selfClosing) { if (tree.openElements.inTableScope('td') || tree.openElements.inTableScope('th')) { this.closeCell(); tree.insertionMode.processStartTag(name, attributes, selfClosing); } else { tree.parseError('unexpected-start-tag', {name: name}); } }; modes.inCell.startTagOther = function(name, attributes, selfClosing) { modes.inBody.processStartTag(name, attributes, selfClosing); }; modes.inCell.endTagTableCell = function(name) { if (tree.openElements.inTableScope(name)) { tree.generateImpliedEndTags(name); if (tree.currentStackItem().localName != name.toLowerCase()) { tree.parseError('unexpected-cell-end-tag', {name: name}); tree.openElements.popUntilPopped(name); } else { tree.popElement(); } tree.clearActiveFormattingElements(); tree.setInsertionMode('inRow'); } else { tree.parseError('unexpected-end-tag', {name: name}); } }; modes.inCell.endTagIgnore = function(name) { tree.parseError('unexpected-end-tag', {name: name}); }; modes.inCell.endTagImply = function(name) { if (tree.openElements.inTableScope(name)) { this.closeCell(); tree.insertionMode.processEndTag(name); } else { tree.parseError('unexpected-end-tag', {name: name}); } }; modes.inCell.endTagOther = function(name) { modes.inBody.processEndTag(name); }; modes.inCell.closeCell = function() { if (tree.openElements.inTableScope('td')) { this.endTagTableCell('td'); } else if (tree.openElements.inTableScope('th')) { this.endTagTableCell('th'); } }; modes.inColumnGroup = Object.create(modes.base); modes.inColumnGroup.start_tag_handlers = { html: 'startTagHtml', col: 'startTagCol', '-default': 'startTagOther' }; modes.inColumnGroup.end_tag_handlers = { colgroup: 'endTagColgroup', col: 'endTagCol', '-default': 'endTagOther' }; modes.inColumnGroup.ignoreEndTagColgroup = function() { return tree.currentStackItem().localName == 'html'; }; modes.inColumnGroup.processCharacters = function(buffer) { var leadingWhitespace = buffer.takeLeadingWhitespace(); if (leadingWhitespace) tree.insertText(leadingWhitespace); if (!buffer.length) return; var ignoreEndTag = this.ignoreEndTagColgroup(); this.endTagColgroup('colgroup'); if (!ignoreEndTag) tree.insertionMode.processCharacters(buffer); }; modes.inColumnGroup.startTagCol = function(name, attributes) { tree.insertSelfClosingElement(name, attributes); }; modes.inColumnGroup.startTagOther = function(name, attributes, selfClosing) { var ignoreEndTag = this.ignoreEndTagColgroup(); this.endTagColgroup('colgroup'); if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.inColumnGroup.endTagColgroup = function(name) { if (this.ignoreEndTagColgroup()) { assert.ok(tree.context); tree.parseError('unexpected-end-tag', {name: name}); } else { tree.popElement(); tree.setInsertionMode('inTable'); } }; modes.inColumnGroup.endTagCol = function(name) { tree.parseError("no-end-tag", {name: 'col'}); }; modes.inColumnGroup.endTagOther = function(name) { var ignoreEndTag = this.ignoreEndTagColgroup(); this.endTagColgroup('colgroup'); if (!ignoreEndTag) tree.insertionMode.processEndTag(name) ; }; modes.inForeignContent = Object.create(modes.base); modes.inForeignContent.processStartTag = function(name, attributes, selfClosing) { if (['b', 'big', 'blockquote', 'body', 'br', 'center', 'code', 'dd', 'div', 'dl', 'dt', 'em', 'embed', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'i', 'img', 'li', 'listing', 'menu', 'meta', 'nobr', 'ol', 'p', 'pre', 'ruby', 's', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'table', 'tt', 'u', 'ul', 'var'].indexOf(name) != -1 || (name == 'font' && attributes.some(function(attr){ return ['color', 'face', 'size'].indexOf(attr.nodeName) >= 0 }))) { tree.parseError('unexpected-html-element-in-foreign-content', {name: name}); while (tree.currentStackItem().isForeign() && !tree.currentStackItem().isHtmlIntegrationPoint() && !tree.currentStackItem().isMathMLTextIntegrationPoint()) { tree.openElements.pop(); } tree.insertionMode.processStartTag(name, attributes, selfClosing); return; } if (tree.currentStackItem().namespaceURI == "http://www.w3.org/1998/Math/MathML") { attributes = tree.adjustMathMLAttributes(attributes); } if (tree.currentStackItem().namespaceURI == "http://www.w3.org/2000/svg") { name = tree.adjustSVGTagNameCase(name); attributes = tree.adjustSVGAttributes(attributes); } attributes = tree.adjustForeignAttributes(attributes); tree.insertForeignElement(name, attributes, tree.currentStackItem().namespaceURI, selfClosing); }; modes.inForeignContent.processEndTag = function(name) { var node = tree.currentStackItem(); var index = tree.openElements.length - 1; if (node.localName.toLowerCase() != name) tree.parseError("unexpected-end-tag", {name: name}); while (true) { if (index === 0) break; if (node.localName.toLowerCase() == name) { while (tree.openElements.pop() != node); break; } index -= 1; node = tree.openElements.item(index); if (node.isForeign()) { continue; } else { tree.insertionMode.processEndTag(name); break; } } }; modes.inForeignContent.processCharacters = function(buffer) { var characters = buffer.takeRemaining(); characters = characters.replace(/\u0000/g, function(match, index){ tree.parseError('invalid-codepoint'); return '\uFFFD'; }); if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters)) tree.framesetOk = false; tree.insertText(characters); }; modes.inHeadNoscript = Object.create(modes.base); modes.inHeadNoscript.start_tag_handlers = { html: 'startTagHtml', basefont: 'startTagBasefontBgsoundLinkMetaNoframesStyle', bgsound: 'startTagBasefontBgsoundLinkMetaNoframesStyle', link: 'startTagBasefontBgsoundLinkMetaNoframesStyle', meta: 'startTagBasefontBgsoundLinkMetaNoframesStyle', noframes: 'startTagBasefontBgsoundLinkMetaNoframesStyle', style: 'startTagBasefontBgsoundLinkMetaNoframesStyle', head: 'startTagHeadNoscript', noscript: 'startTagHeadNoscript', "-default": 'startTagOther' }; modes.inHeadNoscript.end_tag_handlers = { noscript: 'endTagNoscript', br: 'endTagBr', '-default': 'endTagOther' }; modes.inHeadNoscript.processCharacters = function(buffer) { var leadingWhitespace = buffer.takeLeadingWhitespace(); if (leadingWhitespace) tree.insertText(leadingWhitespace); if (!buffer.length) return; tree.parseError("unexpected-char-in-frameset"); this.anythingElse(); tree.insertionMode.processCharacters(buffer); }; modes.inHeadNoscript.processComment = function(data) { modes.inHead.processComment(data); }; modes.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; modes.inHeadNoscript.startTagHeadNoscript = function(name, attributes) { tree.parseError("unexpected-start-tag-in-frameset", {name: name}); }; modes.inHeadNoscript.startTagOther = function(name, attributes) { tree.parseError("unexpected-start-tag-in-frameset", {name: name}); this.anythingElse(); tree.insertionMode.processStartTag(name, attributes); }; modes.inHeadNoscript.endTagBr = function(name, attributes) { tree.parseError("unexpected-end-tag-in-frameset", {name: name}); this.anythingElse(); tree.insertionMode.processEndTag(name, attributes); }; modes.inHeadNoscript.endTagNoscript = function(name, attributes) { tree.popElement(); tree.setInsertionMode('inHead'); }; modes.inHeadNoscript.endTagOther = function(name, attributes) { tree.parseError("unexpected-end-tag-in-frameset", {name: name}); }; modes.inHeadNoscript.anythingElse = function() { tree.popElement(); tree.setInsertionMode('inHead'); }; modes.inFrameset = Object.create(modes.base); modes.inFrameset.start_tag_handlers = { html: 'startTagHtml', frameset: 'startTagFrameset', frame: 'startTagFrame', noframes: 'startTagNoframes', "-default": 'startTagOther' }; modes.inFrameset.end_tag_handlers = { frameset: 'endTagFrameset', noframes: 'endTagNoframes', '-default': 'endTagOther' }; modes.inFrameset.processCharacters = function(data) { tree.parseError("unexpected-char-in-frameset"); }; modes.inFrameset.startTagFrameset = function(name, attributes) { tree.insertElement(name, attributes); }; modes.inFrameset.startTagFrame = function(name, attributes) { tree.insertSelfClosingElement(name, attributes); }; modes.inFrameset.startTagNoframes = function(name, attributes) { modes.inBody.processStartTag(name, attributes); }; modes.inFrameset.startTagOther = function(name, attributes) { tree.parseError("unexpected-start-tag-in-frameset", {name: name}); }; modes.inFrameset.endTagFrameset = function(name, attributes) { if (tree.currentStackItem().localName == 'html') { tree.parseError("unexpected-frameset-in-frameset-innerhtml"); } else { tree.popElement(); } if (!tree.context && tree.currentStackItem().localName != 'frameset') { tree.setInsertionMode('afterFrameset'); } }; modes.inFrameset.endTagNoframes = function(name) { modes.inBody.processEndTag(name); }; modes.inFrameset.endTagOther = function(name) { tree.parseError("unexpected-end-tag-in-frameset", {name: name}); }; modes.inTable = Object.create(modes.base); modes.inTable.start_tag_handlers = { html: 'startTagHtml', caption: 'startTagCaption', colgroup: 'startTagColgroup', col: 'startTagCol', table: 'startTagTable', tbody: 'startTagRowGroup', tfoot: 'startTagRowGroup', thead: 'startTagRowGroup', td: 'startTagImplyTbody', th: 'startTagImplyTbody', tr: 'startTagImplyTbody', style: 'startTagStyleScript', script: 'startTagStyleScript', input: 'startTagInput', form: 'startTagForm', '-default': 'startTagOther' }; modes.inTable.end_tag_handlers = { table: 'endTagTable', body: 'endTagIgnore', caption: 'endTagIgnore', col: 'endTagIgnore', colgroup: 'endTagIgnore', html: 'endTagIgnore', tbody: 'endTagIgnore', td: 'endTagIgnore', tfoot: 'endTagIgnore', th: 'endTagIgnore', thead: 'endTagIgnore', tr: 'endTagIgnore', '-default': 'endTagOther' }; modes.inTable.processCharacters = function(data) { if (tree.currentStackItem().isFosterParenting()) { var originalInsertionMode = tree.insertionModeName; tree.setInsertionMode('inTableText'); tree.originalInsertionMode = originalInsertionMode; tree.insertionMode.processCharacters(data); } else { tree.redirectAttachToFosterParent = true; modes.inBody.processCharacters(data); tree.redirectAttachToFosterParent = false; } }; modes.inTable.startTagCaption = function(name, attributes) { tree.openElements.popUntilTableScopeMarker(); tree.activeFormattingElements.push(Marker); tree.insertElement(name, attributes); tree.setInsertionMode('inCaption'); }; modes.inTable.startTagColgroup = function(name, attributes) { tree.openElements.popUntilTableScopeMarker(); tree.insertElement(name, attributes); tree.setInsertionMode('inColumnGroup'); }; modes.inTable.startTagCol = function(name, attributes) { this.startTagColgroup('colgroup', []); tree.insertionMode.processStartTag(name, attributes); }; modes.inTable.startTagRowGroup = function(name, attributes) { tree.openElements.popUntilTableScopeMarker(); tree.insertElement(name, attributes); tree.setInsertionMode('inTableBody'); }; modes.inTable.startTagImplyTbody = function(name, attributes) { this.startTagRowGroup('tbody', []); tree.insertionMode.processStartTag(name, attributes); }; modes.inTable.startTagTable = function(name, attributes) { tree.parseError("unexpected-start-tag-implies-end-tag", {startName: "table", endName: "table"}); tree.insertionMode.processEndTag('table'); if (!tree.context) tree.insertionMode.processStartTag(name, attributes); }; modes.inTable.startTagStyleScript = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; modes.inTable.startTagInput = function(name, attributes) { for (var key in attributes) { if (attributes[key].nodeName.toLowerCase() == 'type') { if (attributes[key].nodeValue.toLowerCase() == 'hidden') { tree.parseError("unexpected-hidden-input-in-table"); tree.insertElement(name, attributes); tree.openElements.pop(); return; } break; } } this.startTagOther(name, attributes); }; modes.inTable.startTagForm = function(name, attributes) { tree.parseError("unexpected-form-in-table"); if (!tree.form) { tree.insertElement(name, attributes); tree.form = tree.currentStackItem(); tree.openElements.pop(); } }; modes.inTable.startTagOther = function(name, attributes, selfClosing) { tree.parseError("unexpected-start-tag-implies-table-voodoo", {name: name}); tree.redirectAttachToFosterParent = true; modes.inBody.processStartTag(name, attributes, selfClosing); tree.redirectAttachToFosterParent = false; }; modes.inTable.endTagTable = function(name) { if (tree.openElements.inTableScope(name)) { tree.generateImpliedEndTags(); if (tree.currentStackItem().localName != name) { tree.parseError("end-tag-too-early-named", {gotName: 'table', expectedName: tree.currentStackItem().localName}); } tree.openElements.popUntilPopped('table'); tree.resetInsertionMode(); } else { assert.ok(tree.context); tree.parseError('unexpected-end-tag', {name: name}); } }; modes.inTable.endTagIgnore = function(name) { tree.parseError("unexpected-end-tag", {name: name}); }; modes.inTable.endTagOther = function(name) { tree.parseError("unexpected-end-tag-implies-table-voodoo", {name: name}); tree.redirectAttachToFosterParent = true; modes.inBody.processEndTag(name); tree.redirectAttachToFosterParent = false; }; modes.inTableText = Object.create(modes.base); modes.inTableText.flushCharacters = function() { var characters = tree.pendingTableCharacters.join(''); if (!isAllWhitespace(characters)) { tree.redirectAttachToFosterParent = true; tree.reconstructActiveFormattingElements(); tree.insertText(characters); tree.framesetOk = false; tree.redirectAttachToFosterParent = false; } else { tree.insertText(characters); } tree.pendingTableCharacters = []; }; modes.inTableText.processComment = function(data) { this.flushCharacters(); tree.setInsertionMode(tree.originalInsertionMode); tree.insertionMode.processComment(data); }; modes.inTableText.processEOF = function(data) { this.flushCharacters(); tree.setInsertionMode(tree.originalInsertionMode); tree.insertionMode.processEOF(); }; modes.inTableText.processCharacters = function(buffer) { var characters = buffer.takeRemaining(); characters = characters.replace(/\u0000/g, function(match, index){ tree.parseError("invalid-codepoint"); return ''; }); if (!characters) return; tree.pendingTableCharacters.push(characters); }; modes.inTableText.processStartTag = function(name, attributes, selfClosing) { this.flushCharacters(); tree.setInsertionMode(tree.originalInsertionMode); tree.insertionMode.processStartTag(name, attributes, selfClosing); }; modes.inTableText.processEndTag = function(name, attributes) { this.flushCharacters(); tree.setInsertionMode(tree.originalInsertionMode); tree.insertionMode.processEndTag(name, attributes); }; modes.inTableBody = Object.create(modes.base); modes.inTableBody.start_tag_handlers = { html: 'startTagHtml', tr: 'startTagTr', td: 'startTagTableCell', th: 'startTagTableCell', caption: 'startTagTableOther', col: 'startTagTableOther', colgroup: 'startTagTableOther', tbody: 'startTagTableOther', tfoot: 'startTagTableOther', thead: 'startTagTableOther', '-default': 'startTagOther' }; modes.inTableBody.end_tag_handlers = { table: 'endTagTable', tbody: 'endTagTableRowGroup', tfoot: 'endTagTableRowGroup', thead: 'endTagTableRowGroup', body: 'endTagIgnore', caption: 'endTagIgnore', col: 'endTagIgnore', colgroup: 'endTagIgnore', html: 'endTagIgnore', td: 'endTagIgnore', th: 'endTagIgnore', tr: 'endTagIgnore', '-default': 'endTagOther' }; modes.inTableBody.processCharacters = function(data) { modes.inTable.processCharacters(data); }; modes.inTableBody.startTagTr = function(name, attributes) { tree.openElements.popUntilTableBodyScopeMarker(); tree.insertElement(name, attributes); tree.setInsertionMode('inRow'); }; modes.inTableBody.startTagTableCell = function(name, attributes) { tree.parseError("unexpected-cell-in-table-body", {name: name}); this.startTagTr('tr', []); tree.insertionMode.processStartTag(name, attributes); }; modes.inTableBody.startTagTableOther = function(name, attributes) { if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) { tree.openElements.popUntilTableBodyScopeMarker(); this.endTagTableRowGroup(tree.currentStackItem().localName); tree.insertionMode.processStartTag(name, attributes); } else { tree.parseError('unexpected-start-tag', {name: name}); } }; modes.inTableBody.startTagOther = function(name, attributes) { modes.inTable.processStartTag(name, attributes); }; modes.inTableBody.endTagTableRowGroup = function(name) { if (tree.openElements.inTableScope(name)) { tree.openElements.popUntilTableBodyScopeMarker(); tree.popElement(); tree.setInsertionMode('inTable'); } else { tree.parseError('unexpected-end-tag-in-table-body', {name: name}); } }; modes.inTableBody.endTagTable = function(name) { if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) { tree.openElements.popUntilTableBodyScopeMarker(); this.endTagTableRowGroup(tree.currentStackItem().localName); tree.insertionMode.processEndTag(name); } else { tree.parseError('unexpected-end-tag', {name: name}); } }; modes.inTableBody.endTagIgnore = function(name) { tree.parseError("unexpected-end-tag-in-table-body", {name: name}); }; modes.inTableBody.endTagOther = function(name) { modes.inTable.processEndTag(name); }; modes.inSelect = Object.create(modes.base); modes.inSelect.start_tag_handlers = { html: 'startTagHtml', option: 'startTagOption', optgroup: 'startTagOptgroup', select: 'startTagSelect', input: 'startTagInput', keygen: 'startTagInput', textarea: 'startTagInput', script: 'startTagScript', '-default': 'startTagOther' }; modes.inSelect.end_tag_handlers = { option: 'endTagOption', optgroup: 'endTagOptgroup', select: 'endTagSelect', caption: 'endTagTableElements', table: 'endTagTableElements', tbody: 'endTagTableElements', tfoot: 'endTagTableElements', thead: 'endTagTableElements', tr: 'endTagTableElements', td: 'endTagTableElements', th: 'endTagTableElements', '-default': 'endTagOther' }; modes.inSelect.processCharacters = function(buffer) { var data = buffer.takeRemaining(); data = data.replace(/\u0000/g, function(match, index){ tree.parseError("invalid-codepoint"); return ''; }); if (!data) return; tree.insertText(data); }; modes.inSelect.startTagOption = function(name, attributes) { if (tree.currentStackItem().localName == 'option') tree.popElement(); tree.insertElement(name, attributes); }; modes.inSelect.startTagOptgroup = function(name, attributes) { if (tree.currentStackItem().localName == 'option') tree.popElement(); if (tree.currentStackItem().localName == 'optgroup') tree.popElement(); tree.insertElement(name, attributes); }; modes.inSelect.endTagOption = function(name) { if (tree.currentStackItem().localName !== 'option') { tree.parseError('unexpected-end-tag-in-select', {name: name}); return; } tree.popElement(); }; modes.inSelect.endTagOptgroup = function(name) { if (tree.currentStackItem().localName == 'option' && tree.openElements.item(tree.openElements.length - 2).localName == 'optgroup') { tree.popElement(); } if (tree.currentStackItem().localName == 'optgroup') { tree.popElement(); } else { tree.parseError('unexpected-end-tag-in-select', {name: 'optgroup'}); } }; modes.inSelect.startTagSelect = function(name) { tree.parseError("unexpected-select-in-select"); this.endTagSelect('select'); }; modes.inSelect.endTagSelect = function(name) { if (tree.openElements.inTableScope('select')) { tree.openElements.popUntilPopped('select'); tree.resetInsertionMode(); } else { tree.parseError('unexpected-end-tag', {name: name}); } }; modes.inSelect.startTagInput = function(name, attributes) { tree.parseError("unexpected-input-in-select"); if (tree.openElements.inSelectScope('select')) { this.endTagSelect('select'); tree.insertionMode.processStartTag(name, attributes); } }; modes.inSelect.startTagScript = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; modes.inSelect.endTagTableElements = function(name) { tree.parseError('unexpected-end-tag-in-select', {name: name}); if (tree.openElements.inTableScope(name)) { this.endTagSelect('select'); tree.insertionMode.processEndTag(name); } }; modes.inSelect.startTagOther = function(name, attributes) { tree.parseError("unexpected-start-tag-in-select", {name: name}); }; modes.inSelect.endTagOther = function(name) { tree.parseError('unexpected-end-tag-in-select', {name: name}); }; modes.inSelectInTable = Object.create(modes.base); modes.inSelectInTable.start_tag_handlers = { caption: 'startTagTable', table: 'startTagTable', tbody: 'startTagTable', tfoot: 'startTagTable', thead: 'startTagTable', tr: 'startTagTable', td: 'startTagTable', th: 'startTagTable', '-default': 'startTagOther' }; modes.inSelectInTable.end_tag_handlers = { caption: 'endTagTable', table: 'endTagTable', tbody: 'endTagTable', tfoot: 'endTagTable', thead: 'endTagTable', tr: 'endTagTable', td: 'endTagTable', th: 'endTagTable', '-default': 'endTagOther' }; modes.inSelectInTable.processCharacters = function(data) { modes.inSelect.processCharacters(data); }; modes.inSelectInTable.startTagTable = function(name, attributes) { tree.parseError("unexpected-table-element-start-tag-in-select-in-table", {name: name}); this.endTagOther("select"); tree.insertionMode.processStartTag(name, attributes); }; modes.inSelectInTable.startTagOther = function(name, attributes, selfClosing) { modes.inSelect.processStartTag(name, attributes, selfClosing); }; modes.inSelectInTable.endTagTable = function(name) { tree.parseError("unexpected-table-element-end-tag-in-select-in-table", {name: name}); if (tree.openElements.inTableScope(name)) { this.endTagOther("select"); tree.insertionMode.processEndTag(name); } }; modes.inSelectInTable.endTagOther = function(name) { modes.inSelect.processEndTag(name); }; modes.inRow = Object.create(modes.base); modes.inRow.start_tag_handlers = { html: 'startTagHtml', td: 'startTagTableCell', th: 'startTagTableCell', caption: 'startTagTableOther', col: 'startTagTableOther', colgroup: 'startTagTableOther', tbody: 'startTagTableOther', tfoot: 'startTagTableOther', thead: 'startTagTableOther', tr: 'startTagTableOther', '-default': 'startTagOther' }; modes.inRow.end_tag_handlers = { tr: 'endTagTr', table: 'endTagTable', tbody: 'endTagTableRowGroup', tfoot: 'endTagTableRowGroup', thead: 'endTagTableRowGroup', body: 'endTagIgnore', caption: 'endTagIgnore', col: 'endTagIgnore', colgroup: 'endTagIgnore', html: 'endTagIgnore', td: 'endTagIgnore', th: 'endTagIgnore', '-default': 'endTagOther' }; modes.inRow.processCharacters = function(data) { modes.inTable.processCharacters(data); }; modes.inRow.startTagTableCell = function(name, attributes) { tree.openElements.popUntilTableRowScopeMarker(); tree.insertElement(name, attributes); tree.setInsertionMode('inCell'); tree.activeFormattingElements.push(Marker); }; modes.inRow.startTagTableOther = function(name, attributes) { var ignoreEndTag = this.ignoreEndTagTr(); this.endTagTr('tr'); if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes); }; modes.inRow.startTagOther = function(name, attributes, selfClosing) { modes.inTable.processStartTag(name, attributes, selfClosing); }; modes.inRow.endTagTr = function(name) { if (this.ignoreEndTagTr()) { assert.ok(tree.context); tree.parseError('unexpected-end-tag', {name: name}); } else { tree.openElements.popUntilTableRowScopeMarker(); tree.popElement(); tree.setInsertionMode('inTableBody'); } }; modes.inRow.endTagTable = function(name) { var ignoreEndTag = this.ignoreEndTagTr(); this.endTagTr('tr'); if (!ignoreEndTag) tree.insertionMode.processEndTag(name); }; modes.inRow.endTagTableRowGroup = function(name) { if (tree.openElements.inTableScope(name)) { this.endTagTr('tr'); tree.insertionMode.processEndTag(name); } else { tree.parseError('unexpected-end-tag', {name: name}); } }; modes.inRow.endTagIgnore = function(name) { tree.parseError("unexpected-end-tag-in-table-row", {name: name}); }; modes.inRow.endTagOther = function(name) { modes.inTable.processEndTag(name); }; modes.inRow.ignoreEndTagTr = function() { return !tree.openElements.inTableScope('tr'); }; modes.afterAfterFrameset = Object.create(modes.base); modes.afterAfterFrameset.start_tag_handlers = { html: 'startTagHtml', noframes: 'startTagNoFrames', '-default': 'startTagOther' }; modes.afterAfterFrameset.processEOF = function() {}; modes.afterAfterFrameset.processComment = function(data) { tree.insertComment(data, tree.document); }; modes.afterAfterFrameset.processCharacters = function(buffer) { var characters = buffer.takeRemaining(); var whitespace = ""; for (var i = 0; i < characters.length; i++) { var ch = characters[i]; if (isWhitespace(ch)) whitespace += ch; } if (whitespace) { tree.reconstructActiveFormattingElements(); tree.insertText(whitespace); } if (whitespace.length < characters.length) tree.parseError('expected-eof-but-got-char'); }; modes.afterAfterFrameset.startTagNoFrames = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; modes.afterAfterFrameset.startTagOther = function(name, attributes, selfClosing) { tree.parseError('expected-eof-but-got-start-tag', {name: name}); }; modes.afterAfterFrameset.processEndTag = function(name, attributes) { tree.parseError('expected-eof-but-got-end-tag', {name: name}); }; modes.text = Object.create(modes.base); modes.text.start_tag_handlers = { '-default': 'startTagOther' }; modes.text.end_tag_handlers = { script: 'endTagScript', '-default': 'endTagOther' }; modes.text.processCharacters = function(buffer) { if (tree.shouldSkipLeadingNewline) { tree.shouldSkipLeadingNewline = false; buffer.skipAtMostOneLeadingNewline(); } var data = buffer.takeRemaining(); if (!data) return; tree.insertText(data); }; modes.text.processEOF = function() { tree.parseError("expected-named-closing-tag-but-got-eof", {name: tree.currentStackItem().localName}); tree.openElements.pop(); tree.setInsertionMode(tree.originalInsertionMode); tree.insertionMode.processEOF(); }; modes.text.startTagOther = function(name) { throw "Tried to process start tag " + name + " in RCDATA/RAWTEXT mode"; }; modes.text.endTagScript = function(name) { var node = tree.openElements.pop(); assert.ok(node.localName == 'script'); tree.setInsertionMode(tree.originalInsertionMode); }; modes.text.endTagOther = function(name) { tree.openElements.pop(); tree.setInsertionMode(tree.originalInsertionMode); }; } TreeBuilder.prototype.setInsertionMode = function(name) { this.insertionMode = this.insertionModes[name]; this.insertionModeName = name; }; TreeBuilder.prototype.adoptionAgencyEndTag = function(name) { var outerIterationLimit = 8; var innerIterationLimit = 3; var formattingElement; function isActiveFormattingElement(el) { return el === formattingElement; } var outerLoopCounter = 0; while (outerLoopCounter++ < outerIterationLimit) { formattingElement = this.elementInActiveFormattingElements(name); if (!formattingElement || (this.openElements.contains(formattingElement) && !this.openElements.inScope(formattingElement.localName))) { this.parseError('adoption-agency-1.1', {name: name}); return false; } if (!this.openElements.contains(formattingElement)) { this.parseError('adoption-agency-1.2', {name: name}); this.removeElementFromActiveFormattingElements(formattingElement); return true; } if (!this.openElements.inScope(formattingElement.localName)) { this.parseError('adoption-agency-4.4', {name: name}); } if (formattingElement != this.currentStackItem()) { this.parseError('adoption-agency-1.3', {name: name}); } var furthestBlock = this.openElements.furthestBlockForFormattingElement(formattingElement.node); if (!furthestBlock) { this.openElements.remove_openElements_until(isActiveFormattingElement); this.removeElementFromActiveFormattingElements(formattingElement); return true; } var afeIndex = this.openElements.elements.indexOf(formattingElement); var commonAncestor = this.openElements.item(afeIndex - 1); var bookmark = this.activeFormattingElements.indexOf(formattingElement); var node = furthestBlock; var lastNode = furthestBlock; var index = this.openElements.elements.indexOf(node); var innerLoopCounter = 0; while (innerLoopCounter++ < innerIterationLimit) { index -= 1; node = this.openElements.item(index); if (this.activeFormattingElements.indexOf(node) < 0) { this.openElements.elements.splice(index, 1); continue; } if (node == formattingElement) break; if (lastNode == furthestBlock) bookmark = this.activeFormattingElements.indexOf(node) + 1; var clone = this.createElement(node.namespaceURI, node.localName, node.attributes); var newNode = new StackItem(node.namespaceURI, node.localName, node.attributes, clone); this.activeFormattingElements[this.activeFormattingElements.indexOf(node)] = newNode; this.openElements.elements[this.openElements.elements.indexOf(node)] = newNode; node = newNode; this.detachFromParent(lastNode.node); this.attachNode(lastNode.node, node.node); lastNode = node; } this.detachFromParent(lastNode.node); if (commonAncestor.isFosterParenting()) { this.insertIntoFosterParent(lastNode.node); } else { this.attachNode(lastNode.node, commonAncestor.node); } var clone = this.createElement("http://www.w3.org/1999/xhtml", formattingElement.localName, formattingElement.attributes); var formattingClone = new StackItem(formattingElement.namespaceURI, formattingElement.localName, formattingElement.attributes, clone); this.reparentChildren(furthestBlock.node, clone); this.attachNode(clone, furthestBlock.node); this.removeElementFromActiveFormattingElements(formattingElement); this.activeFormattingElements.splice(Math.min(bookmark, this.activeFormattingElements.length), 0, formattingClone); this.openElements.remove(formattingElement); this.openElements.elements.splice(this.openElements.elements.indexOf(furthestBlock) + 1, 0, formattingClone); } return true; }; TreeBuilder.prototype.start = function() { throw "Not mplemented"; }; TreeBuilder.prototype.startTokenization = function(tokenizer) { this.tokenizer = tokenizer; this.compatMode = "no quirks"; this.originalInsertionMode = "initial"; this.framesetOk = true; this.openElements = new ElementStack(); this.activeFormattingElements = []; this.start(); if (this.context) { switch(this.context) { case 'title': case 'textarea': this.tokenizer.setState(Tokenizer.RCDATA); break; case 'style': case 'xmp': case 'iframe': case 'noembed': case 'noframes': this.tokenizer.setState(Tokenizer.RAWTEXT); break; case 'script': this.tokenizer.setState(Tokenizer.SCRIPT_DATA); break; case 'noscript': if (this.scriptingEnabled) this.tokenizer.setState(Tokenizer.RAWTEXT); break; case 'plaintext': this.tokenizer.setState(Tokenizer.PLAINTEXT); break; } this.insertHtmlElement(); this.resetInsertionMode(); } else { this.setInsertionMode('initial'); } }; TreeBuilder.prototype.processToken = function(token) { this.selfClosingFlagAcknowledged = false; var currentNode = this.openElements.top || null; var insertionMode; if (!currentNode || !currentNode.isForeign() || (currentNode.isMathMLTextIntegrationPoint() && ((token.type == 'StartTag' && !(token.name in {mglyph:0, malignmark:0})) || (token.type === 'Characters')) ) || (currentNode.namespaceURI == "http://www.w3.org/1998/Math/MathML" && currentNode.localName == 'annotation-xml' && token.type == 'StartTag' && token.name == 'svg' ) || (currentNode.isHtmlIntegrationPoint() && token.type in {StartTag:0, Characters:0} ) || token.type == 'EOF' ) { insertionMode = this.insertionMode; } else { insertionMode = this.insertionModes.inForeignContent; } switch(token.type) { case 'Characters': var buffer = new CharacterBuffer(token.data); insertionMode.processCharacters(buffer); break; case 'Comment': insertionMode.processComment(token.data); break; case 'StartTag': insertionMode.processStartTag(token.name, token.data, token.selfClosing); break; case 'EndTag': insertionMode.processEndTag(token.name); break; case 'Doctype': insertionMode.processDoctype(token.name, token.publicId, token.systemId, token.forceQuirks); break; case 'EOF': insertionMode.processEOF(); break; } }; TreeBuilder.prototype.isCdataSectionAllowed = function() { return this.openElements.length > 0 && this.currentStackItem().isForeign(); }; TreeBuilder.prototype.isSelfClosingFlagAcknowledged = function() { return this.selfClosingFlagAcknowledged; }; TreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) { throw new Error("Not implemented"); }; TreeBuilder.prototype.attachNode = function(child, parent) { throw new Error("Not implemented"); }; TreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) { throw new Error("Not implemented"); }; TreeBuilder.prototype.detachFromParent = function(node) { throw new Error("Not implemented"); }; TreeBuilder.prototype.addAttributesToElement = function(element, attributes) { throw new Error("Not implemented"); }; TreeBuilder.prototype.insertHtmlElement = function(attributes) { var root = this.createElement("http://www.w3.org/1999/xhtml", 'html', attributes); this.attachNode(root, this.document); this.openElements.pushHtmlElement(new StackItem("http://www.w3.org/1999/xhtml", 'html', attributes, root)); return root; }; TreeBuilder.prototype.insertHeadElement = function(attributes) { var element = this.createElement("http://www.w3.org/1999/xhtml", "head", attributes); this.head = new StackItem("http://www.w3.org/1999/xhtml", "head", attributes, element); this.attachNode(element, this.openElements.top.node); this.openElements.pushHeadElement(this.head); return element; }; TreeBuilder.prototype.insertBodyElement = function(attributes) { var element = this.createElement("http://www.w3.org/1999/xhtml", "body", attributes); this.attachNode(element, this.openElements.top.node); this.openElements.pushBodyElement(new StackItem("http://www.w3.org/1999/xhtml", "body", attributes, element)); return element; }; TreeBuilder.prototype.insertIntoFosterParent = function(node) { var tableIndex = this.openElements.findIndex('table'); var tableElement = this.openElements.item(tableIndex).node; if (tableIndex === 0) return this.attachNode(node, tableElement); this.attachNodeToFosterParent(node, tableElement, this.openElements.item(tableIndex - 1).node); }; TreeBuilder.prototype.insertElement = function(name, attributes, namespaceURI, selfClosing) { if (!namespaceURI) namespaceURI = "http://www.w3.org/1999/xhtml"; var element = this.createElement(namespaceURI, name, attributes); if (this.shouldFosterParent()) this.insertIntoFosterParent(element); else this.attachNode(element, this.openElements.top.node); if (!selfClosing) this.openElements.push(new StackItem(namespaceURI, name, attributes, element)); }; TreeBuilder.prototype.insertFormattingElement = function(name, attributes) { this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml"); this.appendElementToActiveFormattingElements(this.currentStackItem()); }; TreeBuilder.prototype.insertSelfClosingElement = function(name, attributes) { this.selfClosingFlagAcknowledged = true; this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml", true); }; TreeBuilder.prototype.insertForeignElement = function(name, attributes, namespaceURI, selfClosing) { if (selfClosing) this.selfClosingFlagAcknowledged = true; this.insertElement(name, attributes, namespaceURI, selfClosing); }; TreeBuilder.prototype.insertComment = function(data, parent) { throw new Error("Not implemented"); }; TreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) { throw new Error("Not implemented"); }; TreeBuilder.prototype.insertText = function(data) { throw new Error("Not implemented"); }; TreeBuilder.prototype.currentStackItem = function() { return this.openElements.top; }; TreeBuilder.prototype.popElement = function() { return this.openElements.pop(); }; TreeBuilder.prototype.shouldFosterParent = function() { return this.redirectAttachToFosterParent && this.currentStackItem().isFosterParenting(); }; TreeBuilder.prototype.generateImpliedEndTags = function(exclude) { var name = this.openElements.top.localName; if (['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'].indexOf(name) != -1 && name != exclude) { this.popElement(); this.generateImpliedEndTags(exclude); } }; TreeBuilder.prototype.reconstructActiveFormattingElements = function() { if (this.activeFormattingElements.length === 0) return; var i = this.activeFormattingElements.length - 1; var entry = this.activeFormattingElements[i]; if (entry == Marker || this.openElements.contains(entry)) return; while (entry != Marker && !this.openElements.contains(entry)) { i -= 1; entry = this.activeFormattingElements[i]; if (!entry) break; } while (true) { i += 1; entry = this.activeFormattingElements[i]; this.insertElement(entry.localName, entry.attributes); var element = this.currentStackItem(); this.activeFormattingElements[i] = element; if (element == this.activeFormattingElements[this.activeFormattingElements.length -1]) break; } }; TreeBuilder.prototype.ensureNoahsArkCondition = function(item) { var kNoahsArkCapacity = 3; if (this.activeFormattingElements.length < kNoahsArkCapacity) return; var candidates = []; var newItemAttributeCount = item.attributes.length; for (var i = this.activeFormattingElements.length - 1; i >= 0; i--) { var candidate = this.activeFormattingElements[i]; if (candidate === Marker) break; if (item.localName !== candidate.localName || item.namespaceURI !== candidate.namespaceURI) continue; if (candidate.attributes.length != newItemAttributeCount) continue; candidates.push(candidate); } if (candidates.length < kNoahsArkCapacity) return; var remainingCandidates = []; var attributes = item.attributes; for (var i = 0; i < attributes.length; i++) { var attribute = attributes[i]; for (var j = 0; j < candidates.length; j++) { var candidate = candidates[j]; var candidateAttribute = getAttribute(candidate, attribute.nodeName); if (candidateAttribute && candidateAttribute.nodeValue === attribute.nodeValue) remainingCandidates.push(candidate); } if (remainingCandidates.length < kNoahsArkCapacity) return; candidates = remainingCandidates; remainingCandidates = []; } for (var i = kNoahsArkCapacity - 1; i < candidates.length; i++) this.removeElementFromActiveFormattingElements(candidates[i]); }; TreeBuilder.prototype.appendElementToActiveFormattingElements = function(item) { this.ensureNoahsArkCondition(item); this.activeFormattingElements.push(item); }; TreeBuilder.prototype.removeElementFromActiveFormattingElements = function(item) { var index = this.activeFormattingElements.indexOf(item); if (index >= 0) this.activeFormattingElements.splice(index, 1); }; TreeBuilder.prototype.elementInActiveFormattingElements = function(name) { var els = this.activeFormattingElements; for (var i = els.length - 1; i >= 0; i--) { if (els[i] == Marker) break; if (els[i].localName == name) return els[i]; } return false; }; TreeBuilder.prototype.clearActiveFormattingElements = function() { while (!(this.activeFormattingElements.length === 0 || this.activeFormattingElements.pop() == Marker)); }; TreeBuilder.prototype.reparentChildren = function(oldParent, newParent) { throw new Error("Not implemented"); }; TreeBuilder.prototype.setFragmentContext = function(context) { this.context = context; }; TreeBuilder.prototype.parseError = function(code, args) { if (!this.errorHandler) return; var message = formatMessage(messages[code], args); this.errorHandler.error(message, this.tokenizer._inputStream.location(), code); }; TreeBuilder.prototype.resetInsertionMode = function() { var last = false; var node = null; for (var i = this.openElements.length - 1; i >= 0; i--) { node = this.openElements.item(i); if (i === 0) { assert.ok(this.context); last = true; node = new StackItem("http://www.w3.org/1999/xhtml", this.context, [], null); } if (node.namespaceURI === "http://www.w3.org/1999/xhtml") { if (node.localName === 'select') return this.setInsertionMode('inSelect'); if (node.localName === 'td' || node.localName === 'th') return this.setInsertionMode('inCell'); if (node.localName === 'tr') return this.setInsertionMode('inRow'); if (node.localName === 'tbody' || node.localName === 'thead' || node.localName === 'tfoot') return this.setInsertionMode('inTableBody'); if (node.localName === 'caption') return this.setInsertionMode('inCaption'); if (node.localName === 'colgroup') return this.setInsertionMode('inColumnGroup'); if (node.localName === 'table') return this.setInsertionMode('inTable'); if (node.localName === 'head' && !last) return this.setInsertionMode('inHead'); if (node.localName === 'body') return this.setInsertionMode('inBody'); if (node.localName === 'frameset') return this.setInsertionMode('inFrameset'); if (node.localName === 'html') if (!this.openElements.headElement) return this.setInsertionMode('beforeHead'); else return this.setInsertionMode('afterHead'); } if (last) return this.setInsertionMode('inBody'); } }; TreeBuilder.prototype.processGenericRCDATAStartTag = function(name, attributes) { this.insertElement(name, attributes); this.tokenizer.setState(Tokenizer.RCDATA); this.originalInsertionMode = this.insertionModeName; this.setInsertionMode('text'); }; TreeBuilder.prototype.processGenericRawTextStartTag = function(name, attributes) { this.insertElement(name, attributes); this.tokenizer.setState(Tokenizer.RAWTEXT); this.originalInsertionMode = this.insertionModeName; this.setInsertionMode('text'); }; TreeBuilder.prototype.adjustMathMLAttributes = function(attributes) { attributes.forEach(function(a) { a.namespaceURI = "http://www.w3.org/1998/Math/MathML"; if (constants.MATHMLAttributeMap[a.nodeName]) a.nodeName = constants.MATHMLAttributeMap[a.nodeName]; }); return attributes; }; TreeBuilder.prototype.adjustSVGTagNameCase = function(name) { return constants.SVGTagMap[name] || name; }; TreeBuilder.prototype.adjustSVGAttributes = function(attributes) { attributes.forEach(function(a) { a.namespaceURI = "http://www.w3.org/2000/svg"; if (constants.SVGAttributeMap[a.nodeName]) a.nodeName = constants.SVGAttributeMap[a.nodeName]; }); return attributes; }; TreeBuilder.prototype.adjustForeignAttributes = function(attributes) { for (var i = 0; i < attributes.length; i++) { var attribute = attributes[i]; var adjusted = constants.ForeignAttributeMap[attribute.nodeName]; if (adjusted) { attribute.nodeName = adjusted.localName; attribute.prefix = adjusted.prefix; attribute.namespaceURI = adjusted.namespaceURI; } } return attributes; }; function formatMessage(format, args) { return format.replace(new RegExp('{[0-9a-z-]+}', 'gi'), function(match) { return args[match.slice(1, -1)] || match; }); } exports.TreeBuilder = TreeBuilder; }, {"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":16}], 7:[function(_dereq_,module,exports){ exports.SVGTagMap = { "altglyph": "altGlyph", "altglyphdef": "altGlyphDef", "altglyphitem": "altGlyphItem", "animatecolor": "animateColor", "animatemotion": "animateMotion", "animatetransform": "animateTransform", "clippath": "clipPath", "feblend": "feBlend", "fecolormatrix": "feColorMatrix", "fecomponenttransfer": "feComponentTransfer", "fecomposite": "feComposite", "feconvolvematrix": "feConvolveMatrix", "fediffuselighting": "feDiffuseLighting", "fedisplacementmap": "feDisplacementMap", "fedistantlight": "feDistantLight", "feflood": "feFlood", "fefunca": "feFuncA", "fefuncb": "feFuncB", "fefuncg": "feFuncG", "fefuncr": "feFuncR", "fegaussianblur": "feGaussianBlur", "feimage": "feImage", "femerge": "feMerge", "femergenode": "feMergeNode", "femorphology": "feMorphology", "feoffset": "feOffset", "fepointlight": "fePointLight", "fespecularlighting": "feSpecularLighting", "fespotlight": "feSpotLight", "fetile": "feTile", "feturbulence": "feTurbulence", "foreignobject": "foreignObject", "glyphref": "glyphRef", "lineargradient": "linearGradient", "radialgradient": "radialGradient", "textpath": "textPath" }; exports.MATHMLAttributeMap = { definitionurl: 'definitionURL' }; exports.SVGAttributeMap = { attributename: 'attributeName', attributetype: 'attributeType', basefrequency: 'baseFrequency', baseprofile: 'baseProfile', calcmode: 'calcMode', clippathunits: 'clipPathUnits', contentscripttype: 'contentScriptType', contentstyletype: 'contentStyleType', diffuseconstant: 'diffuseConstant', edgemode: 'edgeMode', externalresourcesrequired: 'externalResourcesRequired', filterres: 'filterRes', filterunits: 'filterUnits', glyphref: 'glyphRef', gradienttransform: 'gradientTransform', gradientunits: 'gradientUnits', kernelmatrix: 'kernelMatrix', kernelunitlength: 'kernelUnitLength', keypoints: 'keyPoints', keysplines: 'keySplines', keytimes: 'keyTimes', lengthadjust: 'lengthAdjust', limitingconeangle: 'limitingConeAngle', markerheight: 'markerHeight', markerunits: 'markerUnits', markerwidth: 'markerWidth', maskcontentunits: 'maskContentUnits', maskunits: 'maskUnits', numoctaves: 'numOctaves', pathlength: 'pathLength', patterncontentunits: 'patternContentUnits', patterntransform: 'patternTransform', patternunits: 'patternUnits', pointsatx: 'pointsAtX', pointsaty: 'pointsAtY', pointsatz: 'pointsAtZ', preservealpha: 'preserveAlpha', preserveaspectratio: 'preserveAspectRatio', primitiveunits: 'primitiveUnits', refx: 'refX', refy: 'refY', repeatcount: 'repeatCount', repeatdur: 'repeatDur', requiredextensions: 'requiredExtensions', requiredfeatures: 'requiredFeatures', specularconstant: 'specularConstant', specularexponent: 'specularExponent', spreadmethod: 'spreadMethod', startoffset: 'startOffset', stddeviation: 'stdDeviation', stitchtiles: 'stitchTiles', surfacescale: 'surfaceScale', systemlanguage: 'systemLanguage', tablevalues: 'tableValues', targetx: 'targetX', targety: 'targetY', textlength: 'textLength', viewbox: 'viewBox', viewtarget: 'viewTarget', xchannelselector: 'xChannelSelector', ychannelselector: 'yChannelSelector', zoomandpan: 'zoomAndPan' }; exports.ForeignAttributeMap = { "xlink:actuate": {prefix: "xlink", localName: "actuate", namespaceURI: "http://www.w3.org/1999/xlink"}, "xlink:arcrole": {prefix: "xlink", localName: "arcrole", namespaceURI: "http://www.w3.org/1999/xlink"}, "xlink:href": {prefix: "xlink", localName: "href", namespaceURI: "http://www.w3.org/1999/xlink"}, "xlink:role": {prefix: "xlink", localName: "role", namespaceURI: "http://www.w3.org/1999/xlink"}, "xlink:show": {prefix: "xlink", localName: "show", namespaceURI: "http://www.w3.org/1999/xlink"}, "xlink:title": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"}, "xlink:type": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"}, "xml:base": {prefix: "xml", localName: "base", namespaceURI: "http://www.w3.org/XML/1998/namespace"}, "xml:lang": {prefix: "xml", localName: "lang", namespaceURI: "http://www.w3.org/XML/1998/namespace"}, "xml:space": {prefix: "xml", localName: "space", namespaceURI: "http://www.w3.org/XML/1998/namespace"}, "xmlns": {prefix: null, localName: "xmlns", namespaceURI: "http://www.w3.org/2000/xmlns/"}, "xmlns:xlink": {prefix: "xmlns", localName: "xlink", namespaceURI: "http://www.w3.org/2000/xmlns/"}, }; }, {}], 8:[function(_dereq_,module,exports){ module.exports={ "null-character": "Null character in input stream, replaced with U+FFFD.", "invalid-codepoint": "Invalid codepoint in stream", "incorrectly-placed-solidus": "Solidus (/) incorrectly placed in tag.", "incorrect-cr-newline-entity": "Incorrect CR newline entity, replaced with LF.", "illegal-windows-1252-entity": "Entity used with illegal number (windows-1252 reference).", "cant-convert-numeric-entity": "Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).", "invalid-numeric-entity-replaced": "Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.", "numeric-entity-without-semicolon": "Numeric entity didn't end with ';'.", "expected-numeric-entity-but-got-eof": "Numeric entity expected. Got end of file instead.", "expected-numeric-entity": "Numeric entity expected but none found.", "named-entity-without-semicolon": "Named entity didn't end with ';'.", "expected-named-entity": "Named entity expected. Got none.", "attributes-in-end-tag": "End tag contains unexpected attributes.", "self-closing-flag-on-end-tag": "End tag contains unexpected self-closing flag.", "bare-less-than-sign-at-eof": "End of file after <.", "expected-tag-name-but-got-right-bracket": "Expected tag name. Got '>' instead.", "expected-tag-name-but-got-question-mark": "Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)", "expected-tag-name": "Expected tag name. Got something else instead.", "expected-closing-tag-but-got-right-bracket": "Expected closing tag. Got '>' instead. Ignoring ''.", "expected-closing-tag-but-got-eof": "Expected closing tag. Unexpected end of file.", "expected-closing-tag-but-got-char": "Expected closing tag. Unexpected character '{data}' found.", "eof-in-tag-name": "Unexpected end of file in the tag name.", "expected-attribute-name-but-got-eof": "Unexpected end of file. Expected attribute name instead.", "eof-in-attribute-name": "Unexpected end of file in attribute name.", "invalid-character-in-attribute-name": "Invalid character in attribute name.", "duplicate-attribute": "Dropped duplicate attribute '{name}' on tag.", "expected-end-of-tag-but-got-eof": "Unexpected end of file. Expected = or end of tag.", "expected-attribute-value-but-got-eof": "Unexpected end of file. Expected attribute value.", "expected-attribute-value-but-got-right-bracket": "Expected attribute value. Got '>' instead.", "unexpected-character-in-unquoted-attribute-value": "Unexpected character in unquoted attribute", "invalid-character-after-attribute-name": "Unexpected character after attribute name.", "unexpected-character-after-attribute-value": "Unexpected character after attribute value.", "eof-in-attribute-value-double-quote": "Unexpected end of file in attribute value (\").", "eof-in-attribute-value-single-quote": "Unexpected end of file in attribute value (').", "eof-in-attribute-value-no-quotes": "Unexpected end of file in attribute value.", "eof-after-attribute-value": "Unexpected end of file after attribute value.", "unexpected-eof-after-solidus-in-tag": "Unexpected end of file in tag. Expected >.", "unexpected-character-after-solidus-in-tag": "Unexpected character after / in tag. Expected >.", "expected-dashes-or-doctype": "Expected '--' or 'DOCTYPE'. Not found.", "unexpected-bang-after-double-dash-in-comment": "Unexpected ! after -- in comment.", "incorrect-comment": "Incorrect comment.", "eof-in-comment": "Unexpected end of file in comment.", "eof-in-comment-end-dash": "Unexpected end of file in comment (-).", "unexpected-dash-after-double-dash-in-comment": "Unexpected '-' after '--' found in comment.", "eof-in-comment-double-dash": "Unexpected end of file in comment (--).", "eof-in-comment-end-bang-state": "Unexpected end of file in comment.", "unexpected-char-in-comment": "Unexpected character in comment found.", "need-space-after-doctype": "No space after literal string 'DOCTYPE'.", "expected-doctype-name-but-got-right-bracket": "Unexpected > character. Expected DOCTYPE name.", "expected-doctype-name-but-got-eof": "Unexpected end of file. Expected DOCTYPE name.", "eof-in-doctype-name": "Unexpected end of file in DOCTYPE name.", "eof-in-doctype": "Unexpected end of file in DOCTYPE.", "expected-space-or-right-bracket-in-doctype": "Expected space or '>'. Got '{data}'.", "unexpected-end-of-doctype": "Unexpected end of DOCTYPE.", "unexpected-char-in-doctype": "Unexpected character in DOCTYPE.", "eof-in-bogus-doctype": "Unexpected end of file in bogus doctype.", "eof-in-innerhtml": "Unexpected EOF in inner html mode.", "unexpected-doctype": "Unexpected DOCTYPE. Ignored.", "non-html-root": "html needs to be the first start tag.", "expected-doctype-but-got-eof": "Unexpected End of file. Expected DOCTYPE.", "unknown-doctype": "Erroneous DOCTYPE. Expected .", "quirky-doctype": "Quirky doctype. Expected .", "almost-standards-doctype": "Almost standards mode doctype. Expected .", "obsolete-doctype": "Obsolete doctype. Expected .", "expected-doctype-but-got-chars": "Non-space characters found without seeing a doctype first. Expected e.g. .", "expected-doctype-but-got-start-tag": "Start tag seen without seeing a doctype first. Expected e.g. .", "expected-doctype-but-got-end-tag": "End tag seen without seeing a doctype first. Expected e.g. .", "end-tag-after-implied-root": "Unexpected end tag ({name}) after the (implied) root element.", "expected-named-closing-tag-but-got-eof": "Unexpected end of file. Expected end tag ({name}).", "two-heads-are-not-better-than-one": "Unexpected start tag head in existing head. Ignored.", "unexpected-end-tag": "Unexpected end tag ({name}). Ignored.", "unexpected-implied-end-tag": "End tag {name} implied, but there were open elements.", "unexpected-start-tag-out-of-my-head": "Unexpected start tag ({name}) that can be in head. Moved.", "unexpected-start-tag": "Unexpected start tag ({name}).", "missing-end-tag": "Missing end tag ({name}).", "missing-end-tags": "Missing end tags ({name}).", "unexpected-start-tag-implies-end-tag": "Unexpected start tag ({startName}) implies end tag ({endName}).", "unexpected-start-tag-treated-as": "Unexpected start tag ({originalName}). Treated as {newName}.", "deprecated-tag": "Unexpected start tag {name}. Don't use it!", "unexpected-start-tag-ignored": "Unexpected start tag {name}. Ignored.", "expected-one-end-tag-but-got-another": "Unexpected end tag ({gotName}). Missing end tag ({expectedName}).", "end-tag-too-early": "End tag ({name}) seen too early. Expected other end tag.", "end-tag-too-early-named": "Unexpected end tag ({gotName}). Expected end tag ({expectedName}.", "end-tag-too-early-ignored": "End tag ({name}) seen too early. Ignored.", "adoption-agency-1.1": "End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.", "adoption-agency-1.2": "End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.", "adoption-agency-1.3": "End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.", "adoption-agency-4.4": "End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.", "unexpected-end-tag-treated-as": "Unexpected end tag ({originalName}). Treated as {newName}.", "no-end-tag": "This element ({name}) has no end tag.", "unexpected-implied-end-tag-in-table": "Unexpected implied end tag ({name}) in the table phase.", "unexpected-implied-end-tag-in-table-body": "Unexpected implied end tag ({name}) in the table body phase.", "unexpected-char-implies-table-voodoo": "Unexpected non-space characters in table context caused voodoo mode.", "unexpected-hidden-input-in-table": "Unexpected input with type hidden in table context.", "unexpected-form-in-table": "Unexpected form in table context.", "unexpected-start-tag-implies-table-voodoo": "Unexpected start tag ({name}) in table context caused voodoo mode.", "unexpected-end-tag-implies-table-voodoo": "Unexpected end tag ({name}) in table context caused voodoo mode.", "unexpected-cell-in-table-body": "Unexpected table cell start tag ({name}) in the table body phase.", "unexpected-cell-end-tag": "Got table cell end tag ({name}) while required end tags are missing.", "unexpected-end-tag-in-table-body": "Unexpected end tag ({name}) in the table body phase. Ignored.", "unexpected-implied-end-tag-in-table-row": "Unexpected implied end tag ({name}) in the table row phase.", "unexpected-end-tag-in-table-row": "Unexpected end tag ({name}) in the table row phase. Ignored.", "unexpected-select-in-select": "Unexpected select start tag in the select phase treated as select end tag.", "unexpected-input-in-select": "Unexpected input start tag in the select phase.", "unexpected-start-tag-in-select": "Unexpected start tag token ({name}) in the select phase. Ignored.", "unexpected-end-tag-in-select": "Unexpected end tag ({name}) in the select phase. Ignored.", "unexpected-table-element-start-tag-in-select-in-table": "Unexpected table element start tag ({name}) in the select in table phase.", "unexpected-table-element-end-tag-in-select-in-table": "Unexpected table element end tag ({name}) in the select in table phase.", "unexpected-char-after-body": "Unexpected non-space characters in the after body phase.", "unexpected-start-tag-after-body": "Unexpected start tag token ({name}) in the after body phase.", "unexpected-end-tag-after-body": "Unexpected end tag token ({name}) in the after body phase.", "unexpected-char-in-frameset": "Unepxected characters in the frameset phase. Characters ignored.", "unexpected-start-tag-in-frameset": "Unexpected start tag token ({name}) in the frameset phase. Ignored.", "unexpected-frameset-in-frameset-innerhtml": "Unexpected end tag token (frameset in the frameset phase (innerHTML).", "unexpected-end-tag-in-frameset": "Unexpected end tag token ({name}) in the frameset phase. Ignored.", "unexpected-char-after-frameset": "Unexpected non-space characters in the after frameset phase. Ignored.", "unexpected-start-tag-after-frameset": "Unexpected start tag ({name}) in the after frameset phase. Ignored.", "unexpected-end-tag-after-frameset": "Unexpected end tag ({name}) in the after frameset phase. Ignored.", "expected-eof-but-got-char": "Unexpected non-space characters. Expected end of file.", "expected-eof-but-got-start-tag": "Unexpected start tag ({name}). Expected end of file.", "expected-eof-but-got-end-tag": "Unexpected end tag ({name}). Expected end of file.", "unexpected-end-table-in-caption": "Unexpected end table tag in caption. Generates implied end caption.", "end-html-in-innerhtml": "Unexpected html end tag in inner html mode.", "eof-in-table": "Unexpected end of file. Expected table content.", "eof-in-script": "Unexpected end of file. Expected script content.", "non-void-element-with-trailing-solidus": "Trailing solidus not allowed on element {name}.", "unexpected-html-element-in-foreign-content": "HTML start tag \"{name}\" in a foreign namespace context.", "unexpected-start-tag-in-table": "Unexpected {name}. Expected table content." } }, {}], 9:[function(_dereq_,module,exports){ var SAXTreeBuilder = _dereq_('./SAXTreeBuilder').SAXTreeBuilder; var Tokenizer = _dereq_('../Tokenizer').Tokenizer; var TreeParser = _dereq_('./TreeParser').TreeParser; function SAXParser() { this.contentHandler = null; this._errorHandler = null; this._treeBuilder = new SAXTreeBuilder(); this._tokenizer = new Tokenizer(this._treeBuilder); this._scriptingEnabled = false; } SAXParser.prototype.parse = function(source) { this._tokenizer.tokenize(source); var document = this._treeBuilder.document; if (document) { new TreeParser(this.contentHandler).parse(document); } }; SAXParser.prototype.parseFragment = function(source, context) { this._treeBuilder.setFragmentContext(context); this._tokenizer.tokenize(source); var fragment = this._treeBuilder.getFragment(); if (fragment) { new TreeParser(this.contentHandler).parse(fragment); } }; Object.defineProperty(SAXParser.prototype, 'scriptingEnabled', { get: function() { return this._scriptingEnabled; }, set: function(value) { this._scriptingEnabled = value; this._treeBuilder.scriptingEnabled = value; } }); Object.defineProperty(SAXParser.prototype, 'errorHandler', { get: function() { return this._errorHandler; }, set: function(value) { this._errorHandler = value; this._treeBuilder.errorHandler = value; } }); exports.SAXParser = SAXParser; }, {"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}], 10:[function(_dereq_,module,exports){ var util = _dereq_('util'); var TreeBuilder = _dereq_('../TreeBuilder').TreeBuilder; function SAXTreeBuilder() { TreeBuilder.call(this); } util.inherits(SAXTreeBuilder, TreeBuilder); SAXTreeBuilder.prototype.start = function(tokenizer) { this.document = new Document(this.tokenizer); }; SAXTreeBuilder.prototype.end = function() { this.document.endLocator = this.tokenizer; }; SAXTreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) { var doctype = new DTD(this.tokenizer, name, publicId, systemId); doctype.endLocator = this.tokenizer; this.document.appendChild(doctype); }; SAXTreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) { var element = new Element(this.tokenizer, namespaceURI, localName, localName, attributes || []); return element; }; SAXTreeBuilder.prototype.insertComment = function(data, parent) { if (!parent) parent = this.currentStackItem(); var comment = new Comment(this.tokenizer, data); parent.appendChild(comment); }; SAXTreeBuilder.prototype.appendCharacters = function(parent, data) { var text = new Characters(this.tokenizer, data); parent.appendChild(text); }; SAXTreeBuilder.prototype.insertText = function(data) { if (this.redirectAttachToFosterParent && this.openElements.top.isFosterParenting()) { var tableIndex = this.openElements.findIndex('table'); var tableItem = this.openElements.item(tableIndex); var table = tableItem.node; if (tableIndex === 0) { return this.appendCharacters(table, data); } var text = new Characters(this.tokenizer, data); var parent = table.parentNode; if (parent) { parent.insertBetween(text, table.previousSibling, table); return; } var stackParent = this.openElements.item(tableIndex - 1).node; stackParent.appendChild(text); return; } this.appendCharacters(this.currentStackItem().node, data); }; SAXTreeBuilder.prototype.attachNode = function(node, parent) { parent.appendChild(node); }; SAXTreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) { var parent = table.parentNode; if (parent) parent.insertBetween(child, table.previousSibling, table); else stackParent.appendChild(child); }; SAXTreeBuilder.prototype.detachFromParent = function(element) { element.detach(); }; SAXTreeBuilder.prototype.reparentChildren = function(oldParent, newParent) { newParent.appendChildren(oldParent.firstChild); }; SAXTreeBuilder.prototype.getFragment = function() { var fragment = new DocumentFragment(); this.reparentChildren(this.openElements.rootNode, fragment); return fragment; }; function getAttribute(node, name) { for (var i = 0; i < node.attributes.length; i++) { var attribute = node.attributes[i]; if (attribute.nodeName === name) return attribute.nodeValue; } } SAXTreeBuilder.prototype.addAttributesToElement = function(element, attributes) { for (var i = 0; i < attributes.length; i++) { var attribute = attributes[i]; if (!getAttribute(element, attribute.nodeName)) element.attributes.push(attribute); } }; var NodeType = { CDATA: 1, CHARACTERS: 2, COMMENT: 3, DOCUMENT: 4, DOCUMENT_FRAGMENT: 5, DTD: 6, ELEMENT: 7, ENTITY: 8, IGNORABLE_WHITESPACE: 9, PROCESSING_INSTRUCTION: 10, SKIPPED_ENTITY: 11 }; function Node(locator) { if (!locator) { this.columnNumber = -1; this.lineNumber = -1; } else { this.columnNumber = locator.columnNumber; this.lineNumber = locator.lineNumber; } this.parentNode = null; this.nextSibling = null; this.firstChild = null; } Node.prototype.visit = function(treeParser) { throw new Error("Not Implemented"); }; Node.prototype.revisit = function(treeParser) { return; }; Node.prototype.detach = function() { if (this.parentNode !== null) { this.parentNode.removeChild(this); this.parentNode = null; } }; Object.defineProperty(Node.prototype, 'previousSibling', { get: function() { var prev = null; var next = this.parentNode.firstChild; for(;;) { if (this == next) { return prev; } prev = next; next = next.nextSibling; } } }); function ParentNode(locator) { Node.call(this, locator); this.lastChild = null; this._endLocator = null; } ParentNode.prototype = Object.create(Node.prototype); ParentNode.prototype.insertBefore = function(child, sibling) { if (!sibling) { return this.appendChild(child); } child.detach(); child.parentNode = this; if (this.firstChild == sibling) { child.nextSibling = sibling; this.firstChild = child; } else { var prev = this.firstChild; var next = this.firstChild.nextSibling; while (next != sibling) { prev = next; next = next.nextSibling; } prev.nextSibling = child; child.nextSibling = next; } return child; }; ParentNode.prototype.insertBetween = function(child, prev, next) { if (!next) { return this.appendChild(child); } child.detach(); child.parentNode = this; child.nextSibling = next; if (!prev) { firstChild = child; } else { prev.nextSibling = child; } return child; }; ParentNode.prototype.appendChild = function(child) { child.detach(); child.parentNode = this; if (!this.firstChild) { this.firstChild = child; } else { this.lastChild.nextSibling = child; } this.lastChild = child; return child; }; ParentNode.prototype.appendChildren = function(parent) { var child = parent.firstChild; if (!child) { return; } var another = parent; if (!this.firstChild) { this.firstChild = child; } else { this.lastChild.nextSibling = child; } this.lastChild = another.lastChild; do { child.parentNode = this; } while ((child = child.nextSibling)); another.firstChild = null; another.lastChild = null; }; ParentNode.prototype.removeChild = function(node) { if (this.firstChild == node) { this.firstChild = node.nextSibling; if (this.lastChild == node) { this.lastChild = null; } } else { var prev = this.firstChild; var next = this.firstChild.nextSibling; while (next != node) { prev = next; next = next.nextSibling; } prev.nextSibling = node.nextSibling; if (this.lastChild == node) { this.lastChild = prev; } } node.parentNode = null; return node; }; Object.defineProperty(ParentNode.prototype, 'endLocator', { get: function() { return this._endLocator; }, set: function(endLocator) { this._endLocator = { lineNumber: endLocator.lineNumber, columnNumber: endLocator.columnNumber }; } }); function Document (locator) { ParentNode.call(this, locator); this.nodeType = NodeType.DOCUMENT; } Document.prototype = Object.create(ParentNode.prototype); Document.prototype.visit = function(treeParser) { treeParser.startDocument(this); }; Document.prototype.revisit = function(treeParser) { treeParser.endDocument(this.endLocator); }; function DocumentFragment() { ParentNode.call(this, new Locator()); this.nodeType = NodeType.DOCUMENT_FRAGMENT; } DocumentFragment.prototype = Object.create(ParentNode.prototype); DocumentFragment.prototype.visit = function(treeParser) { }; function Element(locator, uri, localName, qName, atts, prefixMappings) { ParentNode.call(this, locator); this.uri = uri; this.localName = localName; this.qName = qName; this.attributes = atts; this.prefixMappings = prefixMappings; this.nodeType = NodeType.ELEMENT; } Element.prototype = Object.create(ParentNode.prototype); Element.prototype.visit = function(treeParser) { if (this.prefixMappings) { for (var key in prefixMappings) { var mapping = prefixMappings[key]; treeParser.startPrefixMapping(mapping.getPrefix(), mapping.getUri(), this); } } treeParser.startElement(this.uri, this.localName, this.qName, this.attributes, this); }; Element.prototype.revisit = function(treeParser) { treeParser.endElement(this.uri, this.localName, this.qName, this.endLocator); if (this.prefixMappings) { for (var key in prefixMappings) { var mapping = prefixMappings[key]; treeParser.endPrefixMapping(mapping.getPrefix(), this.endLocator); } } }; function Characters(locator, data){ Node.call(this, locator); this.data = data; this.nodeType = NodeType.CHARACTERS; } Characters.prototype = Object.create(Node.prototype); Characters.prototype.visit = function (treeParser) { treeParser.characters(this.data, 0, this.data.length, this); }; function IgnorableWhitespace(locator, data) { Node.call(this, locator); this.data = data; this.nodeType = NodeType.IGNORABLE_WHITESPACE; } IgnorableWhitespace.prototype = Object.create(Node.prototype); IgnorableWhitespace.prototype.visit = function(treeParser) { treeParser.ignorableWhitespace(this.data, 0, this.data.length, this); }; function Comment(locator, data) { Node.call(this, locator); this.data = data; this.nodeType = NodeType.COMMENT; } Comment.prototype = Object.create(Node.prototype); Comment.prototype.visit = function(treeParser) { treeParser.comment(this.data, 0, this.data.length, this); }; function CDATA(locator) { ParentNode.call(this, locator); this.nodeType = NodeType.CDATA; } CDATA.prototype = Object.create(ParentNode.prototype); CDATA.prototype.visit = function(treeParser) { treeParser.startCDATA(this); }; CDATA.prototype.revisit = function(treeParser) { treeParser.endCDATA(this.endLocator); }; function Entity(name) { ParentNode.call(this); this.name = name; this.nodeType = NodeType.ENTITY; } Entity.prototype = Object.create(ParentNode.prototype); Entity.prototype.visit = function(treeParser) { treeParser.startEntity(this.name, this); }; Entity.prototype.revisit = function(treeParser) { treeParser.endEntity(this.name); }; function SkippedEntity(name) { Node.call(this); this.name = name; this.nodeType = NodeType.SKIPPED_ENTITY; } SkippedEntity.prototype = Object.create(Node.prototype); SkippedEntity.prototype.visit = function(treeParser) { treeParser.skippedEntity(this.name, this); }; function ProcessingInstruction(target, data) { Node.call(this); this.target = target; this.data = data; } ProcessingInstruction.prototype = Object.create(Node.prototype); ProcessingInstruction.prototype.visit = function(treeParser) { treeParser.processingInstruction(this.target, this.data, this); }; ProcessingInstruction.prototype.getNodeType = function() { return NodeType.PROCESSING_INSTRUCTION; }; function DTD(name, publicIdentifier, systemIdentifier) { ParentNode.call(this); this.name = name; this.publicIdentifier = publicIdentifier; this.systemIdentifier = systemIdentifier; this.nodeType = NodeType.DTD; } DTD.prototype = Object.create(ParentNode.prototype); DTD.prototype.visit = function(treeParser) { treeParser.startDTD(this.name, this.publicIdentifier, this.systemIdentifier, this); }; DTD.prototype.revisit = function(treeParser) { treeParser.endDTD(); }; exports.SAXTreeBuilder = SAXTreeBuilder; }, {"../TreeBuilder":6,"util":20}], 11:[function(_dereq_,module,exports){ function TreeParser(contentHandler, lexicalHandler){ this.contentHandler; this.lexicalHandler; this.locatorDelegate; if (!contentHandler) { throw new IllegalArgumentException("contentHandler was null."); } this.contentHandler = contentHandler; if (!lexicalHandler) { this.lexicalHandler = new NullLexicalHandler(); } else { this.lexicalHandler = lexicalHandler; } } TreeParser.prototype.parse = function(node) { this.contentHandler.documentLocator = this; var current = node; var next; for (;;) { current.visit(this); if (next = current.firstChild) { current = next; continue; } for (;;) { current.revisit(this); if (current == node) { return; } if (next = current.nextSibling) { current = next; break; } current = current.parentNode; } } }; TreeParser.prototype.characters = function(ch, start, length, locator) { this.locatorDelegate = locator; this.contentHandler.characters(ch, start, length); }; TreeParser.prototype.endDocument = function(locator) { this.locatorDelegate = locator; this.contentHandler.endDocument(); }; TreeParser.prototype.endElement = function(uri, localName, qName, locator) { this.locatorDelegate = locator; this.contentHandler.endElement(uri, localName, qName); }; TreeParser.prototype.endPrefixMapping = function(prefix, locator) { this.locatorDelegate = locator; this.contentHandler.endPrefixMapping(prefix); }; TreeParser.prototype.ignorableWhitespace = function(ch, start, length, locator) { this.locatorDelegate = locator; this.contentHandler.ignorableWhitespace(ch, start, length); }; TreeParser.prototype.processingInstruction = function(target, data, locator) { this.locatorDelegate = locator; this.contentHandler.processingInstruction(target, data); }; TreeParser.prototype.skippedEntity = function(name, locator) { this.locatorDelegate = locator; this.contentHandler.skippedEntity(name); }; TreeParser.prototype.startDocument = function(locator) { this.locatorDelegate = locator; this.contentHandler.startDocument(); }; TreeParser.prototype.startElement = function(uri, localName, qName, atts, locator) { this.locatorDelegate = locator; this.contentHandler.startElement(uri, localName, qName, atts); }; TreeParser.prototype.startPrefixMapping = function(prefix, uri, locator) { this.locatorDelegate = locator; this.contentHandler.startPrefixMapping(prefix, uri); }; TreeParser.prototype.comment = function(ch, start, length, locator) { this.locatorDelegate = locator; this.lexicalHandler.comment(ch, start, length); }; TreeParser.prototype.endCDATA = function(locator) { this.locatorDelegate = locator; this.lexicalHandler.endCDATA(); }; TreeParser.prototype.endDTD = function(locator) { this.locatorDelegate = locator; this.lexicalHandler.endDTD(); }; TreeParser.prototype.endEntity = function(name, locator) { this.locatorDelegate = locator; this.lexicalHandler.endEntity(name); }; TreeParser.prototype.startCDATA = function(locator) { this.locatorDelegate = locator; this.lexicalHandler.startCDATA(); }; TreeParser.prototype.startDTD = function(name, publicId, systemId, locator) { this.locatorDelegate = locator; this.lexicalHandler.startDTD(name, publicId, systemId); }; TreeParser.prototype.startEntity = function(name, locator) { this.locatorDelegate = locator; this.lexicalHandler.startEntity(name); }; Object.defineProperty(TreeParser.prototype, 'columnNumber', { get: function() { if (!this.locatorDelegate) return -1; else return this.locatorDelegate.columnNumber; } }); Object.defineProperty(TreeParser.prototype, 'lineNumber', { get: function() { if (!this.locatorDelegate) return -1; else return this.locatorDelegate.lineNumber; } }); function NullLexicalHandler() { } NullLexicalHandler.prototype.comment = function() {}; NullLexicalHandler.prototype.endCDATA = function() {}; NullLexicalHandler.prototype.endDTD = function() {}; NullLexicalHandler.prototype.endEntity = function() {}; NullLexicalHandler.prototype.startCDATA = function() {}; NullLexicalHandler.prototype.startDTD = function() {}; NullLexicalHandler.prototype.startEntity = function() {}; exports.TreeParser = TreeParser; }, {}], 12:[function(_dereq_,module,exports){ module.exports = { "Aacute;": "\u00C1", "Aacute": "\u00C1", "aacute;": "\u00E1", "aacute": "\u00E1", "Abreve;": "\u0102", "abreve;": "\u0103", "ac;": "\u223E", "acd;": "\u223F", "acE;": "\u223E\u0333", "Acirc;": "\u00C2", "Acirc": "\u00C2", "acirc;": "\u00E2", "acirc": "\u00E2", "acute;": "\u00B4", "acute": "\u00B4", "Acy;": "\u0410", "acy;": "\u0430", "AElig;": "\u00C6", "AElig": "\u00C6", "aelig;": "\u00E6", "aelig": "\u00E6", "af;": "\u2061", "Afr;": "\uD835\uDD04", "afr;": "\uD835\uDD1E", "Agrave;": "\u00C0", "Agrave": "\u00C0", "agrave;": "\u00E0", "agrave": "\u00E0", "alefsym;": "\u2135", "aleph;": "\u2135", "Alpha;": "\u0391", "alpha;": "\u03B1", "Amacr;": "\u0100", "amacr;": "\u0101", "amalg;": "\u2A3F", "amp;": "\u0026", "amp": "\u0026", "AMP;": "\u0026", "AMP": "\u0026", "andand;": "\u2A55", "And;": "\u2A53", "and;": "\u2227", "andd;": "\u2A5C", "andslope;": "\u2A58", "andv;": "\u2A5A", "ang;": "\u2220", "ange;": "\u29A4", "angle;": "\u2220", "angmsdaa;": "\u29A8", "angmsdab;": "\u29A9", "angmsdac;": "\u29AA", "angmsdad;": "\u29AB", "angmsdae;": "\u29AC", "angmsdaf;": "\u29AD", "angmsdag;": "\u29AE", "angmsdah;": "\u29AF", "angmsd;": "\u2221", "angrt;": "\u221F", "angrtvb;": "\u22BE", "angrtvbd;": "\u299D", "angsph;": "\u2222", "angst;": "\u00C5", "angzarr;": "\u237C", "Aogon;": "\u0104", "aogon;": "\u0105", "Aopf;": "\uD835\uDD38", "aopf;": "\uD835\uDD52", "apacir;": "\u2A6F", "ap;": "\u2248", "apE;": "\u2A70", "ape;": "\u224A", "apid;": "\u224B", "apos;": "\u0027", "ApplyFunction;": "\u2061", "approx;": "\u2248", "approxeq;": "\u224A", "Aring;": "\u00C5", "Aring": "\u00C5", "aring;": "\u00E5", "aring": "\u00E5", "Ascr;": "\uD835\uDC9C", "ascr;": "\uD835\uDCB6", "Assign;": "\u2254", "ast;": "\u002A", "asymp;": "\u2248", "asympeq;": "\u224D", "Atilde;": "\u00C3", "Atilde": "\u00C3", "atilde;": "\u00E3", "atilde": "\u00E3", "Auml;": "\u00C4", "Auml": "\u00C4", "auml;": "\u00E4", "auml": "\u00E4", "awconint;": "\u2233", "awint;": "\u2A11", "backcong;": "\u224C", "backepsilon;": "\u03F6", "backprime;": "\u2035", "backsim;": "\u223D", "backsimeq;": "\u22CD", "Backslash;": "\u2216", "Barv;": "\u2AE7", "barvee;": "\u22BD", "barwed;": "\u2305", "Barwed;": "\u2306", "barwedge;": "\u2305", "bbrk;": "\u23B5", "bbrktbrk;": "\u23B6", "bcong;": "\u224C", "Bcy;": "\u0411", "bcy;": "\u0431", "bdquo;": "\u201E", "becaus;": "\u2235", "because;": "\u2235", "Because;": "\u2235", "bemptyv;": "\u29B0", "bepsi;": "\u03F6", "bernou;": "\u212C", "Bernoullis;": "\u212C", "Beta;": "\u0392", "beta;": "\u03B2", "beth;": "\u2136", "between;": "\u226C", "Bfr;": "\uD835\uDD05", "bfr;": "\uD835\uDD1F", "bigcap;": "\u22C2", "bigcirc;": "\u25EF", "bigcup;": "\u22C3", "bigodot;": "\u2A00", "bigoplus;": "\u2A01", "bigotimes;": "\u2A02", "bigsqcup;": "\u2A06", "bigstar;": "\u2605", "bigtriangledown;": "\u25BD", "bigtriangleup;": "\u25B3", "biguplus;": "\u2A04", "bigvee;": "\u22C1", "bigwedge;": "\u22C0", "bkarow;": "\u290D", "blacklozenge;": "\u29EB", "blacksquare;": "\u25AA", "blacktriangle;": "\u25B4", "blacktriangledown;": "\u25BE", "blacktriangleleft;": "\u25C2", "blacktriangleright;": "\u25B8", "blank;": "\u2423", "blk12;": "\u2592", "blk14;": "\u2591", "blk34;": "\u2593", "block;": "\u2588", "bne;": "\u003D\u20E5", "bnequiv;": "\u2261\u20E5", "bNot;": "\u2AED", "bnot;": "\u2310", "Bopf;": "\uD835\uDD39", "bopf;": "\uD835\uDD53", "bot;": "\u22A5", "bottom;": "\u22A5", "bowtie;": "\u22C8", "boxbox;": "\u29C9", "boxdl;": "\u2510", "boxdL;": "\u2555", "boxDl;": "\u2556", "boxDL;": "\u2557", "boxdr;": "\u250C", "boxdR;": "\u2552", "boxDr;": "\u2553", "boxDR;": "\u2554", "boxh;": "\u2500", "boxH;": "\u2550", "boxhd;": "\u252C", "boxHd;": "\u2564", "boxhD;": "\u2565", "boxHD;": "\u2566", "boxhu;": "\u2534", "boxHu;": "\u2567", "boxhU;": "\u2568", "boxHU;": "\u2569", "boxminus;": "\u229F", "boxplus;": "\u229E", "boxtimes;": "\u22A0", "boxul;": "\u2518", "boxuL;": "\u255B", "boxUl;": "\u255C", "boxUL;": "\u255D", "boxur;": "\u2514", "boxuR;": "\u2558", "boxUr;": "\u2559", "boxUR;": "\u255A", "boxv;": "\u2502", "boxV;": "\u2551", "boxvh;": "\u253C", "boxvH;": "\u256A", "boxVh;": "\u256B", "boxVH;": "\u256C", "boxvl;": "\u2524", "boxvL;": "\u2561", "boxVl;": "\u2562", "boxVL;": "\u2563", "boxvr;": "\u251C", "boxvR;": "\u255E", "boxVr;": "\u255F", "boxVR;": "\u2560", "bprime;": "\u2035", "breve;": "\u02D8", "Breve;": "\u02D8", "brvbar;": "\u00A6", "brvbar": "\u00A6", "bscr;": "\uD835\uDCB7", "Bscr;": "\u212C", "bsemi;": "\u204F", "bsim;": "\u223D", "bsime;": "\u22CD", "bsolb;": "\u29C5", "bsol;": "\u005C", "bsolhsub;": "\u27C8", "bull;": "\u2022", "bullet;": "\u2022", "bump;": "\u224E", "bumpE;": "\u2AAE", "bumpe;": "\u224F", "Bumpeq;": "\u224E", "bumpeq;": "\u224F", "Cacute;": "\u0106", "cacute;": "\u0107", "capand;": "\u2A44", "capbrcup;": "\u2A49", "capcap;": "\u2A4B", "cap;": "\u2229", "Cap;": "\u22D2", "capcup;": "\u2A47", "capdot;": "\u2A40", "CapitalDifferentialD;": "\u2145", "caps;": "\u2229\uFE00", "caret;": "\u2041", "caron;": "\u02C7", "Cayleys;": "\u212D", "ccaps;": "\u2A4D", "Ccaron;": "\u010C", "ccaron;": "\u010D", "Ccedil;": "\u00C7", "Ccedil": "\u00C7", "ccedil;": "\u00E7", "ccedil": "\u00E7", "Ccirc;": "\u0108", "ccirc;": "\u0109", "Cconint;": "\u2230", "ccups;": "\u2A4C", "ccupssm;": "\u2A50", "Cdot;": "\u010A", "cdot;": "\u010B", "cedil;": "\u00B8", "cedil": "\u00B8", "Cedilla;": "\u00B8", "cemptyv;": "\u29B2", "cent;": "\u00A2", "cent": "\u00A2", "centerdot;": "\u00B7", "CenterDot;": "\u00B7", "cfr;": "\uD835\uDD20", "Cfr;": "\u212D", "CHcy;": "\u0427", "chcy;": "\u0447", "check;": "\u2713", "checkmark;": "\u2713", "Chi;": "\u03A7", "chi;": "\u03C7", "circ;": "\u02C6", "circeq;": "\u2257", "circlearrowleft;": "\u21BA", "circlearrowright;": "\u21BB", "circledast;": "\u229B", "circledcirc;": "\u229A", "circleddash;": "\u229D", "CircleDot;": "\u2299", "circledR;": "\u00AE", "circledS;": "\u24C8", "CircleMinus;": "\u2296", "CirclePlus;": "\u2295", "CircleTimes;": "\u2297", "cir;": "\u25CB", "cirE;": "\u29C3", "cire;": "\u2257", "cirfnint;": "\u2A10", "cirmid;": "\u2AEF", "cirscir;": "\u29C2", "ClockwiseContourIntegral;": "\u2232", "CloseCurlyDoubleQuote;": "\u201D", "CloseCurlyQuote;": "\u2019", "clubs;": "\u2663", "clubsuit;": "\u2663", "colon;": "\u003A", "Colon;": "\u2237", "Colone;": "\u2A74", "colone;": "\u2254", "coloneq;": "\u2254", "comma;": "\u002C", "commat;": "\u0040", "comp;": "\u2201", "compfn;": "\u2218", "complement;": "\u2201", "complexes;": "\u2102", "cong;": "\u2245", "congdot;": "\u2A6D", "Congruent;": "\u2261", "conint;": "\u222E", "Conint;": "\u222F", "ContourIntegral;": "\u222E", "copf;": "\uD835\uDD54", "Copf;": "\u2102", "coprod;": "\u2210", "Coproduct;": "\u2210", "copy;": "\u00A9", "copy": "\u00A9", "COPY;": "\u00A9", "COPY": "\u00A9", "copysr;": "\u2117", "CounterClockwiseContourIntegral;": "\u2233", "crarr;": "\u21B5", "cross;": "\u2717", "Cross;": "\u2A2F", "Cscr;": "\uD835\uDC9E", "cscr;": "\uD835\uDCB8", "csub;": "\u2ACF", "csube;": "\u2AD1", "csup;": "\u2AD0", "csupe;": "\u2AD2", "ctdot;": "\u22EF", "cudarrl;": "\u2938", "cudarrr;": "\u2935", "cuepr;": "\u22DE", "cuesc;": "\u22DF", "cularr;": "\u21B6", "cularrp;": "\u293D", "cupbrcap;": "\u2A48", "cupcap;": "\u2A46", "CupCap;": "\u224D", "cup;": "\u222A", "Cup;": "\u22D3", "cupcup;": "\u2A4A", "cupdot;": "\u228D", "cupor;": "\u2A45", "cups;": "\u222A\uFE00", "curarr;": "\u21B7", "curarrm;": "\u293C", "curlyeqprec;": "\u22DE", "curlyeqsucc;": "\u22DF", "curlyvee;": "\u22CE", "curlywedge;": "\u22CF", "curren;": "\u00A4", "curren": "\u00A4", "curvearrowleft;": "\u21B6", "curvearrowright;": "\u21B7", "cuvee;": "\u22CE", "cuwed;": "\u22CF", "cwconint;": "\u2232", "cwint;": "\u2231", "cylcty;": "\u232D", "dagger;": "\u2020", "Dagger;": "\u2021", "daleth;": "\u2138", "darr;": "\u2193", "Darr;": "\u21A1", "dArr;": "\u21D3", "dash;": "\u2010", "Dashv;": "\u2AE4", "dashv;": "\u22A3", "dbkarow;": "\u290F", "dblac;": "\u02DD", "Dcaron;": "\u010E", "dcaron;": "\u010F", "Dcy;": "\u0414", "dcy;": "\u0434", "ddagger;": "\u2021", "ddarr;": "\u21CA", "DD;": "\u2145", "dd;": "\u2146", "DDotrahd;": "\u2911", "ddotseq;": "\u2A77", "deg;": "\u00B0", "deg": "\u00B0", "Del;": "\u2207", "Delta;": "\u0394", "delta;": "\u03B4", "demptyv;": "\u29B1", "dfisht;": "\u297F", "Dfr;": "\uD835\uDD07", "dfr;": "\uD835\uDD21", "dHar;": "\u2965", "dharl;": "\u21C3", "dharr;": "\u21C2", "DiacriticalAcute;": "\u00B4", "DiacriticalDot;": "\u02D9", "DiacriticalDoubleAcute;": "\u02DD", "DiacriticalGrave;": "\u0060", "DiacriticalTilde;": "\u02DC", "diam;": "\u22C4", "diamond;": "\u22C4", "Diamond;": "\u22C4", "diamondsuit;": "\u2666", "diams;": "\u2666", "die;": "\u00A8", "DifferentialD;": "\u2146", "digamma;": "\u03DD", "disin;": "\u22F2", "div;": "\u00F7", "divide;": "\u00F7", "divide": "\u00F7", "divideontimes;": "\u22C7", "divonx;": "\u22C7", "DJcy;": "\u0402", "djcy;": "\u0452", "dlcorn;": "\u231E", "dlcrop;": "\u230D", "dollar;": "\u0024", "Dopf;": "\uD835\uDD3B", "dopf;": "\uD835\uDD55", "Dot;": "\u00A8", "dot;": "\u02D9", "DotDot;": "\u20DC", "doteq;": "\u2250", "doteqdot;": "\u2251", "DotEqual;": "\u2250", "dotminus;": "\u2238", "dotplus;": "\u2214", "dotsquare;": "\u22A1", "doublebarwedge;": "\u2306", "DoubleContourIntegral;": "\u222F", "DoubleDot;": "\u00A8", "DoubleDownArrow;": "\u21D3", "DoubleLeftArrow;": "\u21D0", "DoubleLeftRightArrow;": "\u21D4", "DoubleLeftTee;": "\u2AE4", "DoubleLongLeftArrow;": "\u27F8", "DoubleLongLeftRightArrow;": "\u27FA", "DoubleLongRightArrow;": "\u27F9", "DoubleRightArrow;": "\u21D2", "DoubleRightTee;": "\u22A8", "DoubleUpArrow;": "\u21D1", "DoubleUpDownArrow;": "\u21D5", "DoubleVerticalBar;": "\u2225", "DownArrowBar;": "\u2913", "downarrow;": "\u2193", "DownArrow;": "\u2193", "Downarrow;": "\u21D3", "DownArrowUpArrow;": "\u21F5", "DownBreve;": "\u0311", "downdownarrows;": "\u21CA", "downharpoonleft;": "\u21C3", "downharpoonright;": "\u21C2", "DownLeftRightVector;": "\u2950", "DownLeftTeeVector;": "\u295E", "DownLeftVectorBar;": "\u2956", "DownLeftVector;": "\u21BD", "DownRightTeeVector;": "\u295F", "DownRightVectorBar;": "\u2957", "DownRightVector;": "\u21C1", "DownTeeArrow;": "\u21A7", "DownTee;": "\u22A4", "drbkarow;": "\u2910", "drcorn;": "\u231F", "drcrop;": "\u230C", "Dscr;": "\uD835\uDC9F", "dscr;": "\uD835\uDCB9", "DScy;": "\u0405", "dscy;": "\u0455", "dsol;": "\u29F6", "Dstrok;": "\u0110", "dstrok;": "\u0111", "dtdot;": "\u22F1", "dtri;": "\u25BF", "dtrif;": "\u25BE", "duarr;": "\u21F5", "duhar;": "\u296F", "dwangle;": "\u29A6", "DZcy;": "\u040F", "dzcy;": "\u045F", "dzigrarr;": "\u27FF", "Eacute;": "\u00C9", "Eacute": "\u00C9", "eacute;": "\u00E9", "eacute": "\u00E9", "easter;": "\u2A6E", "Ecaron;": "\u011A", "ecaron;": "\u011B", "Ecirc;": "\u00CA", "Ecirc": "\u00CA", "ecirc;": "\u00EA", "ecirc": "\u00EA", "ecir;": "\u2256", "ecolon;": "\u2255", "Ecy;": "\u042D", "ecy;": "\u044D", "eDDot;": "\u2A77", "Edot;": "\u0116", "edot;": "\u0117", "eDot;": "\u2251", "ee;": "\u2147", "efDot;": "\u2252", "Efr;": "\uD835\uDD08", "efr;": "\uD835\uDD22", "eg;": "\u2A9A", "Egrave;": "\u00C8", "Egrave": "\u00C8", "egrave;": "\u00E8", "egrave": "\u00E8", "egs;": "\u2A96", "egsdot;": "\u2A98", "el;": "\u2A99", "Element;": "\u2208", "elinters;": "\u23E7", "ell;": "\u2113", "els;": "\u2A95", "elsdot;": "\u2A97", "Emacr;": "\u0112", "emacr;": "\u0113", "empty;": "\u2205", "emptyset;": "\u2205", "EmptySmallSquare;": "\u25FB", "emptyv;": "\u2205", "EmptyVerySmallSquare;": "\u25AB", "emsp13;": "\u2004", "emsp14;": "\u2005", "emsp;": "\u2003", "ENG;": "\u014A", "eng;": "\u014B", "ensp;": "\u2002", "Eogon;": "\u0118", "eogon;": "\u0119", "Eopf;": "\uD835\uDD3C", "eopf;": "\uD835\uDD56", "epar;": "\u22D5", "eparsl;": "\u29E3", "eplus;": "\u2A71", "epsi;": "\u03B5", "Epsilon;": "\u0395", "epsilon;": "\u03B5", "epsiv;": "\u03F5", "eqcirc;": "\u2256", "eqcolon;": "\u2255", "eqsim;": "\u2242", "eqslantgtr;": "\u2A96", "eqslantless;": "\u2A95", "Equal;": "\u2A75", "equals;": "\u003D", "EqualTilde;": "\u2242", "equest;": "\u225F", "Equilibrium;": "\u21CC", "equiv;": "\u2261", "equivDD;": "\u2A78", "eqvparsl;": "\u29E5", "erarr;": "\u2971", "erDot;": "\u2253", "escr;": "\u212F", "Escr;": "\u2130", "esdot;": "\u2250", "Esim;": "\u2A73", "esim;": "\u2242", "Eta;": "\u0397", "eta;": "\u03B7", "ETH;": "\u00D0", "ETH": "\u00D0", "eth;": "\u00F0", "eth": "\u00F0", "Euml;": "\u00CB", "Euml": "\u00CB", "euml;": "\u00EB", "euml": "\u00EB", "euro;": "\u20AC", "excl;": "\u0021", "exist;": "\u2203", "Exists;": "\u2203", "expectation;": "\u2130", "exponentiale;": "\u2147", "ExponentialE;": "\u2147", "fallingdotseq;": "\u2252", "Fcy;": "\u0424", "fcy;": "\u0444", "female;": "\u2640", "ffilig;": "\uFB03", "fflig;": "\uFB00", "ffllig;": "\uFB04", "Ffr;": "\uD835\uDD09", "ffr;": "\uD835\uDD23", "filig;": "\uFB01", "FilledSmallSquare;": "\u25FC", "FilledVerySmallSquare;": "\u25AA", "fjlig;": "\u0066\u006A", "flat;": "\u266D", "fllig;": "\uFB02", "fltns;": "\u25B1", "fnof;": "\u0192", "Fopf;": "\uD835\uDD3D", "fopf;": "\uD835\uDD57", "forall;": "\u2200", "ForAll;": "\u2200", "fork;": "\u22D4", "forkv;": "\u2AD9", "Fouriertrf;": "\u2131", "fpartint;": "\u2A0D", "frac12;": "\u00BD", "frac12": "\u00BD", "frac13;": "\u2153", "frac14;": "\u00BC", "frac14": "\u00BC", "frac15;": "\u2155", "frac16;": "\u2159", "frac18;": "\u215B", "frac23;": "\u2154", "frac25;": "\u2156", "frac34;": "\u00BE", "frac34": "\u00BE", "frac35;": "\u2157", "frac38;": "\u215C", "frac45;": "\u2158", "frac56;": "\u215A", "frac58;": "\u215D", "frac78;": "\u215E", "frasl;": "\u2044", "frown;": "\u2322", "fscr;": "\uD835\uDCBB", "Fscr;": "\u2131", "gacute;": "\u01F5", "Gamma;": "\u0393", "gamma;": "\u03B3", "Gammad;": "\u03DC", "gammad;": "\u03DD", "gap;": "\u2A86", "Gbreve;": "\u011E", "gbreve;": "\u011F", "Gcedil;": "\u0122", "Gcirc;": "\u011C", "gcirc;": "\u011D", "Gcy;": "\u0413", "gcy;": "\u0433", "Gdot;": "\u0120", "gdot;": "\u0121", "ge;": "\u2265", "gE;": "\u2267", "gEl;": "\u2A8C", "gel;": "\u22DB", "geq;": "\u2265", "geqq;": "\u2267", "geqslant;": "\u2A7E", "gescc;": "\u2AA9", "ges;": "\u2A7E", "gesdot;": "\u2A80", "gesdoto;": "\u2A82", "gesdotol;": "\u2A84", "gesl;": "\u22DB\uFE00", "gesles;": "\u2A94", "Gfr;": "\uD835\uDD0A", "gfr;": "\uD835\uDD24", "gg;": "\u226B", "Gg;": "\u22D9", "ggg;": "\u22D9", "gimel;": "\u2137", "GJcy;": "\u0403", "gjcy;": "\u0453", "gla;": "\u2AA5", "gl;": "\u2277", "glE;": "\u2A92", "glj;": "\u2AA4", "gnap;": "\u2A8A", "gnapprox;": "\u2A8A", "gne;": "\u2A88", "gnE;": "\u2269", "gneq;": "\u2A88", "gneqq;": "\u2269", "gnsim;": "\u22E7", "Gopf;": "\uD835\uDD3E", "gopf;": "\uD835\uDD58", "grave;": "\u0060", "GreaterEqual;": "\u2265", "GreaterEqualLess;": "\u22DB", "GreaterFullEqual;": "\u2267", "GreaterGreater;": "\u2AA2", "GreaterLess;": "\u2277", "GreaterSlantEqual;": "\u2A7E", "GreaterTilde;": "\u2273", "Gscr;": "\uD835\uDCA2", "gscr;": "\u210A", "gsim;": "\u2273", "gsime;": "\u2A8E", "gsiml;": "\u2A90", "gtcc;": "\u2AA7", "gtcir;": "\u2A7A", "gt;": "\u003E", "gt": "\u003E", "GT;": "\u003E", "GT": "\u003E", "Gt;": "\u226B", "gtdot;": "\u22D7", "gtlPar;": "\u2995", "gtquest;": "\u2A7C", "gtrapprox;": "\u2A86", "gtrarr;": "\u2978", "gtrdot;": "\u22D7", "gtreqless;": "\u22DB", "gtreqqless;": "\u2A8C", "gtrless;": "\u2277", "gtrsim;": "\u2273", "gvertneqq;": "\u2269\uFE00", "gvnE;": "\u2269\uFE00", "Hacek;": "\u02C7", "hairsp;": "\u200A", "half;": "\u00BD", "hamilt;": "\u210B", "HARDcy;": "\u042A", "hardcy;": "\u044A", "harrcir;": "\u2948", "harr;": "\u2194", "hArr;": "\u21D4", "harrw;": "\u21AD", "Hat;": "\u005E", "hbar;": "\u210F", "Hcirc;": "\u0124", "hcirc;": "\u0125", "hearts;": "\u2665", "heartsuit;": "\u2665", "hellip;": "\u2026", "hercon;": "\u22B9", "hfr;": "\uD835\uDD25", "Hfr;": "\u210C", "HilbertSpace;": "\u210B", "hksearow;": "\u2925", "hkswarow;": "\u2926", "hoarr;": "\u21FF", "homtht;": "\u223B", "hookleftarrow;": "\u21A9", "hookrightarrow;": "\u21AA", "hopf;": "\uD835\uDD59", "Hopf;": "\u210D", "horbar;": "\u2015", "HorizontalLine;": "\u2500", "hscr;": "\uD835\uDCBD", "Hscr;": "\u210B", "hslash;": "\u210F", "Hstrok;": "\u0126", "hstrok;": "\u0127", "HumpDownHump;": "\u224E", "HumpEqual;": "\u224F", "hybull;": "\u2043", "hyphen;": "\u2010", "Iacute;": "\u00CD", "Iacute": "\u00CD", "iacute;": "\u00ED", "iacute": "\u00ED", "ic;": "\u2063", "Icirc;": "\u00CE", "Icirc": "\u00CE", "icirc;": "\u00EE", "icirc": "\u00EE", "Icy;": "\u0418", "icy;": "\u0438", "Idot;": "\u0130", "IEcy;": "\u0415", "iecy;": "\u0435", "iexcl;": "\u00A1", "iexcl": "\u00A1", "iff;": "\u21D4", "ifr;": "\uD835\uDD26", "Ifr;": "\u2111", "Igrave;": "\u00CC", "Igrave": "\u00CC", "igrave;": "\u00EC", "igrave": "\u00EC", "ii;": "\u2148", "iiiint;": "\u2A0C", "iiint;": "\u222D", "iinfin;": "\u29DC", "iiota;": "\u2129", "IJlig;": "\u0132", "ijlig;": "\u0133", "Imacr;": "\u012A", "imacr;": "\u012B", "image;": "\u2111", "ImaginaryI;": "\u2148", "imagline;": "\u2110", "imagpart;": "\u2111", "imath;": "\u0131", "Im;": "\u2111", "imof;": "\u22B7", "imped;": "\u01B5", "Implies;": "\u21D2", "incare;": "\u2105", "in;": "\u2208", "infin;": "\u221E", "infintie;": "\u29DD", "inodot;": "\u0131", "intcal;": "\u22BA", "int;": "\u222B", "Int;": "\u222C", "integers;": "\u2124", "Integral;": "\u222B", "intercal;": "\u22BA", "Intersection;": "\u22C2", "intlarhk;": "\u2A17", "intprod;": "\u2A3C", "InvisibleComma;": "\u2063", "InvisibleTimes;": "\u2062", "IOcy;": "\u0401", "iocy;": "\u0451", "Iogon;": "\u012E", "iogon;": "\u012F", "Iopf;": "\uD835\uDD40", "iopf;": "\uD835\uDD5A", "Iota;": "\u0399", "iota;": "\u03B9", "iprod;": "\u2A3C", "iquest;": "\u00BF", "iquest": "\u00BF", "iscr;": "\uD835\uDCBE", "Iscr;": "\u2110", "isin;": "\u2208", "isindot;": "\u22F5", "isinE;": "\u22F9", "isins;": "\u22F4", "isinsv;": "\u22F3", "isinv;": "\u2208", "it;": "\u2062", "Itilde;": "\u0128", "itilde;": "\u0129", "Iukcy;": "\u0406", "iukcy;": "\u0456", "Iuml;": "\u00CF", "Iuml": "\u00CF", "iuml;": "\u00EF", "iuml": "\u00EF", "Jcirc;": "\u0134", "jcirc;": "\u0135", "Jcy;": "\u0419", "jcy;": "\u0439", "Jfr;": "\uD835\uDD0D", "jfr;": "\uD835\uDD27", "jmath;": "\u0237", "Jopf;": "\uD835\uDD41", "jopf;": "\uD835\uDD5B", "Jscr;": "\uD835\uDCA5", "jscr;": "\uD835\uDCBF", "Jsercy;": "\u0408", "jsercy;": "\u0458", "Jukcy;": "\u0404", "jukcy;": "\u0454", "Kappa;": "\u039A", "kappa;": "\u03BA", "kappav;": "\u03F0", "Kcedil;": "\u0136", "kcedil;": "\u0137", "Kcy;": "\u041A", "kcy;": "\u043A", "Kfr;": "\uD835\uDD0E", "kfr;": "\uD835\uDD28", "kgreen;": "\u0138", "KHcy;": "\u0425", "khcy;": "\u0445", "KJcy;": "\u040C", "kjcy;": "\u045C", "Kopf;": "\uD835\uDD42", "kopf;": "\uD835\uDD5C", "Kscr;": "\uD835\uDCA6", "kscr;": "\uD835\uDCC0", "lAarr;": "\u21DA", "Lacute;": "\u0139", "lacute;": "\u013A", "laemptyv;": "\u29B4", "lagran;": "\u2112", "Lambda;": "\u039B", "lambda;": "\u03BB", "lang;": "\u27E8", "Lang;": "\u27EA", "langd;": "\u2991", "langle;": "\u27E8", "lap;": "\u2A85", "Laplacetrf;": "\u2112", "laquo;": "\u00AB", "laquo": "\u00AB", "larrb;": "\u21E4", "larrbfs;": "\u291F", "larr;": "\u2190", "Larr;": "\u219E", "lArr;": "\u21D0", "larrfs;": "\u291D", "larrhk;": "\u21A9", "larrlp;": "\u21AB", "larrpl;": "\u2939", "larrsim;": "\u2973", "larrtl;": "\u21A2", "latail;": "\u2919", "lAtail;": "\u291B", "lat;": "\u2AAB", "late;": "\u2AAD", "lates;": "\u2AAD\uFE00", "lbarr;": "\u290C", "lBarr;": "\u290E", "lbbrk;": "\u2772", "lbrace;": "\u007B", "lbrack;": "\u005B", "lbrke;": "\u298B", "lbrksld;": "\u298F", "lbrkslu;": "\u298D", "Lcaron;": "\u013D", "lcaron;": "\u013E", "Lcedil;": "\u013B", "lcedil;": "\u013C", "lceil;": "\u2308", "lcub;": "\u007B", "Lcy;": "\u041B", "lcy;": "\u043B", "ldca;": "\u2936", "ldquo;": "\u201C", "ldquor;": "\u201E", "ldrdhar;": "\u2967", "ldrushar;": "\u294B", "ldsh;": "\u21B2", "le;": "\u2264", "lE;": "\u2266", "LeftAngleBracket;": "\u27E8", "LeftArrowBar;": "\u21E4", "leftarrow;": "\u2190", "LeftArrow;": "\u2190", "Leftarrow;": "\u21D0", "LeftArrowRightArrow;": "\u21C6", "leftarrowtail;": "\u21A2", "LeftCeiling;": "\u2308", "LeftDoubleBracket;": "\u27E6", "LeftDownTeeVector;": "\u2961", "LeftDownVectorBar;": "\u2959", "LeftDownVector;": "\u21C3", "LeftFloor;": "\u230A", "leftharpoondown;": "\u21BD", "leftharpoonup;": "\u21BC", "leftleftarrows;": "\u21C7", "leftrightarrow;": "\u2194", "LeftRightArrow;": "\u2194", "Leftrightarrow;": "\u21D4", "leftrightarrows;": "\u21C6", "leftrightharpoons;": "\u21CB", "leftrightsquigarrow;": "\u21AD", "LeftRightVector;": "\u294E", "LeftTeeArrow;": "\u21A4", "LeftTee;": "\u22A3", "LeftTeeVector;": "\u295A", "leftthreetimes;": "\u22CB", "LeftTriangleBar;": "\u29CF", "LeftTriangle;": "\u22B2", "LeftTriangleEqual;": "\u22B4", "LeftUpDownVector;": "\u2951", "LeftUpTeeVector;": "\u2960", "LeftUpVectorBar;": "\u2958", "LeftUpVector;": "\u21BF", "LeftVectorBar;": "\u2952", "LeftVector;": "\u21BC", "lEg;": "\u2A8B", "leg;": "\u22DA", "leq;": "\u2264", "leqq;": "\u2266", "leqslant;": "\u2A7D", "lescc;": "\u2AA8", "les;": "\u2A7D", "lesdot;": "\u2A7F", "lesdoto;": "\u2A81", "lesdotor;": "\u2A83", "lesg;": "\u22DA\uFE00", "lesges;": "\u2A93", "lessapprox;": "\u2A85", "lessdot;": "\u22D6", "lesseqgtr;": "\u22DA", "lesseqqgtr;": "\u2A8B", "LessEqualGreater;": "\u22DA", "LessFullEqual;": "\u2266", "LessGreater;": "\u2276", "lessgtr;": "\u2276", "LessLess;": "\u2AA1", "lesssim;": "\u2272", "LessSlantEqual;": "\u2A7D", "LessTilde;": "\u2272", "lfisht;": "\u297C", "lfloor;": "\u230A", "Lfr;": "\uD835\uDD0F", "lfr;": "\uD835\uDD29", "lg;": "\u2276", "lgE;": "\u2A91", "lHar;": "\u2962", "lhard;": "\u21BD", "lharu;": "\u21BC", "lharul;": "\u296A", "lhblk;": "\u2584", "LJcy;": "\u0409", "ljcy;": "\u0459", "llarr;": "\u21C7", "ll;": "\u226A", "Ll;": "\u22D8", "llcorner;": "\u231E", "Lleftarrow;": "\u21DA", "llhard;": "\u296B", "lltri;": "\u25FA", "Lmidot;": "\u013F", "lmidot;": "\u0140", "lmoustache;": "\u23B0", "lmoust;": "\u23B0", "lnap;": "\u2A89", "lnapprox;": "\u2A89", "lne;": "\u2A87", "lnE;": "\u2268", "lneq;": "\u2A87", "lneqq;": "\u2268", "lnsim;": "\u22E6", "loang;": "\u27EC", "loarr;": "\u21FD", "lobrk;": "\u27E6", "longleftarrow;": "\u27F5", "LongLeftArrow;": "\u27F5", "Longleftarrow;": "\u27F8", "longleftrightarrow;": "\u27F7", "LongLeftRightArrow;": "\u27F7", "Longleftrightarrow;": "\u27FA", "longmapsto;": "\u27FC", "longrightarrow;": "\u27F6", "LongRightArrow;": "\u27F6", "Longrightarrow;": "\u27F9", "looparrowleft;": "\u21AB", "looparrowright;": "\u21AC", "lopar;": "\u2985", "Lopf;": "\uD835\uDD43", "lopf;": "\uD835\uDD5D", "loplus;": "\u2A2D", "lotimes;": "\u2A34", "lowast;": "\u2217", "lowbar;": "\u005F", "LowerLeftArrow;": "\u2199", "LowerRightArrow;": "\u2198", "loz;": "\u25CA", "lozenge;": "\u25CA", "lozf;": "\u29EB", "lpar;": "\u0028", "lparlt;": "\u2993", "lrarr;": "\u21C6", "lrcorner;": "\u231F", "lrhar;": "\u21CB", "lrhard;": "\u296D", "lrm;": "\u200E", "lrtri;": "\u22BF", "lsaquo;": "\u2039", "lscr;": "\uD835\uDCC1", "Lscr;": "\u2112", "lsh;": "\u21B0", "Lsh;": "\u21B0", "lsim;": "\u2272", "lsime;": "\u2A8D", "lsimg;": "\u2A8F", "lsqb;": "\u005B", "lsquo;": "\u2018", "lsquor;": "\u201A", "Lstrok;": "\u0141", "lstrok;": "\u0142", "ltcc;": "\u2AA6", "ltcir;": "\u2A79", "lt;": "\u003C", "lt": "\u003C", "LT;": "\u003C", "LT": "\u003C", "Lt;": "\u226A", "ltdot;": "\u22D6", "lthree;": "\u22CB", "ltimes;": "\u22C9", "ltlarr;": "\u2976", "ltquest;": "\u2A7B", "ltri;": "\u25C3", "ltrie;": "\u22B4", "ltrif;": "\u25C2", "ltrPar;": "\u2996", "lurdshar;": "\u294A", "luruhar;": "\u2966", "lvertneqq;": "\u2268\uFE00", "lvnE;": "\u2268\uFE00", "macr;": "\u00AF", "macr": "\u00AF", "male;": "\u2642", "malt;": "\u2720", "maltese;": "\u2720", "Map;": "\u2905", "map;": "\u21A6", "mapsto;": "\u21A6", "mapstodown;": "\u21A7", "mapstoleft;": "\u21A4", "mapstoup;": "\u21A5", "marker;": "\u25AE", "mcomma;": "\u2A29", "Mcy;": "\u041C", "mcy;": "\u043C", "mdash;": "\u2014", "mDDot;": "\u223A", "measuredangle;": "\u2221", "MediumSpace;": "\u205F", "Mellintrf;": "\u2133", "Mfr;": "\uD835\uDD10", "mfr;": "\uD835\uDD2A", "mho;": "\u2127", "micro;": "\u00B5", "micro": "\u00B5", "midast;": "\u002A", "midcir;": "\u2AF0", "mid;": "\u2223", "middot;": "\u00B7", "middot": "\u00B7", "minusb;": "\u229F", "minus;": "\u2212", "minusd;": "\u2238", "minusdu;": "\u2A2A", "MinusPlus;": "\u2213", "mlcp;": "\u2ADB", "mldr;": "\u2026", "mnplus;": "\u2213", "models;": "\u22A7", "Mopf;": "\uD835\uDD44", "mopf;": "\uD835\uDD5E", "mp;": "\u2213", "mscr;": "\uD835\uDCC2", "Mscr;": "\u2133", "mstpos;": "\u223E", "Mu;": "\u039C", "mu;": "\u03BC", "multimap;": "\u22B8", "mumap;": "\u22B8", "nabla;": "\u2207", "Nacute;": "\u0143", "nacute;": "\u0144", "nang;": "\u2220\u20D2", "nap;": "\u2249", "napE;": "\u2A70\u0338", "napid;": "\u224B\u0338", "napos;": "\u0149", "napprox;": "\u2249", "natural;": "\u266E", "naturals;": "\u2115", "natur;": "\u266E", "nbsp;": "\u00A0", "nbsp": "\u00A0", "nbump;": "\u224E\u0338", "nbumpe;": "\u224F\u0338", "ncap;": "\u2A43", "Ncaron;": "\u0147", "ncaron;": "\u0148", "Ncedil;": "\u0145", "ncedil;": "\u0146", "ncong;": "\u2247", "ncongdot;": "\u2A6D\u0338", "ncup;": "\u2A42", "Ncy;": "\u041D", "ncy;": "\u043D", "ndash;": "\u2013", "nearhk;": "\u2924", "nearr;": "\u2197", "neArr;": "\u21D7", "nearrow;": "\u2197", "ne;": "\u2260", "nedot;": "\u2250\u0338", "NegativeMediumSpace;": "\u200B", "NegativeThickSpace;": "\u200B", "NegativeThinSpace;": "\u200B", "NegativeVeryThinSpace;": "\u200B", "nequiv;": "\u2262", "nesear;": "\u2928", "nesim;": "\u2242\u0338", "NestedGreaterGreater;": "\u226B", "NestedLessLess;": "\u226A", "NewLine;": "\u000A", "nexist;": "\u2204", "nexists;": "\u2204", "Nfr;": "\uD835\uDD11", "nfr;": "\uD835\uDD2B", "ngE;": "\u2267\u0338", "nge;": "\u2271", "ngeq;": "\u2271", "ngeqq;": "\u2267\u0338", "ngeqslant;": "\u2A7E\u0338", "nges;": "\u2A7E\u0338", "nGg;": "\u22D9\u0338", "ngsim;": "\u2275", "nGt;": "\u226B\u20D2", "ngt;": "\u226F", "ngtr;": "\u226F", "nGtv;": "\u226B\u0338", "nharr;": "\u21AE", "nhArr;": "\u21CE", "nhpar;": "\u2AF2", "ni;": "\u220B", "nis;": "\u22FC", "nisd;": "\u22FA", "niv;": "\u220B", "NJcy;": "\u040A", "njcy;": "\u045A", "nlarr;": "\u219A", "nlArr;": "\u21CD", "nldr;": "\u2025", "nlE;": "\u2266\u0338", "nle;": "\u2270", "nleftarrow;": "\u219A", "nLeftarrow;": "\u21CD", "nleftrightarrow;": "\u21AE", "nLeftrightarrow;": "\u21CE", "nleq;": "\u2270", "nleqq;": "\u2266\u0338", "nleqslant;": "\u2A7D\u0338", "nles;": "\u2A7D\u0338", "nless;": "\u226E", "nLl;": "\u22D8\u0338", "nlsim;": "\u2274", "nLt;": "\u226A\u20D2", "nlt;": "\u226E", "nltri;": "\u22EA", "nltrie;": "\u22EC", "nLtv;": "\u226A\u0338", "nmid;": "\u2224", "NoBreak;": "\u2060", "NonBreakingSpace;": "\u00A0", "nopf;": "\uD835\uDD5F", "Nopf;": "\u2115", "Not;": "\u2AEC", "not;": "\u00AC", "not": "\u00AC", "NotCongruent;": "\u2262", "NotCupCap;": "\u226D", "NotDoubleVerticalBar;": "\u2226", "NotElement;": "\u2209", "NotEqual;": "\u2260", "NotEqualTilde;": "\u2242\u0338", "NotExists;": "\u2204", "NotGreater;": "\u226F", "NotGreaterEqual;": "\u2271", "NotGreaterFullEqual;": "\u2267\u0338", "NotGreaterGreater;": "\u226B\u0338", "NotGreaterLess;": "\u2279", "NotGreaterSlantEqual;": "\u2A7E\u0338", "NotGreaterTilde;": "\u2275", "NotHumpDownHump;": "\u224E\u0338", "NotHumpEqual;": "\u224F\u0338", "notin;": "\u2209", "notindot;": "\u22F5\u0338", "notinE;": "\u22F9\u0338", "notinva;": "\u2209", "notinvb;": "\u22F7", "notinvc;": "\u22F6", "NotLeftTriangleBar;": "\u29CF\u0338", "NotLeftTriangle;": "\u22EA", "NotLeftTriangleEqual;": "\u22EC", "NotLess;": "\u226E", "NotLessEqual;": "\u2270", "NotLessGreater;": "\u2278", "NotLessLess;": "\u226A\u0338", "NotLessSlantEqual;": "\u2A7D\u0338", "NotLessTilde;": "\u2274", "NotNestedGreaterGreater;": "\u2AA2\u0338", "NotNestedLessLess;": "\u2AA1\u0338", "notni;": "\u220C", "notniva;": "\u220C", "notnivb;": "\u22FE", "notnivc;": "\u22FD", "NotPrecedes;": "\u2280", "NotPrecedesEqual;": "\u2AAF\u0338", "NotPrecedesSlantEqual;": "\u22E0", "NotReverseElement;": "\u220C", "NotRightTriangleBar;": "\u29D0\u0338", "NotRightTriangle;": "\u22EB", "NotRightTriangleEqual;": "\u22ED", "NotSquareSubset;": "\u228F\u0338", "NotSquareSubsetEqual;": "\u22E2", "NotSquareSuperset;": "\u2290\u0338", "NotSquareSupersetEqual;": "\u22E3", "NotSubset;": "\u2282\u20D2", "NotSubsetEqual;": "\u2288", "NotSucceeds;": "\u2281", "NotSucceedsEqual;": "\u2AB0\u0338", "NotSucceedsSlantEqual;": "\u22E1", "NotSucceedsTilde;": "\u227F\u0338", "NotSuperset;": "\u2283\u20D2", "NotSupersetEqual;": "\u2289", "NotTilde;": "\u2241", "NotTildeEqual;": "\u2244", "NotTildeFullEqual;": "\u2247", "NotTildeTilde;": "\u2249", "NotVerticalBar;": "\u2224", "nparallel;": "\u2226", "npar;": "\u2226", "nparsl;": "\u2AFD\u20E5", "npart;": "\u2202\u0338", "npolint;": "\u2A14", "npr;": "\u2280", "nprcue;": "\u22E0", "nprec;": "\u2280", "npreceq;": "\u2AAF\u0338", "npre;": "\u2AAF\u0338", "nrarrc;": "\u2933\u0338", "nrarr;": "\u219B", "nrArr;": "\u21CF", "nrarrw;": "\u219D\u0338", "nrightarrow;": "\u219B", "nRightarrow;": "\u21CF", "nrtri;": "\u22EB", "nrtrie;": "\u22ED", "nsc;": "\u2281", "nsccue;": "\u22E1", "nsce;": "\u2AB0\u0338", "Nscr;": "\uD835\uDCA9", "nscr;": "\uD835\uDCC3", "nshortmid;": "\u2224", "nshortparallel;": "\u2226", "nsim;": "\u2241", "nsime;": "\u2244", "nsimeq;": "\u2244", "nsmid;": "\u2224", "nspar;": "\u2226", "nsqsube;": "\u22E2", "nsqsupe;": "\u22E3", "nsub;": "\u2284", "nsubE;": "\u2AC5\u0338", "nsube;": "\u2288", "nsubset;": "\u2282\u20D2", "nsubseteq;": "\u2288", "nsubseteqq;": "\u2AC5\u0338", "nsucc;": "\u2281", "nsucceq;": "\u2AB0\u0338", "nsup;": "\u2285", "nsupE;": "\u2AC6\u0338", "nsupe;": "\u2289", "nsupset;": "\u2283\u20D2", "nsupseteq;": "\u2289", "nsupseteqq;": "\u2AC6\u0338", "ntgl;": "\u2279", "Ntilde;": "\u00D1", "Ntilde": "\u00D1", "ntilde;": "\u00F1", "ntilde": "\u00F1", "ntlg;": "\u2278", "ntriangleleft;": "\u22EA", "ntrianglelefteq;": "\u22EC", "ntriangleright;": "\u22EB", "ntrianglerighteq;": "\u22ED", "Nu;": "\u039D", "nu;": "\u03BD", "num;": "\u0023", "numero;": "\u2116", "numsp;": "\u2007", "nvap;": "\u224D\u20D2", "nvdash;": "\u22AC", "nvDash;": "\u22AD", "nVdash;": "\u22AE", "nVDash;": "\u22AF", "nvge;": "\u2265\u20D2", "nvgt;": "\u003E\u20D2", "nvHarr;": "\u2904", "nvinfin;": "\u29DE", "nvlArr;": "\u2902", "nvle;": "\u2264\u20D2", "nvlt;": "\u003C\u20D2", "nvltrie;": "\u22B4\u20D2", "nvrArr;": "\u2903", "nvrtrie;": "\u22B5\u20D2", "nvsim;": "\u223C\u20D2", "nwarhk;": "\u2923", "nwarr;": "\u2196", "nwArr;": "\u21D6", "nwarrow;": "\u2196", "nwnear;": "\u2927", "Oacute;": "\u00D3", "Oacute": "\u00D3", "oacute;": "\u00F3", "oacute": "\u00F3", "oast;": "\u229B", "Ocirc;": "\u00D4", "Ocirc": "\u00D4", "ocirc;": "\u00F4", "ocirc": "\u00F4", "ocir;": "\u229A", "Ocy;": "\u041E", "ocy;": "\u043E", "odash;": "\u229D", "Odblac;": "\u0150", "odblac;": "\u0151", "odiv;": "\u2A38", "odot;": "\u2299", "odsold;": "\u29BC", "OElig;": "\u0152", "oelig;": "\u0153", "ofcir;": "\u29BF", "Ofr;": "\uD835\uDD12", "ofr;": "\uD835\uDD2C", "ogon;": "\u02DB", "Ograve;": "\u00D2", "Ograve": "\u00D2", "ograve;": "\u00F2", "ograve": "\u00F2", "ogt;": "\u29C1", "ohbar;": "\u29B5", "ohm;": "\u03A9", "oint;": "\u222E", "olarr;": "\u21BA", "olcir;": "\u29BE", "olcross;": "\u29BB", "oline;": "\u203E", "olt;": "\u29C0", "Omacr;": "\u014C", "omacr;": "\u014D", "Omega;": "\u03A9", "omega;": "\u03C9", "Omicron;": "\u039F", "omicron;": "\u03BF", "omid;": "\u29B6", "ominus;": "\u2296", "Oopf;": "\uD835\uDD46", "oopf;": "\uD835\uDD60", "opar;": "\u29B7", "OpenCurlyDoubleQuote;": "\u201C", "OpenCurlyQuote;": "\u2018", "operp;": "\u29B9", "oplus;": "\u2295", "orarr;": "\u21BB", "Or;": "\u2A54", "or;": "\u2228", "ord;": "\u2A5D", "order;": "\u2134", "orderof;": "\u2134", "ordf;": "\u00AA", "ordf": "\u00AA", "ordm;": "\u00BA", "ordm": "\u00BA", "origof;": "\u22B6", "oror;": "\u2A56", "orslope;": "\u2A57", "orv;": "\u2A5B", "oS;": "\u24C8", "Oscr;": "\uD835\uDCAA", "oscr;": "\u2134", "Oslash;": "\u00D8", "Oslash": "\u00D8", "oslash;": "\u00F8", "oslash": "\u00F8", "osol;": "\u2298", "Otilde;": "\u00D5", "Otilde": "\u00D5", "otilde;": "\u00F5", "otilde": "\u00F5", "otimesas;": "\u2A36", "Otimes;": "\u2A37", "otimes;": "\u2297", "Ouml;": "\u00D6", "Ouml": "\u00D6", "ouml;": "\u00F6", "ouml": "\u00F6", "ovbar;": "\u233D", "OverBar;": "\u203E", "OverBrace;": "\u23DE", "OverBracket;": "\u23B4", "OverParenthesis;": "\u23DC", "para;": "\u00B6", "para": "\u00B6", "parallel;": "\u2225", "par;": "\u2225", "parsim;": "\u2AF3", "parsl;": "\u2AFD", "part;": "\u2202", "PartialD;": "\u2202", "Pcy;": "\u041F", "pcy;": "\u043F", "percnt;": "\u0025", "period;": "\u002E", "permil;": "\u2030", "perp;": "\u22A5", "pertenk;": "\u2031", "Pfr;": "\uD835\uDD13", "pfr;": "\uD835\uDD2D", "Phi;": "\u03A6", "phi;": "\u03C6", "phiv;": "\u03D5", "phmmat;": "\u2133", "phone;": "\u260E", "Pi;": "\u03A0", "pi;": "\u03C0", "pitchfork;": "\u22D4", "piv;": "\u03D6", "planck;": "\u210F", "planckh;": "\u210E", "plankv;": "\u210F", "plusacir;": "\u2A23", "plusb;": "\u229E", "pluscir;": "\u2A22", "plus;": "\u002B", "plusdo;": "\u2214", "plusdu;": "\u2A25", "pluse;": "\u2A72", "PlusMinus;": "\u00B1", "plusmn;": "\u00B1", "plusmn": "\u00B1", "plussim;": "\u2A26", "plustwo;": "\u2A27", "pm;": "\u00B1", "Poincareplane;": "\u210C", "pointint;": "\u2A15", "popf;": "\uD835\uDD61", "Popf;": "\u2119", "pound;": "\u00A3", "pound": "\u00A3", "prap;": "\u2AB7", "Pr;": "\u2ABB", "pr;": "\u227A", "prcue;": "\u227C", "precapprox;": "\u2AB7", "prec;": "\u227A", "preccurlyeq;": "\u227C", "Precedes;": "\u227A", "PrecedesEqual;": "\u2AAF", "PrecedesSlantEqual;": "\u227C", "PrecedesTilde;": "\u227E", "preceq;": "\u2AAF", "precnapprox;": "\u2AB9", "precneqq;": "\u2AB5", "precnsim;": "\u22E8", "pre;": "\u2AAF", "prE;": "\u2AB3", "precsim;": "\u227E", "prime;": "\u2032", "Prime;": "\u2033", "primes;": "\u2119", "prnap;": "\u2AB9", "prnE;": "\u2AB5", "prnsim;": "\u22E8", "prod;": "\u220F", "Product;": "\u220F", "profalar;": "\u232E", "profline;": "\u2312", "profsurf;": "\u2313", "prop;": "\u221D", "Proportional;": "\u221D", "Proportion;": "\u2237", "propto;": "\u221D", "prsim;": "\u227E", "prurel;": "\u22B0", "Pscr;": "\uD835\uDCAB", "pscr;": "\uD835\uDCC5", "Psi;": "\u03A8", "psi;": "\u03C8", "puncsp;": "\u2008", "Qfr;": "\uD835\uDD14", "qfr;": "\uD835\uDD2E", "qint;": "\u2A0C", "qopf;": "\uD835\uDD62", "Qopf;": "\u211A", "qprime;": "\u2057", "Qscr;": "\uD835\uDCAC", "qscr;": "\uD835\uDCC6", "quaternions;": "\u210D", "quatint;": "\u2A16", "quest;": "\u003F", "questeq;": "\u225F", "quot;": "\u0022", "quot": "\u0022", "QUOT;": "\u0022", "QUOT": "\u0022", "rAarr;": "\u21DB", "race;": "\u223D\u0331", "Racute;": "\u0154", "racute;": "\u0155", "radic;": "\u221A", "raemptyv;": "\u29B3", "rang;": "\u27E9", "Rang;": "\u27EB", "rangd;": "\u2992", "range;": "\u29A5", "rangle;": "\u27E9", "raquo;": "\u00BB", "raquo": "\u00BB", "rarrap;": "\u2975", "rarrb;": "\u21E5", "rarrbfs;": "\u2920", "rarrc;": "\u2933", "rarr;": "\u2192", "Rarr;": "\u21A0", "rArr;": "\u21D2", "rarrfs;": "\u291E", "rarrhk;": "\u21AA", "rarrlp;": "\u21AC", "rarrpl;": "\u2945", "rarrsim;": "\u2974", "Rarrtl;": "\u2916", "rarrtl;": "\u21A3", "rarrw;": "\u219D", "ratail;": "\u291A", "rAtail;": "\u291C", "ratio;": "\u2236", "rationals;": "\u211A", "rbarr;": "\u290D", "rBarr;": "\u290F", "RBarr;": "\u2910", "rbbrk;": "\u2773", "rbrace;": "\u007D", "rbrack;": "\u005D", "rbrke;": "\u298C", "rbrksld;": "\u298E", "rbrkslu;": "\u2990", "Rcaron;": "\u0158", "rcaron;": "\u0159", "Rcedil;": "\u0156", "rcedil;": "\u0157", "rceil;": "\u2309", "rcub;": "\u007D", "Rcy;": "\u0420", "rcy;": "\u0440", "rdca;": "\u2937", "rdldhar;": "\u2969", "rdquo;": "\u201D", "rdquor;": "\u201D", "rdsh;": "\u21B3", "real;": "\u211C", "realine;": "\u211B", "realpart;": "\u211C", "reals;": "\u211D", "Re;": "\u211C", "rect;": "\u25AD", "reg;": "\u00AE", "reg": "\u00AE", "REG;": "\u00AE", "REG": "\u00AE", "ReverseElement;": "\u220B", "ReverseEquilibrium;": "\u21CB", "ReverseUpEquilibrium;": "\u296F", "rfisht;": "\u297D", "rfloor;": "\u230B", "rfr;": "\uD835\uDD2F", "Rfr;": "\u211C", "rHar;": "\u2964", "rhard;": "\u21C1", "rharu;": "\u21C0", "rharul;": "\u296C", "Rho;": "\u03A1", "rho;": "\u03C1", "rhov;": "\u03F1", "RightAngleBracket;": "\u27E9", "RightArrowBar;": "\u21E5", "rightarrow;": "\u2192", "RightArrow;": "\u2192", "Rightarrow;": "\u21D2", "RightArrowLeftArrow;": "\u21C4", "rightarrowtail;": "\u21A3", "RightCeiling;": "\u2309", "RightDoubleBracket;": "\u27E7", "RightDownTeeVector;": "\u295D", "RightDownVectorBar;": "\u2955", "RightDownVector;": "\u21C2", "RightFloor;": "\u230B", "rightharpoondown;": "\u21C1", "rightharpoonup;": "\u21C0", "rightleftarrows;": "\u21C4", "rightleftharpoons;": "\u21CC", "rightrightarrows;": "\u21C9", "rightsquigarrow;": "\u219D", "RightTeeArrow;": "\u21A6", "RightTee;": "\u22A2", "RightTeeVector;": "\u295B", "rightthreetimes;": "\u22CC", "RightTriangleBar;": "\u29D0", "RightTriangle;": "\u22B3", "RightTriangleEqual;": "\u22B5", "RightUpDownVector;": "\u294F", "RightUpTeeVector;": "\u295C", "RightUpVectorBar;": "\u2954", "RightUpVector;": "\u21BE", "RightVectorBar;": "\u2953", "RightVector;": "\u21C0", "ring;": "\u02DA", "risingdotseq;": "\u2253", "rlarr;": "\u21C4", "rlhar;": "\u21CC", "rlm;": "\u200F", "rmoustache;": "\u23B1", "rmoust;": "\u23B1", "rnmid;": "\u2AEE", "roang;": "\u27ED", "roarr;": "\u21FE", "robrk;": "\u27E7", "ropar;": "\u2986", "ropf;": "\uD835\uDD63", "Ropf;": "\u211D", "roplus;": "\u2A2E", "rotimes;": "\u2A35", "RoundImplies;": "\u2970", "rpar;": "\u0029", "rpargt;": "\u2994", "rppolint;": "\u2A12", "rrarr;": "\u21C9", "Rrightarrow;": "\u21DB", "rsaquo;": "\u203A", "rscr;": "\uD835\uDCC7", "Rscr;": "\u211B", "rsh;": "\u21B1", "Rsh;": "\u21B1", "rsqb;": "\u005D", "rsquo;": "\u2019", "rsquor;": "\u2019", "rthree;": "\u22CC", "rtimes;": "\u22CA", "rtri;": "\u25B9", "rtrie;": "\u22B5", "rtrif;": "\u25B8", "rtriltri;": "\u29CE", "RuleDelayed;": "\u29F4", "ruluhar;": "\u2968", "rx;": "\u211E", "Sacute;": "\u015A", "sacute;": "\u015B", "sbquo;": "\u201A", "scap;": "\u2AB8", "Scaron;": "\u0160", "scaron;": "\u0161", "Sc;": "\u2ABC", "sc;": "\u227B", "sccue;": "\u227D", "sce;": "\u2AB0", "scE;": "\u2AB4", "Scedil;": "\u015E", "scedil;": "\u015F", "Scirc;": "\u015C", "scirc;": "\u015D", "scnap;": "\u2ABA", "scnE;": "\u2AB6", "scnsim;": "\u22E9", "scpolint;": "\u2A13", "scsim;": "\u227F", "Scy;": "\u0421", "scy;": "\u0441", "sdotb;": "\u22A1", "sdot;": "\u22C5", "sdote;": "\u2A66", "searhk;": "\u2925", "searr;": "\u2198", "seArr;": "\u21D8", "searrow;": "\u2198", "sect;": "\u00A7", "sect": "\u00A7", "semi;": "\u003B", "seswar;": "\u2929", "setminus;": "\u2216", "setmn;": "\u2216", "sext;": "\u2736", "Sfr;": "\uD835\uDD16", "sfr;": "\uD835\uDD30", "sfrown;": "\u2322", "sharp;": "\u266F", "SHCHcy;": "\u0429", "shchcy;": "\u0449", "SHcy;": "\u0428", "shcy;": "\u0448", "ShortDownArrow;": "\u2193", "ShortLeftArrow;": "\u2190", "shortmid;": "\u2223", "shortparallel;": "\u2225", "ShortRightArrow;": "\u2192", "ShortUpArrow;": "\u2191", "shy;": "\u00AD", "shy": "\u00AD", "Sigma;": "\u03A3", "sigma;": "\u03C3", "sigmaf;": "\u03C2", "sigmav;": "\u03C2", "sim;": "\u223C", "simdot;": "\u2A6A", "sime;": "\u2243", "simeq;": "\u2243", "simg;": "\u2A9E", "simgE;": "\u2AA0", "siml;": "\u2A9D", "simlE;": "\u2A9F", "simne;": "\u2246", "simplus;": "\u2A24", "simrarr;": "\u2972", "slarr;": "\u2190", "SmallCircle;": "\u2218", "smallsetminus;": "\u2216", "smashp;": "\u2A33", "smeparsl;": "\u29E4", "smid;": "\u2223", "smile;": "\u2323", "smt;": "\u2AAA", "smte;": "\u2AAC", "smtes;": "\u2AAC\uFE00", "SOFTcy;": "\u042C", "softcy;": "\u044C", "solbar;": "\u233F", "solb;": "\u29C4", "sol;": "\u002F", "Sopf;": "\uD835\uDD4A", "sopf;": "\uD835\uDD64", "spades;": "\u2660", "spadesuit;": "\u2660", "spar;": "\u2225", "sqcap;": "\u2293", "sqcaps;": "\u2293\uFE00", "sqcup;": "\u2294", "sqcups;": "\u2294\uFE00", "Sqrt;": "\u221A", "sqsub;": "\u228F", "sqsube;": "\u2291", "sqsubset;": "\u228F", "sqsubseteq;": "\u2291", "sqsup;": "\u2290", "sqsupe;": "\u2292", "sqsupset;": "\u2290", "sqsupseteq;": "\u2292", "square;": "\u25A1", "Square;": "\u25A1", "SquareIntersection;": "\u2293", "SquareSubset;": "\u228F", "SquareSubsetEqual;": "\u2291", "SquareSuperset;": "\u2290", "SquareSupersetEqual;": "\u2292", "SquareUnion;": "\u2294", "squarf;": "\u25AA", "squ;": "\u25A1", "squf;": "\u25AA", "srarr;": "\u2192", "Sscr;": "\uD835\uDCAE", "sscr;": "\uD835\uDCC8", "ssetmn;": "\u2216", "ssmile;": "\u2323", "sstarf;": "\u22C6", "Star;": "\u22C6", "star;": "\u2606", "starf;": "\u2605", "straightepsilon;": "\u03F5", "straightphi;": "\u03D5", "strns;": "\u00AF", "sub;": "\u2282", "Sub;": "\u22D0", "subdot;": "\u2ABD", "subE;": "\u2AC5", "sube;": "\u2286", "subedot;": "\u2AC3", "submult;": "\u2AC1", "subnE;": "\u2ACB", "subne;": "\u228A", "subplus;": "\u2ABF", "subrarr;": "\u2979", "subset;": "\u2282", "Subset;": "\u22D0", "subseteq;": "\u2286", "subseteqq;": "\u2AC5", "SubsetEqual;": "\u2286", "subsetneq;": "\u228A", "subsetneqq;": "\u2ACB", "subsim;": "\u2AC7", "subsub;": "\u2AD5", "subsup;": "\u2AD3", "succapprox;": "\u2AB8", "succ;": "\u227B", "succcurlyeq;": "\u227D", "Succeeds;": "\u227B", "SucceedsEqual;": "\u2AB0", "SucceedsSlantEqual;": "\u227D", "SucceedsTilde;": "\u227F", "succeq;": "\u2AB0", "succnapprox;": "\u2ABA", "succneqq;": "\u2AB6", "succnsim;": "\u22E9", "succsim;": "\u227F", "SuchThat;": "\u220B", "sum;": "\u2211", "Sum;": "\u2211", "sung;": "\u266A", "sup1;": "\u00B9", "sup1": "\u00B9", "sup2;": "\u00B2", "sup2": "\u00B2", "sup3;": "\u00B3", "sup3": "\u00B3", "sup;": "\u2283", "Sup;": "\u22D1", "supdot;": "\u2ABE", "supdsub;": "\u2AD8", "supE;": "\u2AC6", "supe;": "\u2287", "supedot;": "\u2AC4", "Superset;": "\u2283", "SupersetEqual;": "\u2287", "suphsol;": "\u27C9", "suphsub;": "\u2AD7", "suplarr;": "\u297B", "supmult;": "\u2AC2", "supnE;": "\u2ACC", "supne;": "\u228B", "supplus;": "\u2AC0", "supset;": "\u2283", "Supset;": "\u22D1", "supseteq;": "\u2287", "supseteqq;": "\u2AC6", "supsetneq;": "\u228B", "supsetneqq;": "\u2ACC", "supsim;": "\u2AC8", "supsub;": "\u2AD4", "supsup;": "\u2AD6", "swarhk;": "\u2926", "swarr;": "\u2199", "swArr;": "\u21D9", "swarrow;": "\u2199", "swnwar;": "\u292A", "szlig;": "\u00DF", "szlig": "\u00DF", "Tab;": "\u0009", "target;": "\u2316", "Tau;": "\u03A4", "tau;": "\u03C4", "tbrk;": "\u23B4", "Tcaron;": "\u0164", "tcaron;": "\u0165", "Tcedil;": "\u0162", "tcedil;": "\u0163", "Tcy;": "\u0422", "tcy;": "\u0442", "tdot;": "\u20DB", "telrec;": "\u2315", "Tfr;": "\uD835\uDD17", "tfr;": "\uD835\uDD31", "there4;": "\u2234", "therefore;": "\u2234", "Therefore;": "\u2234", "Theta;": "\u0398", "theta;": "\u03B8", "thetasym;": "\u03D1", "thetav;": "\u03D1", "thickapprox;": "\u2248", "thicksim;": "\u223C", "ThickSpace;": "\u205F\u200A", "ThinSpace;": "\u2009", "thinsp;": "\u2009", "thkap;": "\u2248", "thksim;": "\u223C", "THORN;": "\u00DE", "THORN": "\u00DE", "thorn;": "\u00FE", "thorn": "\u00FE", "tilde;": "\u02DC", "Tilde;": "\u223C", "TildeEqual;": "\u2243", "TildeFullEqual;": "\u2245", "TildeTilde;": "\u2248", "timesbar;": "\u2A31", "timesb;": "\u22A0", "times;": "\u00D7", "times": "\u00D7", "timesd;": "\u2A30", "tint;": "\u222D", "toea;": "\u2928", "topbot;": "\u2336", "topcir;": "\u2AF1", "top;": "\u22A4", "Topf;": "\uD835\uDD4B", "topf;": "\uD835\uDD65", "topfork;": "\u2ADA", "tosa;": "\u2929", "tprime;": "\u2034", "trade;": "\u2122", "TRADE;": "\u2122", "triangle;": "\u25B5", "triangledown;": "\u25BF", "triangleleft;": "\u25C3", "trianglelefteq;": "\u22B4", "triangleq;": "\u225C", "triangleright;": "\u25B9", "trianglerighteq;": "\u22B5", "tridot;": "\u25EC", "trie;": "\u225C", "triminus;": "\u2A3A", "TripleDot;": "\u20DB", "triplus;": "\u2A39", "trisb;": "\u29CD", "tritime;": "\u2A3B", "trpezium;": "\u23E2", "Tscr;": "\uD835\uDCAF", "tscr;": "\uD835\uDCC9", "TScy;": "\u0426", "tscy;": "\u0446", "TSHcy;": "\u040B", "tshcy;": "\u045B", "Tstrok;": "\u0166", "tstrok;": "\u0167", "twixt;": "\u226C", "twoheadleftarrow;": "\u219E", "twoheadrightarrow;": "\u21A0", "Uacute;": "\u00DA", "Uacute": "\u00DA", "uacute;": "\u00FA", "uacute": "\u00FA", "uarr;": "\u2191", "Uarr;": "\u219F", "uArr;": "\u21D1", "Uarrocir;": "\u2949", "Ubrcy;": "\u040E", "ubrcy;": "\u045E", "Ubreve;": "\u016C", "ubreve;": "\u016D", "Ucirc;": "\u00DB", "Ucirc": "\u00DB", "ucirc;": "\u00FB", "ucirc": "\u00FB", "Ucy;": "\u0423", "ucy;": "\u0443", "udarr;": "\u21C5", "Udblac;": "\u0170", "udblac;": "\u0171", "udhar;": "\u296E", "ufisht;": "\u297E", "Ufr;": "\uD835\uDD18", "ufr;": "\uD835\uDD32", "Ugrave;": "\u00D9", "Ugrave": "\u00D9", "ugrave;": "\u00F9", "ugrave": "\u00F9", "uHar;": "\u2963", "uharl;": "\u21BF", "uharr;": "\u21BE", "uhblk;": "\u2580", "ulcorn;": "\u231C", "ulcorner;": "\u231C", "ulcrop;": "\u230F", "ultri;": "\u25F8", "Umacr;": "\u016A", "umacr;": "\u016B", "uml;": "\u00A8", "uml": "\u00A8", "UnderBar;": "\u005F", "UnderBrace;": "\u23DF", "UnderBracket;": "\u23B5", "UnderParenthesis;": "\u23DD", "Union;": "\u22C3", "UnionPlus;": "\u228E", "Uogon;": "\u0172", "uogon;": "\u0173", "Uopf;": "\uD835\uDD4C", "uopf;": "\uD835\uDD66", "UpArrowBar;": "\u2912", "uparrow;": "\u2191", "UpArrow;": "\u2191", "Uparrow;": "\u21D1", "UpArrowDownArrow;": "\u21C5", "updownarrow;": "\u2195", "UpDownArrow;": "\u2195", "Updownarrow;": "\u21D5", "UpEquilibrium;": "\u296E", "upharpoonleft;": "\u21BF", "upharpoonright;": "\u21BE", "uplus;": "\u228E", "UpperLeftArrow;": "\u2196", "UpperRightArrow;": "\u2197", "upsi;": "\u03C5", "Upsi;": "\u03D2", "upsih;": "\u03D2", "Upsilon;": "\u03A5", "upsilon;": "\u03C5", "UpTeeArrow;": "\u21A5", "UpTee;": "\u22A5", "upuparrows;": "\u21C8", "urcorn;": "\u231D", "urcorner;": "\u231D", "urcrop;": "\u230E", "Uring;": "\u016E", "uring;": "\u016F", "urtri;": "\u25F9", "Uscr;": "\uD835\uDCB0", "uscr;": "\uD835\uDCCA", "utdot;": "\u22F0", "Utilde;": "\u0168", "utilde;": "\u0169", "utri;": "\u25B5", "utrif;": "\u25B4", "uuarr;": "\u21C8", "Uuml;": "\u00DC", "Uuml": "\u00DC", "uuml;": "\u00FC", "uuml": "\u00FC", "uwangle;": "\u29A7", "vangrt;": "\u299C", "varepsilon;": "\u03F5", "varkappa;": "\u03F0", "varnothing;": "\u2205", "varphi;": "\u03D5", "varpi;": "\u03D6", "varpropto;": "\u221D", "varr;": "\u2195", "vArr;": "\u21D5", "varrho;": "\u03F1", "varsigma;": "\u03C2", "varsubsetneq;": "\u228A\uFE00", "varsubsetneqq;": "\u2ACB\uFE00", "varsupsetneq;": "\u228B\uFE00", "varsupsetneqq;": "\u2ACC\uFE00", "vartheta;": "\u03D1", "vartriangleleft;": "\u22B2", "vartriangleright;": "\u22B3", "vBar;": "\u2AE8", "Vbar;": "\u2AEB", "vBarv;": "\u2AE9", "Vcy;": "\u0412", "vcy;": "\u0432", "vdash;": "\u22A2", "vDash;": "\u22A8", "Vdash;": "\u22A9", "VDash;": "\u22AB", "Vdashl;": "\u2AE6", "veebar;": "\u22BB", "vee;": "\u2228", "Vee;": "\u22C1", "veeeq;": "\u225A", "vellip;": "\u22EE", "verbar;": "\u007C", "Verbar;": "\u2016", "vert;": "\u007C", "Vert;": "\u2016", "VerticalBar;": "\u2223", "VerticalLine;": "\u007C", "VerticalSeparator;": "\u2758", "VerticalTilde;": "\u2240", "VeryThinSpace;": "\u200A", "Vfr;": "\uD835\uDD19", "vfr;": "\uD835\uDD33", "vltri;": "\u22B2", "vnsub;": "\u2282\u20D2", "vnsup;": "\u2283\u20D2", "Vopf;": "\uD835\uDD4D", "vopf;": "\uD835\uDD67", "vprop;": "\u221D", "vrtri;": "\u22B3", "Vscr;": "\uD835\uDCB1", "vscr;": "\uD835\uDCCB", "vsubnE;": "\u2ACB\uFE00", "vsubne;": "\u228A\uFE00", "vsupnE;": "\u2ACC\uFE00", "vsupne;": "\u228B\uFE00", "Vvdash;": "\u22AA", "vzigzag;": "\u299A", "Wcirc;": "\u0174", "wcirc;": "\u0175", "wedbar;": "\u2A5F", "wedge;": "\u2227", "Wedge;": "\u22C0", "wedgeq;": "\u2259", "weierp;": "\u2118", "Wfr;": "\uD835\uDD1A", "wfr;": "\uD835\uDD34", "Wopf;": "\uD835\uDD4E", "wopf;": "\uD835\uDD68", "wp;": "\u2118", "wr;": "\u2240", "wreath;": "\u2240", "Wscr;": "\uD835\uDCB2", "wscr;": "\uD835\uDCCC", "xcap;": "\u22C2", "xcirc;": "\u25EF", "xcup;": "\u22C3", "xdtri;": "\u25BD", "Xfr;": "\uD835\uDD1B", "xfr;": "\uD835\uDD35", "xharr;": "\u27F7", "xhArr;": "\u27FA", "Xi;": "\u039E", "xi;": "\u03BE", "xlarr;": "\u27F5", "xlArr;": "\u27F8", "xmap;": "\u27FC", "xnis;": "\u22FB", "xodot;": "\u2A00", "Xopf;": "\uD835\uDD4F", "xopf;": "\uD835\uDD69", "xoplus;": "\u2A01", "xotime;": "\u2A02", "xrarr;": "\u27F6", "xrArr;": "\u27F9", "Xscr;": "\uD835\uDCB3", "xscr;": "\uD835\uDCCD", "xsqcup;": "\u2A06", "xuplus;": "\u2A04", "xutri;": "\u25B3", "xvee;": "\u22C1", "xwedge;": "\u22C0", "Yacute;": "\u00DD", "Yacute": "\u00DD", "yacute;": "\u00FD", "yacute": "\u00FD", "YAcy;": "\u042F", "yacy;": "\u044F", "Ycirc;": "\u0176", "ycirc;": "\u0177", "Ycy;": "\u042B", "ycy;": "\u044B", "yen;": "\u00A5", "yen": "\u00A5", "Yfr;": "\uD835\uDD1C", "yfr;": "\uD835\uDD36", "YIcy;": "\u0407", "yicy;": "\u0457", "Yopf;": "\uD835\uDD50", "yopf;": "\uD835\uDD6A", "Yscr;": "\uD835\uDCB4", "yscr;": "\uD835\uDCCE", "YUcy;": "\u042E", "yucy;": "\u044E", "yuml;": "\u00FF", "yuml": "\u00FF", "Yuml;": "\u0178", "Zacute;": "\u0179", "zacute;": "\u017A", "Zcaron;": "\u017D", "zcaron;": "\u017E", "Zcy;": "\u0417", "zcy;": "\u0437", "Zdot;": "\u017B", "zdot;": "\u017C", "zeetrf;": "\u2128", "ZeroWidthSpace;": "\u200B", "Zeta;": "\u0396", "zeta;": "\u03B6", "zfr;": "\uD835\uDD37", "Zfr;": "\u2128", "ZHcy;": "\u0416", "zhcy;": "\u0436", "zigrarr;": "\u21DD", "zopf;": "\uD835\uDD6B", "Zopf;": "\u2124", "Zscr;": "\uD835\uDCB5", "zscr;": "\uD835\uDCCF", "zwj;": "\u200D", "zwnj;": "\u200C" }; }, {}], 13:[function(_dereq_,module,exports){ var util = _dereq_('util/'); var pSlice = Array.prototype.slice; var hasOwn = Object.prototype.hasOwnProperty; var assert = module.exports = ok; assert.AssertionError = function AssertionError(options) { this.name = 'AssertionError'; this.actual = options.actual; this.expected = options.expected; this.operator = options.operator; if (options.message) { this.message = options.message; this.generatedMessage = false; } else { this.message = getMessage(this); this.generatedMessage = true; } var stackStartFunction = options.stackStartFunction || fail; if (Error.captureStackTrace) { Error.captureStackTrace(this, stackStartFunction); } else { var err = new Error(); if (err.stack) { var out = err.stack; var fn_name = stackStartFunction.name; var idx = out.indexOf('\n' + fn_name); if (idx >= 0) { var next_line = out.indexOf('\n', idx + 1); out = out.substring(next_line + 1); } this.stack = out; } } }; util.inherits(assert.AssertionError, Error); function replacer(key, value) { if (util.isUndefined(value)) { return '' + value; } if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { return value.toString(); } if (util.isFunction(value) || util.isRegExp(value)) { return value.toString(); } return value; } function truncate(s, n) { if (util.isString(s)) { return s.length < n ? s : s.slice(0, n); } else { return s; } } function getMessage(self) { return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + self.operator + ' ' + truncate(JSON.stringify(self.expected, replacer), 128); } function fail(actual, expected, message, operator, stackStartFunction) { throw new assert.AssertionError({ message: message, actual: actual, expected: expected, operator: operator, stackStartFunction: stackStartFunction }); } assert.fail = fail; function ok(value, message) { if (!value) fail(value, true, message, '==', assert.ok); } assert.ok = ok; assert.equal = function equal(actual, expected, message) { if (actual != expected) fail(actual, expected, message, '==', assert.equal); }; assert.notEqual = function notEqual(actual, expected, message) { if (actual == expected) { fail(actual, expected, message, '!=', assert.notEqual); } }; assert.deepEqual = function deepEqual(actual, expected, message) { if (!_deepEqual(actual, expected)) { fail(actual, expected, message, 'deepEqual', assert.deepEqual); } }; function _deepEqual(actual, expected) { if (actual === expected) { return true; } else if (util.isBuffer(actual) && util.isBuffer(expected)) { if (actual.length != expected.length) return false; for (var i = 0; i < actual.length; i++) { if (actual[i] !== expected[i]) return false; } return true; } else if (util.isDate(actual) && util.isDate(expected)) { return actual.getTime() === expected.getTime(); } else if (util.isRegExp(actual) && util.isRegExp(expected)) { return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase; } else if (!util.isObject(actual) && !util.isObject(expected)) { return actual == expected; } else { return objEquiv(actual, expected); } } function isArguments(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; } function objEquiv(a, b) { if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) return false; if (a.prototype !== b.prototype) return false; if (isArguments(a)) { if (!isArguments(b)) { return false; } a = pSlice.call(a); b = pSlice.call(b); return _deepEqual(a, b); } try { var ka = objectKeys(a), kb = objectKeys(b), key, i; } catch (e) {//happens when one is a string literal and the other isn't return false; } if (ka.length != kb.length) return false; ka.sort(); kb.sort(); for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) return false; } for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!_deepEqual(a[key], b[key])) return false; } return true; } assert.notDeepEqual = function notDeepEqual(actual, expected, message) { if (_deepEqual(actual, expected)) { fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); } }; assert.strictEqual = function strictEqual(actual, expected, message) { if (actual !== expected) { fail(actual, expected, message, '===', assert.strictEqual); } }; assert.notStrictEqual = function notStrictEqual(actual, expected, message) { if (actual === expected) { fail(actual, expected, message, '!==', assert.notStrictEqual); } }; function expectedException(actual, expected) { if (!actual || !expected) { return false; } if (Object.prototype.toString.call(expected) == '[object RegExp]') { return expected.test(actual); } else if (actual instanceof expected) { return true; } else if (expected.call({}, actual) === true) { return true; } return false; } function _throws(shouldThrow, block, expected, message) { var actual; if (util.isString(expected)) { message = expected; expected = null; } try { block(); } catch (e) { actual = e; } message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.'); if (shouldThrow && !actual) { fail(actual, expected, 'Missing expected exception' + message); } if (!shouldThrow && expectedException(actual, expected)) { fail(actual, expected, 'Got unwanted exception' + message); } if ((shouldThrow && actual && expected && !expectedException(actual, expected)) || (!shouldThrow && actual)) { throw actual; } } assert.throws = function(block, /*optional*/error, /*optional*/message) { _throws.apply(this, [true].concat(pSlice.call(arguments))); }; assert.doesNotThrow = function(block, /*optional*/message) { _throws.apply(this, [false].concat(pSlice.call(arguments))); }; assert.ifError = function(err) { if (err) {throw err;}}; var objectKeys = Object.keys || function (obj) { var keys = []; for (var key in obj) { if (hasOwn.call(obj, key)) keys.push(key); } return keys; }; }, {"util/":15}], 14:[function(_dereq_,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } }, {}], 15:[function(_dereq_,module,exports){ (function (process,global){ var formatRegExp = /%[sdj%]/g; exports.format = function(f) { if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { objects.push(inspect(arguments[i])); } return objects.join(' '); } var i = 1; var args = arguments; var len = args.length; var str = String(f).replace(formatRegExp, function(x) { if (x === '%%') return '%'; if (i >= len) return x; switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } default: return x; } }); for (var x = args[i]; i < len; x = args[++i]) { if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { str += ' ' + inspect(x); } } return str; }; exports.deprecate = function(fn, msg) { if (isUndefined(global.process)) { return function() { return exports.deprecate(fn, msg).apply(this, arguments); }; } if (process.noDeprecation === true) { return fn; } var warned = false; function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); } return deprecated; }; var debugs = {}; var debugEnviron; exports.debuglog = function(set) { if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || ''; set = set.toUpperCase(); if (!debugs[set]) { if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { var pid = process.pid; debugs[set] = function() { var msg = exports.format.apply(exports, arguments); console.error('%s %d: %s', set, pid, msg); }; } else { debugs[set] = function() {}; } } return debugs[set]; }; function inspect(obj, opts) { var ctx = { seen: [], stylize: stylizeNoColor }; if (arguments.length >= 3) ctx.depth = arguments[2]; if (arguments.length >= 4) ctx.colors = arguments[3]; if (isBoolean(opts)) { ctx.showHidden = opts; } else if (opts) { exports._extend(ctx, opts); } if (isUndefined(ctx.showHidden)) ctx.showHidden = false; if (isUndefined(ctx.depth)) ctx.depth = 2; if (isUndefined(ctx.colors)) ctx.colors = false; if (isUndefined(ctx.customInspect)) ctx.customInspect = true; if (ctx.colors) ctx.stylize = stylizeWithColor; return formatValue(ctx, obj, ctx.depth); } exports.inspect = inspect; inspect.colors = { 'bold' : [1, 22], 'italic' : [3, 23], 'underline' : [4, 24], 'inverse' : [7, 27], 'white' : [37, 39], 'grey' : [90, 39], 'black' : [30, 39], 'blue' : [34, 39], 'cyan' : [36, 39], 'green' : [32, 39], 'magenta' : [35, 39], 'red' : [31, 39], 'yellow' : [33, 39] }; inspect.styles = { 'special': 'cyan', 'number': 'yellow', 'boolean': 'yellow', 'undefined': 'grey', 'null': 'bold', 'string': 'green', 'date': 'magenta', 'regexp': 'red' }; function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; if (style) { return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; } else { return str; } } function stylizeNoColor(str, styleType) { return str; } function arrayToHash(array) { var hash = {}; array.forEach(function(val, idx) { hash[val] = true; }); return hash; } function formatValue(ctx, value, recurseTimes) { if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports.inspect && !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes, ctx); if (!isString(ret)) { ret = formatValue(ctx, ret, recurseTimes); } return ret; } var primitive = formatPrimitive(ctx, value); if (primitive) { return primitive; } var keys = Object.keys(value); var visibleKeys = arrayToHash(keys); if (ctx.showHidden) { keys = Object.getOwnPropertyNames(value); } if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { return formatError(value); } if (keys.length === 0) { if (isFunction(value)) { var name = value.name ? ': ' + value.name : ''; return ctx.stylize('[Function' + name + ']', 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } if (isDate(value)) { return ctx.stylize(Date.prototype.toString.call(value), 'date'); } if (isError(value)) { return formatError(value); } } var base = '', array = false, braces = ['{', '}']; if (isArray(value)) { array = true; braces = ['[', ']']; } if (isFunction(value)) { var n = value.name ? ': ' + value.name : ''; base = ' [Function' + n + ']'; } if (isRegExp(value)) { base = ' ' + RegExp.prototype.toString.call(value); } if (isDate(value)) { base = ' ' + Date.prototype.toUTCString.call(value); } if (isError(value)) { base = ' ' + formatError(value); } if (keys.length === 0 && (!array || value.length == 0)) { return braces[0] + base + braces[1]; } if (recurseTimes < 0) { if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { return ctx.stylize('[Object]', 'special'); } } ctx.seen.push(value); var output; if (array) { output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { output = keys.map(function(key) { return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); }); } ctx.seen.pop(); return reduceToSingleString(output, base, braces); } function formatPrimitive(ctx, value) { if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); if (isString(value)) { var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; return ctx.stylize(simple, 'string'); } if (isNumber(value)) return ctx.stylize('' + value, 'number'); if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); if (isNull(value)) return ctx.stylize('null', 'null'); } function formatError(value) { return '[' + Error.prototype.toString.call(value) + ']'; } function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; for (var i = 0, l = value.length; i < l; ++i) { if (hasOwnProperty(value, String(i))) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); } else { output.push(''); } } keys.forEach(function(key) { if (!key.match(/^\d+$/)) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); } }); return output; } function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { var name, str, desc; desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; if (desc.get) { if (desc.set) { str = ctx.stylize('[Getter/Setter]', 'special'); } else { str = ctx.stylize('[Getter]', 'special'); } } else { if (desc.set) { str = ctx.stylize('[Setter]', 'special'); } } if (!hasOwnProperty(visibleKeys, key)) { name = '[' + key + ']'; } if (!str) { if (ctx.seen.indexOf(desc.value) < 0) { if (isNull(recurseTimes)) { str = formatValue(ctx, desc.value, null); } else { str = formatValue(ctx, desc.value, recurseTimes - 1); } if (str.indexOf('\n') > -1) { if (array) { str = str.split('\n').map(function(line) { return ' ' + line; }).join('\n').substr(2); } else { str = '\n' + str.split('\n').map(function(line) { return ' ' + line; }).join('\n'); } } } else { str = ctx.stylize('[Circular]', 'special'); } } if (isUndefined(name)) { if (array && key.match(/^\d+$/)) { return str; } name = JSON.stringify('' + key); if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); } else { name = name.replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); name = ctx.stylize(name, 'string'); } } return name + ': ' + str; } function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = output.reduce(function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0); if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } function isArray(ar) { return Array.isArray(ar); } exports.isArray = isArray; function isBoolean(arg) { return typeof arg === 'boolean'; } exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } exports.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } exports.isUndefined = isUndefined; function isRegExp(re) { return isObject(re) && objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; function isObject(arg) { return typeof arg === 'object' && arg !== null; } exports.isObject = isObject; function isDate(d) { return isObject(d) && objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; } exports.isPrimitive = isPrimitive; exports.isBuffer = _dereq_('./support/isBuffer'); function objectToString(o) { return Object.prototype.toString.call(o); } function pad(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); } var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; function timestamp() { var d = new Date(); var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); return [d.getDate(), months[d.getMonth()], time].join(' '); } exports.log = function() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); }; exports.inherits = _dereq_('inherits'); exports._extend = function(origin, add) { if (!add || !isObject(add)) return origin; var keys = Object.keys(add); var i = keys.length; while (i--) { origin[keys[i]] = add[keys[i]]; } return origin; }; function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } }).call(this,_dereq_("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) }, {"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}], 16:[function(_dereq_,module,exports){ function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } module.exports = EventEmitter; EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; EventEmitter.defaultMaxListeners = 10; EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; if (type === 'error') { if (!this._events.error || (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { throw TypeError('Uncaught, unspecified "error" event.'); } return false; } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; default: len = arguments.length; args = new Array(len - 1); for (i = 1; i < len; i++) args[i - 1] = arguments[i]; handler.apply(this, args); } } else if (isObject(handler)) { len = arguments.length; args = new Array(len - 1); for (i = 1; i < len; i++) args[i - 1] = arguments[i]; listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener); if (!this._events[type]) this._events[type] = listener; else if (isObject(this._events[type])) this._events[type].push(listener); else this._events[type] = [this._events[type], listener]; if (isObject(this._events[type]) && !this._events[type].warned) { var m; if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); console.trace(); } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type, listener); } else if (isObject(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else { while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.listenerCount = function(emitter, type) { var ret; if (!emitter._events || !emitter._events[type]) ret = 0; else if (isFunction(emitter._events[type])) ret = 1; else ret = emitter._events[type].length; return ret; }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } }, {}], 17:[function(_dereq_,module,exports){ if (typeof Object.create === 'function') { module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } }, {}], 18:[function(_dereq_,module,exports){ var process = module.exports = {}; process.nextTick = (function () { var canSetImmediate = typeof window !== 'undefined' && window.setImmediate; var canPost = typeof window !== 'undefined' && window.postMessage && window.addEventListener ; if (canSetImmediate) { return function (f) { return window.setImmediate(f) }; } if (canPost) { var queue = []; window.addEventListener('message', function (ev) { var source = ev.source; if ((source === window || source === null) && ev.data === 'process-tick') { ev.stopPropagation(); if (queue.length > 0) { var fn = queue.shift(); fn(); } } }, true); return function nextTick(fn) { queue.push(fn); window.postMessage('process-tick', '*'); }; } return function nextTick(fn) { setTimeout(fn, 0); }; })(); process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; function noop() {} process.on = noop; process.once = noop; process.off = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); } process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; }, {}], 19:[function(_dereq_,module,exports){ module.exports=_dereq_(14) }, {}], 20:[function(_dereq_,module,exports){ module.exports=_dereq_(15) }, {"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}]},{},[9]) (9) }); define("ace/mode/html_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/html/saxparser"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var Mirror = require("../worker/mirror").Mirror; var SAXParser = require("./html/saxparser").SAXParser; var errorTypes = { "expected-doctype-but-got-start-tag": "info", "expected-doctype-but-got-chars": "info", "non-html-root": "info", } var Worker = exports.Worker = function(sender) { Mirror.call(this, sender); this.setTimeout(400); this.context = null; }; oop.inherits(Worker, Mirror); (function() { this.setOptions = function(options) { this.context = options.context; }; this.onUpdate = function() { var value = this.doc.getValue(); if (!value) return; var parser = new SAXParser(); var errors = []; var noop = function(){}; parser.contentHandler = { startDocument: noop, endDocument: noop, startElement: noop, endElement: noop, characters: noop }; parser.errorHandler = { error: function(message, location, code) { errors.push({ row: location.line, column: location.column, text: message, type: errorTypes[code] || "error" }); } }; if (this.context) parser.parseFragment(value, this.context); else parser.parse(value); this.sender.emit("error", errors); }; }).call(Worker.prototype); }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-javascript.js0000644000076400007640000113565512554155240024725 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i= 65 && i <= 90 || // A-Z i === 95 || // _ i >= 97 && i <= 122; // a-z } var identifierPartTable = []; for (var i = 0; i < 128; i++) { identifierPartTable[i] = identifierStartTable[i] || // $, _, A-Z, a-z i >= 48 && i <= 57; // 0-9 } module.exports = { asciiIdentifierStartTable: identifierStartTable, asciiIdentifierPartTable: identifierPartTable }; }, {}], 2:[function(_dereq_,module,exports){ (function() { var root = this; var previousUnderscore = root._; var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; var push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; var nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeBind = FuncProto.bind, nativeCreate = Object.create; var Ctor = function(){}; var _ = function(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; }; if (typeof exports !== 'undefined') { if (typeof module !== 'undefined' && module.exports) { exports = module.exports = _; } exports._ = _; } else { root._ = _; } _.VERSION = '1.8.2'; var optimizeCb = function(func, context, argCount) { if (context === void 0) return func; switch (argCount == null ? 3 : argCount) { case 1: return function(value) { return func.call(context, value); }; case 2: return function(value, other) { return func.call(context, value, other); }; case 3: return function(value, index, collection) { return func.call(context, value, index, collection); }; case 4: return function(accumulator, value, index, collection) { return func.call(context, accumulator, value, index, collection); }; } return function() { return func.apply(context, arguments); }; }; var cb = function(value, context, argCount) { if (value == null) return _.identity; if (_.isFunction(value)) return optimizeCb(value, context, argCount); if (_.isObject(value)) return _.matcher(value); return _.property(value); }; _.iteratee = function(value, context) { return cb(value, context, Infinity); }; var createAssigner = function(keysFunc, undefinedOnly) { return function(obj) { var length = arguments.length; if (length < 2 || obj == null) return obj; for (var index = 1; index < length; index++) { var source = arguments[index], keys = keysFunc(source), l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; } } return obj; }; }; var baseCreate = function(prototype) { if (!_.isObject(prototype)) return {}; if (nativeCreate) return nativeCreate(prototype); Ctor.prototype = prototype; var result = new Ctor; Ctor.prototype = null; return result; }; var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; var isArrayLike = function(collection) { var length = collection && collection.length; return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; }; _.each = _.forEach = function(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; if (isArrayLike(obj)) { for (i = 0, length = obj.length; i < length; i++) { iteratee(obj[i], i, obj); } } else { var keys = _.keys(obj); for (i = 0, length = keys.length; i < length; i++) { iteratee(obj[keys[i]], keys[i], obj); } } return obj; }; _.map = _.collect = function(obj, iteratee, context) { iteratee = cb(iteratee, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length, results = Array(length); for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; results[index] = iteratee(obj[currentKey], currentKey, obj); } return results; }; function createReduce(dir) { function iterator(obj, iteratee, memo, keys, index, length) { for (; index >= 0 && index < length; index += dir) { var currentKey = keys ? keys[index] : index; memo = iteratee(memo, obj[currentKey], currentKey, obj); } return memo; } return function(obj, iteratee, memo, context) { iteratee = optimizeCb(iteratee, context, 4); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length, index = dir > 0 ? 0 : length - 1; if (arguments.length < 3) { memo = obj[keys ? keys[index] : index]; index += dir; } return iterator(obj, iteratee, memo, keys, index, length); }; } _.reduce = _.foldl = _.inject = createReduce(1); _.reduceRight = _.foldr = createReduce(-1); _.find = _.detect = function(obj, predicate, context) { var key; if (isArrayLike(obj)) { key = _.findIndex(obj, predicate, context); } else { key = _.findKey(obj, predicate, context); } if (key !== void 0 && key !== -1) return obj[key]; }; _.filter = _.select = function(obj, predicate, context) { var results = []; predicate = cb(predicate, context); _.each(obj, function(value, index, list) { if (predicate(value, index, list)) results.push(value); }); return results; }; _.reject = function(obj, predicate, context) { return _.filter(obj, _.negate(cb(predicate)), context); }; _.every = _.all = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; if (!predicate(obj[currentKey], currentKey, obj)) return false; } return true; }; _.some = _.any = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; if (predicate(obj[currentKey], currentKey, obj)) return true; } return false; }; _.contains = _.includes = _.include = function(obj, target, fromIndex) { if (!isArrayLike(obj)) obj = _.values(obj); return _.indexOf(obj, target, typeof fromIndex == 'number' && fromIndex) >= 0; }; _.invoke = function(obj, method) { var args = slice.call(arguments, 2); var isFunc = _.isFunction(method); return _.map(obj, function(value) { var func = isFunc ? method : value[method]; return func == null ? func : func.apply(value, args); }); }; _.pluck = function(obj, key) { return _.map(obj, _.property(key)); }; _.where = function(obj, attrs) { return _.filter(obj, _.matcher(attrs)); }; _.findWhere = function(obj, attrs) { return _.find(obj, _.matcher(attrs)); }; _.max = function(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null && obj != null) { obj = isArrayLike(obj) ? obj : _.values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value > result) { result = value; } } } else { iteratee = cb(iteratee, context); _.each(obj, function(value, index, list) { computed = iteratee(value, index, list); if (computed > lastComputed || computed === -Infinity && result === -Infinity) { result = value; lastComputed = computed; } }); } return result; }; _.min = function(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; if (iteratee == null && obj != null) { obj = isArrayLike(obj) ? obj : _.values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value < result) { result = value; } } } else { iteratee = cb(iteratee, context); _.each(obj, function(value, index, list) { computed = iteratee(value, index, list); if (computed < lastComputed || computed === Infinity && result === Infinity) { result = value; lastComputed = computed; } }); } return result; }; _.shuffle = function(obj) { var set = isArrayLike(obj) ? obj : _.values(obj); var length = set.length; var shuffled = Array(length); for (var index = 0, rand; index < length; index++) { rand = _.random(0, index); if (rand !== index) shuffled[index] = shuffled[rand]; shuffled[rand] = set[index]; } return shuffled; }; _.sample = function(obj, n, guard) { if (n == null || guard) { if (!isArrayLike(obj)) obj = _.values(obj); return obj[_.random(obj.length - 1)]; } return _.shuffle(obj).slice(0, Math.max(0, n)); }; _.sortBy = function(obj, iteratee, context) { iteratee = cb(iteratee, context); return _.pluck(_.map(obj, function(value, index, list) { return { value: value, index: index, criteria: iteratee(value, index, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index - right.index; }), 'value'); }; var group = function(behavior) { return function(obj, iteratee, context) { var result = {}; iteratee = cb(iteratee, context); _.each(obj, function(value, index) { var key = iteratee(value, index, obj); behavior(result, value, key); }); return result; }; }; _.groupBy = group(function(result, value, key) { if (_.has(result, key)) result[key].push(value); else result[key] = [value]; }); _.indexBy = group(function(result, value, key) { result[key] = value; }); _.countBy = group(function(result, value, key) { if (_.has(result, key)) result[key]++; else result[key] = 1; }); _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); if (isArrayLike(obj)) return _.map(obj, _.identity); return _.values(obj); }; _.size = function(obj) { if (obj == null) return 0; return isArrayLike(obj) ? obj.length : _.keys(obj).length; }; _.partition = function(obj, predicate, context) { predicate = cb(predicate, context); var pass = [], fail = []; _.each(obj, function(value, key, obj) { (predicate(value, key, obj) ? pass : fail).push(value); }); return [pass, fail]; }; _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; if (n == null || guard) return array[0]; return _.initial(array, array.length - n); }; _.initial = function(array, n, guard) { return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); }; _.last = function(array, n, guard) { if (array == null) return void 0; if (n == null || guard) return array[array.length - 1]; return _.rest(array, Math.max(0, array.length - n)); }; _.rest = _.tail = _.drop = function(array, n, guard) { return slice.call(array, n == null || guard ? 1 : n); }; _.compact = function(array) { return _.filter(array, _.identity); }; var flatten = function(input, shallow, strict, startIndex) { var output = [], idx = 0; for (var i = startIndex || 0, length = input && input.length; i < length; i++) { var value = input[i]; if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { if (!shallow) value = flatten(value, shallow, strict); var j = 0, len = value.length; output.length += len; while (j < len) { output[idx++] = value[j++]; } } else if (!strict) { output[idx++] = value; } } return output; }; _.flatten = function(array, shallow) { return flatten(array, shallow, false); }; _.without = function(array) { return _.difference(array, slice.call(arguments, 1)); }; _.uniq = _.unique = function(array, isSorted, iteratee, context) { if (array == null) return []; if (!_.isBoolean(isSorted)) { context = iteratee; iteratee = isSorted; isSorted = false; } if (iteratee != null) iteratee = cb(iteratee, context); var result = []; var seen = []; for (var i = 0, length = array.length; i < length; i++) { var value = array[i], computed = iteratee ? iteratee(value, i, array) : value; if (isSorted) { if (!i || seen !== computed) result.push(value); seen = computed; } else if (iteratee) { if (!_.contains(seen, computed)) { seen.push(computed); result.push(value); } } else if (!_.contains(result, value)) { result.push(value); } } return result; }; _.union = function() { return _.uniq(flatten(arguments, true, true)); }; _.intersection = function(array) { if (array == null) return []; var result = []; var argsLength = arguments.length; for (var i = 0, length = array.length; i < length; i++) { var item = array[i]; if (_.contains(result, item)) continue; for (var j = 1; j < argsLength; j++) { if (!_.contains(arguments[j], item)) break; } if (j === argsLength) result.push(item); } return result; }; _.difference = function(array) { var rest = flatten(arguments, true, true, 1); return _.filter(array, function(value){ return !_.contains(rest, value); }); }; _.zip = function() { return _.unzip(arguments); }; _.unzip = function(array) { var length = array && _.max(array, 'length').length || 0; var result = Array(length); for (var index = 0; index < length; index++) { result[index] = _.pluck(array, index); } return result; }; _.object = function(list, values) { var result = {}; for (var i = 0, length = list && list.length; i < length; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; }; _.indexOf = function(array, item, isSorted) { var i = 0, length = array && array.length; if (typeof isSorted == 'number') { i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted; } else if (isSorted && length) { i = _.sortedIndex(array, item); return array[i] === item ? i : -1; } if (item !== item) { return _.findIndex(slice.call(array, i), _.isNaN); } for (; i < length; i++) if (array[i] === item) return i; return -1; }; _.lastIndexOf = function(array, item, from) { var idx = array ? array.length : 0; if (typeof from == 'number') { idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1); } if (item !== item) { return _.findLastIndex(slice.call(array, 0, idx), _.isNaN); } while (--idx >= 0) if (array[idx] === item) return idx; return -1; }; function createIndexFinder(dir) { return function(array, predicate, context) { predicate = cb(predicate, context); var length = array != null && array.length; var index = dir > 0 ? 0 : length - 1; for (; index >= 0 && index < length; index += dir) { if (predicate(array[index], index, array)) return index; } return -1; }; } _.findIndex = createIndexFinder(1); _.findLastIndex = createIndexFinder(-1); _.sortedIndex = function(array, obj, iteratee, context) { iteratee = cb(iteratee, context, 1); var value = iteratee(obj); var low = 0, high = array.length; while (low < high) { var mid = Math.floor((low + high) / 2); if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; } return low; }; _.range = function(start, stop, step) { if (arguments.length <= 1) { stop = start || 0; start = 0; } step = step || 1; var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); for (var idx = 0; idx < length; idx++, start += step) { range[idx] = start; } return range; }; var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); var self = baseCreate(sourceFunc.prototype); var result = sourceFunc.apply(self, args); if (_.isObject(result)) return result; return self; }; _.bind = function(func, context) { if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); var args = slice.call(arguments, 2); var bound = function() { return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); }; return bound; }; _.partial = function(func) { var boundArgs = slice.call(arguments, 1); var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); for (var i = 0; i < length; i++) { args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; } while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; return bound; }; _.bindAll = function(obj) { var i, length = arguments.length, key; if (length <= 1) throw new Error('bindAll must be passed function names'); for (i = 1; i < length; i++) { key = arguments[i]; obj[key] = _.bind(obj[key], obj); } return obj; }; _.memoize = function(func, hasher) { var memoize = function(key) { var cache = memoize.cache; var address = '' + (hasher ? hasher.apply(this, arguments) : key); if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); return cache[address]; }; memoize.cache = {}; return memoize; }; _.delay = function(func, wait) { var args = slice.call(arguments, 2); return setTimeout(function(){ return func.apply(null, args); }, wait); }; _.defer = _.partial(_.delay, _, 1); _.throttle = function(func, wait, options) { var context, args, result; var timeout = null; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; return function() { var now = _.now(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; }; _.debounce = function(func, wait, immediate) { var timeout, args, context, timestamp, result; var later = function() { var last = _.now() - timestamp; if (last < wait && last >= 0) { timeout = setTimeout(later, wait - last); } else { timeout = null; if (!immediate) { result = func.apply(context, args); if (!timeout) context = args = null; } } }; return function() { context = this; args = arguments; timestamp = _.now(); var callNow = immediate && !timeout; if (!timeout) timeout = setTimeout(later, wait); if (callNow) { result = func.apply(context, args); context = args = null; } return result; }; }; _.wrap = function(func, wrapper) { return _.partial(wrapper, func); }; _.negate = function(predicate) { return function() { return !predicate.apply(this, arguments); }; }; _.compose = function() { var args = arguments; var start = args.length - 1; return function() { var i = start; var result = args[start].apply(this, arguments); while (i--) result = args[i].call(this, result); return result; }; }; _.after = function(times, func) { return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; _.before = function(times, func) { var memo; return function() { if (--times > 0) { memo = func.apply(this, arguments); } if (times <= 1) func = null; return memo; }; }; _.once = _.partial(_.before, 2); var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; function collectNonEnumProps(obj, keys) { var nonEnumIdx = nonEnumerableProps.length; var constructor = obj.constructor; var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; var prop = 'constructor'; if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); while (nonEnumIdx--) { prop = nonEnumerableProps[nonEnumIdx]; if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { keys.push(prop); } } } _.keys = function(obj) { if (!_.isObject(obj)) return []; if (nativeKeys) return nativeKeys(obj); var keys = []; for (var key in obj) if (_.has(obj, key)) keys.push(key); if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; _.allKeys = function(obj) { if (!_.isObject(obj)) return []; var keys = []; for (var key in obj) keys.push(key); if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; _.values = function(obj) { var keys = _.keys(obj); var length = keys.length; var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[keys[i]]; } return values; }; _.mapObject = function(obj, iteratee, context) { iteratee = cb(iteratee, context); var keys = _.keys(obj), length = keys.length, results = {}, currentKey; for (var index = 0; index < length; index++) { currentKey = keys[index]; results[currentKey] = iteratee(obj[currentKey], currentKey, obj); } return results; }; _.pairs = function(obj) { var keys = _.keys(obj); var length = keys.length; var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [keys[i], obj[keys[i]]]; } return pairs; }; _.invert = function(obj) { var result = {}; var keys = _.keys(obj); for (var i = 0, length = keys.length; i < length; i++) { result[obj[keys[i]]] = keys[i]; } return result; }; _.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); }; _.extend = createAssigner(_.allKeys); _.extendOwn = _.assign = createAssigner(_.keys); _.findKey = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = _.keys(obj), key; for (var i = 0, length = keys.length; i < length; i++) { key = keys[i]; if (predicate(obj[key], key, obj)) return key; } }; _.pick = function(object, oiteratee, context) { var result = {}, obj = object, iteratee, keys; if (obj == null) return result; if (_.isFunction(oiteratee)) { keys = _.allKeys(obj); iteratee = optimizeCb(oiteratee, context); } else { keys = flatten(arguments, false, false, 1); iteratee = function(value, key, obj) { return key in obj; }; obj = Object(obj); } for (var i = 0, length = keys.length; i < length; i++) { var key = keys[i]; var value = obj[key]; if (iteratee(value, key, obj)) result[key] = value; } return result; }; _.omit = function(obj, iteratee, context) { if (_.isFunction(iteratee)) { iteratee = _.negate(iteratee); } else { var keys = _.map(flatten(arguments, false, false, 1), String); iteratee = function(value, key) { return !_.contains(keys, key); }; } return _.pick(obj, iteratee, context); }; _.defaults = createAssigner(_.allKeys, true); _.clone = function(obj) { if (!_.isObject(obj)) return obj; return _.isArray(obj) ? obj.slice() : _.extend({}, obj); }; _.tap = function(obj, interceptor) { interceptor(obj); return obj; }; _.isMatch = function(object, attrs) { var keys = _.keys(attrs), length = keys.length; if (object == null) return !length; var obj = Object(object); for (var i = 0; i < length; i++) { var key = keys[i]; if (attrs[key] !== obj[key] || !(key in obj)) return false; } return true; }; var eq = function(a, b, aStack, bStack) { if (a === b) return a !== 0 || 1 / a === 1 / b; if (a == null || b == null) return a === b; if (a instanceof _) a = a._wrapped; if (b instanceof _) b = b._wrapped; var className = toString.call(a); if (className !== toString.call(b)) return false; switch (className) { case '[object RegExp]': case '[object String]': return '' + a === '' + b; case '[object Number]': if (+a !== +a) return +b !== +b; return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': return +a === +b; } var areArrays = className === '[object Array]'; if (!areArrays) { if (typeof a != 'object' || typeof b != 'object') return false; var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } } aStack = aStack || []; bStack = bStack || []; var length = aStack.length; while (length--) { if (aStack[length] === a) return bStack[length] === b; } aStack.push(a); bStack.push(b); if (areArrays) { length = a.length; if (length !== b.length) return false; while (length--) { if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { var keys = _.keys(a), key; length = keys.length; if (_.keys(b).length !== length) return false; while (length--) { key = keys[length]; if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } aStack.pop(); bStack.pop(); return true; }; _.isEqual = function(a, b) { return eq(a, b); }; _.isEmpty = function(obj) { if (obj == null) return true; if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; return _.keys(obj).length === 0; }; _.isElement = function(obj) { return !!(obj && obj.nodeType === 1); }; _.isArray = nativeIsArray || function(obj) { return toString.call(obj) === '[object Array]'; }; _.isObject = function(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; }; _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { _['is' + name] = function(obj) { return toString.call(obj) === '[object ' + name + ']'; }; }); if (!_.isArguments(arguments)) { _.isArguments = function(obj) { return _.has(obj, 'callee'); }; } if (typeof /./ != 'function' && typeof Int8Array != 'object') { _.isFunction = function(obj) { return typeof obj == 'function' || false; }; } _.isFinite = function(obj) { return isFinite(obj) && !isNaN(parseFloat(obj)); }; _.isNaN = function(obj) { return _.isNumber(obj) && obj !== +obj; }; _.isBoolean = function(obj) { return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; }; _.isNull = function(obj) { return obj === null; }; _.isUndefined = function(obj) { return obj === void 0; }; _.has = function(obj, key) { return obj != null && hasOwnProperty.call(obj, key); }; _.noConflict = function() { root._ = previousUnderscore; return this; }; _.identity = function(value) { return value; }; _.constant = function(value) { return function() { return value; }; }; _.noop = function(){}; _.property = function(key) { return function(obj) { return obj == null ? void 0 : obj[key]; }; }; _.propertyOf = function(obj) { return obj == null ? function(){} : function(key) { return obj[key]; }; }; _.matcher = _.matches = function(attrs) { attrs = _.extendOwn({}, attrs); return function(obj) { return _.isMatch(obj, attrs); }; }; _.times = function(n, iteratee, context) { var accum = Array(Math.max(0, n)); iteratee = optimizeCb(iteratee, context, 1); for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; }; _.random = function(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); }; _.now = Date.now || function() { return new Date().getTime(); }; var escapeMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' }; var unescapeMap = _.invert(escapeMap); var createEscaper = function(map) { var escaper = function(match) { return map[match]; }; var source = '(?:' + _.keys(map).join('|') + ')'; var testRegexp = RegExp(source); var replaceRegexp = RegExp(source, 'g'); return function(string) { string = string == null ? '' : '' + string; return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; }; }; _.escape = createEscaper(escapeMap); _.unescape = createEscaper(unescapeMap); _.result = function(object, property, fallback) { var value = object == null ? void 0 : object[property]; if (value === void 0) { value = fallback; } return _.isFunction(value) ? value.call(object) : value; }; var idCounter = 0; _.uniqueId = function(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; }; _.templateSettings = { evaluate : /<%([\s\S]+?)%>/g, interpolate : /<%=([\s\S]+?)%>/g, escape : /<%-([\s\S]+?)%>/g }; var noMatch = /(.)^/; var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\u2028': 'u2028', '\u2029': 'u2029' }; var escaper = /\\|'|\r|\n|\u2028|\u2029/g; var escapeChar = function(match) { return '\\' + escapes[match]; }; _.template = function(text, settings, oldSettings) { if (!settings && oldSettings) settings = oldSettings; settings = _.defaults({}, settings, _.templateSettings); var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escaper, escapeChar); index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } return match; }); source += "';\n"; if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; try { var render = new Function(settings.variable || 'obj', '_', source); } catch (e) { e.source = source; throw e; } var template = function(data) { return render.call(this, data, _); }; var argument = settings.variable || 'obj'; template.source = 'function(' + argument + '){\n' + source + '}'; return template; }; _.chain = function(obj) { var instance = _(obj); instance._chain = true; return instance; }; var result = function(instance, obj) { return instance._chain ? _(obj).chain() : obj; }; _.mixin = function(obj) { _.each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return result(this, func.apply(_, args)); }; }); }; _.mixin(_); _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { var obj = this._wrapped; method.apply(obj, arguments); if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; return result(this, obj); }; }); _.each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { return result(this, method.apply(this._wrapped, arguments)); }; }); _.prototype.value = function() { return this._wrapped; }; _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; _.prototype.toString = function() { return '' + this._wrapped; }; if (typeof define === 'function' && define.amd) { define('underscore', [], function() { return _; }); } }.call(this)); }, {}], 3:[function(_dereq_,module,exports){ var _ = _dereq_("underscore"); var events = _dereq_("events"); var vars = _dereq_("./vars.js"); var messages = _dereq_("./messages.js"); var Lexer = _dereq_("./lex.js").Lexer; var reg = _dereq_("./reg.js"); var state = _dereq_("./state.js").state; var style = _dereq_("./style.js"); var options = _dereq_("./options.js"); var JSHINT = (function() { "use strict"; var api, // Extension API bang = { "<" : true, "<=" : true, "==" : true, "===": true, "!==": true, "!=" : true, ">" : true, ">=" : true, "+" : true, "-" : true, "*" : true, "/" : true, "%" : true }, declared, // Globals that were declared using /*global ... */ syntax. exported, // Variables that are used outside of the current file. functionicity = [ "closure", "exception", "global", "label", "outer", "unused", "var" ], funct, // The current function functions, // All of the functions global, // The global scope implied, // Implied globals inblock, indent, lookahead, lex, member, membersOnly, predefined, // Global variables defined by option scope, // The current scope stack, unuseds, urls, extraModules = [], emitter = new events.EventEmitter(); function checkOption(name, t) { name = name.trim(); if (/^[+-]W\d{3}$/g.test(name)) { return true; } if (options.validNames.indexOf(name) === -1) { if (t.type !== "jslint" && !_.has(options.removed, name)) { error("E001", t, name); return false; } } return true; } function isString(obj) { return Object.prototype.toString.call(obj) === "[object String]"; } function isIdentifier(tkn, value) { if (!tkn) return false; if (!tkn.identifier || tkn.value !== value) return false; return true; } function isReserved(token) { if (!token.reserved) { return false; } var meta = token.meta; if (meta && meta.isFutureReservedWord && state.option.inES5()) { if (!meta.es5) { return false; } if (meta.strictOnly) { if (!state.option.strict && !state.directive["use strict"]) { return false; } } if (token.isProperty) { return false; } } return true; } function supplant(str, data) { return str.replace(/\{([^{}]*)\}/g, function(a, b) { var r = data[b]; return typeof r === "string" || typeof r === "number" ? r : a; }); } function combine(dest, src) { Object.keys(src).forEach(function(name) { if (_.has(JSHINT.blacklist, name)) return; dest[name] = src[name]; }); } function processenforceall() { if (state.option.enforceall) { for (var enforceopt in options.bool.enforcing) { if (state.option[enforceopt] === undefined) { state.option[enforceopt] = true; } } for (var relaxopt in options.bool.relaxing) { if (state.option[relaxopt] === undefined) { state.option[relaxopt] = false; } } } } function assume() { processenforceall(); if (!state.option.es3) { combine(predefined, vars.ecmaIdentifiers[5]); } if (state.option.esnext) { combine(predefined, vars.ecmaIdentifiers[6]); } if (state.option.couch) { combine(predefined, vars.couch); } if (state.option.qunit) { combine(predefined, vars.qunit); } if (state.option.rhino) { combine(predefined, vars.rhino); } if (state.option.shelljs) { combine(predefined, vars.shelljs); combine(predefined, vars.node); } if (state.option.typed) { combine(predefined, vars.typed); } if (state.option.phantom) { combine(predefined, vars.phantom); } if (state.option.prototypejs) { combine(predefined, vars.prototypejs); } if (state.option.node) { combine(predefined, vars.node); combine(predefined, vars.typed); } if (state.option.devel) { combine(predefined, vars.devel); } if (state.option.dojo) { combine(predefined, vars.dojo); } if (state.option.browser) { combine(predefined, vars.browser); combine(predefined, vars.typed); } if (state.option.browserify) { combine(predefined, vars.browser); combine(predefined, vars.typed); combine(predefined, vars.browserify); } if (state.option.nonstandard) { combine(predefined, vars.nonstandard); } if (state.option.jasmine) { combine(predefined, vars.jasmine); } if (state.option.jquery) { combine(predefined, vars.jquery); } if (state.option.mootools) { combine(predefined, vars.mootools); } if (state.option.worker) { combine(predefined, vars.worker); } if (state.option.wsh) { combine(predefined, vars.wsh); } if (state.option.globalstrict && state.option.strict !== false) { state.option.strict = true; } if (state.option.yui) { combine(predefined, vars.yui); } if (state.option.mocha) { combine(predefined, vars.mocha); } state.option.inMoz = function(strict) { return state.option.moz; }; state.option.inESNext = function(strict) { return state.option.moz || state.option.esnext; }; state.option.inES5 = function(/* strict */) { return !state.option.es3; }; state.option.inES3 = function(strict) { if (strict) { return !state.option.moz && !state.option.esnext && state.option.es3; } return state.option.es3; }; } function quit(code, line, chr) { var percentage = Math.floor((line / state.lines.length) * 100); var message = messages.errors[code].desc; throw { name: "JSHintError", line: line, character: chr, message: message + " (" + percentage + "% scanned).", raw: message, code: code }; } function isundef(scope, code, token, a) { if (!state.ignored[code] && state.option.undef !== false) { JSHINT.undefs.push([scope, code, token, a]); } } function removeIgnoredMessages() { var ignored = state.ignoredLines; if (_.isEmpty(ignored)) return; JSHINT.errors = _.reject(JSHINT.errors, function(err) { return ignored[err.line] }); } function warning(code, t, a, b, c, d) { var ch, l, w, msg; if (/^W\d{3}$/.test(code)) { if (state.ignored[code]) return; msg = messages.warnings[code]; } else if (/E\d{3}/.test(code)) { msg = messages.errors[code]; } else if (/I\d{3}/.test(code)) { msg = messages.info[code]; } t = t || state.tokens.next; if (t.id === "(end)") { // `~ t = state.tokens.curr; } l = t.line || 0; ch = t.from || 0; w = { id: "(error)", raw: msg.desc, code: msg.code, evidence: state.lines[l - 1] || "", line: l, character: ch, scope: JSHINT.scope, a: a, b: b, c: c, d: d }; w.reason = supplant(msg.desc, w); JSHINT.errors.push(w); removeIgnoredMessages(); if (JSHINT.errors.length >= state.option.maxerr) quit("E043", l, ch); return w; } function warningAt(m, l, ch, a, b, c, d) { return warning(m, { line: l, from: ch }, a, b, c, d); } function error(m, t, a, b, c, d) { warning(m, t, a, b, c, d); } function errorAt(m, l, ch, a, b, c, d) { return error(m, { line: l, from: ch }, a, b, c, d); } function addInternalSrc(elem, src) { var i; i = { id: "(internal)", elem: elem, value: src }; JSHINT.internals.push(i); return i; } function addlabel(name, opts) { opts = opts || {}; var type = opts.type; var token = opts.token; var islet = opts.islet; if (type === "exception") { if (_.has(funct["(context)"], name)) { if (funct[name] !== true && !state.option.node) { warning("W002", state.tokens.next, name); } } } if (_.has(funct, name) && !funct["(global)"]) { if (funct[name] === true) { if (state.option.latedef) { if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) || !_.contains([funct[name], type], "unction")) { warning("W003", state.tokens.next, name); } } } else { if ((!state.option.shadow || _.contains([ "inner", "outer" ], state.option.shadow)) && type !== "exception" || funct["(blockscope)"].getlabel(name)) { warning("W004", state.tokens.next, name); } } } if (funct["(context)"] && _.has(funct["(context)"], name) && type !== "function") { if (state.option.shadow === "outer") { warning("W123", state.tokens.next, name); } } if (islet) { funct["(blockscope)"].current.add(name, type, state.tokens.curr); if (funct["(blockscope)"].atTop() && exported[name]) { state.tokens.curr.exported = true; } } else { funct["(blockscope)"].shadow(name); funct[name] = type; if (token) { funct["(tokens)"][name] = token; } setprop(funct, name, { unused: opts.unused || false }); if (funct["(global)"]) { global[name] = funct; if (_.has(implied, name)) { if (state.option.latedef) { if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) || !_.contains([funct[name], type], "unction")) { warning("W003", state.tokens.next, name); } } delete implied[name]; } } else { scope[name] = funct; } } } function doOption() { var nt = state.tokens.next; var body = nt.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g) || []; var predef = {}; if (nt.type === "globals") { body.forEach(function(g) { g = g.split(":"); var key = (g[0] || "").trim(); var val = (g[1] || "").trim(); if (key.charAt(0) === "-") { key = key.slice(1); val = false; JSHINT.blacklist[key] = key; delete predefined[key]; } else { predef[key] = (val === "true"); } }); combine(predefined, predef); for (var key in predef) { if (_.has(predef, key)) { declared[key] = nt; } } } if (nt.type === "exported") { body.forEach(function(e) { exported[e] = true; }); } if (nt.type === "members") { membersOnly = membersOnly || {}; body.forEach(function(m) { var ch1 = m.charAt(0); var ch2 = m.charAt(m.length - 1); if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) { m = m .substr(1, m.length - 2) .replace("\\\"", "\""); } membersOnly[m] = false; }); } var numvals = [ "maxstatements", "maxparams", "maxdepth", "maxcomplexity", "maxerr", "maxlen", "indent" ]; if (nt.type === "jshint" || nt.type === "jslint") { body.forEach(function(g) { g = g.split(":"); var key = (g[0] || "").trim(); var val = (g[1] || "").trim(); if (!checkOption(key, nt)) { return; } if (numvals.indexOf(key) >= 0) { if (val !== "false") { val = +val; if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) { error("E032", nt, g[1].trim()); return; } state.option[key] = val; } else { state.option[key] = key === "indent" ? 4 : false; } return; } if (key === "validthis") { if (funct["(global)"]) return void error("E009"); if (val !== "true" && val !== "false") return void error("E002", nt); state.option.validthis = (val === "true"); return; } if (key === "quotmark") { switch (val) { case "true": case "false": state.option.quotmark = (val === "true"); break; case "double": case "single": state.option.quotmark = val; break; default: error("E002", nt); } return; } if (key === "shadow") { switch (val) { case "true": state.option.shadow = true; break; case "outer": state.option.shadow = "outer"; break; case "false": case "inner": state.option.shadow = "inner"; break; default: error("E002", nt); } return; } if (key === "unused") { switch (val) { case "true": state.option.unused = true; break; case "false": state.option.unused = false; break; case "vars": case "strict": state.option.unused = val; break; default: error("E002", nt); } return; } if (key === "latedef") { switch (val) { case "true": state.option.latedef = true; break; case "false": state.option.latedef = false; break; case "nofunc": state.option.latedef = "nofunc"; break; default: error("E002", nt); } return; } if (key === "ignore") { switch (val) { case "start": state.ignoreLinterErrors = true; break; case "end": state.ignoreLinterErrors = false; break; case "line": state.ignoredLines[nt.line] = true; removeIgnoredMessages(); break; default: error("E002", nt); } return; } var match = /^([+-])(W\d{3})$/g.exec(key); if (match) { state.ignored[match[2]] = (match[1] === "-"); return; } var tn; if (val === "true" || val === "false") { if (nt.type === "jslint") { tn = options.renamed[key] || key; state.option[tn] = (val === "true"); if (options.inverted[tn] !== undefined) { state.option[tn] = !state.option[tn]; } } else { state.option[key] = (val === "true"); } if (key === "newcap") { state.option["(explicitNewcap)"] = true; } return; } error("E002", nt); }); assume(); } } function peek(p) { var i = p || 0, j = 0, t; while (j <= i) { t = lookahead[j]; if (!t) { t = lookahead[j] = lex.token(); } j += 1; } return t; } function peekIgnoreEOL() { var i = 0; var t; do { t = peek(i++); } while (t.id === "(endline)"); return t; } function advance(id, t) { switch (state.tokens.curr.id) { case "(number)": if (state.tokens.next.id === ".") { warning("W005", state.tokens.curr); } break; case "-": if (state.tokens.next.id === "-" || state.tokens.next.id === "--") { warning("W006"); } break; case "+": if (state.tokens.next.id === "+" || state.tokens.next.id === "++") { warning("W007"); } break; } if (id && state.tokens.next.id !== id) { if (t) { if (state.tokens.next.id === "(end)") { error("E019", t, t.id); } else { error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value); } } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) { warning("W116", state.tokens.next, id, state.tokens.next.value); } } state.tokens.prev = state.tokens.curr; state.tokens.curr = state.tokens.next; for (;;) { state.tokens.next = lookahead.shift() || lex.token(); if (!state.tokens.next) { // No more tokens left, give up quit("E041", state.tokens.curr.line); } if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") { return; } if (state.tokens.next.check) { state.tokens.next.check(); } if (state.tokens.next.isSpecial) { doOption(); } else { if (state.tokens.next.id !== "(endline)") { break; } } } } function isInfix(token) { return token.infix || (!token.identifier && !token.template && !!token.led); } function isEndOfExpr() { var curr = state.tokens.curr; var next = state.tokens.next; if (next.id === ";" || next.id === "}" || next.id === ":") { return true; } if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) { return curr.line !== startLine(next); } return false; } function isBeginOfExpr(prev) { return !prev.left && prev.arity !== "unary"; } function expression(rbp, initial) { var left, isArray = false, isObject = false, isLetExpr = false; state.nameStack.push(); if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") { if (!state.option.inMoz(true)) { warning("W118", state.tokens.next, "let expressions"); } isLetExpr = true; funct["(blockscope)"].stack(); advance("let"); advance("("); state.tokens.prev.fud(); advance(")"); } if (state.tokens.next.id === "(end)") error("E006", state.tokens.curr); var isDangerous = state.option.asi && state.tokens.prev.line !== startLine(state.tokens.curr) && _.contains(["]", ")"], state.tokens.prev.id) && _.contains(["[", "("], state.tokens.curr.id); if (isDangerous) warning("W014", state.tokens.curr, state.tokens.curr.id); advance(); if (initial) { funct["(verb)"] = state.tokens.curr.value; state.tokens.curr.beginsStmt = true; } if (initial === true && state.tokens.curr.fud) { left = state.tokens.curr.fud(); } else { if (state.tokens.curr.nud) { left = state.tokens.curr.nud(); } else { error("E030", state.tokens.curr, state.tokens.curr.id); } while ((rbp < state.tokens.next.lbp || state.tokens.next.type === "(template)") && !isEndOfExpr()) { isArray = state.tokens.curr.value === "Array"; isObject = state.tokens.curr.value === "Object"; if (left && (left.value || (left.first && left.first.value))) { if (left.value !== "new" || (left.first && left.first.value && left.first.value === ".")) { isArray = false; if (left.value !== state.tokens.curr.value) { isObject = false; } } } advance(); if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { warning("W009", state.tokens.curr); } if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { warning("W010", state.tokens.curr); } if (left && state.tokens.curr.led) { left = state.tokens.curr.led(left); } else { error("E033", state.tokens.curr, state.tokens.curr.id); } } } if (isLetExpr) { funct["(blockscope)"].unstack(); } state.nameStack.pop(); return left; } function startLine(token) { return token.startLine || token.line; } function nobreaknonadjacent(left, right) { left = left || state.tokens.curr; right = right || state.tokens.next; if (!state.option.laxbreak && left.line !== startLine(right)) { warning("W014", right, right.value); } } function nolinebreak(t) { t = t || state.tokens.curr; if (t.line !== startLine(state.tokens.next)) { warning("E022", t, t.value); } } function nobreakcomma(left, right) { if (left.line !== startLine(right)) { if (!state.option.laxcomma) { if (comma.first) { warning("I001"); comma.first = false; } warning("W014", left, right.value); } } } function comma(opts) { opts = opts || {}; if (!opts.peek) { nobreakcomma(state.tokens.curr, state.tokens.next); advance(","); } else { nobreakcomma(state.tokens.prev, state.tokens.curr); } if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) { switch (state.tokens.next.value) { case "break": case "case": case "catch": case "continue": case "default": case "do": case "else": case "finally": case "for": case "if": case "in": case "instanceof": case "return": case "switch": case "throw": case "try": case "var": case "let": case "while": case "with": error("E024", state.tokens.next, state.tokens.next.value); return false; } } if (state.tokens.next.type === "(punctuator)") { switch (state.tokens.next.value) { case "}": case "]": case ",": if (opts.allowTrailing) { return true; } case ")": error("E024", state.tokens.next, state.tokens.next.value); return false; } } return true; } function symbol(s, p) { var x = state.syntax[s]; if (!x || typeof x !== "object") { state.syntax[s] = x = { id: s, lbp: p, value: s }; } return x; } function delim(s) { var x = symbol(s, 0); x.delim = true; return x; } function stmt(s, f) { var x = delim(s); x.identifier = x.reserved = true; x.fud = f; return x; } function blockstmt(s, f) { var x = stmt(s, f); x.block = true; return x; } function reserveName(x) { var c = x.id.charAt(0); if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) { x.identifier = x.reserved = true; } return x; } function prefix(s, f) { var x = symbol(s, 150); reserveName(x); x.nud = (typeof f === "function") ? f : function() { this.arity = "unary"; this.right = expression(150); if (this.id === "++" || this.id === "--") { if (state.option.plusplus) { warning("W016", this, this.id); } else if (this.right && (!this.right.identifier || isReserved(this.right)) && this.right.id !== "." && this.right.id !== "[") { warning("W017", this); } } return this; }; return x; } function type(s, f) { var x = delim(s); x.type = s; x.nud = f; return x; } function reserve(name, func) { var x = type(name, func); x.identifier = true; x.reserved = true; return x; } function FutureReservedWord(name, meta) { var x = type(name, (meta && meta.nud) || function() { return this; }); meta = meta || {}; meta.isFutureReservedWord = true; x.value = name; x.identifier = true; x.reserved = true; x.meta = meta; return x; } function reservevar(s, v) { return reserve(s, function() { if (typeof v === "function") { v(this); } return this; }); } function infix(s, f, p, w) { var x = symbol(s, p); reserveName(x); x.infix = true; x.led = function(left) { if (!w) { nobreaknonadjacent(state.tokens.prev, state.tokens.curr); } if (s === "in" && left.id === "!") { warning("W018", left, "!"); } if (typeof f === "function") { return f(left, this); } else { this.left = left; this.right = expression(p); return this; } }; return x; } function application(s) { var x = symbol(s, 42); x.led = function(left) { nobreaknonadjacent(state.tokens.prev, state.tokens.curr); this.left = left; this.right = doFunction({ type: "arrow", loneArg: left }); return this; }; return x; } function relation(s, f) { var x = symbol(s, 100); x.led = function(left) { nobreaknonadjacent(state.tokens.prev, state.tokens.curr); var right = expression(100); if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) { warning("W019", this); } else if (f) { f.apply(this, [left, right]); } if (!left || !right) { quit("E041", state.tokens.curr.line); } if (left.id === "!") { warning("W018", left, "!"); } if (right.id === "!") { warning("W018", right, "!"); } this.left = left; this.right = right; return this; }; return x; } function isPoorRelation(node) { return node && ((node.type === "(number)" && +node.value === 0) || (node.type === "(string)" && node.value === "") || (node.type === "null" && !state.option.eqnull) || node.type === "true" || node.type === "false" || node.type === "undefined"); } function isTypoTypeof(left, right) { if (state.option.notypeof) return false; if (!left || !right) return false; var values = [ "undefined", "object", "boolean", "number", "string", "function", "xml", "object", "unknown", "symbol" ]; if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)") return !_.contains(values, left.value); return false; } function isGlobalEval(left, state, funct) { var isGlobal = false; if (left.type === "this" && funct["(context)"] === null) { isGlobal = true; } else if (left.type === "(identifier)") { if (state.option.node && left.value === "global") { isGlobal = true; } else if (state.option.browser && (left.value === "window" || left.value === "document")) { isGlobal = true; } } return isGlobal; } function findNativePrototype(left) { var natives = [ "Array", "ArrayBuffer", "Boolean", "Collator", "DataView", "Date", "DateTimeFormat", "Error", "EvalError", "Float32Array", "Float64Array", "Function", "Infinity", "Intl", "Int16Array", "Int32Array", "Int8Array", "Iterator", "Number", "NumberFormat", "Object", "RangeError", "ReferenceError", "RegExp", "StopIteration", "String", "SyntaxError", "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", "URIError" ]; function walkPrototype(obj) { if (typeof obj !== "object") return; return obj.right === "prototype" ? obj : walkPrototype(obj.left); } function walkNative(obj) { while (!obj.identifier && typeof obj.left === "object") obj = obj.left; if (obj.identifier && natives.indexOf(obj.value) >= 0) return obj.value; } var prototype = walkPrototype(left); if (prototype) return walkNative(prototype); } function assignop(s, f, p) { var x = infix(s, typeof f === "function" ? f : function(left, that) { that.left = left; if (left) { if (state.option.freeze) { var nativeObject = findNativePrototype(left); if (nativeObject) warning("W121", left, nativeObject); } if (predefined[left.value] === false && scope[left.value]["(global)"] === true) { warning("W020", left); } else if (left["function"]) { warning("W021", left, left.value); } if (funct[left.value] === "const") { error("E013", left, left.value); } if (left.id === ".") { if (!left.left) { warning("E031", that); } else if (left.left.value === "arguments" && !state.directive["use strict"]) { warning("E031", that); } state.nameStack.set(state.tokens.prev); that.right = expression(10); return that; } else if (left.id === "[") { if (state.tokens.curr.left.first) { state.tokens.curr.left.first.forEach(function(t) { if (t && funct[t.value] === "const") { error("E013", t, t.value); } }); } else if (!left.left) { warning("E031", that); } else if (left.left.value === "arguments" && !state.directive["use strict"]) { warning("E031", that); } state.nameStack.set(left.right); that.right = expression(10); return that; } else if (left.identifier && !isReserved(left)) { if (funct[left.value] === "exception") { warning("W022", left); } state.nameStack.set(left); that.right = expression(10); return that; } if (left === state.syntax["function"]) { warning("W023", state.tokens.curr); } } error("E031", that); }, p); x.exps = true; x.assign = true; return x; } function bitwise(s, f, p) { var x = symbol(s, p); reserveName(x); x.led = (typeof f === "function") ? f : function(left) { if (state.option.bitwise) { warning("W016", this, this.id); } this.left = left; this.right = expression(p); return this; }; return x; } function bitwiseassignop(s) { return assignop(s, function(left, that) { if (state.option.bitwise) { warning("W016", that, that.id); } if (left) { if (left.id === "." || left.id === "[" || (left.identifier && !isReserved(left))) { expression(10); return that; } if (left === state.syntax["function"]) { warning("W023", state.tokens.curr); } return that; } error("E031", that); }, 20); } function suffix(s) { var x = symbol(s, 150); x.led = function(left) { if (state.option.plusplus) { warning("W016", this, this.id); } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") { warning("W017", this); } this.left = left; return this; }; return x; } function optionalidentifier(fnparam, prop, preserve) { if (!state.tokens.next.identifier) { return; } if (!preserve) { advance(); } var curr = state.tokens.curr; var val = state.tokens.curr.value; if (!isReserved(curr)) { return val; } if (prop) { if (state.option.inES5()) { return val; } } if (fnparam && val === "undefined") { return val; } warning("W024", state.tokens.curr, state.tokens.curr.id); return val; } function identifier(fnparam, prop) { var i = optionalidentifier(fnparam, prop, false); if (i) { return i; } if (state.tokens.next.value === "...") { if (!state.option.esnext) { warning("W119", state.tokens.next, "spread/rest operator"); } advance(); if (checkPunctuators(state.tokens.next, ["..."])) { warning("E024", state.tokens.next, "..."); while (checkPunctuators(state.tokens.next, ["..."])) { advance(); } } if (!state.tokens.next.identifier) { warning("E024", state.tokens.curr, "..."); return; } return identifier(fnparam, prop); } else { error("E030", state.tokens.next, state.tokens.next.value); if (state.tokens.next.id !== ";") { advance(); } } } function reachable(controlToken) { var i = 0, t; if (state.tokens.next.id !== ";" || controlToken.inBracelessBlock) { return; } for (;;) { do { t = peek(i); i += 1; } while (t.id != "(end)" && t.id === "(comment)"); if (t.reach) { return; } if (t.id !== "(endline)") { if (t.id === "function") { if (state.option.latedef === true) { warning("W026", t); } break; } warning("W027", t, t.value, controlToken.value); break; } } } function parseFinalSemicolon() { if (state.tokens.next.id !== ";") { if (state.tokens.next.isUnclosed) return advance(); if (!state.option.asi) { if (!state.option.lastsemic || state.tokens.next.id !== "}" || startLine(state.tokens.next) !== state.tokens.curr.line) { warningAt("W033", state.tokens.curr.line, state.tokens.curr.character); } } } else { advance(";"); } } function statement() { var i = indent, r, s = scope, t = state.tokens.next; if (t.id === ";") { advance(";"); return; } var res = isReserved(t); if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") { warning("W024", t, t.id); res = false; } if (t.value === "module" && t.type === "(identifier)") { if (peek().type === "(identifier)") { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "module"); } advance("module"); var name = identifier(); addlabel(name, { type: "unused", token: state.tokens.curr }); advance("from"); advance("(string)"); parseFinalSemicolon(); return; } } if (t.identifier && !res && peek().id === ":") { advance(); advance(":"); scope = Object.create(s); addlabel(t.value, { type: "label" }); if (!state.tokens.next.labelled && state.tokens.next.value !== "{") { warning("W028", state.tokens.next, t.value, state.tokens.next.value); } state.tokens.next.label = t.value; t = state.tokens.next; } if (t.id === "{") { var iscase = (funct["(verb)"] === "case" && state.tokens.curr.value === ":"); block(true, true, false, false, iscase); return; } r = expression(0, true); if (r && (!r.identifier || r.value !== "function") && (r.type !== "(punctuator)")) { if (!state.directive["use strict"] && state.option.globalstrict && state.option.strict) { warning("E007"); } } if (!t.block) { if (!state.option.expr && (!r || !r.exps)) { warning("W030", state.tokens.curr); } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") { warning("W031", t); } parseFinalSemicolon(); } indent = i; scope = s; return r; } function statements() { var a = [], p; while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { if (state.tokens.next.id === ";") { p = peek(); if (!p || (p.id !== "(" && p.id !== "[")) { warning("W032"); } advance(";"); } else { a.push(statement()); } } return a; } function directives() { var i, p, pn; while (state.tokens.next.id === "(string)") { p = peek(0); if (p.id === "(endline)") { i = 1; do { pn = peek(i++); } while (pn.id === "(endline)"); if (pn.id === ";") { p = pn; } else if (pn.value === "[" || pn.value === ".") { return; } else if (!state.option.asi || pn.value === "(") { warning("W033", state.tokens.next); } } else if (p.id === "." || p.id === "[") { return; } else if (p.id !== ";") { warning("W033", p); } advance(); if (state.directive[state.tokens.curr.value]) { warning("W034", state.tokens.curr, state.tokens.curr.value); } if (state.tokens.curr.value === "use strict") { if (!state.option["(explicitNewcap)"]) { state.option.newcap = true; } state.option.undef = true; } state.directive[state.tokens.curr.value] = true; if (p.id === ";") { advance(";"); } } } function block(ordinary, stmt, isfunc, isfatarrow, iscase) { var a, b = inblock, old_indent = indent, m, s = scope, t, line, d; inblock = ordinary; if (!ordinary || !state.option.funcscope) scope = Object.create(scope); t = state.tokens.next; var metrics = funct["(metrics)"]; metrics.nestedBlockDepth += 1; metrics.verifyMaxNestedBlockDepthPerFunction(); if (state.tokens.next.id === "{") { advance("{"); funct["(blockscope)"].stack(); line = state.tokens.curr.line; if (state.tokens.next.id !== "}") { indent += state.option.indent; while (!ordinary && state.tokens.next.from > indent) { indent += state.option.indent; } if (isfunc) { m = {}; for (d in state.directive) { if (_.has(state.directive, d)) { m[d] = state.directive[d]; } } directives(); if (state.option.strict && funct["(context)"]["(global)"]) { if (!m["use strict"] && !state.directive["use strict"]) { warning("E007"); } } } a = statements(); metrics.statementCount += a.length; if (isfunc) { state.directive = m; } indent -= state.option.indent; } advance("}", t); funct["(blockscope)"].unstack(); indent = old_indent; } else if (!ordinary) { if (isfunc) { m = {}; if (stmt && !isfatarrow && !state.option.inMoz(true)) { error("W118", state.tokens.curr, "function closure expressions"); } if (!stmt) { for (d in state.directive) { if (_.has(state.directive, d)) { m[d] = state.directive[d]; } } } expression(10); if (state.option.strict && funct["(context)"]["(global)"]) { if (!m["use strict"] && !state.directive["use strict"]) { warning("E007"); } } } else { error("E021", state.tokens.next, "{", state.tokens.next.value); } } else { funct["(nolet)"] = true; if (!stmt || state.option.curly) { warning("W116", state.tokens.next, "{", state.tokens.next.value); } state.tokens.next.inBracelessBlock = true; indent += state.option.indent; a = [statement()]; indent -= state.option.indent; delete funct["(nolet)"]; } switch (funct["(verb)"]) { case "break": case "continue": case "return": case "throw": if (iscase) { break; } default: funct["(verb)"] = null; } if (!ordinary || !state.option.funcscope) scope = s; inblock = b; if (ordinary && state.option.noempty && (!a || a.length === 0)) { warning("W035", state.tokens.prev); } metrics.nestedBlockDepth -= 1; return a; } function countMember(m) { if (membersOnly && typeof membersOnly[m] !== "boolean") { warning("W036", state.tokens.curr, m); } if (typeof member[m] === "number") { member[m] += 1; } else { member[m] = 1; } } function note_implied(tkn) { var name = tkn.value; var desc = Object.getOwnPropertyDescriptor(implied, name); if (!desc) implied[name] = [tkn.line]; else desc.value.push(tkn.line); } type("(number)", function() { return this; }); type("(string)", function() { return this; }); state.syntax["(identifier)"] = { type: "(identifier)", lbp: 0, identifier: true, nud: function() { var v = this.value; var s = scope[v]; var f; var block; if (state.tokens.next.id === "=>") { return this; } if (typeof s === "function") { s = undefined; } else if (!funct["(blockscope)"].current.has(v) && typeof s === "boolean") { f = funct; funct = functions[0]; addlabel(v, { type: "var" }); s = funct; funct = f; } block = funct["(blockscope)"].getlabel(v); if (funct === s || block) { switch (block ? block[v]["(type)"] : funct[v]) { case "unused": if (block) block[v]["(type)"] = "var"; else funct[v] = "var"; break; case "unction": if (block) block[v]["(type)"] = "function"; else funct[v] = "function"; this["function"] = true; break; case "const": setprop(funct, v, { unused: false }); break; case "function": this["function"] = true; break; case "label": warning("W037", state.tokens.curr, v); break; } } else { switch (funct[v]) { case "closure": case "function": case "var": case "unused": warning("W038", state.tokens.curr, v); break; case "label": warning("W037", state.tokens.curr, v); break; case "outer": case "global": break; default: if (s === true) { funct[v] = true; } else if (s === null) { warning("W039", state.tokens.curr, v); note_implied(state.tokens.curr); } else if (typeof s !== "object") { if (!funct["(comparray)"].check(v)) { isundef(funct, "W117", state.tokens.curr, v); } if (!funct["(global)"]) { funct[v] = true; } note_implied(state.tokens.curr); } else { switch (s[v]) { case "function": case "unction": this["function"] = true; s[v] = "closure"; funct[v] = s["(global)"] ? "global" : "outer"; break; case "var": case "unused": s[v] = "closure"; funct[v] = s["(global)"] ? "global" : "outer"; break; case "const": setprop(s, v, { unused: false }); break; case "closure": funct[v] = s["(global)"] ? "global" : "outer"; break; case "label": warning("W037", state.tokens.curr, v); } } } } return this; }, led: function() { error("E033", state.tokens.next, state.tokens.next.value); } }; var baseTemplateSyntax = { lbp: 0, identifier: false, template: true, }; state.syntax["(template)"] = _.extend({ type: "(template)", nud: doTemplateLiteral, led: doTemplateLiteral, noSubst: false }, baseTemplateSyntax); state.syntax["(template middle)"] = _.extend({ type: "(template middle)", middle: true, noSubst: false }, baseTemplateSyntax); state.syntax["(template tail)"] = _.extend({ type: "(template tail)", tail: true, noSubst: false }, baseTemplateSyntax); state.syntax["(no subst template)"] = _.extend({ type: "(template)", nud: doTemplateLiteral, led: doTemplateLiteral, noSubst: true, tail: true // mark as tail, since it's always the last component }, baseTemplateSyntax); type("(regexp)", function() { return this; }); delim("(endline)"); delim("(begin)"); delim("(end)").reach = true; delim("(error)").reach = true; delim("}").reach = true; delim(")"); delim("]"); delim("\"").reach = true; delim("'").reach = true; delim(";"); delim(":").reach = true; delim("#"); reserve("else"); reserve("case").reach = true; reserve("catch"); reserve("default").reach = true; reserve("finally"); reservevar("arguments", function(x) { if (state.directive["use strict"] && funct["(global)"]) { warning("E008", x); } }); reservevar("eval"); reservevar("false"); reservevar("Infinity"); reservevar("null"); reservevar("this", function(x) { if (state.directive["use strict"] && !isMethod() && !state.option.validthis && ((funct["(statement)"] && funct["(name)"].charAt(0) > "Z") || funct["(global)"])) { warning("W040", x); } }); reservevar("true"); reservevar("undefined"); assignop("=", "assign", 20); assignop("+=", "assignadd", 20); assignop("-=", "assignsub", 20); assignop("*=", "assignmult", 20); assignop("/=", "assigndiv", 20).nud = function() { error("E014"); }; assignop("%=", "assignmod", 20); bitwiseassignop("&="); bitwiseassignop("|="); bitwiseassignop("^="); bitwiseassignop("<<="); bitwiseassignop(">>="); bitwiseassignop(">>>="); infix(",", function(left, that) { var expr; that.exprs = [left]; if (state.option.nocomma) { warning("W127"); } if (!comma({ peek: true })) { return that; } while (true) { if (!(expr = expression(10))) { break; } that.exprs.push(expr); if (state.tokens.next.value !== "," || !comma()) { break; } } return that; }, 10, true); infix("?", function(left, that) { increaseComplexityCount(); that.left = left; that.right = expression(10); advance(":"); that["else"] = expression(10); return that; }, 30); var orPrecendence = 40; infix("||", function(left, that) { increaseComplexityCount(); that.left = left; that.right = expression(orPrecendence); return that; }, orPrecendence); infix("&&", "and", 50); bitwise("|", "bitor", 70); bitwise("^", "bitxor", 80); bitwise("&", "bitand", 90); relation("==", function(left, right) { var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null"); switch (true) { case !eqnull && state.option.eqeqeq: this.from = this.character; warning("W116", this, "===", "=="); break; case isPoorRelation(left): warning("W041", this, "===", left.value); break; case isPoorRelation(right): warning("W041", this, "===", right.value); break; case isTypoTypeof(right, left): warning("W122", this, right.value); break; case isTypoTypeof(left, right): warning("W122", this, left.value); break; } return this; }); relation("===", function(left, right) { if (isTypoTypeof(right, left)) { warning("W122", this, right.value); } else if (isTypoTypeof(left, right)) { warning("W122", this, left.value); } return this; }); relation("!=", function(left, right) { var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null"); if (!eqnull && state.option.eqeqeq) { this.from = this.character; warning("W116", this, "!==", "!="); } else if (isPoorRelation(left)) { warning("W041", this, "!==", left.value); } else if (isPoorRelation(right)) { warning("W041", this, "!==", right.value); } else if (isTypoTypeof(right, left)) { warning("W122", this, right.value); } else if (isTypoTypeof(left, right)) { warning("W122", this, left.value); } return this; }); relation("!==", function(left, right) { if (isTypoTypeof(right, left)) { warning("W122", this, right.value); } else if (isTypoTypeof(left, right)) { warning("W122", this, left.value); } return this; }); relation("<"); relation(">"); relation("<="); relation(">="); bitwise("<<", "shiftleft", 120); bitwise(">>", "shiftright", 120); bitwise(">>>", "shiftrightunsigned", 120); infix("in", "in", 120); infix("instanceof", "instanceof", 120); infix("+", function(left, that) { var right; that.left = left; that.right = right = expression(130); if (left && right && left.id === "(string)" && right.id === "(string)") { left.value += right.value; left.character = right.character; if (!state.option.scripturl && reg.javascriptURL.test(left.value)) { warning("W050", left); } return left; } return that; }, 130); prefix("+", "num"); prefix("+++", function() { warning("W007"); this.arity = "unary"; this.right = expression(150); return this; }); infix("+++", function(left) { warning("W007"); this.left = left; this.right = expression(130); return this; }, 130); infix("-", "sub", 130); prefix("-", "neg"); prefix("---", function() { warning("W006"); this.arity = "unary"; this.right = expression(150); return this; }); infix("---", function(left) { warning("W006"); this.left = left; this.right = expression(130); return this; }, 130); infix("*", "mult", 140); infix("/", "div", 140); infix("%", "mod", 140); suffix("++"); prefix("++", "preinc"); state.syntax["++"].exps = true; suffix("--"); prefix("--", "predec"); state.syntax["--"].exps = true; prefix("delete", function() { var p = expression(10); if (!p) { return this; } if (p.id !== "." && p.id !== "[") { warning("W051"); } this.first = p; if (p.identifier && !state.directive["use strict"]) { p.forgiveUndef = true; } return this; }).exps = true; prefix("~", function() { if (state.option.bitwise) { warning("W016", this, "~"); } this.arity = "unary"; expression(150); return this; }); prefix("...", function() { if (!state.option.esnext) { warning("W119", this, "spread/rest operator"); } if (!state.tokens.next.identifier && state.tokens.next.type !== "(string)" && !checkPunctuators(state.tokens.next, ["[", "("])) { error("E030", state.tokens.next, state.tokens.next.value); } expression(150); return this; }); prefix("!", function() { this.arity = "unary"; this.right = expression(150); if (!this.right) { // '!' followed by nothing? Give up. quit("E041", this.line || 0); } if (bang[this.right.id] === true) { warning("W018", this, "!"); } return this; }); prefix("typeof", (function() { var p = expression(150); this.first = p; if (p.identifier) { p.forgiveUndef = true; } return this; })); prefix("new", function() { var c = expression(155), i; if (c && c.id !== "function") { if (c.identifier) { c["new"] = true; switch (c.value) { case "Number": case "String": case "Boolean": case "Math": case "JSON": warning("W053", state.tokens.prev, c.value); break; case "Symbol": if (state.option.esnext) { warning("W053", state.tokens.prev, c.value); } break; case "Function": if (!state.option.evil) { warning("W054"); } break; case "Date": case "RegExp": case "this": break; default: if (c.id !== "function") { i = c.value.substr(0, 1); if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) { warning("W055", state.tokens.curr); } } } } else { if (c.id !== "." && c.id !== "[" && c.id !== "(") { warning("W056", state.tokens.curr); } } } else { if (!state.option.supernew) warning("W057", this); } if (state.tokens.next.id !== "(" && !state.option.supernew) { warning("W058", state.tokens.curr, state.tokens.curr.value); } this.first = c; return this; }); state.syntax["new"].exps = true; prefix("void").exps = true; infix(".", function(left, that) { var m = identifier(false, true); if (typeof m === "string") { countMember(m); } that.left = left; that.right = m; if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") { warning("W001"); } if (left && left.value === "arguments" && (m === "callee" || m === "caller")) { if (state.option.noarg) warning("W059", left, m); else if (state.directive["use strict"]) error("E008"); } else if (!state.option.evil && left && left.value === "document" && (m === "write" || m === "writeln")) { warning("W060", left); } if (!state.option.evil && (m === "eval" || m === "execScript")) { if (isGlobalEval(left, state, funct)) { warning("W061"); } } return that; }, 160, true); infix("(", function(left, that) { if (state.option.immed && left && !left.immed && left.id === "function") { warning("W062"); } var n = 0; var p = []; if (left) { if (left.type === "(identifier)") { if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) { if ("Number String Boolean Date Object Error Symbol".indexOf(left.value) === -1) { if (left.value === "Math") { warning("W063", left); } else if (state.option.newcap) { warning("W064", left); } } } } } if (state.tokens.next.id !== ")") { for (;;) { p[p.length] = expression(10); n += 1; if (state.tokens.next.id !== ",") { break; } comma(); } } advance(")"); if (typeof left === "object") { if (state.option.inES3() && left.value === "parseInt" && n === 1) { warning("W065", state.tokens.curr); } if (!state.option.evil) { if (left.value === "eval" || left.value === "Function" || left.value === "execScript") { warning("W061", left); if (p[0] && [0].id === "(string)") { addInternalSrc(left, p[0].value); } } else if (p[0] && p[0].id === "(string)" && (left.value === "setTimeout" || left.value === "setInterval")) { warning("W066", left); addInternalSrc(left, p[0].value); } else if (p[0] && p[0].id === "(string)" && left.value === "." && left.left.value === "window" && (left.right === "setTimeout" || left.right === "setInterval")) { warning("W066", left); addInternalSrc(left, p[0].value); } } if (!left.identifier && left.id !== "." && left.id !== "[" && left.id !== "(" && left.id !== "&&" && left.id !== "||" && left.id !== "?" && !(state.option.esnext && left["(name)"])) { warning("W067", that); } } that.left = left; return that; }, 155, true).exps = true; prefix("(", function() { var pn = state.tokens.next, pn1, i = -1; var ret, triggerFnExpr, first, last; var parens = 1; var opening = state.tokens.curr; var preceeding = state.tokens.prev; var isNecessary = !state.option.singleGroups; do { if (pn.value === "(") { parens += 1; } else if (pn.value === ")") { parens -= 1; } i += 1; pn1 = pn; pn = peek(i); } while (!(parens === 0 && pn1.value === ")") && pn.value !== ";" && pn.type !== "(end)"); if (state.tokens.next.id === "function") { triggerFnExpr = state.tokens.next.immed = true; } if (pn.value === "=>") { return doFunction({ type: "arrow", parsedOpening: true }); } var exprs = []; if (state.tokens.next.id !== ")") { for (;;) { exprs.push(expression(10)); if (state.tokens.next.id !== ",") { break; } if (state.option.nocomma) { warning("W127"); } comma(); } } advance(")", this); if (state.option.immed && exprs[0] && exprs[0].id === "function") { if (state.tokens.next.id !== "(" && state.tokens.next.id !== "." && state.tokens.next.id !== "[") { warning("W068", this); } } if (!exprs.length) { return; } if (exprs.length > 1) { ret = Object.create(state.syntax[","]); ret.exprs = exprs; first = exprs[0]; last = exprs[exprs.length - 1]; if (!isNecessary) { isNecessary = preceeding.assign || preceeding.delim; } } else { ret = first = last = exprs[0]; if (!isNecessary) { isNecessary = (opening.beginsStmt && (ret.id === "{" || triggerFnExpr || isFunctor(ret))) || (ret.id === "{" && preceeding.id === "=>") || (first.id === "+" && preceeding.id === "+"); } } if (ret) { if (!isNecessary && (first.left || ret.exprs)) { isNecessary = (!isBeginOfExpr(preceeding) && first.lbp < preceeding.lbp) || (!isEndOfExpr() && last.lbp < state.tokens.next.lbp); } if (!isNecessary) { warning("W126", opening); } ret.paren = true; } return ret; }); application("=>"); infix("[", function(left, that) { var e = expression(10), s; if (e && e.type === "(string)") { if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) { if (isGlobalEval(left, state, funct)) { warning("W061"); } } countMember(e.value); if (!state.option.sub && reg.identifier.test(e.value)) { s = state.syntax[e.value]; if (!s || !isReserved(s)) { warning("W069", state.tokens.prev, e.value); } } } advance("]", that); if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") { warning("W001"); } that.left = left; that.right = e; return that; }, 160, true); function comprehensiveArrayExpression() { var res = {}; res.exps = true; funct["(comparray)"].stack(); var reversed = false; if (state.tokens.next.value !== "for") { reversed = true; if (!state.option.inMoz(true)) { warning("W116", state.tokens.next, "for", state.tokens.next.value); } funct["(comparray)"].setState("use"); res.right = expression(10); } advance("for"); if (state.tokens.next.value === "each") { advance("each"); if (!state.option.inMoz(true)) { warning("W118", state.tokens.curr, "for each"); } } advance("("); funct["(comparray)"].setState("define"); res.left = expression(130); if (_.contains(["in", "of"], state.tokens.next.value)) { advance(); } else { error("E045", state.tokens.curr); } funct["(comparray)"].setState("generate"); expression(10); advance(")"); if (state.tokens.next.value === "if") { advance("if"); advance("("); funct["(comparray)"].setState("filter"); res.filter = expression(10); advance(")"); } if (!reversed) { funct["(comparray)"].setState("use"); res.right = expression(10); } advance("]"); funct["(comparray)"].unstack(); return res; } prefix("[", function() { var blocktype = lookupBlockType(); if (blocktype.isCompArray) { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "array comprehension"); } return comprehensiveArrayExpression(); } else if (blocktype.isDestAssign && !state.option.inESNext()) { warning("W104", state.tokens.curr, "destructuring assignment"); } var b = state.tokens.curr.line !== startLine(state.tokens.next); this.first = []; if (b) { indent += state.option.indent; if (state.tokens.next.from === indent + state.option.indent) { indent += state.option.indent; } } while (state.tokens.next.id !== "(end)") { while (state.tokens.next.id === ",") { if (!state.option.elision) { if (!state.option.inES5()) { warning("W070"); } else { warning("W128"); do { advance(","); } while (state.tokens.next.id === ","); continue; } } advance(","); } if (state.tokens.next.id === "]") { break; } this.first.push(expression(10)); if (state.tokens.next.id === ",") { comma({ allowTrailing: true }); if (state.tokens.next.id === "]" && !state.option.inES5(true)) { warning("W070", state.tokens.curr); break; } } else { break; } } if (b) { indent -= state.option.indent; } advance("]", this); return this; }); function isMethod() { return funct["(statement)"] && funct["(statement)"].type === "class" || funct["(context)"] && funct["(context)"]["(verb)"] === "class"; } function isPropertyName(token) { return token.identifier || token.id === "(string)" || token.id === "(number)"; } function propertyName(preserveOrToken) { var id; var preserve = true; if (typeof preserveOrToken === "object") { id = preserveOrToken; } else { preserve = preserveOrToken; id = optionalidentifier(false, true, preserve); } if (!id) { if (state.tokens.next.id === "(string)") { id = state.tokens.next.value; if (!preserve) { advance(); } } else if (state.tokens.next.id === "(number)") { id = state.tokens.next.value.toString(); if (!preserve) { advance(); } } } else if (typeof id === "object") { if (id.id === "(string)" || id.id === "(identifier)") id = id.value; else if (id.id === "(number)") id = id.value.toString(); } if (id === "hasOwnProperty") { warning("W001"); } return id; } function functionparams(options) { var next; var params = []; var ident; var tokens = []; var t; var pastDefault = false; var pastRest = false; var loneArg = options && options.loneArg; if (loneArg && loneArg.identifier === true) { addlabel(loneArg.value, { type: "unused", token: loneArg }); return [loneArg]; } next = state.tokens.next; if (!options || !options.parsedOpening) { advance("("); } if (state.tokens.next.id === ")") { advance(")"); return; } for (;;) { if (_.contains(["{", "["], state.tokens.next.id)) { tokens = destructuringExpression(); for (t in tokens) { t = tokens[t]; if (t.id) { params.push(t.id); addlabel(t.id, { type: "unused", token: t.token }); } } } else { if (checkPunctuators(state.tokens.next, ["..."])) pastRest = true; ident = identifier(true); if (ident) { params.push(ident); addlabel(ident, { type: "unused", token: state.tokens.curr }); } else { while (!checkPunctuators(state.tokens.next, [",", ")"])) advance(); } } if (pastDefault) { if (state.tokens.next.id !== "=") { error("E051", state.tokens.current); } } if (state.tokens.next.id === "=") { if (!state.option.inESNext()) { warning("W119", state.tokens.next, "default parameters"); } advance("="); pastDefault = true; expression(10); } if (state.tokens.next.id === ",") { if (pastRest) { warning("W131", state.tokens.next); } comma(); } else { advance(")", next); return params; } } } function setprop(funct, name, values) { if (!funct["(properties)"][name]) { funct["(properties)"][name] = { unused: false }; } _.extend(funct["(properties)"][name], values); } function getprop(funct, name, prop) { if (!funct["(properties)"][name]) return null; return funct["(properties)"][name][prop] || null; } function functor(name, token, scope, overwrites) { var funct = { "(name)" : name, "(breakage)" : 0, "(loopage)" : 0, "(scope)" : scope, "(tokens)" : {}, "(properties)": {}, "(catch)" : false, "(global)" : false, "(line)" : null, "(character)" : null, "(metrics)" : null, "(statement)" : null, "(context)" : null, "(blockscope)": null, "(comparray)" : null, "(generator)" : null, "(params)" : null }; if (token) { _.extend(funct, { "(line)" : token.line, "(character)": token.character, "(metrics)" : createMetrics(token) }); } _.extend(funct, overwrites); if (funct["(context)"]) { funct["(blockscope)"] = funct["(context)"]["(blockscope)"]; funct["(comparray)"] = funct["(context)"]["(comparray)"]; } return funct; } function isFunctor(token) { return "(scope)" in token; } function doTemplateLiteral(left) { var ctx = this.context; var noSubst = this.noSubst; var depth = this.depth; if (!noSubst) { while (!end() && state.tokens.next.id !== "(end)") { if (!state.tokens.next.template || state.tokens.next.depth > depth) { expression(0); // should probably have different rbp? } else { advance(); } } } return { id: "(template)", type: "(template)", tag: left }; function end() { if (state.tokens.curr.template && state.tokens.curr.tail && state.tokens.curr.context === ctx) return true; var complete = (state.tokens.next.template && state.tokens.next.tail && state.tokens.next.context === ctx); if (complete) advance(); return complete || state.tokens.next.isUnclosed; } } function doFunction(options) { var f, name, statement, classExprBinding, isGenerator, isArrow; var oldOption = state.option; var oldIgnored = state.ignored; var oldScope = scope; if (options) { name = options.name; statement = options.statement; classExprBinding = options.classExprBinding; isGenerator = options.type === "generator"; isArrow = options.type === "arrow"; } state.option = Object.create(state.option); state.ignored = Object.create(state.ignored); scope = Object.create(scope); funct = functor(name || state.nameStack.infer(), state.tokens.next, scope, { "(statement)": statement, "(context)": funct, "(generator)": isGenerator }); f = funct; state.tokens.curr.funct = funct; functions.push(funct); if (name) { addlabel(name, { type: "function" }); } if (classExprBinding) { addlabel(classExprBinding, { type: "function" }); } funct["(params)"] = functionparams(options); funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]); if (isArrow) { if (!state.option.esnext) { warning("W119", state.tokens.curr, "arrow function syntax (=>)"); } if (!options.loneArg) { advance("=>"); } } block(false, true, true, isArrow); if (!state.option.noyield && isGenerator && funct["(generator)"] !== "yielded") { warning("W124", state.tokens.curr); } funct["(metrics)"].verifyMaxStatementsPerFunction(); funct["(metrics)"].verifyMaxComplexityPerFunction(); funct["(unusedOption)"] = state.option.unused; scope = oldScope; state.option = oldOption; state.ignored = oldIgnored; funct["(last)"] = state.tokens.curr.line; funct["(lastcharacter)"] = state.tokens.curr.character; _.map(Object.keys(funct), function(key) { if (key[0] === "(") return; funct["(blockscope)"].unshadow(key); }); funct = funct["(context)"]; return f; } function createMetrics(functionStartToken) { return { statementCount: 0, nestedBlockDepth: -1, ComplexityCount: 1, verifyMaxStatementsPerFunction: function() { if (state.option.maxstatements && this.statementCount > state.option.maxstatements) { warning("W071", functionStartToken, this.statementCount); } }, verifyMaxParametersPerFunction: function(params) { params = params || []; if (state.option.maxparams && params.length > state.option.maxparams) { warning("W072", functionStartToken, params.length); } }, verifyMaxNestedBlockDepthPerFunction: function() { if (state.option.maxdepth && this.nestedBlockDepth > 0 && this.nestedBlockDepth === state.option.maxdepth + 1) { warning("W073", null, this.nestedBlockDepth); } }, verifyMaxComplexityPerFunction: function() { var max = state.option.maxcomplexity; var cc = this.ComplexityCount; if (max && cc > max) { warning("W074", functionStartToken, cc); } } }; } function increaseComplexityCount() { funct["(metrics)"].ComplexityCount += 1; } function checkCondAssignment(expr) { var id, paren; if (expr) { id = expr.id; paren = expr.paren; if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) { id = expr.id; paren = paren || expr.paren; } } switch (id) { case "=": case "+=": case "-=": case "*=": case "%=": case "&=": case "|=": case "^=": case "/=": if (!paren && !state.option.boss) { warning("W084"); } } } function checkProperties(props) { if (state.option.inES5()) { for (var name in props) { if (_.has(props, name) && props[name].setterToken && !props[name].getterToken) { warning("W078", props[name].setterToken); } } } } (function(x) { x.nud = function() { var b, f, i, p, t, g, nextVal; var props = {}; // All properties, including accessors b = state.tokens.curr.line !== startLine(state.tokens.next); if (b) { indent += state.option.indent; if (state.tokens.next.from === indent + state.option.indent) { indent += state.option.indent; } } for (;;) { if (state.tokens.next.id === "}") { break; } nextVal = state.tokens.next.value; if (peek().id !== ":" && (nextVal === "get" || nextVal === "set")) { advance(nextVal); if (!state.option.inES5()) { error("E034"); } i = propertyName(); if (!i && !state.option.inESNext()) { error("E035"); } if (i) { saveAccessor(nextVal, props, i, state.tokens.curr); } t = state.tokens.next; f = doFunction(); p = f["(params)"]; if (nextVal === "get" && i && p) { warning("W076", t, p[0], i); } else if (nextVal === "set" && i && (!p || p.length !== 1)) { warning("W077", t, i); } } else { if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") { if (!state.option.inESNext()) { warning("W104", state.tokens.next, "generator functions"); } advance("*"); g = true; } if (state.tokens.next.identifier && (peekIgnoreEOL().id === "," || peekIgnoreEOL().id === "}")) { if (!state.option.inESNext()) { warning("W104", state.tokens.next, "object short notation"); } i = propertyName(true); saveProperty(props, i, state.tokens.next); expression(10); } else { if (state.tokens.next.id === "[") { i = computedPropertyName(); state.nameStack.set(i); } else { state.nameStack.set(state.tokens.next); i = propertyName(); saveProperty(props, i, state.tokens.next); if (typeof i !== "string") { break; } } if (state.tokens.next.value === "(") { if (!state.option.inESNext()) { warning("W104", state.tokens.curr, "concise methods"); } doFunction({ type: g ? "generator" : null }); } else { advance(":"); expression(10); } } } countMember(i); if (state.tokens.next.id === ",") { comma({ allowTrailing: true, property: true }); if (state.tokens.next.id === ",") { warning("W070", state.tokens.curr); } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) { warning("W070", state.tokens.curr); } } else { break; } } if (b) { indent -= state.option.indent; } advance("}", this); checkProperties(props); return this; }; x.fud = function() { error("E036", state.tokens.curr); }; }(delim("{"))); function destructuringExpression() { var id, ids; var identifiers = []; if (!state.option.inESNext()) { warning("W104", state.tokens.curr, "destructuring expression"); } var nextInnerDE = function() { var ident; if (checkPunctuators(state.tokens.next, ["[", "{"])) { ids = destructuringExpression(); for (var id in ids) { id = ids[id]; identifiers.push({ id: id.id, token: id.token }); } } else if (checkPunctuators(state.tokens.next, [","])) { identifiers.push({ id: null, token: state.tokens.curr }); } else if (checkPunctuators(state.tokens.next, ["("])) { advance("("); nextInnerDE(); advance(")"); } else { var is_rest = checkPunctuators(state.tokens.next, ["..."]); ident = identifier(); if (ident) identifiers.push({ id: ident, token: state.tokens.curr }); return is_rest; } return false; }; if (checkPunctuators(state.tokens.next, ["["])) { advance("["); var element_after_rest = false; if (nextInnerDE() && checkPunctuators(state.tokens.next, [","]) && !element_after_rest) { warning("W130", state.tokens.next); element_after_rest = true; } while (!checkPunctuators(state.tokens.next, ["]"])) { advance(","); if (checkPunctuators(state.tokens.next, ["]"])) { break; } if (nextInnerDE() && checkPunctuators(state.tokens.next, [","]) && !element_after_rest) { warning("W130", state.tokens.next); element_after_rest = true; } } advance("]"); } else if (checkPunctuators(state.tokens.next, ["{"])) { advance("{"); id = identifier(); if (checkPunctuators(state.tokens.next, [":"])) { advance(":"); nextInnerDE(); } else { identifiers.push({ id: id, token: state.tokens.curr }); } while (!checkPunctuators(state.tokens.next, ["}"])) { advance(","); if (checkPunctuators(state.tokens.next, ["}"])) { break; } id = identifier(); if (checkPunctuators(state.tokens.next, [":"])) { advance(":"); nextInnerDE(); } else { identifiers.push({ id: id, token: state.tokens.curr }); } } advance("}"); } return identifiers; } function destructuringExpressionMatch(tokens, value) { var first = value.first; if (!first) return; _.zip(tokens, Array.isArray(first) ? first : [ first ]).forEach(function(val) { var token = val[0]; var value = val[1]; if (token && value) token.first = value; else if (token && token.first && !value) warning("W080", token.first, token.first.value); }); } var conststatement = stmt("const", function(context) { var prefix = context && context.prefix; var inexport = context && context.inexport; var tokens; var value; var lone; // State variable to know if it is a lone identifier, or a destructuring statement. if (!state.option.inESNext()) warning("W104", state.tokens.curr, "const"); this.first = []; for (;;) { var names = []; if (_.contains(["{", "["], state.tokens.next.value)) { tokens = destructuringExpression(); lone = false; } else { tokens = [ { id: identifier(), token: state.tokens.curr } ]; lone = true; if (inexport) { exported[state.tokens.curr.value] = true; state.tokens.curr.exported = true; } } for (var t in tokens) { if (tokens.hasOwnProperty(t)) { t = tokens[t]; if (funct[t.id] === "const") { warning("E011", null, t.id); } if (funct["(global)"] && predefined[t.id] === false) { warning("W079", t.token, t.id); } if (t.id) { addlabel(t.id, { token: t.token, type: "const", unused: true }); names.push(t.token); } } } if (prefix) { break; } this.first = this.first.concat(names); if (state.tokens.next.id !== "=") { warning("E012", state.tokens.curr, state.tokens.curr.value); } if (state.tokens.next.id === "=") { advance("="); if (state.tokens.next.id === "undefined") { warning("W080", state.tokens.prev, state.tokens.prev.value); } if (peek(0).id === "=" && state.tokens.next.identifier) { warning("W120", state.tokens.next, state.tokens.next.value); } value = expression(10); if (lone) { tokens[0].first = value; } else { destructuringExpressionMatch(names, value); } } if (state.tokens.next.id !== ",") { break; } comma(); } return this; }); conststatement.exps = true; var varstatement = stmt("var", function(context) { var prefix = context && context.prefix; var inexport = context && context.inexport; var tokens, lone, value; this.first = []; for (;;) { var names = []; if (_.contains(["{", "["], state.tokens.next.value)) { tokens = destructuringExpression(); lone = false; } else { tokens = [ { id: identifier(), token: state.tokens.curr } ]; lone = true; if (inexport) { exported[state.tokens.curr.value] = true; state.tokens.curr.exported = true; } } for (var t in tokens) { if (tokens.hasOwnProperty(t)) { t = tokens[t]; if (state.option.inESNext() && funct[t.id] === "const") { warning("E011", null, t.id); } if (funct["(global)"]) { if (predefined[t.id] === false) { warning("W079", t.token, t.id); } else if (state.option.futurehostile === false) { if ((!state.option.inES5() && vars.ecmaIdentifiers[5][t.id] === false) || (!state.option.inESNext() && vars.ecmaIdentifiers[6][t.id] === false)) { warning("W129", t.token, t.id); } } } if (t.id) { addlabel(t.id, { type: "unused", token: t.token }); names.push(t.token); } } } if (prefix) { break; } this.first = this.first.concat(names); if (state.tokens.next.id === "=") { state.nameStack.set(state.tokens.curr); advance("="); if (state.tokens.next.id === "undefined") { warning("W080", state.tokens.prev, state.tokens.prev.value); } if (peek(0).id === "=" && state.tokens.next.identifier) { if (!funct["(params)"] || funct["(params)"].indexOf(state.tokens.next.value) === -1) { warning("W120", state.tokens.next, state.tokens.next.value); } } value = expression(10); if (lone) { tokens[0].first = value; } else { destructuringExpressionMatch(names, value); } } if (state.tokens.next.id !== ",") { break; } comma(); } return this; }); varstatement.exps = true; var letstatement = stmt("let", function(context) { var prefix = context && context.prefix; var inexport = context && context.inexport; var tokens, lone, value, letblock; if (!state.option.inESNext()) { warning("W104", state.tokens.curr, "let"); } if (state.tokens.next.value === "(") { if (!state.option.inMoz(true)) { warning("W118", state.tokens.next, "let block"); } advance("("); funct["(blockscope)"].stack(); letblock = true; } else if (funct["(nolet)"]) { error("E048", state.tokens.curr); } this.first = []; for (;;) { var names = []; if (_.contains(["{", "["], state.tokens.next.value)) { tokens = destructuringExpression(); lone = false; } else { tokens = [ { id: identifier(), token: state.tokens.curr.value } ]; lone = true; if (inexport) { exported[state.tokens.curr.value] = true; state.tokens.curr.exported = true; } } for (var t in tokens) { if (tokens.hasOwnProperty(t)) { t = tokens[t]; if (state.option.inESNext() && funct[t.id] === "const") { warning("E011", null, t.id); } if (funct["(global)"] && predefined[t.id] === false) { warning("W079", t.token, t.id); } if (t.id && !funct["(nolet)"]) { addlabel(t.id, { type: "unused", token: t.token, islet: true }); names.push(t.token); } } } if (prefix) { break; } this.first = this.first.concat(names); if (state.tokens.next.id === "=") { advance("="); if (state.tokens.next.id === "undefined") { warning("W080", state.tokens.prev, state.tokens.prev.value); } if (peek(0).id === "=" && state.tokens.next.identifier) { warning("W120", state.tokens.next, state.tokens.next.value); } value = expression(10); if (lone) { tokens[0].first = value; } else { destructuringExpressionMatch(names, value); } } if (state.tokens.next.id !== ",") { break; } comma(); } if (letblock) { advance(")"); block(true, true); this.block = true; funct["(blockscope)"].unstack(); } return this; }); letstatement.exps = true; blockstmt("class", function() { return classdef.call(this, true); }); function classdef(isStatement) { if (!state.option.inESNext()) { warning("W104", state.tokens.curr, "class"); } if (isStatement) { this.name = identifier(); addlabel(this.name, { type: "unused", token: state.tokens.curr }); } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") { this.name = identifier(); this.namedExpr = true; } else { this.name = state.nameStack.infer(); } classtail(this); return this; } function classtail(c) { var strictness = state.directive["use strict"]; if (state.tokens.next.value === "extends") { advance("extends"); c.heritage = expression(10); } state.directive["use strict"] = true; advance("{"); c.body = classbody(c); advance("}"); state.directive["use strict"] = strictness; } function classbody(c) { var name; var isStatic; var isGenerator; var getset; var props = {}; var staticProps = {}; var computed; for (var i = 0; state.tokens.next.id !== "}"; ++i) { name = state.tokens.next; isStatic = false; isGenerator = false; getset = null; if (name.id === "*") { isGenerator = true; advance("*"); name = state.tokens.next; } if (name.id === "[") { name = computedPropertyName(); } else if (isPropertyName(name)) { advance(); computed = false; if (name.identifier && name.value === "static") { if (checkPunctuators(state.tokens.next, ["*"])) { isGenerator = true; advance("*"); } if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") { computed = state.tokens.next.id === "["; isStatic = true; name = state.tokens.next; if (state.tokens.next.id === "[") { name = computedPropertyName(); } else advance(); } } if (name.identifier && (name.value === "get" || name.value === "set")) { if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") { computed = state.tokens.next.id === "["; getset = name; name = state.tokens.next; if (state.tokens.next.id === "[") { name = computedPropertyName(); } else advance(); } } } else { warning("W052", state.tokens.next, state.tokens.next.value || state.tokens.next.type); advance(); continue; } if (!checkPunctuators(state.tokens.next, ["("])) { error("E054", state.tokens.next, state.tokens.next.value); while (state.tokens.next.id !== "}" && !checkPunctuators(state.tokens.next, ["("])) { advance(); } if (state.tokens.next.value !== "(") { doFunction({ statement: c }); } } if (!computed) { if (getset) { saveAccessor( getset.value, isStatic ? staticProps : props, name.value, name, true, isStatic); } else { if (name.value === "constructor") { state.nameStack.set(c); } else { state.nameStack.set(name); } saveProperty(isStatic ? staticProps : props, name.value, name, true, isStatic); } } if (getset && name.value === "constructor") { var propDesc = getset.value === "get" ? "class getter method" : "class setter method"; error("E049", name, propDesc, "constructor"); } else if (name.value === "prototype") { error("E049", name, "class method", "prototype"); } propertyName(name); doFunction({ statement: c, type: isGenerator ? "generator" : null, classExprBinding: c.namedExpr ? c.name : null }); } checkProperties(props); } blockstmt("function", function() { var generator = false; if (state.tokens.next.value === "*") { advance("*"); if (state.option.inESNext(true)) { generator = true; } else { warning("W119", state.tokens.curr, "function*"); } } if (inblock) { warning("W082", state.tokens.curr); } var i = optionalidentifier(); if (i === undefined) { warning("W025"); } if (funct[i] === "const") { warning("E011", null, i); } addlabel(i, { type: "unction", token: state.tokens.curr }); doFunction({ name: i, statement: this, type: generator ? "generator" : null }); if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) { error("E039"); } return this; }); prefix("function", function() { var generator = false; if (state.tokens.next.value === "*") { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "function*"); } advance("*"); generator = true; } var i = optionalidentifier(); var fn = doFunction({ name: i, type: generator ? "generator" : null }); function isVariable(name) { return name[0] !== "("; } function isLocal(name) { return fn[name] === "var"; } if (!state.option.loopfunc && funct["(loopage)"]) { if (_.some(fn, function(val, name) { return isVariable(name) && !isLocal(name); })) { warning("W083"); } } return this; }); blockstmt("if", function() { var t = state.tokens.next; increaseComplexityCount(); state.condition = true; advance("("); var expr = expression(0); checkCondAssignment(expr); var forinifcheck = null; if (state.option.forin && state.forinifcheckneeded) { state.forinifcheckneeded = false; // We only need to analyze the first if inside the loop forinifcheck = state.forinifchecks[state.forinifchecks.length - 1]; if (expr.type === "(punctuator)" && expr.value === "!") { forinifcheck.type = "(negative)"; } else { forinifcheck.type = "(positive)"; } } advance(")", t); state.condition = false; var s = block(true, true); if (forinifcheck && forinifcheck.type === "(negative)") { if (s && s.length === 1 && s[0].type === "(identifier)" && s[0].value === "continue") { forinifcheck.type = "(negative-with-continue)"; } } if (state.tokens.next.id === "else") { advance("else"); if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { statement(); } else { block(true, true); } } return this; }); blockstmt("try", function() { var b; function doCatch() { var oldScope = scope; var e; advance("catch"); advance("("); scope = Object.create(oldScope); e = state.tokens.next.value; if (state.tokens.next.type !== "(identifier)") { e = null; warning("E030", state.tokens.next, e); } advance(); funct = functor("(catch)", state.tokens.next, scope, { "(context)" : funct, "(breakage)" : funct["(breakage)"], "(loopage)" : funct["(loopage)"], "(statement)": false, "(catch)" : true }); if (e) { addlabel(e, { type: "exception" }); } if (state.tokens.next.value === "if") { if (!state.option.inMoz(true)) { warning("W118", state.tokens.curr, "catch filter"); } advance("if"); expression(0); } advance(")"); state.tokens.curr.funct = funct; functions.push(funct); block(false); scope = oldScope; funct["(last)"] = state.tokens.curr.line; funct["(lastcharacter)"] = state.tokens.curr.character; funct = funct["(context)"]; } block(true); while (state.tokens.next.id === "catch") { increaseComplexityCount(); if (b && (!state.option.inMoz(true))) { warning("W118", state.tokens.next, "multiple catch blocks"); } doCatch(); b = true; } if (state.tokens.next.id === "finally") { advance("finally"); block(true); return; } if (!b) { error("E021", state.tokens.next, "catch", state.tokens.next.value); } return this; }); blockstmt("while", function() { var t = state.tokens.next; funct["(breakage)"] += 1; funct["(loopage)"] += 1; increaseComplexityCount(); advance("("); checkCondAssignment(expression(0)); advance(")", t); block(true, true); funct["(breakage)"] -= 1; funct["(loopage)"] -= 1; return this; }).labelled = true; blockstmt("with", function() { var t = state.tokens.next; if (state.directive["use strict"]) { error("E010", state.tokens.curr); } else if (!state.option.withstmt) { warning("W085", state.tokens.curr); } advance("("); expression(0); advance(")", t); block(true, true); return this; }); blockstmt("switch", function() { var t = state.tokens.next; var g = false; var noindent = false; funct["(breakage)"] += 1; advance("("); checkCondAssignment(expression(0)); advance(")", t); t = state.tokens.next; advance("{"); if (state.tokens.next.from === indent) noindent = true; if (!noindent) indent += state.option.indent; this.cases = []; for (;;) { switch (state.tokens.next.id) { case "case": switch (funct["(verb)"]) { case "yield": case "break": case "case": case "continue": case "return": case "switch": case "throw": break; default: if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) { warning("W086", state.tokens.curr, "case"); } } advance("case"); this.cases.push(expression(0)); increaseComplexityCount(); g = true; advance(":"); funct["(verb)"] = "case"; break; case "default": switch (funct["(verb)"]) { case "yield": case "break": case "continue": case "return": case "throw": break; default: if (this.cases.length) { if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) { warning("W086", state.tokens.curr, "default"); } } } advance("default"); g = true; advance(":"); break; case "}": if (!noindent) indent -= state.option.indent; advance("}", t); funct["(breakage)"] -= 1; funct["(verb)"] = undefined; return; case "(end)": error("E023", state.tokens.next, "}"); return; default: indent += state.option.indent; if (g) { switch (state.tokens.curr.id) { case ",": error("E040"); return; case ":": g = false; statements(); break; default: error("E025", state.tokens.curr); return; } } else { if (state.tokens.curr.id === ":") { advance(":"); error("E024", state.tokens.curr, ":"); statements(); } else { error("E021", state.tokens.next, "case", state.tokens.next.value); return; } } indent -= state.option.indent; } } }).labelled = true; stmt("debugger", function() { if (!state.option.debug) { warning("W087", this); } return this; }).exps = true; (function() { var x = stmt("do", function() { funct["(breakage)"] += 1; funct["(loopage)"] += 1; increaseComplexityCount(); this.first = block(true, true); advance("while"); var t = state.tokens.next; advance("("); checkCondAssignment(expression(0)); advance(")", t); funct["(breakage)"] -= 1; funct["(loopage)"] -= 1; return this; }); x.labelled = true; x.exps = true; }()); blockstmt("for", function() { var s, t = state.tokens.next; var letscope = false; var foreachtok = null; if (t.value === "each") { foreachtok = t; advance("each"); if (!state.option.inMoz(true)) { warning("W118", state.tokens.curr, "for each"); } } funct["(breakage)"] += 1; funct["(loopage)"] += 1; increaseComplexityCount(); advance("("); var nextop; // contains the token of the "in" or "of" operator var i = 0; var inof = ["in", "of"]; do { nextop = peek(i); ++i; } while (!_.contains(inof, nextop.value) && nextop.value !== ";" && nextop.type !== "(end)"); if (_.contains(inof, nextop.value)) { if (!state.option.inESNext() && nextop.value === "of") { error("W104", nextop, "for of"); } if (state.tokens.next.id === "var") { advance("var"); state.tokens.curr.fud({ prefix: true }); } else if (state.tokens.next.id === "let") { advance("let"); letscope = true; funct["(blockscope)"].stack(); state.tokens.curr.fud({ prefix: true }); } else if (!state.tokens.next.identifier) { error("E030", state.tokens.next, state.tokens.next.type); advance(); } else { switch (funct[state.tokens.next.value]) { case "unused": funct[state.tokens.next.value] = "var"; break; case "var": break; default: var ident = state.tokens.next.value; if (!funct["(blockscope)"].getlabel(ident) && !(scope[ident] || {})[ident]) { warning("W088", state.tokens.next, state.tokens.next.value); } } advance(); } advance(nextop.value); expression(20); advance(")", t); if (nextop.value === "in" && state.option.forin) { state.forinifcheckneeded = true; if (state.forinifchecks === undefined) { state.forinifchecks = []; } state.forinifchecks.push({ type: "(none)" }); } s = block(true, true); if (nextop.value === "in" && state.option.forin) { if (state.forinifchecks && state.forinifchecks.length > 0) { var check = state.forinifchecks.pop(); if (// No if statement or not the first statement in loop body s && s.length > 0 && (typeof s[0] !== "object" || s[0].value !== "if") || check.type === "(positive)" && s.length > 1 || check.type === "(negative)") { warning("W089", this); } } state.forinifcheckneeded = false; } funct["(breakage)"] -= 1; funct["(loopage)"] -= 1; } else { if (foreachtok) { error("E045", foreachtok); } if (state.tokens.next.id !== ";") { if (state.tokens.next.id === "var") { advance("var"); state.tokens.curr.fud(); } else if (state.tokens.next.id === "let") { advance("let"); letscope = true; funct["(blockscope)"].stack(); state.tokens.curr.fud(); } else { for (;;) { expression(0, "for"); if (state.tokens.next.id !== ",") { break; } comma(); } } } nolinebreak(state.tokens.curr); advance(";"); if (state.tokens.next.id !== ";") { checkCondAssignment(expression(0)); } nolinebreak(state.tokens.curr); advance(";"); if (state.tokens.next.id === ";") { error("E021", state.tokens.next, ")", ";"); } if (state.tokens.next.id !== ")") { for (;;) { expression(0, "for"); if (state.tokens.next.id !== ",") { break; } comma(); } } advance(")", t); block(true, true); funct["(breakage)"] -= 1; funct["(loopage)"] -= 1; } if (letscope) { funct["(blockscope)"].unstack(); } return this; }).labelled = true; stmt("break", function() { var v = state.tokens.next.value; if (funct["(breakage)"] === 0) warning("W052", state.tokens.next, this.value); if (!state.option.asi) nolinebreak(this); if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { if (state.tokens.curr.line === startLine(state.tokens.next)) { if (funct[v] !== "label") { warning("W090", state.tokens.next, v); } else if (scope[v] !== funct) { warning("W091", state.tokens.next, v); } this.first = state.tokens.next; advance(); } } reachable(this); return this; }).exps = true; stmt("continue", function() { var v = state.tokens.next.value; if (funct["(breakage)"] === 0) warning("W052", state.tokens.next, this.value); if (!state.option.asi) nolinebreak(this); if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { if (state.tokens.curr.line === startLine(state.tokens.next)) { if (funct[v] !== "label") { warning("W090", state.tokens.next, v); } else if (scope[v] !== funct) { warning("W091", state.tokens.next, v); } this.first = state.tokens.next; advance(); } } else if (!funct["(loopage)"]) { warning("W052", state.tokens.next, this.value); } reachable(this); return this; }).exps = true; stmt("return", function() { if (this.line === startLine(state.tokens.next)) { if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { this.first = expression(0); if (this.first && this.first.type === "(punctuator)" && this.first.value === "=" && !this.first.paren && !state.option.boss) { warningAt("W093", this.first.line, this.first.character); } } } else { if (state.tokens.next.type === "(punctuator)" && ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) { nolinebreak(this); // always warn (Line breaking error) } } reachable(this); return this; }).exps = true; (function(x) { x.exps = true; x.lbp = 25; }(prefix("yield", function() { var prev = state.tokens.prev; if (state.option.inESNext(true) && !funct["(generator)"]) { if (!("(catch)" === funct["(name)"] && funct["(context)"]["(generator)"])) { error("E046", state.tokens.curr, "yield"); } } else if (!state.option.inESNext()) { warning("W104", state.tokens.curr, "yield"); } funct["(generator)"] = "yielded"; var delegatingYield = false; if (state.tokens.next.value === "*") { delegatingYield = true; advance("*"); } if (this.line === startLine(state.tokens.next) || !state.option.inMoz(true)) { if (delegatingYield || (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud)) { nobreaknonadjacent(state.tokens.curr, state.tokens.next); this.first = expression(10); if (this.first.type === "(punctuator)" && this.first.value === "=" && !this.first.paren && !state.option.boss) { warningAt("W093", this.first.line, this.first.character); } } if (state.option.inMoz(true) && state.tokens.next.id !== ")" && (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) { error("E050", this); } } else if (!state.option.asi) { nolinebreak(this); // always warn (Line breaking error) } return this; }))); stmt("throw", function() { nolinebreak(this); this.first = expression(20); reachable(this); return this; }).exps = true; stmt("import", function() { if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "import"); } if (state.tokens.next.type === "(string)") { advance("(string)"); return this; } if (state.tokens.next.identifier) { this.name = identifier(); addlabel(this.name, { type: "unused", token: state.tokens.curr }); if (state.tokens.next.value === ",") { advance(","); } else { advance("from"); advance("(string)"); return this; } } if (state.tokens.next.id === "*") { advance("*"); advance("as"); if (state.tokens.next.identifier) { this.name = identifier(); addlabel(this.name, { type: "unused", token: state.tokens.curr }); } } else { advance("{"); for (;;) { if (state.tokens.next.value === "}") { advance("}"); break; } var importName; if (state.tokens.next.type === "default") { importName = "default"; advance("default"); } else { importName = identifier(); } if (state.tokens.next.value === "as") { advance("as"); importName = identifier(); } addlabel(importName, { type: "unused", token: state.tokens.curr }); if (state.tokens.next.value === ",") { advance(","); } else if (state.tokens.next.value === "}") { advance("}"); break; } else { error("E024", state.tokens.next, state.tokens.next.value); break; } } } advance("from"); advance("(string)"); return this; }).exps = true; stmt("export", function() { var ok = true; var token; var identifier; if (!state.option.inESNext()) { warning("W119", state.tokens.curr, "export"); ok = false; } if (!funct["(global)"] || !funct["(blockscope)"].atTop()) { error("E053", state.tokens.curr); ok = false; } if (state.tokens.next.value === "*") { advance("*"); advance("from"); advance("(string)"); return this; } if (state.tokens.next.type === "default") { state.nameStack.set(state.tokens.next); advance("default"); if (state.tokens.next.id === "function" || state.tokens.next.id === "class") { this.block = true; } token = peek(); expression(10); if (state.tokens.next.id === "class") { identifier = token.name; } else { identifier = token.value; } addlabel(identifier, { type: "function", token: token }); return this; } if (state.tokens.next.value === "{") { advance("{"); var exportedTokens = []; for (;;) { if (!state.tokens.next.identifier) { error("E030", state.tokens.next, state.tokens.next.value); } advance(); state.tokens.curr.exported = ok; exportedTokens.push(state.tokens.curr); if (state.tokens.next.value === "as") { advance("as"); if (!state.tokens.next.identifier) { error("E030", state.tokens.next, state.tokens.next.value); } advance(); } if (state.tokens.next.value === ",") { advance(","); } else if (state.tokens.next.value === "}") { advance("}"); break; } else { error("E024", state.tokens.next, state.tokens.next.value); break; } } if (state.tokens.next.value === "from") { advance("from"); advance("(string)"); } else if (ok) { exportedTokens.forEach(function(token) { if (!funct[token.value]) { isundef(funct, "W117", token, token.value); } exported[token.value] = true; funct["(blockscope)"].setExported(token.value); }); } return this; } if (state.tokens.next.id === "var") { advance("var"); state.tokens.curr.fud({ inexport:true }); } else if (state.tokens.next.id === "let") { advance("let"); state.tokens.curr.fud({ inexport:true }); } else if (state.tokens.next.id === "const") { advance("const"); state.tokens.curr.fud({ inexport:true }); } else if (state.tokens.next.id === "function") { this.block = true; advance("function"); exported[state.tokens.next.value] = ok; state.tokens.next.exported = true; state.syntax["function"].fud(); } else if (state.tokens.next.id === "class") { this.block = true; advance("class"); exported[state.tokens.next.value] = ok; state.tokens.next.exported = true; state.syntax["class"].fud(); } else { error("E024", state.tokens.next, state.tokens.next.value); } return this; }).exps = true; FutureReservedWord("abstract"); FutureReservedWord("boolean"); FutureReservedWord("byte"); FutureReservedWord("char"); FutureReservedWord("class", { es5: true, nud: classdef }); FutureReservedWord("double"); FutureReservedWord("enum", { es5: true }); FutureReservedWord("export", { es5: true }); FutureReservedWord("extends", { es5: true }); FutureReservedWord("final"); FutureReservedWord("float"); FutureReservedWord("goto"); FutureReservedWord("implements", { es5: true, strictOnly: true }); FutureReservedWord("import", { es5: true }); FutureReservedWord("int"); FutureReservedWord("interface", { es5: true, strictOnly: true }); FutureReservedWord("long"); FutureReservedWord("native"); FutureReservedWord("package", { es5: true, strictOnly: true }); FutureReservedWord("private", { es5: true, strictOnly: true }); FutureReservedWord("protected", { es5: true, strictOnly: true }); FutureReservedWord("public", { es5: true, strictOnly: true }); FutureReservedWord("short"); FutureReservedWord("static", { es5: true, strictOnly: true }); FutureReservedWord("super", { es5: true }); FutureReservedWord("synchronized"); FutureReservedWord("transient"); FutureReservedWord("volatile"); var lookupBlockType = function() { var pn, pn1; var i = -1; var bracketStack = 0; var ret = {}; if (checkPunctuators(state.tokens.curr, ["[", "{"])) bracketStack += 1; do { pn = (i === -1) ? state.tokens.next : peek(i); pn1 = peek(i + 1); i = i + 1; if (checkPunctuators(pn, ["[", "{"])) { bracketStack += 1; } else if (checkPunctuators(pn, ["]", "}"])) { bracketStack -= 1; } if (pn.identifier && pn.value === "for" && bracketStack === 1) { ret.isCompArray = true; ret.notJson = true; break; } if (checkPunctuators(pn, ["}", "]"]) && bracketStack === 0) { if (pn1.value === "=") { ret.isDestAssign = true; ret.notJson = true; break; } else if (pn1.value === ".") { ret.notJson = true; break; } } if (pn.value === ";") { ret.isBlock = true; ret.notJson = true; } } while (bracketStack > 0 && pn.id !== "(end)"); return ret; }; function saveProperty(props, name, tkn, isClass, isStatic) { var msg = ["key", "class method", "static class method"]; msg = msg[(isClass || false) + (isStatic || false)]; if (tkn.identifier) { name = tkn.value; } if (props[name] && _.has(props, name)) { warning("W075", state.tokens.next, msg, name); } else { props[name] = {}; } props[name].basic = true; props[name].basictkn = tkn; } function saveAccessor(accessorType, props, name, tkn, isClass, isStatic) { var flagName = accessorType === "get" ? "getterToken" : "setterToken"; var msg = ""; if (isClass) { if (isStatic) { msg += "static "; } msg += accessorType + "ter method"; } else { msg = "key"; } state.tokens.curr.accessorType = accessorType; state.nameStack.set(tkn); if (props[name] && _.has(props, name)) { if (props[name].basic || props[name][flagName]) { warning("W075", state.tokens.next, msg, name); } } else { props[name] = {}; } props[name][flagName] = tkn; } function computedPropertyName() { advance("["); if (!state.option.esnext) { warning("W119", state.tokens.curr, "computed property names"); } var value = expression(10); advance("]"); return value; } function checkPunctuators(token, values) { return token.type === "(punctuator)" && _.contains(values, token.value); } function destructuringAssignOrJsonValue() { var block = lookupBlockType(); if (block.notJson) { if (!state.option.inESNext() && block.isDestAssign) { warning("W104", state.tokens.curr, "destructuring assignment"); } statements(); } else { state.option.laxbreak = true; state.jsonMode = true; jsonValue(); } } var arrayComprehension = function() { var CompArray = function() { this.mode = "use"; this.variables = []; }; var _carrays = []; var _current; function declare(v) { var l = _current.variables.filter(function(elt) { if (elt.value === v) { elt.undef = false; return v; } }).length; return l !== 0; } function use(v) { var l = _current.variables.filter(function(elt) { if (elt.value === v && !elt.undef) { if (elt.unused === true) { elt.unused = false; } return v; } }).length; return (l === 0); } return { stack: function() { _current = new CompArray(); _carrays.push(_current); }, unstack: function() { _current.variables.filter(function(v) { if (v.unused) warning("W098", v.token, v.raw_text || v.value); if (v.undef) isundef(v.funct, "W117", v.token, v.value); }); _carrays.splice(-1, 1); _current = _carrays[_carrays.length - 1]; }, setState: function(s) { if (_.contains(["use", "define", "generate", "filter"], s)) _current.mode = s; }, check: function(v) { if (!_current) { return; } if (_current && _current.mode === "use") { if (use(v)) { _current.variables.push({ funct: funct, token: state.tokens.curr, value: v, undef: true, unused: false }); } return true; } else if (_current && _current.mode === "define") { if (!declare(v)) { _current.variables.push({ funct: funct, token: state.tokens.curr, value: v, undef: false, unused: true }); } return true; } else if (_current && _current.mode === "generate") { isundef(funct, "W117", state.tokens.curr, v); return true; } else if (_current && _current.mode === "filter") { if (use(v)) { isundef(funct, "W117", state.tokens.curr, v); } return true; } return false; } }; }; function jsonValue() { function jsonObject() { var o = {}, t = state.tokens.next; advance("{"); if (state.tokens.next.id !== "}") { for (;;) { if (state.tokens.next.id === "(end)") { error("E026", state.tokens.next, t.line); } else if (state.tokens.next.id === "}") { warning("W094", state.tokens.curr); break; } else if (state.tokens.next.id === ",") { error("E028", state.tokens.next); } else if (state.tokens.next.id !== "(string)") { warning("W095", state.tokens.next, state.tokens.next.value); } if (o[state.tokens.next.value] === true) { warning("W075", state.tokens.next, "key", state.tokens.next.value); } else if ((state.tokens.next.value === "__proto__" && !state.option.proto) || (state.tokens.next.value === "__iterator__" && !state.option.iterator)) { warning("W096", state.tokens.next, state.tokens.next.value); } else { o[state.tokens.next.value] = true; } advance(); advance(":"); jsonValue(); if (state.tokens.next.id !== ",") { break; } advance(","); } } advance("}"); } function jsonArray() { var t = state.tokens.next; advance("["); if (state.tokens.next.id !== "]") { for (;;) { if (state.tokens.next.id === "(end)") { error("E027", state.tokens.next, t.line); } else if (state.tokens.next.id === "]") { warning("W094", state.tokens.curr); break; } else if (state.tokens.next.id === ",") { error("E028", state.tokens.next); } jsonValue(); if (state.tokens.next.id !== ",") { break; } advance(","); } } advance("]"); } switch (state.tokens.next.id) { case "{": jsonObject(); break; case "[": jsonArray(); break; case "true": case "false": case "null": case "(number)": case "(string)": advance(); break; case "-": advance("-"); advance("(number)"); break; default: error("E003", state.tokens.next); } } var blockScope = function() { var _current = {}; var _variables = [_current]; function _checkBlockLabels() { for (var t in _current) { if (_current[t]["(type)"] === "unused") { if (state.option.unused) { var tkn = _current[t]["(token)"]; if (tkn.exported) { continue; } var line = tkn.line; var chr = tkn.character; warningAt("W098", line, chr, t); } } } } return { stack: function() { _current = {}; _variables.push(_current); }, unstack: function() { _checkBlockLabels(); _variables.splice(_variables.length - 1, 1); _current = _.last(_variables); }, getlabel: function(l) { for (var i = _variables.length - 1 ; i >= 0; --i) { if (_.has(_variables[i], l) && !_variables[i][l]["(shadowed)"]) { return _variables[i]; } } }, shadow: function(name) { for (var i = _variables.length - 1; i >= 0; i--) { if (_.has(_variables[i], name)) { _variables[i][name]["(shadowed)"] = true; } } }, unshadow: function(name) { for (var i = _variables.length - 1; i >= 0; i--) { if (_.has(_variables[i], name)) { _variables[i][name]["(shadowed)"] = false; } } }, atTop: function() { return _variables.length === 1; }, setExported: function(id) { if (funct["(blockscope)"].atTop()) { var item = _current[id]; if (item && item["(token)"]) { item["(token)"].exported = true; } } }, current: { has: function(t) { return _.has(_current, t); }, add: function(t, type, tok) { _current[t] = { "(type)" : type, "(token)": tok, "(shadowed)": false }; } } }; }; var escapeRegex = function(str) { return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); }; var itself = function(s, o, g) { var i, k, x, reIgnoreStr, reIgnore; var optionKeys; var newOptionObj = {}; var newIgnoredObj = {}; o = _.clone(o); state.reset(); if (o && o.scope) { JSHINT.scope = o.scope; } else { JSHINT.errors = []; JSHINT.undefs = []; JSHINT.internals = []; JSHINT.blacklist = {}; JSHINT.scope = "(main)"; } predefined = Object.create(null); combine(predefined, vars.ecmaIdentifiers[3]); combine(predefined, vars.reservedVars); combine(predefined, g || {}); declared = Object.create(null); exported = Object.create(null); function each(obj, cb) { if (!obj) return; if (!Array.isArray(obj) && typeof obj === "object") obj = Object.keys(obj); obj.forEach(cb); } if (o) { each(o.predef || null, function(item) { var slice, prop; if (item[0] === "-") { slice = item.slice(1); JSHINT.blacklist[slice] = slice; delete predefined[slice]; } else { prop = Object.getOwnPropertyDescriptor(o.predef, item); predefined[item] = prop ? prop.value : false; } }); each(o.exported || null, function(item) { exported[item] = true; }); delete o.predef; delete o.exported; optionKeys = Object.keys(o); for (x = 0; x < optionKeys.length; x++) { if (/^-W\d{3}$/g.test(optionKeys[x])) { newIgnoredObj[optionKeys[x].slice(1)] = true; } else { newOptionObj[optionKeys[x]] = o[optionKeys[x]]; if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false) newOptionObj["(explicitNewcap)"] = true; } } } state.option = newOptionObj; state.ignored = newIgnoredObj; state.option.indent = state.option.indent || 4; state.option.maxerr = state.option.maxerr || 50; indent = 1; global = Object.create(predefined); scope = global; funct = functor("(global)", null, scope, { "(global)" : true, "(blockscope)": blockScope(), "(comparray)" : arrayComprehension(), "(metrics)" : createMetrics(state.tokens.next) }); functions = [funct]; urls = []; stack = null; member = {}; membersOnly = null; implied = {}; inblock = false; lookahead = []; unuseds = []; if (!isString(s) && !Array.isArray(s)) { errorAt("E004", 0); return false; } api = { get isJSON() { return state.jsonMode; }, getOption: function(name) { return state.option[name] || null; }, getCache: function(name) { return state.cache[name]; }, setCache: function(name, value) { state.cache[name] = value; }, warn: function(code, data) { warningAt.apply(null, [ code, data.line, data.char ].concat(data.data)); }, on: function(names, listener) { names.split(" ").forEach(function(name) { emitter.on(name, listener); }.bind(this)); } }; emitter.removeAllListeners(); (extraModules || []).forEach(function(func) { func(api); }); state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"]; if (o && o.ignoreDelimiters) { if (!Array.isArray(o.ignoreDelimiters)) { o.ignoreDelimiters = [o.ignoreDelimiters]; } o.ignoreDelimiters.forEach(function(delimiterPair) { if (!delimiterPair.start || !delimiterPair.end) return; reIgnoreStr = escapeRegex(delimiterPair.start) + "[\\s\\S]*?" + escapeRegex(delimiterPair.end); reIgnore = new RegExp(reIgnoreStr, "ig"); s = s.replace(reIgnore, function(match) { return match.replace(/./g, " "); }); }); } lex = new Lexer(s); lex.on("warning", function(ev) { warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data)); }); lex.on("error", function(ev) { errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data)); }); lex.on("fatal", function(ev) { quit("E041", ev.line, ev.from); }); lex.on("Identifier", function(ev) { emitter.emit("Identifier", ev); }); lex.on("String", function(ev) { emitter.emit("String", ev); }); lex.on("Number", function(ev) { emitter.emit("Number", ev); }); lex.start(); for (var name in o) { if (_.has(o, name)) { checkOption(name, state.tokens.curr); } } assume(); combine(predefined, g || {}); comma.first = true; try { advance(); switch (state.tokens.next.id) { case "{": case "[": destructuringAssignOrJsonValue(); break; default: directives(); if (state.directive["use strict"]) { if (!state.option.globalstrict) { if (!(state.option.node || state.option.phantom || state.option.browserify)) { warning("W097", state.tokens.prev); } } } statements(); } advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined); funct["(blockscope)"].unstack(); var markDefined = function(name, context) { do { if (typeof context[name] === "string") { if (context[name] === "unused") context[name] = "var"; else if (context[name] === "unction") context[name] = "closure"; return true; } context = context["(context)"]; } while (context); return false; }; var clearImplied = function(name, line) { if (!implied[name]) return; var newImplied = []; for (var i = 0; i < implied[name].length; i += 1) { if (implied[name][i] !== line) newImplied.push(implied[name][i]); } if (newImplied.length === 0) delete implied[name]; else implied[name] = newImplied; }; var warnUnused = function(name, tkn, type, unused_opt) { var line = tkn.line; var chr = tkn.from; var raw_name = tkn.raw_text || name; if (unused_opt === undefined) { unused_opt = state.option.unused; } if (unused_opt === true) { unused_opt = "last-param"; } var warnable_types = { "vars": ["var"], "last-param": ["var", "param"], "strict": ["var", "param", "last-param"] }; if (unused_opt) { if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) { if (!tkn.exported) { warningAt("W098", line, chr, raw_name); } } } unuseds.push({ name: name, line: line, character: chr }); }; var checkUnused = function(func, key) { var type = func[key]; var tkn = func["(tokens)"][key]; if (key.charAt(0) === "(") return; if (type !== "unused" && type !== "unction" && type !== "const") return; if (func["(params)"] && func["(params)"].indexOf(key) !== -1) return; if (func["(global)"] && _.has(exported, key)) return; if (type === "const" && !getprop(func, key, "unused")) return; warnUnused(key, tkn, "var"); }; for (i = 0; i < JSHINT.undefs.length; i += 1) { k = JSHINT.undefs[i].slice(0); if (markDefined(k[2].value, k[0]) || k[2].forgiveUndef) { clearImplied(k[2].value, k[2].line); } else if (state.option.undef) { warning.apply(warning, k.slice(1)); } } functions.forEach(function(func) { if (func["(unusedOption)"] === false) { return; } for (var key in func) { if (_.has(func, key)) { checkUnused(func, key); } } if (!func["(params)"]) return; var params = func["(params)"].slice(); var param = params.pop(); var type, unused_opt; while (param) { type = func[param]; unused_opt = func["(unusedOption)"] || state.option.unused; unused_opt = unused_opt === true ? "last-param" : unused_opt; if (param === "undefined") return; if (type === "unused" || type === "unction") { warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]); } else if (unused_opt === "last-param") { return; } param = params.pop(); } }); for (var key in declared) { if (_.has(declared, key) && !_.has(global, key) && !_.has(exported, key)) { warnUnused(key, declared[key], "var"); } } } catch (err) { if (err && err.name === "JSHintError") { var nt = state.tokens.next || {}; JSHINT.errors.push({ scope : "(main)", raw : err.raw, code : err.code, reason : err.message, line : err.line || nt.line, character : err.character || nt.from }, null); } else { throw err; } } if (JSHINT.scope === "(main)") { o = o || {}; for (i = 0; i < JSHINT.internals.length; i += 1) { k = JSHINT.internals[i]; o.scope = k.elem; itself(k.value, o, g); } } return JSHINT.errors.length === 0; }; itself.addModule = function(func) { extraModules.push(func); }; itself.addModule(style.register); itself.data = function() { var data = { functions: [], options: state.option }; var implieds = []; var members = []; var fu, f, i, j, n, globals; if (itself.errors.length) { data.errors = itself.errors; } if (state.jsonMode) { data.json = true; } for (n in implied) { if (_.has(implied, n)) { implieds.push({ name: n, line: implied[n] }); } } if (implieds.length > 0) { data.implieds = implieds; } if (urls.length > 0) { data.urls = urls; } globals = Object.keys(scope); if (globals.length > 0) { data.globals = globals; } for (i = 1; i < functions.length; i += 1) { f = functions[i]; fu = {}; for (j = 0; j < functionicity.length; j += 1) { fu[functionicity[j]] = []; } for (j = 0; j < functionicity.length; j += 1) { if (fu[functionicity[j]].length === 0) { delete fu[functionicity[j]]; } } fu.name = f["(name)"]; fu.param = f["(params)"]; fu.line = f["(line)"]; fu.character = f["(character)"]; fu.last = f["(last)"]; fu.lastcharacter = f["(lastcharacter)"]; fu.metrics = { complexity: f["(metrics)"].ComplexityCount, parameters: (f["(params)"] || []).length, statements: f["(metrics)"].statementCount }; data.functions.push(fu); } if (unuseds.length > 0) { data.unused = unuseds; } members = []; for (n in member) { if (typeof member[n] === "number") { data.member = member; break; } } return data; }; itself.jshint = itself; return itself; }()); if (typeof exports === "object" && exports) { exports.JSHINT = JSHINT; } }, {"./lex.js":4,"./messages.js":5,"./options.js":7,"./reg.js":8,"./state.js":9,"./style.js":10,"./vars.js":11,"events":12,"underscore":2}], 4:[function(_dereq_,module,exports){ "use strict"; var _ = _dereq_("underscore"); var events = _dereq_("events"); var reg = _dereq_("./reg.js"); var state = _dereq_("./state.js").state; var unicodeData = _dereq_("../data/ascii-identifier-data.js"); var asciiIdentifierStartTable = unicodeData.asciiIdentifierStartTable; var asciiIdentifierPartTable = unicodeData.asciiIdentifierPartTable; var Token = { Identifier: 1, Punctuator: 2, NumericLiteral: 3, StringLiteral: 4, Comment: 5, Keyword: 6, NullLiteral: 7, BooleanLiteral: 8, RegExp: 9, TemplateHead: 10, TemplateMiddle: 11, TemplateTail: 12, NoSubstTemplate: 13 }; var Context = { Block: 1, Template: 2 }; function asyncTrigger() { var _checks = []; return { push: function(fn) { _checks.push(fn); }, check: function() { for (var check = 0; check < _checks.length; ++check) { _checks[check](); } _checks.splice(0, _checks.length); } }; } function Lexer(source) { var lines = source; if (typeof lines === "string") { lines = lines .replace(/\r\n/g, "\n") .replace(/\r/g, "\n") .split("\n"); } if (lines[0] && lines[0].substr(0, 2) === "#!") { if (lines[0].indexOf("node") !== -1) { state.option.node = true; } lines[0] = ""; } this.emitter = new events.EventEmitter(); this.source = source; this.setLines(lines); this.prereg = true; this.line = 0; this.char = 1; this.from = 1; this.input = ""; this.inComment = false; this.context = []; this.templateStarts = []; for (var i = 0; i < state.option.indent; i += 1) { state.tab += " "; } } Lexer.prototype = { _lines: [], inContext: function(ctxType) { return this.context.length > 0 && this.context[this.context.length - 1].type === ctxType; }, pushContext: function(ctxType) { this.context.push({ type: ctxType }); }, popContext: function() { return this.context.pop(); }, isContext: function(context) { return this.context.length > 0 && this.context[this.context.length - 1] === context; }, currentContext: function() { return this.context.length > 0 && this.context[this.context.length - 1]; }, getLines: function() { this._lines = state.lines; return this._lines; }, setLines: function(val) { this._lines = val; state.lines = this._lines; }, peek: function(i) { return this.input.charAt(i || 0); }, skip: function(i) { i = i || 1; this.char += i; this.input = this.input.slice(i); }, on: function(names, listener) { names.split(" ").forEach(function(name) { this.emitter.on(name, listener); }.bind(this)); }, trigger: function() { this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments)); }, triggerAsync: function(type, args, checks, fn) { checks.push(function() { if (fn()) { this.trigger(type, args); } }.bind(this)); }, scanPunctuator: function() { var ch1 = this.peek(); var ch2, ch3, ch4; switch (ch1) { case ".": if ((/^[0-9]$/).test(this.peek(1))) { return null; } if (this.peek(1) === "." && this.peek(2) === ".") { return { type: Token.Punctuator, value: "..." }; } case "(": case ")": case ";": case ",": case "[": case "]": case ":": case "~": case "?": return { type: Token.Punctuator, value: ch1 }; case "{": this.pushContext(Context.Block); return { type: Token.Punctuator, value: ch1 }; case "}": if (this.inContext(Context.Block)) { this.popContext(); } return { type: Token.Punctuator, value: ch1 }; case "#": return { type: Token.Punctuator, value: ch1 }; case "": return null; } ch2 = this.peek(1); ch3 = this.peek(2); ch4 = this.peek(3); if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") { return { type: Token.Punctuator, value: ">>>=" }; } if (ch1 === "=" && ch2 === "=" && ch3 === "=") { return { type: Token.Punctuator, value: "===" }; } if (ch1 === "!" && ch2 === "=" && ch3 === "=") { return { type: Token.Punctuator, value: "!==" }; } if (ch1 === ">" && ch2 === ">" && ch3 === ">") { return { type: Token.Punctuator, value: ">>>" }; } if (ch1 === "<" && ch2 === "<" && ch3 === "=") { return { type: Token.Punctuator, value: "<<=" }; } if (ch1 === ">" && ch2 === ">" && ch3 === "=") { return { type: Token.Punctuator, value: ">>=" }; } if (ch1 === "=" && ch2 === ">") { return { type: Token.Punctuator, value: ch1 + ch2 }; } if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) { return { type: Token.Punctuator, value: ch1 + ch2 }; } if ("<>=!+-*%&|^".indexOf(ch1) >= 0) { if (ch2 === "=") { return { type: Token.Punctuator, value: ch1 + ch2 }; } return { type: Token.Punctuator, value: ch1 }; } if (ch1 === "/") { if (ch2 === "=") { return { type: Token.Punctuator, value: "/=" }; } return { type: Token.Punctuator, value: "/" }; } return null; }, scanComments: function() { var ch1 = this.peek(); var ch2 = this.peek(1); var rest = this.input.substr(2); var startLine = this.line; var startChar = this.char; function commentToken(label, body, opt) { var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"]; var isSpecial = false; var value = label + body; var commentType = "plain"; opt = opt || {}; if (opt.isMultiline) { value += "*/"; } body = body.replace(/\n/g, " "); special.forEach(function(str) { if (isSpecial) { return; } if (label === "//" && str !== "jshint") { return; } if (body.charAt(str.length) === " " && body.substr(0, str.length) === str) { isSpecial = true; label = label + str; body = body.substr(str.length); } if (!isSpecial && body.charAt(0) === " " && body.charAt(str.length + 1) === " " && body.substr(1, str.length) === str) { isSpecial = true; label = label + " " + str; body = body.substr(str.length + 1); } if (!isSpecial) { return; } switch (str) { case "member": commentType = "members"; break; case "global": commentType = "globals"; break; default: commentType = str; } }); return { type: Token.Comment, commentType: commentType, value: value, body: body, isSpecial: isSpecial, isMultiline: opt.isMultiline || false, isMalformed: opt.isMalformed || false }; } if (ch1 === "*" && ch2 === "/") { this.trigger("error", { code: "E018", line: startLine, character: startChar }); this.skip(2); return null; } if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) { return null; } if (ch2 === "/") { this.skip(this.input.length); // Skip to the EOL. return commentToken("//", rest); } var body = ""; if (ch2 === "*") { this.inComment = true; this.skip(2); while (this.peek() !== "*" || this.peek(1) !== "/") { if (this.peek() === "") { // End of Line body += "\n"; if (!this.nextLine()) { this.trigger("error", { code: "E017", line: startLine, character: startChar }); this.inComment = false; return commentToken("/*", body, { isMultiline: true, isMalformed: true }); } } else { body += this.peek(); this.skip(); } } this.skip(2); this.inComment = false; return commentToken("/*", body, { isMultiline: true }); } }, scanKeyword: function() { var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input); var keywords = [ "if", "in", "do", "var", "for", "new", "try", "let", "this", "else", "case", "void", "with", "enum", "while", "break", "catch", "throw", "const", "yield", "class", "super", "return", "typeof", "delete", "switch", "export", "import", "default", "finally", "extends", "function", "continue", "debugger", "instanceof" ]; if (result && keywords.indexOf(result[0]) >= 0) { return { type: Token.Keyword, value: result[0] }; } return null; }, scanIdentifier: function() { var id = ""; var index = 0; var type, char; function isNonAsciiIdentifierStart(code) { return code > 256; } function isNonAsciiIdentifierPart(code) { return code > 256; } function isHexDigit(str) { return (/^[0-9a-fA-F]$/).test(str); } var readUnicodeEscapeSequence = function() { index += 1; if (this.peek(index) !== "u") { return null; } var ch1 = this.peek(index + 1); var ch2 = this.peek(index + 2); var ch3 = this.peek(index + 3); var ch4 = this.peek(index + 4); var code; if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) { code = parseInt(ch1 + ch2 + ch3 + ch4, 16); if (asciiIdentifierPartTable[code] || isNonAsciiIdentifierPart(code)) { index += 5; return "\\u" + ch1 + ch2 + ch3 + ch4; } return null; } return null; }.bind(this); var getIdentifierStart = function() { var chr = this.peek(index); var code = chr.charCodeAt(0); if (code === 92) { return readUnicodeEscapeSequence(); } if (code < 128) { if (asciiIdentifierStartTable[code]) { index += 1; return chr; } return null; } if (isNonAsciiIdentifierStart(code)) { index += 1; return chr; } return null; }.bind(this); var getIdentifierPart = function() { var chr = this.peek(index); var code = chr.charCodeAt(0); if (code === 92) { return readUnicodeEscapeSequence(); } if (code < 128) { if (asciiIdentifierPartTable[code]) { index += 1; return chr; } return null; } if (isNonAsciiIdentifierPart(code)) { index += 1; return chr; } return null; }.bind(this); function removeEscapeSequences(id) { return id.replace(/\\u([0-9a-fA-F]{4})/g, function(m0, codepoint) { return String.fromCharCode(parseInt(codepoint, 16)); }); } char = getIdentifierStart(); if (char === null) { return null; } id = char; for (;;) { char = getIdentifierPart(); if (char === null) { break; } id += char; } switch (id) { case "true": case "false": type = Token.BooleanLiteral; break; case "null": type = Token.NullLiteral; break; default: type = Token.Identifier; } return { type: type, value: removeEscapeSequences(id), text: id, tokenLength: id.length }; }, scanNumericLiteral: function() { var index = 0; var value = ""; var length = this.input.length; var char = this.peek(index); var bad; var isAllowedDigit = isDecimalDigit; var base = 10; var isLegacy = false; function isDecimalDigit(str) { return (/^[0-9]$/).test(str); } function isOctalDigit(str) { return (/^[0-7]$/).test(str); } function isBinaryDigit(str) { return (/^[01]$/).test(str); } function isHexDigit(str) { return (/^[0-9a-fA-F]$/).test(str); } function isIdentifierStart(ch) { return (ch === "$") || (ch === "_") || (ch === "\\") || (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z"); } if (char !== "." && !isDecimalDigit(char)) { return null; } if (char !== ".") { value = this.peek(index); index += 1; char = this.peek(index); if (value === "0") { if (char === "x" || char === "X") { isAllowedDigit = isHexDigit; base = 16; index += 1; value += char; } if (char === "o" || char === "O") { isAllowedDigit = isOctalDigit; base = 8; if (!state.option.esnext) { this.trigger("warning", { code: "W119", line: this.line, character: this.char, data: [ "Octal integer literal" ] }); } index += 1; value += char; } if (char === "b" || char === "B") { isAllowedDigit = isBinaryDigit; base = 2; if (!state.option.esnext) { this.trigger("warning", { code: "W119", line: this.line, character: this.char, data: [ "Binary integer literal" ] }); } index += 1; value += char; } if (isOctalDigit(char)) { isAllowedDigit = isOctalDigit; base = 8; isLegacy = true; bad = false; index += 1; value += char; } if (!isOctalDigit(char) && isDecimalDigit(char)) { index += 1; value += char; } } while (index < length) { char = this.peek(index); if (isLegacy && isDecimalDigit(char)) { bad = true; } else if (!isAllowedDigit(char)) { break; } value += char; index += 1; } if (isAllowedDigit !== isDecimalDigit) { if (!isLegacy && value.length <= 2) { // 0x return { type: Token.NumericLiteral, value: value, isMalformed: true }; } if (index < length) { char = this.peek(index); if (isIdentifierStart(char)) { return null; } } return { type: Token.NumericLiteral, value: value, base: base, isLegacy: isLegacy, isMalformed: false }; } } if (char === ".") { value += char; index += 1; while (index < length) { char = this.peek(index); if (!isDecimalDigit(char)) { break; } value += char; index += 1; } } if (char === "e" || char === "E") { value += char; index += 1; char = this.peek(index); if (char === "+" || char === "-") { value += this.peek(index); index += 1; } char = this.peek(index); if (isDecimalDigit(char)) { value += char; index += 1; while (index < length) { char = this.peek(index); if (!isDecimalDigit(char)) { break; } value += char; index += 1; } } else { return null; } } if (index < length) { char = this.peek(index); if (isIdentifierStart(char)) { return null; } } return { type: Token.NumericLiteral, value: value, base: base, isMalformed: !isFinite(value) }; }, scanEscapeSequence: function(checks) { var allowNewLine = false; var jump = 1; this.skip(); var char = this.peek(); switch (char) { case "'": this.triggerAsync("warning", { code: "W114", line: this.line, character: this.char, data: [ "\\'" ] }, checks, function() {return state.jsonMode; }); break; case "b": char = "\\b"; break; case "f": char = "\\f"; break; case "n": char = "\\n"; break; case "r": char = "\\r"; break; case "t": char = "\\t"; break; case "0": char = "\\0"; var n = parseInt(this.peek(1), 10); this.triggerAsync("warning", { code: "W115", line: this.line, character: this.char }, checks, function() { return n >= 0 && n <= 7 && state.directive["use strict"]; }); break; case "u": var hexCode = this.input.substr(1, 4); var code = parseInt(hexCode, 16); if (isNaN(code)) { this.trigger("warning", { code: "W052", line: this.line, character: this.char, data: [ "u" + hexCode ] }); } char = String.fromCharCode(code); jump = 5; break; case "v": this.triggerAsync("warning", { code: "W114", line: this.line, character: this.char, data: [ "\\v" ] }, checks, function() { return state.jsonMode; }); char = "\v"; break; case "x": var x = parseInt(this.input.substr(1, 2), 16); this.triggerAsync("warning", { code: "W114", line: this.line, character: this.char, data: [ "\\x-" ] }, checks, function() { return state.jsonMode; }); char = String.fromCharCode(x); jump = 3; break; case "\\": char = "\\\\"; break; case "\"": char = "\\\""; break; case "/": break; case "": allowNewLine = true; char = ""; break; } return { char: char, jump: jump, allowNewLine: allowNewLine }; }, scanTemplateLiteral: function(checks) { var tokenType; var value = ""; var ch; var startLine = this.line; var startChar = this.char; var depth = this.templateStarts.length; if (!state.option.esnext) { return null; } else if (this.peek() === "`") { tokenType = Token.TemplateHead; this.templateStarts.push({ line: this.line, char: this.char }); depth = this.templateStarts.length; this.skip(1); this.pushContext(Context.Template); } else if (this.inContext(Context.Template) && this.peek() === "}") { tokenType = Token.TemplateMiddle; } else { return null; } while (this.peek() !== "`") { while ((ch = this.peek()) === "") { value += "\n"; if (!this.nextLine()) { var startPos = this.templateStarts.pop(); this.trigger("error", { code: "E052", line: startPos.line, character: startPos.char }); return { type: tokenType, value: value, startLine: startLine, startChar: startChar, isUnclosed: true, depth: depth, context: this.popContext() }; } } if (ch === '$' && this.peek(1) === '{') { value += '${'; this.skip(2); return { type: tokenType, value: value, startLine: startLine, startChar: startChar, isUnclosed: false, depth: depth, context: this.currentContext() }; } else if (ch === '\\') { var escape = this.scanEscapeSequence(checks); value += escape.char; this.skip(escape.jump); } else if (ch !== '`') { value += ch; this.skip(1); } } tokenType = tokenType === Token.TemplateHead ? Token.NoSubstTemplate : Token.TemplateTail; this.skip(1); this.templateStarts.pop(); return { type: tokenType, value: value, startLine: startLine, startChar: startChar, isUnclosed: false, depth: depth, context: this.popContext() }; }, scanStringLiteral: function(checks) { var quote = this.peek(); if (quote !== "\"" && quote !== "'") { return null; } this.triggerAsync("warning", { code: "W108", line: this.line, character: this.char // +1? }, checks, function() { return state.jsonMode && quote !== "\""; }); var value = ""; var startLine = this.line; var startChar = this.char; var allowNewLine = false; this.skip(); outer: while (this.peek() !== quote) { while (this.peek() === "") { // End Of Line if (!allowNewLine) { this.trigger("warning", { code: "W112", line: this.line, character: this.char }); } else { allowNewLine = false; this.triggerAsync("warning", { code: "W043", line: this.line, character: this.char }, checks, function() { return !state.option.multistr; }); this.triggerAsync("warning", { code: "W042", line: this.line, character: this.char }, checks, function() { return state.jsonMode && state.option.multistr; }); } if (!this.nextLine()) { this.trigger("error", { code: "E029", line: startLine, character: startChar }); return { type: Token.StringLiteral, value: value, startLine: startLine, startChar: startChar, isUnclosed: true, quote: quote }; } if (this.peek() == quote) break outer; } allowNewLine = false; var char = this.peek(); var jump = 1; // A length of a jump, after we're done if (char < " ") { this.trigger("warning", { code: "W113", line: this.line, character: this.char, data: [ "" ] }); } if (char === "\\") { var parsed = this.scanEscapeSequence(checks); char = parsed.char; jump = parsed.jump; allowNewLine = parsed.allowNewLine; } value += char; this.skip(jump); } this.skip(); return { type: Token.StringLiteral, value: value, startLine: startLine, startChar: startChar, isUnclosed: false, quote: quote }; }, scanRegExp: function() { var index = 0; var length = this.input.length; var char = this.peek(); var value = char; var body = ""; var flags = []; var malformed = false; var isCharSet = false; var terminated; var scanUnexpectedChars = function() { if (char < " ") { malformed = true; this.trigger("warning", { code: "W048", line: this.line, character: this.char }); } if (char === "<") { malformed = true; this.trigger("warning", { code: "W049", line: this.line, character: this.char, data: [ char ] }); } }.bind(this); if (!this.prereg || char !== "/") { return null; } index += 1; terminated = false; while (index < length) { char = this.peek(index); value += char; body += char; if (isCharSet) { if (char === "]") { if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") { isCharSet = false; } } if (char === "\\") { index += 1; char = this.peek(index); body += char; value += char; scanUnexpectedChars(); } index += 1; continue; } if (char === "\\") { index += 1; char = this.peek(index); body += char; value += char; scanUnexpectedChars(); if (char === "/") { index += 1; continue; } if (char === "[") { index += 1; continue; } } if (char === "[") { isCharSet = true; index += 1; continue; } if (char === "/") { body = body.substr(0, body.length - 1); terminated = true; index += 1; break; } index += 1; } if (!terminated) { this.trigger("error", { code: "E015", line: this.line, character: this.from }); return void this.trigger("fatal", { line: this.line, from: this.from }); } while (index < length) { char = this.peek(index); if (!/[gim]/.test(char)) { break; } flags.push(char); value += char; index += 1; } try { new RegExp(body, flags.join("")); } catch (err) { malformed = true; this.trigger("error", { code: "E016", line: this.line, character: this.char, data: [ err.message ] // Platform dependent! }); } return { type: Token.RegExp, value: value, flags: flags, isMalformed: malformed }; }, scanNonBreakingSpaces: function() { return state.option.nonbsp ? this.input.search(/(\u00A0)/) : -1; }, scanUnsafeChars: function() { return this.input.search(reg.unsafeChars); }, next: function(checks) { this.from = this.char; var start; if (/\s/.test(this.peek())) { start = this.char; while (/\s/.test(this.peek())) { this.from += 1; this.skip(); } } var match = this.scanComments() || this.scanStringLiteral(checks) || this.scanTemplateLiteral(checks); if (match) { return match; } match = this.scanRegExp() || this.scanPunctuator() || this.scanKeyword() || this.scanIdentifier() || this.scanNumericLiteral(); if (match) { this.skip(match.tokenLength || match.value.length); return match; } return null; }, nextLine: function() { var char; if (this.line >= this.getLines().length) { return false; } this.input = this.getLines()[this.line]; this.line += 1; this.char = 1; this.from = 1; var inputTrimmed = this.input.trim(); var startsWith = function() { return _.some(arguments, function(prefix) { return inputTrimmed.indexOf(prefix) === 0; }); }; var endsWith = function() { return _.some(arguments, function(suffix) { return inputTrimmed.indexOf(suffix, inputTrimmed.length - suffix.length) !== -1; }); }; if (state.ignoreLinterErrors === true) { if (!startsWith("/*", "//") && !(this.inComment && endsWith("*/"))) { this.input = ""; } } char = this.scanNonBreakingSpaces(); if (char >= 0) { this.trigger("warning", { code: "W125", line: this.line, character: char + 1 }); } this.input = this.input.replace(/\t/g, state.tab); char = this.scanUnsafeChars(); if (char >= 0) { this.trigger("warning", { code: "W100", line: this.line, character: char }); } if (state.option.maxlen && state.option.maxlen < this.input.length) { var inComment = this.inComment || startsWith.call(inputTrimmed, "//") || startsWith.call(inputTrimmed, "/*"); var shouldTriggerError = !inComment || !reg.maxlenException.test(inputTrimmed); if (shouldTriggerError) { this.trigger("warning", { code: "W101", line: this.line, character: this.input.length }); } } return true; }, start: function() { this.nextLine(); }, token: function() { var checks = asyncTrigger(); var token; function isReserved(token, isProperty) { if (!token.reserved) { return false; } var meta = token.meta; if (meta && meta.isFutureReservedWord && state.option.inES5()) { if (!meta.es5) { return false; } if (meta.strictOnly) { if (!state.option.strict && !state.directive["use strict"]) { return false; } } if (isProperty) { return false; } } return true; } var create = function(type, value, isProperty, token) { var obj; if (type !== "(endline)" && type !== "(end)") { this.prereg = false; } if (type === "(punctuator)") { switch (value) { case ".": case ")": case "~": case "#": case "]": case "++": case "--": this.prereg = false; break; default: this.prereg = true; } obj = Object.create(state.syntax[value] || state.syntax["(error)"]); } if (type === "(identifier)") { if (value === "return" || value === "case" || value === "typeof") { this.prereg = true; } if (_.has(state.syntax, value)) { obj = Object.create(state.syntax[value] || state.syntax["(error)"]); if (!isReserved(obj, isProperty && type === "(identifier)")) { obj = null; } } } if (!obj) { obj = Object.create(state.syntax[type]); } obj.identifier = (type === "(identifier)"); obj.type = obj.type || type; obj.value = value; obj.line = this.line; obj.character = this.char; obj.from = this.from; if (obj.identifier && token) obj.raw_text = token.text || token.value; if (token && token.startLine && token.startLine !== this.line) { obj.startLine = token.startLine; } if (token && token.context) { obj.context = token.context; } if (token && token.depth) { obj.depth = token.depth; } if (token && token.isUnclosed) { obj.isUnclosed = token.isUnclosed; } if (isProperty && obj.identifier) { obj.isProperty = isProperty; } obj.check = checks.check; return obj; }.bind(this); for (;;) { if (!this.input.length) { return create(this.nextLine() ? "(endline)" : "(end)", ""); } token = this.next(checks); if (!token) { if (this.input.length) { this.trigger("error", { code: "E024", line: this.line, character: this.char, data: [ this.peek() ] }); this.input = ""; } continue; } switch (token.type) { case Token.StringLiteral: this.triggerAsync("String", { line: this.line, char: this.char, from: this.from, startLine: token.startLine, startChar: token.startChar, value: token.value, quote: token.quote }, checks, function() { return true; }); return create("(string)", token.value, null, token); case Token.TemplateHead: this.trigger("TemplateHead", { line: this.line, char: this.char, from: this.from, startLine: token.startLine, startChar: token.startChar, value: token.value }); return create("(template)", token.value, null, token); case Token.TemplateMiddle: this.trigger("TemplateMiddle", { line: this.line, char: this.char, from: this.from, startLine: token.startLine, startChar: token.startChar, value: token.value }); return create("(template middle)", token.value, null, token); case Token.TemplateTail: this.trigger("TemplateTail", { line: this.line, char: this.char, from: this.from, startLine: token.startLine, startChar: token.startChar, value: token.value }); return create("(template tail)", token.value, null, token); case Token.NoSubstTemplate: this.trigger("NoSubstTemplate", { line: this.line, char: this.char, from: this.from, startLine: token.startLine, startChar: token.startChar, value: token.value }); return create("(no subst template)", token.value, null, token); case Token.Identifier: this.trigger("Identifier", { line: this.line, char: this.char, from: this.form, name: token.value, raw_name: token.text, isProperty: state.tokens.curr.id === "." }); case Token.Keyword: case Token.NullLiteral: case Token.BooleanLiteral: return create("(identifier)", token.value, state.tokens.curr.id === ".", token); case Token.NumericLiteral: if (token.isMalformed) { this.trigger("warning", { code: "W045", line: this.line, character: this.char, data: [ token.value ] }); } this.triggerAsync("warning", { code: "W114", line: this.line, character: this.char, data: [ "0x-" ] }, checks, function() { return token.base === 16 && state.jsonMode; }); this.triggerAsync("warning", { code: "W115", line: this.line, character: this.char }, checks, function() { return state.directive["use strict"] && token.base === 8 && token.isLegacy; }); this.trigger("Number", { line: this.line, char: this.char, from: this.from, value: token.value, base: token.base, isMalformed: token.malformed }); return create("(number)", token.value); case Token.RegExp: return create("(regexp)", token.value); case Token.Comment: state.tokens.curr.comment = true; if (token.isSpecial) { return { id: '(comment)', value: token.value, body: token.body, type: token.commentType, isSpecial: token.isSpecial, line: this.line, character: this.char, from: this.from }; } break; case "": break; default: return create("(punctuator)", token.value); } } } }; exports.Lexer = Lexer; exports.Context = Context; }, {"../data/ascii-identifier-data.js":1,"./reg.js":8,"./state.js":9,"events":12,"underscore":2}], 5:[function(_dereq_,module,exports){ "use strict"; var _ = _dereq_("underscore"); var errors = { E001: "Bad option: '{a}'.", E002: "Bad option value.", E003: "Expected a JSON value.", E004: "Input is neither a string nor an array of strings.", E005: "Input is empty.", E006: "Unexpected early end of program.", E007: "Missing \"use strict\" statement.", E008: "Strict violation.", E009: "Option 'validthis' can't be used in a global scope.", E010: "'with' is not allowed in strict mode.", E011: "const '{a}' has already been declared.", E012: "const '{a}' is initialized to 'undefined'.", E013: "Attempting to override '{a}' which is a constant.", E014: "A regular expression literal can be confused with '/='.", E015: "Unclosed regular expression.", E016: "Invalid regular expression.", E017: "Unclosed comment.", E018: "Unbegun comment.", E019: "Unmatched '{a}'.", E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.", E021: "Expected '{a}' and instead saw '{b}'.", E022: "Line breaking error '{a}'.", E023: "Missing '{a}'.", E024: "Unexpected '{a}'.", E025: "Missing ':' on a case clause.", E026: "Missing '}' to match '{' from line {a}.", E027: "Missing ']' to match '[' from line {a}.", E028: "Illegal comma.", E029: "Unclosed string.", E030: "Expected an identifier and instead saw '{a}'.", E031: "Bad assignment.", // FIXME: Rephrase E032: "Expected a small integer or 'false' and instead saw '{a}'.", E033: "Expected an operator and instead saw '{a}'.", E034: "get/set are ES5 features.", E035: "Missing property name.", E036: "Expected to see a statement and instead saw a block.", E037: null, E038: null, E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.", E040: "Each value should have its own case label.", E041: "Unrecoverable syntax error.", E042: "Stopping.", E043: "Too many errors.", E044: null, E045: "Invalid for each loop.", E046: "A yield statement shall be within a generator function (with syntax: `function*`)", E047: null, // Vacant E048: "Let declaration not directly within block.", E049: "A {a} cannot be named '{b}'.", E050: "Mozilla requires the yield expression to be parenthesized here.", E051: "Regular parameters cannot come after default parameters.", E052: "Unclosed template literal.", E053: "Export declaration must be in global scope.", E054: "Class properties must be methods. Expected '(' but instead saw '{a}'." }; var warnings = { W001: "'hasOwnProperty' is a really bad name.", W002: "Value of '{a}' may be overwritten in IE 8 and earlier.", W003: "'{a}' was used before it was defined.", W004: "'{a}' is already defined.", W005: "A dot following a number can be confused with a decimal point.", W006: "Confusing minuses.", W007: "Confusing plusses.", W008: "A leading decimal point can be confused with a dot: '{a}'.", W009: "The array literal notation [] is preferable.", W010: "The object literal notation {} is preferable.", W011: null, W012: null, W013: null, W014: "Bad line breaking before '{a}'.", W015: null, W016: "Unexpected use of '{a}'.", W017: "Bad operand.", W018: "Confusing use of '{a}'.", W019: "Use the isNaN function to compare with NaN.", W020: "Read only.", W021: "'{a}' is a function.", W022: "Do not assign to the exception parameter.", W023: "Expected an identifier in an assignment and instead saw a function invocation.", W024: "Expected an identifier and instead saw '{a}' (a reserved word).", W025: "Missing name in function declaration.", W026: "Inner functions should be listed at the top of the outer function.", W027: "Unreachable '{a}' after '{b}'.", W028: "Label '{a}' on {b} statement.", W030: "Expected an assignment or function call and instead saw an expression.", W031: "Do not use 'new' for side effects.", W032: "Unnecessary semicolon.", W033: "Missing semicolon.", W034: "Unnecessary directive \"{a}\".", W035: "Empty block.", W036: "Unexpected /*member '{a}'.", W037: "'{a}' is a statement label.", W038: "'{a}' used out of scope.", W039: "'{a}' is not allowed.", W040: "Possible strict violation.", W041: "Use '{a}' to compare with '{b}'.", W042: "Avoid EOL escaping.", W043: "Bad escaping of EOL. Use option multistr if needed.", W044: "Bad or unnecessary escaping.", /* TODO(caitp): remove W044 */ W045: "Bad number '{a}'.", W046: "Don't use extra leading zeros '{a}'.", W047: "A trailing decimal point can be confused with a dot: '{a}'.", W048: "Unexpected control character in regular expression.", W049: "Unexpected escaped character '{a}' in regular expression.", W050: "JavaScript URL.", W051: "Variables should not be deleted.", W052: "Unexpected '{a}'.", W053: "Do not use {a} as a constructor.", W054: "The Function constructor is a form of eval.", W055: "A constructor name should start with an uppercase letter.", W056: "Bad constructor.", W057: "Weird construction. Is 'new' necessary?", W058: "Missing '()' invoking a constructor.", W059: "Avoid arguments.{a}.", W060: "document.write can be a form of eval.", W061: "eval can be harmful.", W062: "Wrap an immediate function invocation in parens " + "to assist the reader in understanding that the expression " + "is the result of a function, and not the function itself.", W063: "Math is not a function.", W064: "Missing 'new' prefix when invoking a constructor.", W065: "Missing radix parameter.", W066: "Implied eval. Consider passing a function instead of a string.", W067: "Bad invocation.", W068: "Wrapping non-IIFE function literals in parens is unnecessary.", W069: "['{a}'] is better written in dot notation.", W070: "Extra comma. (it breaks older versions of IE)", W071: "This function has too many statements. ({a})", W072: "This function has too many parameters. ({a})", W073: "Blocks are nested too deeply. ({a})", W074: "This function's cyclomatic complexity is too high. ({a})", W075: "Duplicate {a} '{b}'.", W076: "Unexpected parameter '{a}' in get {b} function.", W077: "Expected a single parameter in set {a} function.", W078: "Setter is defined without getter.", W079: "Redefinition of '{a}'.", W080: "It's not necessary to initialize '{a}' to 'undefined'.", W081: null, W082: "Function declarations should not be placed in blocks. " + "Use a function expression or move the statement to the top of " + "the outer function.", W083: "Don't make functions within a loop.", W084: "Assignment in conditional expression", W085: "Don't use 'with'.", W086: "Expected a 'break' statement before '{a}'.", W087: "Forgotten 'debugger' statement?", W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.", W089: "The body of a for in should be wrapped in an if statement to filter " + "unwanted properties from the prototype.", W090: "'{a}' is not a statement label.", W091: "'{a}' is out of scope.", W093: "Did you mean to return a conditional instead of an assignment?", W094: "Unexpected comma.", W095: "Expected a string and instead saw {a}.", W096: "The '{a}' key may produce unexpected results.", W097: "Use the function form of \"use strict\".", W098: "'{a}' is defined but never used.", W099: null, W100: "This character may get silently deleted by one or more browsers.", W101: "Line is too long.", W102: null, W103: "The '{a}' property is deprecated.", W104: "'{a}' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz).", W105: "Unexpected {a} in '{b}'.", W106: "Identifier '{a}' is not in camel case.", W107: "Script URL.", W108: "Strings must use doublequote.", W109: "Strings must use singlequote.", W110: "Mixed double and single quotes.", W112: "Unclosed string.", W113: "Control character in string: {a}.", W114: "Avoid {a}.", W115: "Octal literals are not allowed in strict mode.", W116: "Expected '{a}' and instead saw '{b}'.", W117: "'{a}' is not defined.", W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).", W119: "'{a}' is only available in ES6 (use esnext option).", W120: "You might be leaking a variable ({a}) here.", W121: "Extending prototype of native object: '{a}'.", W122: "Invalid typeof value '{a}'", W123: "'{a}' is already defined in outer scope.", W124: "A generator function shall contain a yield statement.", W125: "This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp", W126: "Unnecessary grouping operator.", W127: "Unexpected use of a comma operator.", W128: "Empty array elements require elision=true.", W129: "'{a}' is defined in a future version of JavaScript. Use a " + "different variable name to avoid migration issues.", W130: "Invalid element after rest element.", W131: "Invalid parameter after rest parameter." }; var info = { I001: "Comma warnings can be turned off with 'laxcomma'.", I002: null, I003: "ES5 option is now set per default" }; exports.errors = {}; exports.warnings = {}; exports.info = {}; _.each(errors, function(desc, code) { exports.errors[code] = { code: code, desc: desc }; }); _.each(warnings, function(desc, code) { exports.warnings[code] = { code: code, desc: desc }; }); _.each(info, function(desc, code) { exports.info[code] = { code: code, desc: desc }; }); }, {"underscore":2}], 6:[function(_dereq_,module,exports){ "use strict"; function NameStack() { this._stack = []; } Object.defineProperty(NameStack.prototype, "length", { get: function() { return this._stack.length; } }); NameStack.prototype.push = function() { this._stack.push(null); }; NameStack.prototype.pop = function() { this._stack.pop(); }; NameStack.prototype.set = function(token) { this._stack[this.length - 1] = token; }; NameStack.prototype.infer = function() { var nameToken = this._stack[this.length - 1]; var prefix = ""; var type; if (!nameToken || nameToken.type === "class") { nameToken = this._stack[this.length - 2]; } if (!nameToken) { return "(empty)"; } type = nameToken.type; if (type !== "(string)" && type !== "(number)" && type !== "(identifier)" && type !== "default") { return "(expression)"; } if (nameToken.accessorType) { prefix = nameToken.accessorType + " "; } return prefix + nameToken.value; }; module.exports = NameStack; }, {}], 7:[function(_dereq_,module,exports){ "use strict"; exports.bool = { enforcing: { bitwise : true, freeze : true, camelcase : true, curly : true, eqeqeq : true, futurehostile: true, notypeof : true, es3 : true, es5 : true, forin : true, funcscope : true, globalstrict: true, immed : true, iterator : true, newcap : true, noarg : true, nocomma : true, noempty : true, nonbsp : true, nonew : true, undef : true, singleGroups: false, enforceall : false }, relaxing: { asi : true, multistr : true, debug : true, boss : true, phantom : true, evil : true, plusplus : true, proto : true, scripturl : true, strict : true, sub : true, supernew : true, laxbreak : true, laxcomma : true, validthis : true, withstmt : true, moz : true, noyield : true, eqnull : true, lastsemic : true, loopfunc : true, expr : true, esnext : true, elision : true, }, environments: { mootools : true, couch : true, jasmine : true, jquery : true, node : true, qunit : true, rhino : true, shelljs : true, prototypejs : true, yui : true, mocha : true, wsh : true, worker : true, nonstandard : true, browser : true, browserify : true, devel : true, dojo : true, typed : true }, obsolete: { onecase : true, // if one case switch statements should be allowed regexp : true, // if the . should not be allowed in regexp literals regexdash : true // if unescaped first/last dash (-) inside brackets } }; exports.val = { maxlen : false, indent : false, maxerr : false, predef : false, // predef is deprecated and being replaced by globals globals : false, quotmark : false, scope : false, maxstatements: false, maxdepth : false, maxparams : false, maxcomplexity: false, shadow : false, unused : true, latedef : false, ignore : false, // start/end ignoring lines of code, bypassing the lexer ignoreDelimiters: false // array of start/end delimiters used to ignore }; exports.inverted = { bitwise : true, forin : true, newcap : true, plusplus: true, regexp : true, undef : true, eqeqeq : true, strict : true }; exports.validNames = Object.keys(exports.val) .concat(Object.keys(exports.bool.relaxing)) .concat(Object.keys(exports.bool.enforcing)) .concat(Object.keys(exports.bool.obsolete)) .concat(Object.keys(exports.bool.environments)); exports.renamed = { eqeq : "eqeqeq", windows: "wsh", sloppy : "strict" }; exports.removed = { nomen: true, onevar: true, passfail: true, white: true, gcl: true, smarttabs: true, trailing: true }; }, {}], 8:[function(_dereq_,module,exports){ "use strict"; exports.unsafeString = /@cc|<\/?|script|\]\s*\]|<\s*!|</i; exports.unsafeChars = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; exports.needEsc = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; exports.needEscGlobal = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; exports.starSlash = /\*\//; exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/; exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i; exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/; exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/; }, {}], 9:[function(_dereq_,module,exports){ "use strict"; var NameStack = _dereq_("./name-stack.js"); var state = { syntax: {}, reset: function() { this.tokens = { prev: null, next: null, curr: null }; this.option = {}; this.ignored = {}; this.directive = {}; this.jsonMode = false; this.jsonWarnings = []; this.lines = []; this.tab = ""; this.cache = {}; // Node.JS doesn't have Map. Sniff. this.ignoredLines = {}; this.forinifcheckneeded = false; this.nameStack = new NameStack(); this.ignoreLinterErrors = false; } }; exports.state = state; }, {"./name-stack.js":6}], 10:[function(_dereq_,module,exports){ "use strict"; exports.register = function(linter) { linter.on("Identifier", function style_scanProto(data) { if (linter.getOption("proto")) { return; } if (data.name === "__proto__") { linter.warn("W103", { line: data.line, char: data.char, data: [ data.name ] }); } }); linter.on("Identifier", function style_scanIterator(data) { if (linter.getOption("iterator")) { return; } if (data.name === "__iterator__") { linter.warn("W104", { line: data.line, char: data.char, data: [ data.name ] }); } }); linter.on("Identifier", function style_scanCamelCase(data) { if (!linter.getOption("camelcase")) { return; } if (data.name.replace(/^_+|_+$/g, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) { linter.warn("W106", { line: data.line, char: data.from, data: [ data.name ] }); } }); linter.on("String", function style_scanQuotes(data) { var quotmark = linter.getOption("quotmark"); var code; if (!quotmark) { return; } if (quotmark === "single" && data.quote !== "'") { code = "W109"; } if (quotmark === "double" && data.quote !== "\"") { code = "W108"; } if (quotmark === true) { if (!linter.getCache("quotmark")) { linter.setCache("quotmark", data.quote); } if (linter.getCache("quotmark") !== data.quote) { code = "W110"; } } if (code) { linter.warn(code, { line: data.line, char: data.char, }); } }); linter.on("Number", function style_scanNumbers(data) { if (data.value.charAt(0) === ".") { linter.warn("W008", { line: data.line, char: data.char, data: [ data.value ] }); } if (data.value.substr(data.value.length - 1) === ".") { linter.warn("W047", { line: data.line, char: data.char, data: [ data.value ] }); } if (/^00+/.test(data.value)) { linter.warn("W046", { line: data.line, char: data.char, data: [ data.value ] }); } }); linter.on("String", function style_scanJavaScriptURLs(data) { var re = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i; if (linter.getOption("scripturl")) { return; } if (re.test(data.value)) { linter.warn("W107", { line: data.line, char: data.char }); } }); }; }, {}], 11:[function(_dereq_,module,exports){ "use strict"; exports.reservedVars = { arguments : false, NaN : false }; exports.ecmaIdentifiers = { 3: { Array : false, Boolean : false, Date : false, decodeURI : false, decodeURIComponent : false, encodeURI : false, encodeURIComponent : false, Error : false, "eval" : false, EvalError : false, Function : false, hasOwnProperty : false, isFinite : false, isNaN : false, Math : false, Number : false, Object : false, parseInt : false, parseFloat : false, RangeError : false, ReferenceError : false, RegExp : false, String : false, SyntaxError : false, TypeError : false, URIError : false }, 5: { JSON : false }, 6: { Map : false, Promise : false, Proxy : false, Reflect : false, Set : false, Symbol : false, WeakMap : false, WeakSet : false } }; exports.browser = { Audio : false, Blob : false, addEventListener : false, applicationCache : false, atob : false, blur : false, btoa : false, cancelAnimationFrame : false, CanvasGradient : false, CanvasPattern : false, CanvasRenderingContext2D: false, CSS : false, clearInterval : false, clearTimeout : false, close : false, closed : false, Comment : false, CustomEvent : false, DOMParser : false, defaultStatus : false, Document : false, document : false, DocumentFragment : false, Element : false, ElementTimeControl : false, Event : false, event : false, FileReader : false, FormData : false, focus : false, frames : false, getComputedStyle : false, HTMLElement : false, HTMLAnchorElement : false, HTMLBaseElement : false, HTMLBlockquoteElement: false, HTMLBodyElement : false, HTMLBRElement : false, HTMLButtonElement : false, HTMLCanvasElement : false, HTMLDirectoryElement : false, HTMLDivElement : false, HTMLDListElement : false, HTMLFieldSetElement : false, HTMLFontElement : false, HTMLFormElement : false, HTMLFrameElement : false, HTMLFrameSetElement : false, HTMLHeadElement : false, HTMLHeadingElement : false, HTMLHRElement : false, HTMLHtmlElement : false, HTMLIFrameElement : false, HTMLImageElement : false, HTMLInputElement : false, HTMLIsIndexElement : false, HTMLLabelElement : false, HTMLLayerElement : false, HTMLLegendElement : false, HTMLLIElement : false, HTMLLinkElement : false, HTMLMapElement : false, HTMLMenuElement : false, HTMLMetaElement : false, HTMLModElement : false, HTMLObjectElement : false, HTMLOListElement : false, HTMLOptGroupElement : false, HTMLOptionElement : false, HTMLParagraphElement : false, HTMLParamElement : false, HTMLPreElement : false, HTMLQuoteElement : false, HTMLScriptElement : false, HTMLSelectElement : false, HTMLStyleElement : false, HTMLTableCaptionElement: false, HTMLTableCellElement : false, HTMLTableColElement : false, HTMLTableElement : false, HTMLTableRowElement : false, HTMLTableSectionElement: false, HTMLTemplateElement : false, HTMLTextAreaElement : false, HTMLTitleElement : false, HTMLUListElement : false, HTMLVideoElement : false, history : false, Image : false, Intl : false, length : false, localStorage : false, location : false, matchMedia : false, MessageChannel : false, MessageEvent : false, MessagePort : false, MouseEvent : false, moveBy : false, moveTo : false, MutationObserver : false, name : false, Node : false, NodeFilter : false, NodeList : false, Notification : false, navigator : false, onbeforeunload : true, onblur : true, onerror : true, onfocus : true, onload : true, onresize : true, onunload : true, open : false, openDatabase : false, opener : false, Option : false, parent : false, print : false, Range : false, requestAnimationFrame : false, removeEventListener : false, resizeBy : false, resizeTo : false, screen : false, scroll : false, scrollBy : false, scrollTo : false, sessionStorage : false, setInterval : false, setTimeout : false, SharedWorker : false, status : false, SVGAElement : false, SVGAltGlyphDefElement: false, SVGAltGlyphElement : false, SVGAltGlyphItemElement: false, SVGAngle : false, SVGAnimateColorElement: false, SVGAnimateElement : false, SVGAnimateMotionElement: false, SVGAnimateTransformElement: false, SVGAnimatedAngle : false, SVGAnimatedBoolean : false, SVGAnimatedEnumeration: false, SVGAnimatedInteger : false, SVGAnimatedLength : false, SVGAnimatedLengthList: false, SVGAnimatedNumber : false, SVGAnimatedNumberList: false, SVGAnimatedPathData : false, SVGAnimatedPoints : false, SVGAnimatedPreserveAspectRatio: false, SVGAnimatedRect : false, SVGAnimatedString : false, SVGAnimatedTransformList: false, SVGAnimationElement : false, SVGCSSRule : false, SVGCircleElement : false, SVGClipPathElement : false, SVGColor : false, SVGColorProfileElement: false, SVGColorProfileRule : false, SVGComponentTransferFunctionElement: false, SVGCursorElement : false, SVGDefsElement : false, SVGDescElement : false, SVGDocument : false, SVGElement : false, SVGElementInstance : false, SVGElementInstanceList: false, SVGEllipseElement : false, SVGExternalResourcesRequired: false, SVGFEBlendElement : false, SVGFEColorMatrixElement: false, SVGFEComponentTransferElement: false, SVGFECompositeElement: false, SVGFEConvolveMatrixElement: false, SVGFEDiffuseLightingElement: false, SVGFEDisplacementMapElement: false, SVGFEDistantLightElement: false, SVGFEFloodElement : false, SVGFEFuncAElement : false, SVGFEFuncBElement : false, SVGFEFuncGElement : false, SVGFEFuncRElement : false, SVGFEGaussianBlurElement: false, SVGFEImageElement : false, SVGFEMergeElement : false, SVGFEMergeNodeElement: false, SVGFEMorphologyElement: false, SVGFEOffsetElement : false, SVGFEPointLightElement: false, SVGFESpecularLightingElement: false, SVGFESpotLightElement: false, SVGFETileElement : false, SVGFETurbulenceElement: false, SVGFilterElement : false, SVGFilterPrimitiveStandardAttributes: false, SVGFitToViewBox : false, SVGFontElement : false, SVGFontFaceElement : false, SVGFontFaceFormatElement: false, SVGFontFaceNameElement: false, SVGFontFaceSrcElement: false, SVGFontFaceUriElement: false, SVGForeignObjectElement: false, SVGGElement : false, SVGGlyphElement : false, SVGGlyphRefElement : false, SVGGradientElement : false, SVGHKernElement : false, SVGICCColor : false, SVGImageElement : false, SVGLangSpace : false, SVGLength : false, SVGLengthList : false, SVGLineElement : false, SVGLinearGradientElement: false, SVGLocatable : false, SVGMPathElement : false, SVGMarkerElement : false, SVGMaskElement : false, SVGMatrix : false, SVGMetadataElement : false, SVGMissingGlyphElement: false, SVGNumber : false, SVGNumberList : false, SVGPaint : false, SVGPathElement : false, SVGPathSeg : false, SVGPathSegArcAbs : false, SVGPathSegArcRel : false, SVGPathSegClosePath : false, SVGPathSegCurvetoCubicAbs: false, SVGPathSegCurvetoCubicRel: false, SVGPathSegCurvetoCubicSmoothAbs: false, SVGPathSegCurvetoCubicSmoothRel: false, SVGPathSegCurvetoQuadraticAbs: false, SVGPathSegCurvetoQuadraticRel: false, SVGPathSegCurvetoQuadraticSmoothAbs: false, SVGPathSegCurvetoQuadraticSmoothRel: false, SVGPathSegLinetoAbs : false, SVGPathSegLinetoHorizontalAbs: false, SVGPathSegLinetoHorizontalRel: false, SVGPathSegLinetoRel : false, SVGPathSegLinetoVerticalAbs: false, SVGPathSegLinetoVerticalRel: false, SVGPathSegList : false, SVGPathSegMovetoAbs : false, SVGPathSegMovetoRel : false, SVGPatternElement : false, SVGPoint : false, SVGPointList : false, SVGPolygonElement : false, SVGPolylineElement : false, SVGPreserveAspectRatio: false, SVGRadialGradientElement: false, SVGRect : false, SVGRectElement : false, SVGRenderingIntent : false, SVGSVGElement : false, SVGScriptElement : false, SVGSetElement : false, SVGStopElement : false, SVGStringList : false, SVGStylable : false, SVGStyleElement : false, SVGSwitchElement : false, SVGSymbolElement : false, SVGTRefElement : false, SVGTSpanElement : false, SVGTests : false, SVGTextContentElement: false, SVGTextElement : false, SVGTextPathElement : false, SVGTextPositioningElement: false, SVGTitleElement : false, SVGTransform : false, SVGTransformList : false, SVGTransformable : false, SVGURIReference : false, SVGUnitTypes : false, SVGUseElement : false, SVGVKernElement : false, SVGViewElement : false, SVGViewSpec : false, SVGZoomAndPan : false, Text : false, TextDecoder : false, TextEncoder : false, TimeEvent : false, top : false, URL : false, WebGLActiveInfo : false, WebGLBuffer : false, WebGLContextEvent : false, WebGLFramebuffer : false, WebGLProgram : false, WebGLRenderbuffer : false, WebGLRenderingContext: false, WebGLShader : false, WebGLShaderPrecisionFormat: false, WebGLTexture : false, WebGLUniformLocation : false, WebSocket : false, window : false, Worker : false, XDomainRequest : false, XMLHttpRequest : false, XMLSerializer : false, XPathEvaluator : false, XPathException : false, XPathExpression : false, XPathNamespace : false, XPathNSResolver : false, XPathResult : false }; exports.devel = { alert : false, confirm: false, console: false, Debug : false, opera : false, prompt : false }; exports.worker = { importScripts : true, postMessage : true, self : true, FileReaderSync : true }; exports.nonstandard = { escape : false, unescape: false }; exports.couch = { "require" : false, respond : false, getRow : false, emit : false, send : false, start : false, sum : false, log : false, exports : false, module : false, provides : false }; exports.node = { __filename : false, __dirname : false, GLOBAL : false, global : false, module : false, require : false, Buffer : true, console : true, exports : true, process : true, setTimeout : true, clearTimeout : true, setInterval : true, clearInterval : true, setImmediate : true, // v0.9.1+ clearImmediate: true // v0.9.1+ }; exports.browserify = { __filename : false, __dirname : false, global : false, module : false, require : false, Buffer : true, exports : true, process : true }; exports.phantom = { phantom : true, require : true, WebPage : true, console : true, // in examples, but undocumented exports : true // v1.7+ }; exports.qunit = { asyncTest : false, deepEqual : false, equal : false, expect : false, module : false, notDeepEqual : false, notEqual : false, notPropEqual : false, notStrictEqual : false, ok : false, propEqual : false, QUnit : false, raises : false, start : false, stop : false, strictEqual : false, test : false, "throws" : false }; exports.rhino = { defineClass : false, deserialize : false, gc : false, help : false, importClass : false, importPackage: false, "java" : false, load : false, loadClass : false, Packages : false, print : false, quit : false, readFile : false, readUrl : false, runCommand : false, seal : false, serialize : false, spawn : false, sync : false, toint32 : false, version : false }; exports.shelljs = { target : false, echo : false, exit : false, cd : false, pwd : false, ls : false, find : false, cp : false, rm : false, mv : false, mkdir : false, test : false, cat : false, sed : false, grep : false, which : false, dirs : false, pushd : false, popd : false, env : false, exec : false, chmod : false, config : false, error : false, tempdir : false }; exports.typed = { ArrayBuffer : false, ArrayBufferView : false, DataView : false, Float32Array : false, Float64Array : false, Int16Array : false, Int32Array : false, Int8Array : false, Uint16Array : false, Uint32Array : false, Uint8Array : false, Uint8ClampedArray : false }; exports.wsh = { ActiveXObject : true, Enumerator : true, GetObject : true, ScriptEngine : true, ScriptEngineBuildVersion : true, ScriptEngineMajorVersion : true, ScriptEngineMinorVersion : true, VBArray : true, WSH : true, WScript : true, XDomainRequest : true }; exports.dojo = { dojo : false, dijit : false, dojox : false, define : false, "require": false }; exports.jquery = { "$" : false, jQuery : false }; exports.mootools = { "$" : false, "$$" : false, Asset : false, Browser : false, Chain : false, Class : false, Color : false, Cookie : false, Core : false, Document : false, DomReady : false, DOMEvent : false, DOMReady : false, Drag : false, Element : false, Elements : false, Event : false, Events : false, Fx : false, Group : false, Hash : false, HtmlTable : false, IFrame : false, IframeShim : false, InputValidator: false, instanceOf : false, Keyboard : false, Locale : false, Mask : false, MooTools : false, Native : false, Options : false, OverText : false, Request : false, Scroller : false, Slick : false, Slider : false, Sortables : false, Spinner : false, Swiff : false, Tips : false, Type : false, typeOf : false, URI : false, Window : false }; exports.prototypejs = { "$" : false, "$$" : false, "$A" : false, "$F" : false, "$H" : false, "$R" : false, "$break" : false, "$continue" : false, "$w" : false, Abstract : false, Ajax : false, Class : false, Enumerable : false, Element : false, Event : false, Field : false, Form : false, Hash : false, Insertion : false, ObjectRange : false, PeriodicalExecuter: false, Position : false, Prototype : false, Selector : false, Template : false, Toggle : false, Try : false, Autocompleter : false, Builder : false, Control : false, Draggable : false, Draggables : false, Droppables : false, Effect : false, Sortable : false, SortableObserver : false, Sound : false, Scriptaculous : false }; exports.yui = { YUI : false, Y : false, YUI_config: false }; exports.mocha = { describe : false, xdescribe : false, it : false, xit : false, context : false, xcontext : false, before : false, after : false, beforeEach : false, afterEach : false, suite : false, test : false, setup : false, teardown : false, suiteSetup : false, suiteTeardown : false }; exports.jasmine = { jasmine : false, describe : false, it : false, xit : false, beforeEach : false, afterEach : false, setFixtures : false, loadFixtures: false, spyOn : false, expect : false, runs : false, waitsFor : false, waits : false, beforeAll : false, afterAll : false, fail : false, fdescribe : false, fit : false }; }, {}], 12:[function(_dereq_,module,exports){ function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } module.exports = EventEmitter; EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; EventEmitter.defaultMaxListeners = 10; EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; if (type === 'error') { if (!this._events.error || (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { throw TypeError('Uncaught, unspecified "error" event.'); } return false; } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; default: len = arguments.length; args = new Array(len - 1); for (i = 1; i < len; i++) args[i - 1] = arguments[i]; handler.apply(this, args); } } else if (isObject(handler)) { len = arguments.length; args = new Array(len - 1); for (i = 1; i < len; i++) args[i - 1] = arguments[i]; listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener); if (!this._events[type]) this._events[type] = listener; else if (isObject(this._events[type])) this._events[type].push(listener); else this._events[type] = [this._events[type], listener]; if (isObject(this._events[type]) && !this._events[type].warned) { var m; if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type, listener); } else if (isObject(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else { while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.listenerCount = function(emitter, type) { var ret; if (!emitter._events || !emitter._events[type]) ret = 0; else if (isFunction(emitter._events[type])) ret = 1; else ret = emitter._events[type].length; return ret; }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } }, {}]},{},[3]) (3) }); define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var Mirror = require("../worker/mirror").Mirror; var lint = require("./javascript/jshint").JSHINT; function startRegex(arr) { return RegExp("^(" + arr.join("|") + ")"); } var disabledWarningsRe = startRegex([ "Bad for in variable '(.+)'.", 'Missing "use strict"' ]); var errorsRe = startRegex([ "Unexpected", "Expected ", "Confusing (plus|minus)", "\\{a\\} unterminated regular expression", "Unclosed ", "Unmatched ", "Unbegun comment", "Bad invocation", "Missing space after", "Missing operator at" ]); var infoRe = startRegex([ "Expected an assignment", "Bad escapement of EOL", "Unexpected comma", "Unexpected space", "Missing radix parameter.", "A leading decimal point can", "\\['{a}'\\] is better written in dot notation.", "'{a}' used out of scope" ]); var JavaScriptWorker = exports.JavaScriptWorker = function(sender) { Mirror.call(this, sender); this.setTimeout(500); this.setOptions(); }; oop.inherits(JavaScriptWorker, Mirror); (function() { this.setOptions = function(options) { this.options = options || { esnext: true, moz: true, devel: true, browser: true, node: true, laxcomma: true, laxbreak: true, lastsemic: true, onevar: false, passfail: false, maxerr: 100, expr: true, multistr: true, globalstrict: true }; this.doc.getValue() && this.deferredUpdate.schedule(100); }; this.changeOptions = function(newOptions) { oop.mixin(this.options, newOptions); this.doc.getValue() && this.deferredUpdate.schedule(100); }; this.isValidJS = function(str) { try { eval("throw 0;" + str); } catch(e) { if (e === 0) return true; } return false }; this.onUpdate = function() { var value = this.doc.getValue(); value = value.replace(/^#!.*\n/, "\n"); if (!value) return this.sender.emit("annotate", []); var errors = []; var maxErrorLevel = this.isValidJS(value) ? "warning" : "error"; lint(value, this.options); var results = lint.errors; var errorAdded = false for (var i = 0; i < results.length; i++) { var error = results[i]; if (!error) continue; var raw = error.raw; var type = "warning"; if (raw == "Missing semicolon.") { var str = error.evidence.substr(error.character); str = str.charAt(str.search(/\S/)); if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) { error.reason = 'Missing ";" before statement'; type = "error"; } else { type = "info"; } } else if (disabledWarningsRe.test(raw)) { continue; } else if (infoRe.test(raw)) { type = "info" } else if (errorsRe.test(raw)) { errorAdded = true; type = maxErrorLevel; } else if (raw == "'{a}' is not defined.") { type = "warning"; } else if (raw == "'{a}' is defined but never used.") { type = "info"; } errors.push({ row: error.line-1, column: error.character-1, text: error.reason, type: type, raw: raw }); if (errorAdded) { } } this.sender.emit("annotate", errors); }; }).call(JavaScriptWorker.prototype); }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js0000644000076400007640000000637412554155240026432 0ustar pravipravidefine("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night-blue"; exports.cssText = ".ace-tomorrow-night-blue .ace_gutter {\ background: #00204b;\ color: #7388b5\ }\ .ace-tomorrow-night-blue .ace_print-margin {\ width: 1px;\ background: #00204b\ }\ .ace-tomorrow-night-blue {\ background-color: #002451;\ color: #FFFFFF\ }\ .ace-tomorrow-night-blue .ace_constant.ace_other,\ .ace-tomorrow-night-blue .ace_cursor {\ color: #FFFFFF\ }\ .ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\ background: #003F8E\ }\ .ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #002451;\ border-radius: 2px\ }\ .ace-tomorrow-night-blue .ace_marker-layer .ace_step {\ background: rgb(127, 111, 19)\ }\ .ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #404F7D\ }\ .ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\ background: #00346E\ }\ .ace-tomorrow-night-blue .ace_gutter-active-line {\ background-color: #022040\ }\ .ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\ border: 1px solid #003F8E\ }\ .ace-tomorrow-night-blue .ace_invisible {\ color: #404F7D\ }\ .ace-tomorrow-night-blue .ace_keyword,\ .ace-tomorrow-night-blue .ace_meta,\ .ace-tomorrow-night-blue .ace_storage,\ .ace-tomorrow-night-blue .ace_storage.ace_type,\ .ace-tomorrow-night-blue .ace_support.ace_type {\ color: #EBBBFF\ }\ .ace-tomorrow-night-blue .ace_keyword.ace_operator {\ color: #99FFFF\ }\ .ace-tomorrow-night-blue .ace_constant.ace_character,\ .ace-tomorrow-night-blue .ace_constant.ace_language,\ .ace-tomorrow-night-blue .ace_constant.ace_numeric,\ .ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\ .ace-tomorrow-night-blue .ace_support.ace_constant,\ .ace-tomorrow-night-blue .ace_variable.ace_parameter {\ color: #FFC58F\ }\ .ace-tomorrow-night-blue .ace_invalid {\ color: #FFFFFF;\ background-color: #F99DA5\ }\ .ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\ color: #FFFFFF;\ background-color: #EBBBFF\ }\ .ace-tomorrow-night-blue .ace_fold {\ background-color: #BBDAFF;\ border-color: #FFFFFF\ }\ .ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\ .ace-tomorrow-night-blue .ace_support.ace_function,\ .ace-tomorrow-night-blue .ace_variable {\ color: #BBDAFF\ }\ .ace-tomorrow-night-blue .ace_support.ace_class,\ .ace-tomorrow-night-blue .ace_support.ace_type {\ color: #FFEEAD\ }\ .ace-tomorrow-night-blue .ace_heading,\ .ace-tomorrow-night-blue .ace_markup.ace_heading,\ .ace-tomorrow-night-blue .ace_string {\ color: #D1F1A9\ }\ .ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\ .ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\ .ace-tomorrow-night-blue .ace_meta.ace_tag,\ .ace-tomorrow-night-blue .ace_string.ace_regexp,\ .ace-tomorrow-night-blue .ace_variable {\ color: #FF9DA4\ }\ .ace-tomorrow-night-blue .ace_comment {\ color: #7285B7\ }\ .ace-tomorrow-night-blue .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-jsx.js0000644000076400007640000006715712554155240022776 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JsxHighlightRules = function() { var keywords = lang.arrayToMap( ("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|" + "if|throw|" + "delete|in|try|" + "class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|" + "number|int|string|boolean|variant|" + "log|assert").split("|") ); var buildinConstants = lang.arrayToMap( ("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined").split("|") ); var reserved = lang.arrayToMap( ("debugger|with|" + "const|export|" + "let|private|public|yield|protected|" + "extern|native|as|operator|__fake__|__readonly__").split("|") ); var identifierRe = "[a-zA-Z_][a-zA-Z0-9_]*\\b"; this.$rules = { "start" : [ { token : "comment", regex : "\\/\\/.*$" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : [ "storage.type", "text", "entity.name.function" ], regex : "(function)(\\s+)(" + identifierRe + ")" }, { token : function(value) { if (value == "this") return "variable.language"; else if (value == "function") return "storage.type"; else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value)) return "keyword"; else if (buildinConstants.hasOwnProperty(value)) return "constant.language"; else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value)) return "language.support.class"; else return "identifier"; }, regex : identifierRe }, { token : "keyword.operator", regex : "!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({<]" }, { token : "paren.rparen", regex : "[\\])}>]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(JsxHighlightRules, TextHighlightRules); exports.JsxHighlightRules = JsxHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; function Mode() { this.HighlightRules = JsxHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); } oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/jsx"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-tomorrow.js0000644000076400007640000000544612554155240024231 0ustar pravipravidefine("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-tomorrow"; exports.cssText = ".ace-tomorrow .ace_gutter {\ background: #f6f6f6;\ color: #4D4D4C\ }\ .ace-tomorrow .ace_print-margin {\ width: 1px;\ background: #f6f6f6\ }\ .ace-tomorrow {\ background-color: #FFFFFF;\ color: #4D4D4C\ }\ .ace-tomorrow .ace_cursor {\ color: #AEAFAD\ }\ .ace-tomorrow .ace_marker-layer .ace_selection {\ background: #D6D6D6\ }\ .ace-tomorrow.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #FFFFFF;\ border-radius: 2px\ }\ .ace-tomorrow .ace_marker-layer .ace_step {\ background: rgb(255, 255, 0)\ }\ .ace-tomorrow .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #D1D1D1\ }\ .ace-tomorrow .ace_marker-layer .ace_active-line {\ background: #EFEFEF\ }\ .ace-tomorrow .ace_gutter-active-line {\ background-color : #dcdcdc\ }\ .ace-tomorrow .ace_marker-layer .ace_selected-word {\ border: 1px solid #D6D6D6\ }\ .ace-tomorrow .ace_invisible {\ color: #D1D1D1\ }\ .ace-tomorrow .ace_keyword,\ .ace-tomorrow .ace_meta,\ .ace-tomorrow .ace_storage,\ .ace-tomorrow .ace_storage.ace_type,\ .ace-tomorrow .ace_support.ace_type {\ color: #8959A8\ }\ .ace-tomorrow .ace_keyword.ace_operator {\ color: #3E999F\ }\ .ace-tomorrow .ace_constant.ace_character,\ .ace-tomorrow .ace_constant.ace_language,\ .ace-tomorrow .ace_constant.ace_numeric,\ .ace-tomorrow .ace_keyword.ace_other.ace_unit,\ .ace-tomorrow .ace_support.ace_constant,\ .ace-tomorrow .ace_variable.ace_parameter {\ color: #F5871F\ }\ .ace-tomorrow .ace_constant.ace_other {\ color: #666969\ }\ .ace-tomorrow .ace_invalid {\ color: #FFFFFF;\ background-color: #C82829\ }\ .ace-tomorrow .ace_invalid.ace_deprecated {\ color: #FFFFFF;\ background-color: #8959A8\ }\ .ace-tomorrow .ace_fold {\ background-color: #4271AE;\ border-color: #4D4D4C\ }\ .ace-tomorrow .ace_entity.ace_name.ace_function,\ .ace-tomorrow .ace_support.ace_function,\ .ace-tomorrow .ace_variable {\ color: #4271AE\ }\ .ace-tomorrow .ace_support.ace_class,\ .ace-tomorrow .ace_support.ace_type {\ color: #C99E00\ }\ .ace-tomorrow .ace_heading,\ .ace-tomorrow .ace_markup.ace_heading,\ .ace-tomorrow .ace_string {\ color: #718C00\ }\ .ace-tomorrow .ace_entity.ace_name.ace_tag,\ .ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\ .ace-tomorrow .ace_meta.ace_tag,\ .ace-tomorrow .ace_string.ace_regexp,\ .ace-tomorrow .ace_variable {\ color: #C82829\ }\ .ace-tomorrow .ace_comment {\ color: #8E908C\ }\ .ace-tomorrow .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-smarty.js0000644000076400007640000030513012554155240023473 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var SmartyHighlightRules = function() { HtmlHighlightRules.call(this); var smartyRules = { start: [ { include: '#comments' }, { include: '#blocks' } ], '#blocks': [ { token: 'punctuation.section.embedded.begin.smarty', regex: '\\{%?', push: [ { token: 'punctuation.section.embedded.end.smarty', regex: '%?\\}', next: 'pop' }, { include: '#strings' }, { include: '#variables' }, { include: '#lang' }, { defaultToken: 'source.smarty' } ] } ], '#comments': [ { token: [ 'punctuation.definition.comment.smarty', 'comment.block.smarty' ], regex: '(\\{%?)(\\*)', push: [ { token: 'comment.block.smarty', regex: '\\*%?\\}', next: 'pop' }, { defaultToken: 'comment.block.smarty' } ] } ], '#lang': [ { token: 'keyword.operator.smarty', regex: '(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b' }, { token: 'constant.language.smarty', regex: '\\b(?:TRUE|FALSE|true|false)\\b' }, { token: 'keyword.control.smarty', regex: '\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b' }, { token: 'variable.parameter.smarty', regex: '\\b[a-zA-Z]+=' }, { token: 'support.function.built-in.smarty', regex: '\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b' }, { token: 'support.function.variable-modifier.smarty', regex: '\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)' } ], '#strings': [ { token: 'punctuation.definition.string.begin.smarty', regex: '\'', push: [ { token: 'punctuation.definition.string.end.smarty', regex: '\'', next: 'pop' }, { token: 'constant.character.escape.smarty', regex: '\\\\.' }, { defaultToken: 'string.quoted.single.smarty' } ] }, { token: 'punctuation.definition.string.begin.smarty', regex: '"', push: [ { token: 'punctuation.definition.string.end.smarty', regex: '"', next: 'pop' }, { token: 'constant.character.escape.smarty', regex: '\\\\.' }, { defaultToken: 'string.quoted.double.smarty' } ] } ], '#variables': [ { token: [ 'punctuation.definition.variable.smarty', 'variable.other.global.smarty' ], regex: '\\b(\\$)(Smarty\\.)' }, { token: [ 'punctuation.definition.variable.smarty', 'variable.other.smarty' ], regex: '(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b' }, { token: [ 'keyword.operator.smarty', 'variable.other.property.smarty' ], regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b' }, { token: [ 'keyword.operator.smarty', 'meta.function-call.object.smarty', 'punctuation.definition.variable.smarty', 'variable.other.smarty', 'punctuation.definition.variable.smarty' ], regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' } ] } var smartyStart = smartyRules.start; for (var rule in this.$rules) { this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart); } Object.keys(smartyRules).forEach(function(x) { if (!this.$rules[x]) this.$rules[x] = smartyRules[x]; }, this); this.normalizeRules(); }; SmartyHighlightRules.metaData = { fileTypes: [ 'tpl' ], foldingStartMarker: '\\{%?', foldingStopMarker: '%?\\}', name: 'Smarty', scopeName: 'text.html.smarty' } oop.inherits(SmartyHighlightRules, HtmlHighlightRules); exports.SmartyHighlightRules = SmartyHighlightRules; }); define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules; var Mode = function() { HtmlMode.call(this); this.HighlightRules = SmartyHighlightRules; }; oop.inherits(Mode, HtmlMode); (function() { this.$id = "ace/mode/smarty"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-cobol.js0000644000076400007640000000645112554155240023256 0ustar pravipravidefine("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var CobolHighlightRules = function() { var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" + "AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" + "ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" + "TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" + "UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" + "PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" + "CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" + "COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" + "RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" + "DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" + "ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" + "EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT"; var builtinConstants = ( "true|false|null" ); var builtinFunctions = ( "count|min|max|avg|sum|rank|now|coalesce|main" ); var keywordMapper = this.createKeywordMapper({ "support.function": builtinFunctions, "keyword": keywords, "constant.language": builtinConstants }, "identifier", true); this.$rules = { "start" : [ { token : "comment", regex : "\\*.*$" }, { token : "string", // " string regex : '".*?"' }, { token : "string", // ' string regex : "'.*?'" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" }, { token : "paren.lparen", regex : "[\\(]" }, { token : "paren.rparen", regex : "[\\)]" }, { token : "text", regex : "\\s+" } ] }; }; oop.inherits(CobolHighlightRules, TextHighlightRules); exports.CobolHighlightRules = CobolHighlightRules; }); define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = CobolHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "*"; this.$id = "ace/mode/cobol"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/keybinding-emacs.js0000644000076400007640000011761712554155240024456 0ustar pravipravidefine("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var Range = require("./range").Range; var Search = require("./search").Search; var EditSession = require("./edit_session").EditSession; var SearchHighlight = require("./search_highlight").SearchHighlight; function Occur() {} oop.inherits(Occur, Search); (function() { this.enter = function(editor, options) { if (!options.needle) return false; var pos = editor.getCursorPosition(); this.displayOccurContent(editor, options); var translatedPos = this.originalToOccurPosition(editor.session, pos); editor.moveCursorToPosition(translatedPos); return true; } this.exit = function(editor, options) { var pos = options.translatePosition && editor.getCursorPosition(); var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos); this.displayOriginalContent(editor); if (translatedPos) editor.moveCursorToPosition(translatedPos); return true; } this.highlight = function(sess, regexp) { var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker( new SearchHighlight(null, "ace_occur-highlight", "text")); hl.setRegexp(regexp); sess._emit("changeBackMarker"); // force highlight layer redraw } this.displayOccurContent = function(editor, options) { this.$originalSession = editor.session; var found = this.matchingLines(editor.session, options); var lines = found.map(function(foundLine) { return foundLine.content; }); var occurSession = new EditSession(lines.join('\n')); occurSession.$occur = this; occurSession.$occurMatchingLines = found; editor.setSession(occurSession); this.$useEmacsStyleLineStart = this.$originalSession.$useEmacsStyleLineStart; occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; this.highlight(occurSession, options.re); occurSession._emit('changeBackMarker'); } this.displayOriginalContent = function(editor) { editor.setSession(this.$originalSession); this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; } this.originalToOccurPosition = function(session, pos) { var lines = session.$occurMatchingLines; var nullPos = {row: 0, column: 0}; if (!lines) return nullPos; for (var i = 0; i < lines.length; i++) { if (lines[i].row === pos.row) return {row: i, column: pos.column}; } return nullPos; } this.occurToOriginalPosition = function(session, pos) { var lines = session.$occurMatchingLines; if (!lines || !lines[pos.row]) return pos; return {row: lines[pos.row].row, column: pos.column}; } this.matchingLines = function(session, options) { options = oop.mixin({}, options); if (!session || !options.needle) return []; var search = new Search(); search.set(options); return search.findAll(session).reduce(function(lines, range) { var row = range.start.row; var last = lines[lines.length-1]; return last && last.row === row ? lines : lines.concat({row: row, content: session.getLine(row)}); }, []); } }).call(Occur.prototype); var dom = require('./lib/dom'); dom.importCssString(".ace_occur-highlight {\n\ border-radius: 4px;\n\ background-color: rgba(87, 255, 8, 0.25);\n\ position: absolute;\n\ z-index: 4;\n\ -moz-box-sizing: border-box;\n\ -webkit-box-sizing: border-box;\n\ box-sizing: border-box;\n\ box-shadow: 0 0 4px rgb(91, 255, 50);\n\ }\n\ .ace_dark .ace_occur-highlight {\n\ background-color: rgb(80, 140, 85);\n\ box-shadow: 0 0 4px rgb(60, 120, 70);\n\ }\n", "incremental-occur-highlighting"); exports.Occur = Occur; }); define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module) { var config = require("../config"), Occur = require("../occur").Occur; var occurStartCommand = { name: "occur", exec: function(editor, options) { var alreadyInOccur = !!editor.session.$occur; var occurSessionActive = new Occur().enter(editor, options); if (occurSessionActive && !alreadyInOccur) OccurKeyboardHandler.installIn(editor); }, readOnly: true }; var occurCommands = [{ name: "occurexit", bindKey: 'esc|Ctrl-G', exec: function(editor) { var occur = editor.session.$occur; if (!occur) return; occur.exit(editor, {}); if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor); }, readOnly: true }, { name: "occuraccept", bindKey: 'enter', exec: function(editor) { var occur = editor.session.$occur; if (!occur) return; occur.exit(editor, {translatePosition: true}); if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor); }, readOnly: true }]; var HashHandler = require("../keyboard/hash_handler").HashHandler; var oop = require("../lib/oop"); function OccurKeyboardHandler() {} oop.inherits(OccurKeyboardHandler, HashHandler); ;(function() { this.isOccurHandler = true; this.attach = function(editor) { HashHandler.call(this, occurCommands, editor.commands.platform); this.$editor = editor; } var handleKeyboard$super = this.handleKeyboard; this.handleKeyboard = function(data, hashId, key, keyCode) { var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode); return (cmd && cmd.command) ? cmd : undefined; } }).call(OccurKeyboardHandler.prototype); OccurKeyboardHandler.installIn = function(editor) { var handler = new this(); editor.keyBinding.addKeyboardHandler(handler); editor.commands.addCommands(occurCommands); } OccurKeyboardHandler.uninstallFrom = function(editor) { editor.commands.removeCommands(occurCommands); var handler = editor.getKeyboardHandler(); if (handler.isOccurHandler) editor.keyBinding.removeKeyboardHandler(handler); } exports.occurStartCommand = occurStartCommand; }); define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module) { var config = require("../config"); var oop = require("../lib/oop"); var HashHandler = require("../keyboard/hash_handler").HashHandler; var occurStartCommand = require("./occur_commands").occurStartCommand; exports.iSearchStartCommands = [{ name: "iSearch", bindKey: {win: "Ctrl-F", mac: "Command-F"}, exec: function(editor, options) { config.loadModule(["core", "ace/incremental_search"], function(e) { var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch(); iSearch.activate(editor, options.backwards); if (options.jumpToFirstMatch) iSearch.next(options); }); }, readOnly: true }, { name: "iSearchBackwards", exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {backwards: true}); }, readOnly: true }, { name: "iSearchAndGo", bindKey: {win: "Ctrl-K", mac: "Command-G"}, exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {jumpToFirstMatch: true, useCurrentOrPrevSearch: true}); }, readOnly: true }, { name: "iSearchBackwardsAndGo", bindKey: {win: "Ctrl-Shift-K", mac: "Command-Shift-G"}, exec: function(editor) { editor.execCommand('iSearch', {jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true}); }, readOnly: true }]; exports.iSearchCommands = [{ name: "restartSearch", bindKey: {win: "Ctrl-F", mac: "Command-F"}, exec: function(iSearch) { iSearch.cancelSearch(true); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "searchForward", bindKey: {win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G"}, exec: function(iSearch, options) { options.useCurrentOrPrevSearch = true; iSearch.next(options); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "searchBackward", bindKey: {win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G"}, exec: function(iSearch, options) { options.useCurrentOrPrevSearch = true; options.backwards = true; iSearch.next(options); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "extendSearchTerm", exec: function(iSearch, string) { iSearch.addString(string); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "extendSearchTermSpace", bindKey: "space", exec: function(iSearch) { iSearch.addString(' '); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "shrinkSearchTerm", bindKey: "backspace", exec: function(iSearch) { iSearch.removeChar(); }, readOnly: true, isIncrementalSearchCommand: true }, { name: 'confirmSearch', bindKey: 'return', exec: function(iSearch) { iSearch.deactivate(); }, readOnly: true, isIncrementalSearchCommand: true }, { name: 'cancelSearch', bindKey: 'esc|Ctrl-G', exec: function(iSearch) { iSearch.deactivate(true); }, readOnly: true, isIncrementalSearchCommand: true }, { name: 'occurisearch', bindKey: 'Ctrl-O', exec: function(iSearch) { var options = oop.mixin({}, iSearch.$options); iSearch.deactivate(); occurStartCommand.exec(iSearch.$editor, options); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "yankNextWord", bindKey: "Ctrl-w", exec: function(iSearch) { var ed = iSearch.$editor, range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorWordRight(); }), string = ed.session.getTextRange(range); iSearch.addString(string); }, readOnly: true, isIncrementalSearchCommand: true }, { name: "yankNextChar", bindKey: "Ctrl-Alt-y", exec: function(iSearch) { var ed = iSearch.$editor, range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorRight(); }), string = ed.session.getTextRange(range); iSearch.addString(string); }, readOnly: true, isIncrementalSearchCommand: true }, { name: 'recenterTopBottom', bindKey: 'Ctrl-l', exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); }, readOnly: true, isIncrementalSearchCommand: true }, { name: 'selectAllMatches', bindKey: 'Ctrl-space', exec: function(iSearch) { var ed = iSearch.$editor, hl = ed.session.$isearchHighlight, ranges = hl && hl.cache ? hl.cache .reduce(function(ranges, ea) { return ranges.concat(ea ? ea : []); }, []) : []; iSearch.deactivate(false); ranges.forEach(ed.selection.addRange.bind(ed.selection)); }, readOnly: true, isIncrementalSearchCommand: true }, { name: 'searchAsRegExp', bindKey: 'Alt-r', exec: function(iSearch) { iSearch.convertNeedleToRegExp(); }, readOnly: true, isIncrementalSearchCommand: true }]; function IncrementalSearchKeyboardHandler(iSearch) { this.$iSearch = iSearch; } oop.inherits(IncrementalSearchKeyboardHandler, HashHandler); ;(function() { this.attach = function(editor) { var iSearch = this.$iSearch; HashHandler.call(this, exports.iSearchCommands, editor.commands.platform); this.$commandExecHandler = editor.commands.addEventListener('exec', function(e) { if (!e.command.isIncrementalSearchCommand) return undefined; e.stopPropagation(); e.preventDefault(); return e.command.exec(iSearch, e.args || {}); }); } this.detach = function(editor) { if (!this.$commandExecHandler) return; editor.commands.removeEventListener('exec', this.$commandExecHandler); delete this.$commandExecHandler; } var handleKeyboard$super = this.handleKeyboard; this.handleKeyboard = function(data, hashId, key, keyCode) { if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v') || (hashId === 1/*ctrl*/ && key === 'y')) return null; var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode); if (cmd.command) { return cmd; } if (hashId == -1) { var extendCmd = this.commands.extendSearchTerm; if (extendCmd) { return {command: extendCmd, args: key}; } } return {command: "null", passEvent: hashId == 0 || hashId == 4}; } }).call(IncrementalSearchKeyboardHandler.prototype); exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler; }); define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var Range = require("./range").Range; var Search = require("./search").Search; var SearchHighlight = require("./search_highlight").SearchHighlight; var iSearchCommandModule = require("./commands/incremental_search_commands"); var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler; function IncrementalSearch() { this.$options = {wrap: false, skipCurrent: false}; this.$keyboardHandler = new ISearchKbd(this); } oop.inherits(IncrementalSearch, Search); function isRegExp(obj) { return obj instanceof RegExp; } function regExpToObject(re) { var string = String(re), start = string.indexOf('/'), flagStart = string.lastIndexOf('/'); return { expression: string.slice(start+1, flagStart), flags: string.slice(flagStart+1) } } function stringToRegExp(string, flags) { try { return new RegExp(string, flags); } catch (e) { return string; } } function objectToRegExp(obj) { return stringToRegExp(obj.expression, obj.flags); } ;(function() { this.activate = function(ed, backwards) { this.$editor = ed; this.$startPos = this.$currentPos = ed.getCursorPosition(); this.$options.needle = ''; this.$options.backwards = backwards; ed.keyBinding.addKeyboardHandler(this.$keyboardHandler); this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this); this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this)); this.selectionFix(ed); this.statusMessage(true); } this.deactivate = function(reset) { this.cancelSearch(reset); var ed = this.$editor; ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler); if (this.$mousedownHandler) { ed.removeEventListener('mousedown', this.$mousedownHandler); delete this.$mousedownHandler; } ed.onPaste = this.$originalEditorOnPaste; this.message(''); } this.selectionFix = function(editor) { if (editor.selection.isEmpty() && !editor.session.$emacsMark) { editor.clearSelection(); } } this.highlight = function(regexp) { var sess = this.$editor.session, hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker( new SearchHighlight(null, "ace_isearch-result", "text")); hl.setRegexp(regexp); sess._emit("changeBackMarker"); // force highlight layer redraw } this.cancelSearch = function(reset) { var e = this.$editor; this.$prevNeedle = this.$options.needle; this.$options.needle = ''; if (reset) { e.moveCursorToPosition(this.$startPos); this.$currentPos = this.$startPos; } else { e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false); } this.highlight(null); return Range.fromPoints(this.$currentPos, this.$currentPos); } this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) { if (!this.$editor) return null; var options = this.$options; if (needleUpdateFunc) { options.needle = needleUpdateFunc.call(this, options.needle || '') || ''; } if (options.needle.length === 0) { this.statusMessage(true); return this.cancelSearch(true); }; options.start = this.$currentPos; var session = this.$editor.session, found = this.find(session), shouldSelect = this.$editor.emacsMark ? !!this.$editor.emacsMark() : !this.$editor.selection.isEmpty(); if (found) { if (options.backwards) found = Range.fromPoints(found.end, found.start); this.$editor.selection.setRange(Range.fromPoints(shouldSelect ? this.$startPos : found.end, found.end)); if (moveToNext) this.$currentPos = found.end; this.highlight(options.re) } this.statusMessage(found); return found; } this.addString = function(s) { return this.highlightAndFindWithNeedle(false, function(needle) { if (!isRegExp(needle)) return needle + s; var reObj = regExpToObject(needle); reObj.expression += s; return objectToRegExp(reObj); }); } this.removeChar = function(c) { return this.highlightAndFindWithNeedle(false, function(needle) { if (!isRegExp(needle)) return needle.substring(0, needle.length-1); var reObj = regExpToObject(needle); reObj.expression = reObj.expression.substring(0, reObj.expression.length-1); return objectToRegExp(reObj); }); } this.next = function(options) { options = options || {}; this.$options.backwards = !!options.backwards; this.$currentPos = this.$editor.getCursorPosition(); return this.highlightAndFindWithNeedle(true, function(needle) { return options.useCurrentOrPrevSearch && needle.length === 0 ? this.$prevNeedle || '' : needle; }); } this.onMouseDown = function(evt) { this.deactivate(); return true; } this.onPaste = function(text) { this.addString(text); } this.convertNeedleToRegExp = function() { return this.highlightAndFindWithNeedle(false, function(needle) { return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig'); }); } this.convertNeedleToString = function() { return this.highlightAndFindWithNeedle(false, function(needle) { return isRegExp(needle) ? regExpToObject(needle).expression : needle; }); } this.statusMessage = function(found) { var options = this.$options, msg = ''; msg += options.backwards ? 'reverse-' : ''; msg += 'isearch: ' + options.needle; msg += found ? '' : ' (not found)'; this.message(msg); } this.message = function(msg) { if (this.$editor.showCommandLine) { this.$editor.showCommandLine(msg); this.$editor.focus(); } else { console.log(msg); } } }).call(IncrementalSearch.prototype); exports.IncrementalSearch = IncrementalSearch; var dom = require('./lib/dom'); dom.importCssString && dom.importCssString("\ .ace_marker-layer .ace_isearch-result {\ position: absolute;\ z-index: 6;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ div.ace_isearch-result {\ border-radius: 4px;\ background-color: rgba(255, 200, 0, 0.5);\ box-shadow: 0 0 4px rgb(255, 200, 0);\ }\ .ace_dark div.ace_isearch-result {\ background-color: rgb(100, 110, 160);\ box-shadow: 0 0 4px rgb(80, 90, 140);\ }", "incremental-search-highlighting"); var commands = require("./commands/command_manager"); (function() { this.setupIncrementalSearch = function(editor, val) { if (this.usesIncrementalSearch == val) return; this.usesIncrementalSearch = val; var iSearchCommands = iSearchCommandModule.iSearchStartCommands; var method = val ? 'addCommands' : 'removeCommands'; this[method](iSearchCommands); }; }).call(commands.CommandManager.prototype); var Editor = require("./editor").Editor; require("./config").defineOptions(Editor.prototype, "editor", { useIncrementalSearch: { set: function(val) { this.keyBinding.$handlers.forEach(function(handler) { if (handler.setupIncrementalSearch) { handler.setupIncrementalSearch(this, val); } }); this._emit('incrementalSearchSettingChanged', {isEnabled: val}); } } }); }); define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); require("../incremental_search"); var iSearchCommandModule = require("../commands/incremental_search_commands"); var screenToTextBlockCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var col = Math.floor( (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth ); var row = Math.floor( (y + this.scrollTop - canvasPos.top) / this.lineHeight ); return this.session.screenToDocumentPosition(row, col); }; var HashHandler = require("./hash_handler").HashHandler; exports.handler = new HashHandler(); exports.handler.isEmacs = true; exports.handler.$id = "ace/keyboard/emacs"; var initialized = false; var $formerLongWords; var $formerLineStart; exports.handler.attach = function(editor) { if (!initialized) { initialized = true; dom.importCssString('\ .emacs-mode .ace_cursor{\ border: 1px rgba(50,250,50,0.8) solid!important;\ -moz-box-sizing: border-box!important;\ -webkit-box-sizing: border-box!important;\ box-sizing: border-box!important;\ background-color: rgba(0,250,0,0.9);\ opacity: 0.5;\ }\ .emacs-mode .ace_hidden-cursors .ace_cursor{\ opacity: 1;\ background-color: transparent;\ }\ .emacs-mode .ace_overwrite-cursors .ace_cursor {\ opacity: 1;\ background-color: transparent;\ border-width: 0 0 2px 2px !important;\ }\ .emacs-mode .ace_text-layer {\ z-index: 4\ }\ .emacs-mode .ace_cursor-layer {\ z-index: 2\ }', 'emacsMode' ); } $formerLongWords = editor.session.$selectLongWords; editor.session.$selectLongWords = true; $formerLineStart = editor.session.$useEmacsStyleLineStart; editor.session.$useEmacsStyleLineStart = true; editor.session.$emacsMark = null; // the active mark editor.session.$emacsMarkRing = editor.session.$emacsMarkRing || []; editor.emacsMark = function() { return this.session.$emacsMark; }; editor.setEmacsMark = function(p) { this.session.$emacsMark = p; }; editor.pushEmacsMark = function(p, activate) { var prevMark = this.session.$emacsMark; if (prevMark) this.session.$emacsMarkRing.push(prevMark); if (!p || activate) this.setEmacsMark(p); else this.session.$emacsMarkRing.push(p); }; editor.popEmacsMark = function() { var mark = this.emacsMark(); if (mark) { this.setEmacsMark(null); return mark; } return this.session.$emacsMarkRing.pop(); }; editor.getLastEmacsMark = function(p) { return this.session.$emacsMark || this.session.$emacsMarkRing.slice(-1)[0]; }; editor.emacsMarkForSelection = function(replacement) { var sel = this.selection, multiRangeLength = this.multiSelect ? this.multiSelect.getAllRanges().length : 1, selIndex = sel.index || 0, markRing = this.session.$emacsMarkRing, markIndex = markRing.length - (multiRangeLength - selIndex), lastMark = markRing[markIndex] || sel.anchor; if (replacement) { markRing.splice(markIndex, 1, "row" in replacement && "column" in replacement ? replacement : undefined); } return lastMark; } editor.on("click", $resetMarkMode); editor.on("changeSession", $kbSessionChange); editor.renderer.screenToTextCoordinates = screenToTextBlockCoordinates; editor.setStyle("emacs-mode"); editor.commands.addCommands(commands); exports.handler.platform = editor.commands.platform; editor.$emacsModeHandler = this; editor.addEventListener('copy', this.onCopy); editor.addEventListener('paste', this.onPaste); }; exports.handler.detach = function(editor) { delete editor.renderer.screenToTextCoordinates; editor.session.$selectLongWords = $formerLongWords; editor.session.$useEmacsStyleLineStart = $formerLineStart; editor.removeEventListener("click", $resetMarkMode); editor.removeEventListener("changeSession", $kbSessionChange); editor.unsetStyle("emacs-mode"); editor.commands.removeCommands(commands); editor.removeEventListener('copy', this.onCopy); editor.removeEventListener('paste', this.onPaste); editor.$emacsModeHandler = null; }; var $kbSessionChange = function(e) { if (e.oldSession) { e.oldSession.$selectLongWords = $formerLongWords; e.oldSession.$useEmacsStyleLineStart = $formerLineStart; } $formerLongWords = e.session.$selectLongWords; e.session.$selectLongWords = true; $formerLineStart = e.session.$useEmacsStyleLineStart; e.session.$useEmacsStyleLineStart = true; if (!e.session.hasOwnProperty('$emacsMark')) e.session.$emacsMark = null; if (!e.session.hasOwnProperty('$emacsMarkRing')) e.session.$emacsMarkRing = []; }; var $resetMarkMode = function(e) { e.editor.session.$emacsMark = null; }; var keys = require("../lib/keys").KEY_MODS; var eMods = {C: "ctrl", S: "shift", M: "alt", CMD: "command"}; var combinations = ["C-S-M-CMD", "S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M", "M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S", "CMD", "M", "S", "C"]; combinations.forEach(function(c) { var hashId = 0; c.split("-").forEach(function(c) { hashId = hashId | keys[eMods[c]]; }); eMods[hashId] = c.toLowerCase() + "-"; }); exports.handler.onCopy = function(e, editor) { if (editor.$handlesEmacsOnCopy) return; editor.$handlesEmacsOnCopy = true; exports.handler.commands.killRingSave.exec(editor); editor.$handlesEmacsOnCopy = false; }; exports.handler.onPaste = function(e, editor) { editor.pushEmacsMark(editor.getCursorPosition()); }; exports.handler.bindKey = function(key, command) { if (typeof key == "object") key = key[this.platform]; if (!key) return; var ckb = this.commandKeyBinding; key.split("|").forEach(function(keyPart) { keyPart = keyPart.toLowerCase(); ckb[keyPart] = command; var keyParts = keyPart.split(" ").slice(0,-1); keyParts.reduce(function(keyMapKeys, keyPart, i) { var prefix = keyMapKeys[i-1] ? keyMapKeys[i-1] + ' ' : ''; return keyMapKeys.concat([prefix + keyPart]); }, []).forEach(function(keyPart) { if (!ckb[keyPart]) ckb[keyPart] = "null"; }); }, this); }; exports.handler.getStatusText = function(editor, data) { var str = ""; if (data.count) str += data.count; if (data.keyChain) str += " " + data.keyChain return str; }; exports.handler.handleKeyboard = function(data, hashId, key, keyCode) { if (keyCode === -1) return undefined; var editor = data.editor; editor._signal("changeStatus"); if (hashId == -1) { editor.pushEmacsMark(); if (data.count) { var str = new Array(data.count + 1).join(key); data.count = null; return {command: "insertstring", args: str}; } } var modifier = eMods[hashId]; if (modifier == "c-" || data.count) { var count = parseInt(key[key.length - 1]); if (typeof count === 'number' && !isNaN(count)) { data.count = Math.max(data.count, 0) || 0; data.count = 10 * data.count + count; return {command: "null"}; } } if (modifier) key = modifier + key; if (data.keyChain) key = data.keyChain += " " + key; var command = this.commandKeyBinding[key]; data.keyChain = command == "null" ? key : ""; if (!command) return undefined; if (command === "null") return {command: "null"}; if (command === "universalArgument") { data.count = -4; return {command: "null"}; } var args; if (typeof command !== "string") { args = command.args; if (command.command) command = command.command; if (command === "goorselect") { command = editor.emacsMark() ? args[1] : args[0]; args = null; } } if (typeof command === "string") { if (command === "insertstring" || command === "splitline" || command === "togglecomment") { editor.pushEmacsMark(); } command = this.commands[command] || editor.commands.commands[command]; if (!command) return undefined; } if (!command.readOnly && !command.isYank) data.lastCommand = null; if (!command.readOnly && editor.emacsMark()) editor.setEmacsMark(null) if (data.count) { var count = data.count; data.count = 0; if (!command || !command.handlesCount) { return { args: args, command: { exec: function(editor, args) { for (var i = 0; i < count; i++) command.exec(editor, args); }, multiSelectAction: command.multiSelectAction } }; } else { if (!args) args = {}; if (typeof args === 'object') args.count = count; } } return {command: command, args: args}; }; exports.emacsKeys = { "Up|C-p" : {command: "goorselect", args: ["golineup","selectup"]}, "Down|C-n" : {command: "goorselect", args: ["golinedown","selectdown"]}, "Left|C-b" : {command: "goorselect", args: ["gotoleft","selectleft"]}, "Right|C-f" : {command: "goorselect", args: ["gotoright","selectright"]}, "C-Left|M-b" : {command: "goorselect", args: ["gotowordleft","selectwordleft"]}, "C-Right|M-f" : {command: "goorselect", args: ["gotowordright","selectwordright"]}, "Home|C-a" : {command: "goorselect", args: ["gotolinestart","selecttolinestart"]}, "End|C-e" : {command: "goorselect", args: ["gotolineend","selecttolineend"]}, "C-Home|S-M-,": {command: "goorselect", args: ["gotostart","selecttostart"]}, "C-End|S-M-." : {command: "goorselect", args: ["gotoend","selecttoend"]}, "S-Up|S-C-p" : "selectup", "S-Down|S-C-n" : "selectdown", "S-Left|S-C-b" : "selectleft", "S-Right|S-C-f" : "selectright", "S-C-Left|S-M-b" : "selectwordleft", "S-C-Right|S-M-f" : "selectwordright", "S-Home|S-C-a" : "selecttolinestart", "S-End|S-C-e" : "selecttolineend", "S-C-Home" : "selecttostart", "S-C-End" : "selecttoend", "C-l" : "recenterTopBottom", "M-s" : "centerselection", "M-g": "gotoline", "C-x C-p": "selectall", "C-Down": {command: "goorselect", args: ["gotopagedown","selectpagedown"]}, "C-Up": {command: "goorselect", args: ["gotopageup","selectpageup"]}, "PageDown|C-v": {command: "goorselect", args: ["gotopagedown","selectpagedown"]}, "PageUp|M-v": {command: "goorselect", args: ["gotopageup","selectpageup"]}, "S-C-Down": "selectpagedown", "S-C-Up": "selectpageup", "C-s": "iSearch", "C-r": "iSearchBackwards", "M-C-s": "findnext", "M-C-r": "findprevious", "S-M-5": "replace", "Backspace": "backspace", "Delete|C-d": "del", "Return|C-m": {command: "insertstring", args: "\n"}, // "newline" "C-o": "splitline", "M-d|C-Delete": {command: "killWord", args: "right"}, "C-Backspace|M-Backspace|M-Delete": {command: "killWord", args: "left"}, "C-k": "killLine", "C-y|S-Delete": "yank", "M-y": "yankRotate", "C-g": "keyboardQuit", "C-w|C-S-W": "killRegion", "M-w": "killRingSave", "C-Space": "setMark", "C-x C-x": "exchangePointAndMark", "C-t": "transposeletters", "M-u": "touppercase", // Doesn't work "M-l": "tolowercase", "M-/": "autocomplete", // Doesn't work "C-u": "universalArgument", "M-;": "togglecomment", "C-/|C-x u|S-C--|C-z": "undo", "S-C-/|S-C-x u|C--|S-C-z": "redo", //infinite undo? "C-x r": "selectRectangularRegion", "M-x": {command: "focusCommandLine", args: "M-x "} }; exports.handler.bindKeys(exports.emacsKeys); exports.handler.addCommands({ recenterTopBottom: function(editor) { var renderer = editor.renderer; var pos = renderer.$cursorLayer.getPixelPosition(); var h = renderer.$size.scrollerHeight - renderer.lineHeight; var scrollTop = renderer.scrollTop; if (Math.abs(pos.top - scrollTop) < 2) { scrollTop = pos.top - h; } else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) { scrollTop = pos.top; } else { scrollTop = pos.top - h * 0.5; } editor.session.setScrollTop(scrollTop); }, selectRectangularRegion: function(editor) { editor.multiSelect.toggleBlockSelection(); }, setMark: { exec: function(editor, args) { if (args && args.count) { if (editor.inMultiSelectMode) editor.forEachSelection(moveToMark); else moveToMark(); moveToMark(); return; } var mark = editor.emacsMark(), ranges = editor.selection.getAllRanges(), rangePositions = ranges.map(function(r) { return {row: r.start.row, column: r.start.column}; }), transientMarkModeActive = true, hasNoSelection = ranges.every(function(range) { return range.isEmpty(); }); if (transientMarkModeActive && (mark || !hasNoSelection)) { if (editor.inMultiSelectMode) editor.forEachSelection({exec: editor.clearSelection.bind(editor)}) else editor.clearSelection(); if (mark) editor.pushEmacsMark(null); return; } if (!mark) { rangePositions.forEach(function(pos) { editor.pushEmacsMark(pos); }); editor.setEmacsMark(rangePositions[rangePositions.length-1]); return; } function moveToMark() { var mark = editor.popEmacsMark(); mark && editor.moveCursorToPosition(mark); } }, readOnly: true, handlesCount: true }, exchangePointAndMark: { exec: function exchangePointAndMark$exec(editor, args) { var sel = editor.selection; if (!args.count && !sel.isEmpty()) { // just invert selection sel.setSelectionRange(sel.getRange(), !sel.isBackwards()); return; } if (args.count) { // replace mark and point var pos = {row: sel.lead.row, column: sel.lead.column}; sel.clearSelection(); sel.moveCursorToPosition(editor.emacsMarkForSelection(pos)); } else { // create selection to last mark sel.selectToPosition(editor.emacsMarkForSelection()); } }, readOnly: true, handlesCount: true, multiSelectAction: "forEach" }, killWord: { exec: function(editor, dir) { editor.clearSelection(); if (dir == "left") editor.selection.selectWordLeft(); else editor.selection.selectWordRight(); var range = editor.getSelectionRange(); var text = editor.session.getTextRange(range); exports.killRing.add(text); editor.session.remove(range); editor.clearSelection(); }, multiSelectAction: "forEach" }, killLine: function(editor) { editor.pushEmacsMark(null); var pos = editor.getCursorPosition(); if (pos.column === 0 && editor.session.doc.getLine(pos.row).length === 0) { editor.selection.selectLine(); } else { editor.clearSelection(); editor.selection.selectLineEnd(); } var range = editor.getSelectionRange(); var text = editor.session.getTextRange(range); exports.killRing.add(text); editor.session.remove(range); editor.clearSelection(); }, yank: function(editor) { editor.onPaste(exports.killRing.get() || ''); editor.keyBinding.$data.lastCommand = "yank"; }, yankRotate: function(editor) { if (editor.keyBinding.$data.lastCommand != "yank") return; editor.undo(); editor.session.$emacsMarkRing.pop(); // also undo recording mark editor.onPaste(exports.killRing.rotate()); editor.keyBinding.$data.lastCommand = "yank"; }, killRegion: { exec: function(editor) { exports.killRing.add(editor.getCopyText()); editor.commands.byName.cut.exec(editor); }, readOnly: true, multiSelectAction: "forEach" }, killRingSave: { exec: function(editor) { editor.$handlesEmacsOnCopy = true; var marks = editor.session.$emacsMarkRing.slice(), deselectedMarks = []; exports.killRing.add(editor.getCopyText()); setTimeout(function() { function deselect() { var sel = editor.selection, range = sel.getRange(), pos = sel.isBackwards() ? range.end : range.start; deselectedMarks.push({row: pos.row, column: pos.column}); sel.clearSelection(); } editor.$handlesEmacsOnCopy = false; if (editor.inMultiSelectMode) editor.forEachSelection({exec: deselect}); else deselect(); editor.session.$emacsMarkRing = marks.concat(deselectedMarks.reverse()); }, 0); }, readOnly: true }, keyboardQuit: function(editor) { editor.selection.clearSelection(); editor.setEmacsMark(null); editor.keyBinding.$data.count = null; }, focusCommandLine: function(editor, arg) { if (editor.showCommandLine) editor.showCommandLine(arg); } }); exports.handler.addCommands(iSearchCommandModule.iSearchStartCommands); var commands = exports.handler.commands; commands.yank.isYank = true; commands.yankRotate.isYank = true; exports.killRing = { $data: [], add: function(str) { str && this.$data.push(str); if (this.$data.length > 30) this.$data.shift(); }, get: function(n) { n = n || 1; return this.$data.slice(this.$data.length-n, this.$data.length).reverse().join('\n'); }, pop: function() { if (this.$data.length > 1) this.$data.pop(); return this.get(); }, rotate: function() { this.$data.unshift(this.$data.pop()); return this.get(); } }; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-sass.js0000644000076400007640000004130712554155240023130 0ustar pravipravidefine("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var ScssHighlightRules = function() { var properties = lang.arrayToMap( (function () { var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + "background-size|binding|border-bottom-colors|border-left-colors|" + "border-right-colors|border-top-colors|border-end|border-end-color|" + "border-end-style|border-end-width|border-image|border-start|" + "border-start-color|border-start-style|border-start-width|box-align|" + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + "font-feature-settings|font-language-override|force-broken-image-icon|" + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + "outline-offset|outline-radius|outline-radius-bottomleft|" + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + "text-decoration-style|transform|transform-origin|transition|" + "transition-delay|transition-duration|transition-property|" + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + "window-shadow|border-radius").split("|"); var properties = ("azimuth|background-attachment|background-color|background-image|" + "background-position|background-repeat|background|border-bottom-color|" + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + "border-color|border-left-color|border-left-style|border-left-width|" + "border-left|border-right-color|border-right-style|border-right-width|" + "border-right|border-spacing|border-style|border-top-color|" + "border-top-style|border-top-width|border-top|border-width|border|bottom|" + "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + "letter-spacing|line-height|list-style-image|list-style-position|" + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + "min-width|opacity|orphans|outline-color|" + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + "padding-left|padding-right|padding-top|padding|page-break-after|" + "page-break-before|page-break-inside|page|pause-after|pause-before|" + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + "stress|table-layout|text-align|text-decoration|text-indent|" + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + "z-index").split("|"); var ret = []; for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" }, { caseInsensitive: true } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { token : "string", regex : '.+' } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { token : "string", regex : '.+' } ] }; }; oop.inherits(ScssHighlightRules, TextHighlightRules); exports.ScssHighlightRules = ScssHighlightRules; }); define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; var SassHighlightRules = function() { ScssHighlightRules.call(this); var start = this.$rules.start; if (start[1].token == "comment") { start.splice(1, 1, { onMatch: function(value, currentState, stack) { stack.unshift(this.next, -1, value.length - 2, currentState); return "comment"; }, regex: /^\s*\/\*/, next: "comment" }, { token: "error.invalid", regex: "/\\*|[{;}]" }, { token: "support.type", regex: /^\s*:[\w\-]+\s/ }); this.$rules.comment = [ {regex: /^\s*/, onMatch: function(value, currentState, stack) { if (stack[1] === -1) stack[1] = Math.max(stack[2], value.length - 1); if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); this.next = stack.shift(); return "text"; } else { this.next = ""; return "comment"; } }, next: "start"}, {defaultToken: "comment"} ] } }; oop.inherits(SassHighlightRules, ScssHighlightRules); exports.SassHighlightRules = SassHighlightRules; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = SassHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.$id = "ace/mode/sass"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-ruby.js0000644000076400007640000010151612554155240023137 0ustar pravipravidefine("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var constantOtherSymbol = exports.constantOtherSymbol = { token : "constant.other.symbol.ruby", // symbol regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" }; var qString = exports.qString = { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }; var qqString = exports.qqString = { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }; var tString = exports.tString = { token : "string", // backtick string regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" }; var constantNumericHex = exports.constantNumericHex = { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" }; var constantNumericFloat = exports.constantNumericFloat = { token : "constant.numeric", // float regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" }; var RubyHighlightRules = function() { var builtinFunctions = ( "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + "has_many|has_one|belongs_to|has_and_belongs_to_many" ); var keywords = ( "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" ); var buildinConstants = ( "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" ); var builtinVariables = ( "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + "$!|root_url|flash|session|cookies|params|request|response|logger|self" ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword": keywords, "constant.language": buildinConstants, "variable.language": builtinVariables, "support.function": builtinFunctions, "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? }, "identifier"); this.$rules = { "start" : [ { token : "comment", regex : "#.*$" }, { token : "comment", // multi line comment regex : "^=begin(?:$|\\s.*$)", next : "comment" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, [{ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren.lparen"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.start", regex : /"/, push : [{ token : "constant.language.escape", regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ }, { token : "paren.start", regex : /\#{/, push : "start" }, { token : "string.end", regex : /"/, next : "pop" }, { defaultToken: "string" }] }, { token : "string.start", regex : /`/, push : [{ token : "constant.language.escape", regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ }, { token : "paren.start", regex : /\#{/, push : "start" }, { token : "string.end", regex : /`/, next : "pop" }, { defaultToken: "string" }] }, { token : "string.start", regex : /'/, push : [{ token : "constant.language.escape", regex : /\\['\\]/ }, { token : "string.end", regex : /'/, next : "pop" }, { defaultToken: "string" }] }], { token : "text", // namespaces aren't symbols regex : "::" }, { token : "variable.instance", // instance variable regex : "@{1,2}[a-zA-Z_\\d]+" }, { token : "support.class", // class name regex : "[A-Z][a-zA-Z_\\d]+" }, constantOtherSymbol, constantNumericHex, constantNumericFloat, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "punctuation.separator.key-value", regex : "=>" }, { stateName: "heredoc", onMatch : function(value, currentState, stack) { var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; var tokens = value.split(this.splitRegex); stack.push(next, tokens[3]); return [ {type:"constant", value: tokens[1]}, {type:"string", value: tokens[2]}, {type:"support.class", value: tokens[3]}, {type:"string", value: tokens[4]} ]; }, regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", rules: { heredoc: [{ onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }], indentedHeredoc: [{ token: "string", regex: "^ +" }, { onMatch: function(value, currentState, stack) { if (value === stack[1]) { stack.shift(); stack.shift(); this.next = stack[0] || "start"; return "support.class"; } this.next = ""; return "string"; }, regex: ".*$", next: "start" }] } }, { regex : "$", token : "empty", next : function(currentState, stack) { if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") return stack[0]; return currentState; } }, { token : "string.character", regex : "\\B\\?." }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : "^=end(?:$|\\s.*$)", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ] }; this.normalizeRules(); }; oop.inherits(RubyHighlightRules, TextHighlightRules); exports.RubyHighlightRules = RubyHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = RubyHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); var startingConditional = line.match(/^\s*(if|else)\s*/) if (match || startingClassOrMethod || startingDoBlock || startingConditional) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, session, row) { var line = session.getLine(row); if (/}/.test(line)) return this.$outdent.autoOutdent(session, row); var indent = this.$getIndent(line); var prevLine = session.getLine(row - 1); var prevIndent = this.$getIndent(prevLine); var tab = session.getTabString(); if (prevIndent.length <= indent.length) { if (indent.slice(-tab.length) == tab) session.remove(new Range(row, indent.length-tab.length, row, indent.length)); } }; this.$id = "ace/mode/ruby"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-coffee.js0000644000076400007640000003532012554155240023404 0ustar pravipravidefine("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; oop.inherits(CoffeeHighlightRules, TextHighlightRules); function CoffeeHighlightRules() { var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; var keywords = ( "this|throw|then|try|typeof|super|switch|return|break|by|continue|" + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + "or|on|unless|until|and|yes" ); var langConstant = ( "true|false|null|undefined|NaN|Infinity" ); var illegal = ( "case|const|default|function|var|void|with|enum|export|implements|" + "interface|let|package|private|protected|public|static|yield|" + "__hasProp|slice|bind|indexOf" ); var supportClass = ( "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + "SyntaxError|TypeError|URIError|" + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray" ); var supportFunction = ( "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + "encodeURIComponent|decodeURI|decodeURIComponent|String|" ); var variableLanguage = ( "window|arguments|prototype|document" ); var keywordMapper = this.createKeywordMapper({ "keyword": keywords, "constant.language": langConstant, "invalid.illegal": illegal, "language.support.class": supportClass, "language.support.function": supportFunction, "variable.language": variableLanguage }, "identifier"); var functionRule = { token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source }; var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; this.$rules = { start : [ { token : "constant.numeric", regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" }, { stateName: "qdoc", token : "string", regex : "'''", next : [ {token : "string", regex : "'''", next : "start"}, {token : "constant.language.escape", regex : stringEscape}, {defaultToken: "string"} ] }, { stateName: "qqdoc", token : "string", regex : '"""', next : [ {token : "string", regex : '"""', next : "start"}, {token : "paren.string", regex : '#{', push : "start"}, {token : "constant.language.escape", regex : stringEscape}, {defaultToken: "string"} ] }, { stateName: "qstring", token : "string", regex : "'", next : [ {token : "string", regex : "'", next : "start"}, {token : "constant.language.escape", regex : stringEscape}, {defaultToken: "string"} ] }, { stateName: "qqstring", token : "string.start", regex : '"', next : [ {token : "string.end", regex : '"', next : "start"}, {token : "paren.string", regex : '#{', push : "start"}, {token : "constant.language.escape", regex : stringEscape}, {defaultToken: "string"} ] }, { stateName: "js", token : "string", regex : "`", next : [ {token : "string", regex : "`", next : "start"}, {token : "constant.language.escape", regex : stringEscape}, {defaultToken: "string"} ] }, { regex: "[{}]", onMatch: function(val, state, stack) { this.next = ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift() || ""; if (this.next.indexOf("string") != -1) return "paren.string"; } return "paren"; } }, { token : "string.regex", regex : "///", next : "heregex" }, { token : "string.regex", regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ }, { token : "comment", regex : "###(?!#)", next : "comment" }, { token : "comment", regex : "#.*" }, { token : ["punctuation.operator", "text", "identifier"], regex : "(\\.)(\\s*)(" + illegal + ")" }, { token : "punctuation.operator", regex : "\\." }, { token : ["keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class"], regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" }, { token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex }, functionRule, { token : "variable", regex : "@(?:" + identifier + ")?" }, { token: keywordMapper, regex : identifier }, { token : "punctuation.operator", regex : "\\,|\\." }, { token : "storage.type", regex : "[\\-=]>" }, { token : "keyword.operator", regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" }, { token : "paren.lparen", regex : "[({[]" }, { token : "paren.rparen", regex : "[\\]})]" }, { token : "text", regex : "\\s+" }], heregex : [{ token : "string.regex", regex : '.*?///[imgy]{0,4}', next : "start" }, { token : "comment.regex", regex : "\\s+(?:#.*)?" }, { token : "string.regex", regex : "\\S+" }], comment : [{ token : "comment", regex : '###', next : "start" }, { defaultToken : "comment" }] }; this.normalizeRules(); } exports.CoffeeHighlightRules = CoffeeHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module) { "use strict"; var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; var FoldMode = require("./folding/coffee").FoldMode; var Range = require("../range").Range; var TextMode = require("./text").Mode; var WorkerClient = require("../worker/worker_client").WorkerClient; var oop = require("../lib/oop"); function Mode() { this.HighlightRules = Rules; this.$outdent = new Outdent(); this.foldingRules = new FoldMode(); } oop.inherits(Mode, TextMode); (function() { var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; var commentLine = /^(\s*)#/; var hereComment = /^\s*###(?!#)/; var indentation = /^\s*/; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && state === 'start' && indenter.test(line)) indent += tab; return indent; }; this.toggleCommentLines = function(state, doc, startRow, endRow){ console.log("toggle"); var range = new Range(0, 0, 0, 0); for (var i = startRow; i <= endRow; ++i) { var line = doc.getLine(i); if (hereComment.test(line)) continue; if (commentLine.test(line)) line = line.replace(commentLine, '$1'); else line = line.replace(indentation, '$&#'); range.end.row = range.start.row = i; range.end.column = line.length + 1; doc.replace(range, line); } }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/coffee"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-r.js0000644000076400007640000002253612554155240022423 0ustar pravipravidefine("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = function(textClass) { if (!textClass) textClass = "text"; this.$rules = { "start" : [ { token : "comment", regex : "%.*$" }, { token : textClass, // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", next : "nospell" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])}]" }, { token : textClass, regex : "\\s+" } ], "nospell" : [ { token : "comment", regex : "%.*$", next : "start" }, { token : "nospell." + textClass, // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next : "start" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])]" }, { token : "paren.keyword.operator", regex : "}", next : "start" }, { token : "nospell." + textClass, regex : "\\s+" }, { token : "nospell." + textClass, regex : "\\w+" } ] }; }; oop.inherits(TexHighlightRules, TextHighlightRules); exports.TexHighlightRules = TexHighlightRules; }); define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; var RHighlightRules = function() { var keywords = lang.arrayToMap( ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") .split("|") ); var buildinConstants = lang.arrayToMap( ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + "NA_complex_").split("|") ); this.$rules = { "start" : [ { token : "comment.sectionhead", regex : "#+(?!').*(?:----|====|####)\\s*$" }, { token : "comment", regex : "#+'", next : "rd-start" }, { token : "comment", regex : "#.*$" }, { token : "string", // multi line string start regex : '["]', next : "qqstring" }, { token : "string", // multi line string start regex : "[']", next : "qstring" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+[Li]?\\b" }, { token : "constant.numeric", // explicit integer regex : "\\d+L\\b" }, { token : "constant.numeric", // number regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" }, { token : "constant.numeric", // number with leading decimal regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" }, { token : "constant.language.boolean", regex : "(?:TRUE|FALSE|T|F)\\b" }, { token : "identifier", regex : "`.*?`" }, { onMatch : function(value) { if (keywords[value]) return "keyword"; else if (buildinConstants[value]) return "constant.language"; else if (value == '...' || value.match(/^\.\.\d+$/)) return "variable.language"; else return "identifier"; }, regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b" }, { token : "keyword.operator", regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" }, { token : "keyword.operator", // infix operators regex : "%.*?%" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { token : "string", regex : '.+' } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { token : "string", regex : '.+' } ] }; var rdRules = new TexHighlightRules("comment").getRules(); for (var i = 0; i < rdRules["start"].length; i++) { rdRules["start"][i].token += ".virtual-comment"; } this.addRules(rdRules, "rd-"); this.$rules["rd-start"].unshift({ token: "text", regex: "^", next: "start" }); this.$rules["rd-start"].unshift({ token : "keyword", regex : "@(?!@)[^ ]*" }); this.$rules["rd-start"].unshift({ token : "comment", regex : "@@" }); this.$rules["rd-start"].push({ token : "comment", regex : "[^%\\\\[({\\])}]+" }); }; oop.inherits(RHighlightRules, TextHighlightRules); exports.RHighlightRules = RHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent","ace/unicode"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RHighlightRules = require("./r_highlight_rules").RHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var unicode = require("../unicode"); var Mode = function() { this.HighlightRules = RHighlightRules; this.$outdent = new MatchingBraceOutdent(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.$id = "ace/mode/r"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-searchbox.js0000644000076400007640000003211112554155240024002 0ustar pravipravidefine("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var lang = require("../lib/lang"); var event = require("../lib/event"); var searchboxCss = "\ .ace_search {\ background-color: #ddd;\ border: 1px solid #cbcbcb;\ border-top: 0 none;\ max-width: 325px;\ overflow: hidden;\ margin: 0;\ padding: 4px;\ padding-right: 6px;\ padding-bottom: 0;\ position: absolute;\ top: 0px;\ z-index: 99;\ white-space: normal;\ }\ .ace_search.left {\ border-left: 0 none;\ border-radius: 0px 0px 5px 0px;\ left: 0;\ }\ .ace_search.right {\ border-radius: 0px 0px 0px 5px;\ border-right: 0 none;\ right: 0;\ }\ .ace_search_form, .ace_replace_form {\ border-radius: 3px;\ border: 1px solid #cbcbcb;\ float: left;\ margin-bottom: 4px;\ overflow: hidden;\ }\ .ace_search_form.ace_nomatch {\ outline: 1px solid red;\ }\ .ace_search_field {\ background-color: white;\ border-right: 1px solid #cbcbcb;\ border: 0 none;\ -webkit-box-sizing: border-box;\ -moz-box-sizing: border-box;\ box-sizing: border-box;\ float: left;\ height: 22px;\ outline: 0;\ padding: 0 7px;\ width: 214px;\ margin: 0;\ }\ .ace_searchbtn,\ .ace_replacebtn {\ background: #fff;\ border: 0 none;\ border-left: 1px solid #dcdcdc;\ cursor: pointer;\ float: left;\ height: 22px;\ margin: 0;\ padding: 0;\ position: relative;\ }\ .ace_searchbtn:last-child,\ .ace_replacebtn:last-child {\ border-top-right-radius: 3px;\ border-bottom-right-radius: 3px;\ }\ .ace_searchbtn:disabled {\ background: none;\ cursor: default;\ }\ .ace_searchbtn {\ background-position: 50% 50%;\ background-repeat: no-repeat;\ width: 27px;\ }\ .ace_searchbtn.prev {\ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \ }\ .ace_searchbtn.next {\ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \ }\ .ace_searchbtn_close {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\ border-radius: 50%;\ border: 0 none;\ color: #656565;\ cursor: pointer;\ float: right;\ font: 16px/16px Arial;\ height: 14px;\ margin: 5px 1px 9px 5px;\ padding: 0;\ text-align: center;\ width: 14px;\ }\ .ace_searchbtn_close:hover {\ background-color: #656565;\ background-position: 50% 100%;\ color: white;\ }\ .ace_replacebtn.prev {\ width: 54px\ }\ .ace_replacebtn.next {\ width: 27px\ }\ .ace_button {\ margin-left: 2px;\ cursor: pointer;\ -webkit-user-select: none;\ -moz-user-select: none;\ -o-user-select: none;\ -ms-user-select: none;\ user-select: none;\ overflow: hidden;\ opacity: 0.7;\ border: 1px solid rgba(100,100,100,0.23);\ padding: 1px;\ -moz-box-sizing: border-box;\ box-sizing: border-box;\ color: black;\ }\ .ace_button:hover {\ background-color: #eee;\ opacity:1;\ }\ .ace_button:active {\ background-color: #ddd;\ }\ .ace_button.checked {\ border-color: #3399ff;\ opacity:1;\ }\ .ace_search_options{\ margin-bottom: 3px;\ text-align: right;\ -webkit-user-select: none;\ -moz-user-select: none;\ -o-user-select: none;\ -ms-user-select: none;\ user-select: none;\ }"; var HashHandler = require("../keyboard/hash_handler").HashHandler; var keyUtil = require("../lib/keys"); dom.importCssString(searchboxCss, "ace_searchbox"); var html = ''.replace(/>\s+/g, ">"); var SearchBox = function(editor, range, showReplaceForm) { var div = dom.createElement("div"); div.innerHTML = html; this.element = div.firstChild; this.$init(); this.setEditor(editor); }; (function() { this.setEditor = function(editor) { editor.searchBox = this; editor.container.appendChild(this.element); this.editor = editor; }; this.$initElements = function(sb) { this.searchBox = sb.querySelector(".ace_search_form"); this.replaceBox = sb.querySelector(".ace_replace_form"); this.searchOptions = sb.querySelector(".ace_search_options"); this.regExpOption = sb.querySelector("[action=toggleRegexpMode]"); this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]"); this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]"); this.searchInput = this.searchBox.querySelector(".ace_search_field"); this.replaceInput = this.replaceBox.querySelector(".ace_search_field"); }; this.$init = function() { var sb = this.element; this.$initElements(sb); var _this = this; event.addListener(sb, "mousedown", function(e) { setTimeout(function(){ _this.activeInput.focus(); }, 0); event.stopPropagation(e); }); event.addListener(sb, "click", function(e) { var t = e.target || e.srcElement; var action = t.getAttribute("action"); if (action && _this[action]) _this[action](); else if (_this.$searchBarKb.commands[action]) _this.$searchBarKb.commands[action].exec(_this); event.stopPropagation(e); }); event.addCommandKeyListener(sb, function(e, hashId, keyCode) { var keyString = keyUtil.keyCodeToString(keyCode); var command = _this.$searchBarKb.findKeyCommand(hashId, keyString); if (command && command.exec) { command.exec(_this); event.stopEvent(e); } }); this.$onChange = lang.delayedCall(function() { _this.find(false, false); }); event.addListener(this.searchInput, "input", function() { _this.$onChange.schedule(20); }); event.addListener(this.searchInput, "focus", function() { _this.activeInput = _this.searchInput; _this.searchInput.value && _this.highlight(); }); event.addListener(this.replaceInput, "focus", function() { _this.activeInput = _this.replaceInput; _this.searchInput.value && _this.highlight(); }); }; this.$closeSearchBarKb = new HashHandler([{ bindKey: "Esc", name: "closeSearchBar", exec: function(editor) { editor.searchBox.hide(); } }]); this.$searchBarKb = new HashHandler(); this.$searchBarKb.bindKeys({ "Ctrl-f|Command-f|Ctrl-H|Command-Option-F": function(sb) { var isReplace = sb.isReplace = !sb.isReplace; sb.replaceBox.style.display = isReplace ? "" : "none"; sb[isReplace ? "replaceInput" : "searchInput"].focus(); }, "Ctrl-G|Command-G": function(sb) { sb.findNext(); }, "Ctrl-Shift-G|Command-Shift-G": function(sb) { sb.findPrev(); }, "esc": function(sb) { setTimeout(function() { sb.hide();}); }, "Return": function(sb) { if (sb.activeInput == sb.replaceInput) sb.replace(); sb.findNext(); }, "Shift-Return": function(sb) { if (sb.activeInput == sb.replaceInput) sb.replace(); sb.findPrev(); }, "Alt-Return": function(sb) { if (sb.activeInput == sb.replaceInput) sb.replaceAll(); sb.findAll(); }, "Tab": function(sb) { (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus(); } }); this.$searchBarKb.addCommands([{ name: "toggleRegexpMode", bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"}, exec: function(sb) { sb.regExpOption.checked = !sb.regExpOption.checked; sb.$syncOptions(); } }, { name: "toggleCaseSensitive", bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"}, exec: function(sb) { sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; sb.$syncOptions(); } }, { name: "toggleWholeWords", bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"}, exec: function(sb) { sb.wholeWordOption.checked = !sb.wholeWordOption.checked; sb.$syncOptions(); } }]); this.$syncOptions = function() { dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); this.find(false, false); }; this.highlight = function(re) { this.editor.session.highlight(re || this.editor.$search.$options.re); this.editor.renderer.updateBackMarkers() }; this.find = function(skipCurrent, backwards) { var range = this.editor.find(this.searchInput.value, { skipCurrent: skipCurrent, backwards: backwards, wrap: true, regExp: this.regExpOption.checked, caseSensitive: this.caseSensitiveOption.checked, wholeWord: this.wholeWordOption.checked }); var noMatch = !range && this.searchInput.value; dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); this.editor._emit("findSearchBox", { match: !noMatch }); this.highlight(); }; this.findNext = function() { this.find(true, false); }; this.findPrev = function() { this.find(true, true); }; this.findAll = function(){ var range = this.editor.findAll(this.searchInput.value, { regExp: this.regExpOption.checked, caseSensitive: this.caseSensitiveOption.checked, wholeWord: this.wholeWordOption.checked }); var noMatch = !range && this.searchInput.value; dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); this.editor._emit("findSearchBox", { match: !noMatch }); this.highlight(); this.hide(); }; this.replace = function() { if (!this.editor.getReadOnly()) this.editor.replace(this.replaceInput.value); }; this.replaceAndFindNext = function() { if (!this.editor.getReadOnly()) { this.editor.replace(this.replaceInput.value); this.findNext() } }; this.replaceAll = function() { if (!this.editor.getReadOnly()) this.editor.replaceAll(this.replaceInput.value); }; this.hide = function() { this.element.style.display = "none"; this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb); this.editor.focus(); }; this.show = function(value, isReplace) { this.element.style.display = ""; this.replaceBox.style.display = isReplace ? "" : "none"; this.isReplace = isReplace; if (value) this.searchInput.value = value; this.searchInput.focus(); this.searchInput.select(); this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb); }; this.isFocused = function() { var el = document.activeElement; return el == this.searchInput || el == this.replaceInput; } }).call(SearchBox.prototype); exports.SearchBox = SearchBox; exports.Search = function(editor, isReplace) { var sb = editor.searchBox || new SearchBox(editor); sb.show(editor.session.getTextRange(), isReplace); }; }); (function() { window.require(["ace/ext/searchbox"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-snippets.js0000644000076400007640000001510712554155240024023 0ustar pravipravidefine("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "#") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "#") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var SnippetHighlightRules = function() { var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" + "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME"; this.$rules = { "start" : [ {token:"constant.language.escape", regex: /\\[\$}`\\]/}, {token:"keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b"}, {token:"variable", regex: "\\$\\w+"}, {onMatch: function(value, state, stack) { if (stack[1]) stack[1]++; else stack.unshift(state, 1); return this.tokenName; }, tokenName: "markup.list", regex: "\\${", next: "varDecl"}, {onMatch: function(value, state, stack) { if (!stack[1]) return "text"; stack[1]--; if (!stack[1]) stack.splice(0,2); return this.tokenName; }, tokenName: "markup.list", regex: "}"}, {token: "doc.comment", regex:/^\${2}-{5,}$/} ], "varDecl" : [ {regex: /\d+\b/, token: "constant.numeric"}, {token:"keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b"}, {token:"variable", regex: "\\w+"}, {regex: /:/, token: "punctuation.operator", next: "start"}, {regex: /\//, token: "string.regex", next: "regexp"}, {regex: "", next: "start"} ], "regexp" : [ {regex: /\\./, token: "escape"}, {regex: /\[/, token: "regex.start", next: "charClass"}, {regex: "/", token: "string.regex", next: "format"}, {"token": "string.regex", regex:"."} ], charClass : [ {regex: "\\.", token: "escape"}, {regex: "\\]", token: "regex.end", next: "regexp"}, {"token": "string.regex", regex:"."} ], "format" : [ {regex: /\\[ulULE]/, token: "keyword"}, {regex: /\$\d+/, token: "variable"}, {regex: "/[gim]*:?", token: "string.regex", next: "start"}, {"token": "string", regex:"."} ] }; }; oop.inherits(SnippetHighlightRules, TextHighlightRules); exports.SnippetHighlightRules = SnippetHighlightRules; var SnippetGroupHighlightRules = function() { this.$rules = { "start" : [ {token: "text", regex: "^\\t", next: "sn-start"}, {token:"invalid", regex: /^ \s*/}, {token:"comment", regex: /^#.*/}, {token:"constant.language.escape", regex: "^regex ", next: "regex"}, {token:"constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"} ], "regex" : [ {token:"text", regex: "\\."}, {token:"keyword", regex: "/"}, {token:"empty", regex: "$", next: "start"} ] }; this.embedRules(SnippetHighlightRules, "sn-", [ {token: "text", regex: "^\\t", next: "sn-start"}, {onMatch: function(value, state, stack) { stack.splice(stack.length); return this.tokenName; }, tokenName: "text", regex: "^(?!\t)", next: "start"} ]) }; oop.inherits(SnippetGroupHighlightRules, TextHighlightRules); exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Mode = function() { this.HighlightRules = SnippetGroupHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.$indentWithTabs = true; this.lineCommentStart = "#"; this.$id = "ace/mode/snippets"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/ext-split.js0000644000076400007640000001633512554155240023171 0ustar pravipravidefine("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Editor = require("./editor").Editor; var Renderer = require("./virtual_renderer").VirtualRenderer; var EditSession = require("./edit_session").EditSession; var Split = function(container, theme, splits) { this.BELOW = 1; this.BESIDE = 0; this.$container = container; this.$theme = theme; this.$splits = 0; this.$editorCSS = ""; this.$editors = []; this.$orientation = this.BESIDE; this.setSplits(splits || 1); this.$cEditor = this.$editors[0]; this.on("focus", function(editor) { this.$cEditor = editor; }.bind(this)); }; (function(){ oop.implement(this, EventEmitter); this.$createEditor = function() { var el = document.createElement("div"); el.className = this.$editorCSS; el.style.cssText = "position: absolute; top:0px; bottom:0px"; this.$container.appendChild(el); var editor = new Editor(new Renderer(el, this.$theme)); editor.on("focus", function() { this._emit("focus", editor); }.bind(this)); this.$editors.push(editor); editor.setFontSize(this.$fontSize); return editor; }; this.setSplits = function(splits) { var editor; if (splits < 1) { throw "The number of splits have to be > 0!"; } if (splits == this.$splits) { return; } else if (splits > this.$splits) { while (this.$splits < this.$editors.length && this.$splits < splits) { editor = this.$editors[this.$splits]; this.$container.appendChild(editor.container); editor.setFontSize(this.$fontSize); this.$splits ++; } while (this.$splits < splits) { this.$createEditor(); this.$splits ++; } } else { while (this.$splits > splits) { editor = this.$editors[this.$splits - 1]; this.$container.removeChild(editor.container); this.$splits --; } } this.resize(); }; this.getSplits = function() { return this.$splits; }; this.getEditor = function(idx) { return this.$editors[idx]; }; this.getCurrentEditor = function() { return this.$cEditor; }; this.focus = function() { this.$cEditor.focus(); }; this.blur = function() { this.$cEditor.blur(); }; this.setTheme = function(theme) { this.$editors.forEach(function(editor) { editor.setTheme(theme); }); }; this.setKeyboardHandler = function(keybinding) { this.$editors.forEach(function(editor) { editor.setKeyboardHandler(keybinding); }); }; this.forEach = function(callback, scope) { this.$editors.forEach(callback, scope); }; this.$fontSize = ""; this.setFontSize = function(size) { this.$fontSize = size; this.forEach(function(editor) { editor.setFontSize(size); }); }; this.$cloneSession = function(session) { var s = new EditSession(session.getDocument(), session.getMode()); var undoManager = session.getUndoManager(); if (undoManager) { var undoManagerProxy = new UndoManagerProxy(undoManager, s); s.setUndoManager(undoManagerProxy); } s.$informUndoManager = lang.delayedCall(function() { s.$deltas = []; }); s.setTabSize(session.getTabSize()); s.setUseSoftTabs(session.getUseSoftTabs()); s.setOverwrite(session.getOverwrite()); s.setBreakpoints(session.getBreakpoints()); s.setUseWrapMode(session.getUseWrapMode()); s.setUseWorker(session.getUseWorker()); s.setWrapLimitRange(session.$wrapLimitRange.min, session.$wrapLimitRange.max); s.$foldData = session.$cloneFoldData(); return s; }; this.setSession = function(session, idx) { var editor; if (idx == null) { editor = this.$cEditor; } else { editor = this.$editors[idx]; } var isUsed = this.$editors.some(function(editor) { return editor.session === session; }); if (isUsed) { session = this.$cloneSession(session); } editor.setSession(session); return session; }; this.getOrientation = function() { return this.$orientation; }; this.setOrientation = function(orientation) { if (this.$orientation == orientation) { return; } this.$orientation = orientation; this.resize(); }; this.resize = function() { var width = this.$container.clientWidth; var height = this.$container.clientHeight; var editor; if (this.$orientation == this.BESIDE) { var editorWidth = width / this.$splits; for (var i = 0; i < this.$splits; i++) { editor = this.$editors[i]; editor.container.style.width = editorWidth + "px"; editor.container.style.top = "0px"; editor.container.style.left = i * editorWidth + "px"; editor.container.style.height = height + "px"; editor.resize(); } } else { var editorHeight = height / this.$splits; for (var i = 0; i < this.$splits; i++) { editor = this.$editors[i]; editor.container.style.width = width + "px"; editor.container.style.top = i * editorHeight + "px"; editor.container.style.left = "0px"; editor.container.style.height = editorHeight + "px"; editor.resize(); } } }; }).call(Split.prototype); function UndoManagerProxy(undoManager, session) { this.$u = undoManager; this.$doc = session; } (function() { this.execute = function(options) { this.$u.execute(options); }; this.undo = function() { var selectionRange = this.$u.undo(true); if (selectionRange) { this.$doc.selection.setSelectionRange(selectionRange); } }; this.redo = function() { var selectionRange = this.$u.redo(true); if (selectionRange) { this.$doc.selection.setSelectionRange(selectionRange); } }; this.reset = function() { this.$u.reset(); }; this.hasUndo = function() { return this.$u.hasUndo(); }; this.hasRedo = function() { return this.$u.hasRedo(); }; }).call(UndoManagerProxy.prototype); exports.Split = Split; }); define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) { "use strict"; module.exports = require("../split"); }); (function() { window.require(["ace/ext/split"], function() {}); })(); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-eiffel.js0000644000076400007640000001152712554155240023412 0ustar pravipravidefine("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var EiffelHighlightRules = function() { var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" + "class|convert|create|debug|deferred|detachable|do|else|elseif|end|" + "ensure|expanded|export|external|feature|from|frozen|if|inherit|" + "inspect|invariant|like|local|loop|not|note|obsolete|old|once|" + "Precursor|redefine|rename|require|rescue|retry|select|separate|" + "some|then|undefine|until|variant|when"; var operatorKeywords = "and|implies|or|xor"; var languageConstants = "Void"; var booleanConstants = "True|False"; var languageVariables = "Current|Result"; var keywordMapper = this.createKeywordMapper({ "constant.language": languageConstants, "constant.language.boolean": booleanConstants, "variable.language": languageVariables, "keyword.operator": operatorKeywords, "keyword": keywords }, "identifier", true); var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/; this.$rules = { "start": [{ token : "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported) regex : /"\[/, next: "aligned_verbatim_string" }, { token : "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported) regex : /"\{/, next: "non-aligned_verbatim_string" }, { token : "string.quoted.double", regex : /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/ }, { token : "comment.line.double-dash", regex : /--.*/ }, { token : "constant.character", regex : /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/ }, { token : "constant.numeric", // hexa | octal | bin regex : /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/ }, { token : "constant.numeric", regex : /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/ }, { token : "paren.lparen", regex : /[\[({]|<<|\|\(/ }, { token : "paren.rparen", regex : /[\])}]|>>|\|\)/ }, { token : "keyword.operator", // punctuation regex : /:=|->|\.(?=\w)|[;,:?]/ }, { token : "keyword.operator", regex : /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/ }, { token : function (v) { var result = keywordMapper (v); if (result === "identifier" && v === v.toUpperCase ()) { result = "entity.name.type"; } return result; }, regex : /[a-zA-Z][a-zA-Z\d_]*\b/ }, { token : "text", regex : /\s+/ } ], "aligned_verbatim_string" : [{ token : "string", regex : /]"/, next : "start" }, { token : "string", regex : simpleString } ], "non-aligned_verbatim_string" : [{ token : "string.quoted.other", regex : /}"/, next : "start" }, { token : "string.quoted.other", regex : simpleString } ]}; }; oop.inherits(EiffelHighlightRules, TextHighlightRules); exports.EiffelHighlightRules = EiffelHighlightRules; }); define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = EiffelHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.$id = "ace/mode/eiffel"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-lua.js0000644000076400007640000003417012554155240022740 0ustar pravipravidefine("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LuaHighlightRules = function() { var keywords = ( "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ "return|then|until|while|or|and|not" ); var builtinConstants = ("true|false|nil|_G|_VERSION"); var functions = ( "string|xpcall|package|tostring|print|os|unpack|require|"+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ "collectgarbage|getmetatable|module|rawset|math|debug|"+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ "load|error|loadfile|"+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ "lines|write|close|flush|open|output|type|read|stderr|"+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ "status|wrap|create|running|"+ "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" ); var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); var futureReserved = ""; var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); var keywordMapper = this.createKeywordMapper({ "keyword": keywords, "support.function": functions, "invalid.deprecated": deprecatedIn5152, "constant.library": stdLibaries, "constant.language": builtinConstants, "invalid.illegal": futureReserved, "variable.language": "self" }, "identifier"); var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)"; var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; var floatNumber = "(?:" + pointFloat + ")"; this.$rules = { "start" : [{ stateName: "bracketedComment", onMatch : function(value, currentState, stack){ stack.unshift(this.next, value.length - 2, currentState); return "comment"; }, regex : /\-\-\[=*\[/, next : [ { onMatch : function(value, currentState, stack) { if (value.length == stack[1]) { stack.shift(); stack.shift(); this.next = stack.shift(); } else { this.next = ""; } return "comment"; }, regex : /\]=*\]/, next : "start" }, { defaultToken : "comment" } ] }, { token : "comment", regex : "\\-\\-.*$" }, { stateName: "bracketedString", onMatch : function(value, currentState, stack){ stack.unshift(this.next, value.length, currentState); return "comment"; }, regex : /\[=*\[/, next : [ { onMatch : function(value, currentState, stack) { if (value.length == stack[1]) { stack.shift(); stack.shift(); this.next = stack.shift(); } else { this.next = ""; } return "comment"; }, regex : /\]=*\]/, next : "start" }, { defaultToken : "comment" } ] }, { token : "string", // " string regex : '"(?:[^\\\\]|\\\\.)*?"' }, { token : "string", // ' string regex : "'(?:[^\\\\]|\\\\.)*?'" }, { token : "constant.numeric", // float regex : floatNumber }, { token : "constant.numeric", // integer regex : integer + "\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." }, { token : "paren.lparen", regex : "[\\[\\(\\{]" }, { token : "paren.rparen", regex : "[\\]\\)\\}]" }, { token : "text", regex : "\\s+|\\w+" } ] }; this.normalizeRules(); } oop.inherits(LuaHighlightRules, TextHighlightRules); exports.LuaHighlightRules = LuaHighlightRules; }); define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var TokenIterator = require("../../token_iterator").TokenIterator; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var isStart = this.foldingStartMarker.test(line); var isEnd = this.foldingStopMarker.test(line); if (isStart && !isEnd) { var match = line.match(this.foldingStartMarker); if (match[1] == "then" && /\belseif\b/.test(line)) return; if (match[1]) { if (session.getTokenAt(row, match.index + 1).type === "keyword") return "start"; } else if (match[2]) { var type = session.bgTokenizer.getState(row) || ""; if (type[0] == "bracketedComment" || type[0] == "bracketedString") return "start"; } else { return "start"; } } if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) return ""; var match = line.match(this.foldingStopMarker); if (match[0] === "end") { if (session.getTokenAt(row, match.index + 1).type === "keyword") return "end"; } else if (match[0][0] === "]") { var type = session.bgTokenizer.getState(row - 1) || ""; if (type[0] == "bracketedComment" || type[0] == "bracketedString") return "end"; } else return "end"; }; this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.doc.getLine(row); var match = this.foldingStartMarker.exec(line); if (match) { if (match[1]) return this.luaBlock(session, row, match.index + 1); if (match[2]) return session.getCommentFoldRange(row, match.index + 1); return this.openingBracketBlock(session, "{", row, match.index); } var match = this.foldingStopMarker.exec(line); if (match) { if (match[0] === "end") { if (session.getTokenAt(row, match.index + 1).type === "keyword") return this.luaBlock(session, row, match.index + 1); } if (match[0][0] === "]") return session.getCommentFoldRange(row, match.index + 1); return this.closingBracketBlock(session, "}", row, match.index + match[0].length); } }; this.luaBlock = function(session, row, column) { var stream = new TokenIterator(session, row, column); var indentKeywords = { "function": 1, "do": 1, "then": 1, "elseif": -1, "end": -1, "repeat": 1, "until": -1 }; var token = stream.getCurrentToken(); if (!token || token.type != "keyword") return; var val = token.value; var stack = [val]; var dir = indentKeywords[val]; if (!dir) return; var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; var startRow = row; stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; while(token = stream.step()) { if (token.type !== "keyword") continue; var level = dir * indentKeywords[token.value]; if (level > 0) { stack.unshift(token.value); } else if (level <= 0) { stack.shift(); if (!stack.length && token.value != "elseif") break; if (level === 0) stack.unshift(token.value); } } var row = stream.getCurrentTokenRow(); if (dir === -1) return new Range(row, session.getLine(row).length, startRow, startColumn); else return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); }; }).call(FoldMode.prototype); }); define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; var LuaFoldMode = require("./folding/lua").FoldMode; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var Mode = function() { this.HighlightRules = LuaHighlightRules; this.foldingRules = new LuaFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.blockComment = {start: "--[", end: "]--"}; var indentKeywords = { "function": 1, "then": 1, "do": 1, "else": 1, "elseif": 1, "repeat": 1, "end": -1, "until": -1 }; var outdentKeywords = [ "else", "elseif", "end", "until" ]; function getNetIndentLevel(tokens) { var level = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (token.type == "keyword") { if (token.value in indentKeywords) { level += indentKeywords[token.value]; } } else if (token.type == "paren.lparen") { level ++; } else if (token.type == "paren.rparen") { level --; } } if (level < 0) { return -1; } else if (level > 0) { return 1; } else { return 0; } } this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var level = 0; var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (state == "start") { level = getNetIndentLevel(tokens); } if (level > 0) { return indent + tab; } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { if (!this.checkOutdent(state, line, "\n")) { return indent.substr(0, indent.length - tab.length); } } return indent; }; this.checkOutdent = function(state, line, input) { if (input != "\n" && input != "\r" && input != "\r\n") return false; if (line.match(/^\s*[\)\}\]]$/)) return true; var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; if (!tokens || !tokens.length) return false; return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); }; this.autoOutdent = function(state, session, row) { var prevLine = session.getLine(row - 1); var prevIndent = this.$getIndent(prevLine).length; var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; var tabLength = session.getTabString().length; var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); var curIndent = this.$getIndent(session.getLine(row)).length; if (curIndent < expectedIndent) { return; } session.outdentRows(new Range(row, 0, row + 2, 0)); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/lua"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-solarized_light.js0000644000076400007640000000510012554155240025507 0ustar pravipravidefine("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-solarized-light"; exports.cssText = ".ace-solarized-light .ace_gutter {\ background: #fbf1d3;\ color: #333\ }\ .ace-solarized-light .ace_print-margin {\ width: 1px;\ background: #e8e8e8\ }\ .ace-solarized-light {\ background-color: #FDF6E3;\ color: #586E75\ }\ .ace-solarized-light .ace_cursor {\ color: #000000\ }\ .ace-solarized-light .ace_marker-layer .ace_selection {\ background: rgba(7, 54, 67, 0.09)\ }\ .ace-solarized-light.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #FDF6E3;\ border-radius: 2px\ }\ .ace-solarized-light .ace_marker-layer .ace_step {\ background: rgb(255, 255, 0)\ }\ .ace-solarized-light .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgba(147, 161, 161, 0.50)\ }\ .ace-solarized-light .ace_marker-layer .ace_active-line {\ background: #EEE8D5\ }\ .ace-solarized-light .ace_gutter-active-line {\ background-color : #EDE5C1\ }\ .ace-solarized-light .ace_marker-layer .ace_selected-word {\ border: 1px solid #073642\ }\ .ace-solarized-light .ace_invisible {\ color: rgba(147, 161, 161, 0.50)\ }\ .ace-solarized-light .ace_keyword,\ .ace-solarized-light .ace_meta,\ .ace-solarized-light .ace_support.ace_class,\ .ace-solarized-light .ace_support.ace_type {\ color: #859900\ }\ .ace-solarized-light .ace_constant.ace_character,\ .ace-solarized-light .ace_constant.ace_other {\ color: #CB4B16\ }\ .ace-solarized-light .ace_constant.ace_language {\ color: #B58900\ }\ .ace-solarized-light .ace_constant.ace_numeric {\ color: #D33682\ }\ .ace-solarized-light .ace_fold {\ background-color: #268BD2;\ border-color: #586E75\ }\ .ace-solarized-light .ace_entity.ace_name.ace_function,\ .ace-solarized-light .ace_entity.ace_name.ace_tag,\ .ace-solarized-light .ace_support.ace_function,\ .ace-solarized-light .ace_variable,\ .ace-solarized-light .ace_variable.ace_language {\ color: #268BD2\ }\ .ace-solarized-light .ace_storage {\ color: #073642\ }\ .ace-solarized-light .ace_string {\ color: #2AA198\ }\ .ace-solarized-light .ace_string.ace_regexp {\ color: #D30102\ }\ .ace-solarized-light .ace_comment,\ .ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\ color: #93A1A1\ }\ .ace-solarized-light .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/theme-idle_fingers.js0000644000076400007640000000473112554155240024767 0ustar pravipravidefine("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-idle-fingers"; exports.cssText = ".ace-idle-fingers .ace_gutter {\ background: #3b3b3b;\ color: rgb(153,153,153)\ }\ .ace-idle-fingers .ace_print-margin {\ width: 1px;\ background: #3b3b3b\ }\ .ace-idle-fingers {\ background-color: #323232;\ color: #FFFFFF\ }\ .ace-idle-fingers .ace_cursor {\ color: #91FF00\ }\ .ace-idle-fingers .ace_marker-layer .ace_selection {\ background: rgba(90, 100, 126, 0.88)\ }\ .ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px #323232;\ border-radius: 2px\ }\ .ace-idle-fingers .ace_marker-layer .ace_step {\ background: rgb(102, 82, 0)\ }\ .ace-idle-fingers .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid #404040\ }\ .ace-idle-fingers .ace_marker-layer .ace_active-line {\ background: #353637\ }\ .ace-idle-fingers .ace_gutter-active-line {\ background-color: #353637\ }\ .ace-idle-fingers .ace_marker-layer .ace_selected-word {\ border: 1px solid rgba(90, 100, 126, 0.88)\ }\ .ace-idle-fingers .ace_invisible {\ color: #404040\ }\ .ace-idle-fingers .ace_keyword,\ .ace-idle-fingers .ace_meta {\ color: #CC7833\ }\ .ace-idle-fingers .ace_constant,\ .ace-idle-fingers .ace_constant.ace_character,\ .ace-idle-fingers .ace_constant.ace_character.ace_escape,\ .ace-idle-fingers .ace_constant.ace_other,\ .ace-idle-fingers .ace_support.ace_constant {\ color: #6C99BB\ }\ .ace-idle-fingers .ace_invalid {\ color: #FFFFFF;\ background-color: #FF0000\ }\ .ace-idle-fingers .ace_fold {\ background-color: #CC7833;\ border-color: #FFFFFF\ }\ .ace-idle-fingers .ace_support.ace_function {\ color: #B83426\ }\ .ace-idle-fingers .ace_variable.ace_parameter {\ font-style: italic\ }\ .ace-idle-fingers .ace_string {\ color: #A5C261\ }\ .ace-idle-fingers .ace_string.ace_regexp {\ color: #CCCC33\ }\ .ace-idle-fingers .ace_comment {\ font-style: italic;\ color: #BC9458\ }\ .ace-idle-fingers .ace_meta.ace_tag {\ color: #FFE5BB\ }\ .ace-idle-fingers .ace_entity.ace_name {\ color: #FFC66D\ }\ .ace-idle-fingers .ace_collab.ace_user1 {\ color: #323232;\ background-color: #FFF980\ }\ .ace-idle-fingers .ace_indent-guide {\ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\ }"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-dart.js0000644000076400007640000011464612554155240023120 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" var c_cppHighlightRules = function() { var keywordControls = ( "break|case|continue|default|do|else|for|goto|if|_Pragma|" + "return|switch|while|catch|operator|try|throw|using" ); var storageType = ( "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + "class|wchar_t|template|char16_t|char32_t" ); var storageModifiers = ( "const|extern|register|restrict|static|volatile|inline|private|" + "protected|public|friend|explicit|virtual|export|mutable|typename|" + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local" ); var keywordOperators = ( "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); var builtinConstants = ( "NULL|true|false|TRUE|FALSE|nullptr" ); var keywordMapper = this.$keywords = this.createKeywordMapper({ "keyword.control" : keywordControls, "storage.type" : storageType, "storage.modifier" : storageModifiers, "keyword.operator" : keywordOperators, "variable.language": "this", "constant.language": builtinConstants }, "identifier"); var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; this.$rules = { "start" : [ { token : "comment", regex : "//", next : "singleLineComment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start regex : '["].*\\\\$', next : "qqstring" }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start regex : "['].*\\\\$", next : "qstring" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { token : "keyword", // pre-compiler directives regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b", next : "directive" }, { token : "keyword", // special case pre-compiler directive regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" }, { token : "support.function.C99.c", regex : cFunctions }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" }, { token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." }, { token : "paren.lparen", regex : "[[({]" }, { token : "paren.rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "singleLineComment" : [ { token : "comment", regex : /\\$/, next : "singleLineComment" }, { token : "comment", regex : /$/, next : "start" }, { defaultToken: "comment" } ], "qqstring" : [ { token : "string", regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next : "start" }, { defaultToken : "string" } ], "qstring" : [ { token : "string", regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next : "start" }, { defaultToken : "string" } ], "directive" : [ { token : "constant.other.multiline", regex : /\\/ }, { token : "constant.other.multiline", regex : /.*\\/ }, { token : "constant.other", regex : "\\s*<.+?>", next : "start" }, { token : "constant.other", // single line regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next : "start" }, { token : "constant.other", // single line regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next : "start" }, { token : "constant.other", regex : /[^\\\/]+/, next : "start" } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = c_cppHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[]\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/c_cpp"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DartHighlightRules = function() { var constantLanguage = "true|false|null"; var variableLanguage = "this|super"; var keywordControl = "try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await"; var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum"; var storageModifier = "static|final|const"; var storageType = "void|bool|num|int|double|dynamic|var|String"; var keywordMapper = this.createKeywordMapper({ "constant.language.dart": constantLanguage, "variable.language.dart": variableLanguage, "keyword.control.dart": keywordControl, "keyword.declaration.dart": keywordDeclaration, "storage.modifier.dart": storageModifier, "storage.type.primitive.dart": storageType }, "identifier"); var stringfill = { token : "string", regex : ".+" }; this.$rules = { "start": [ { token : "comment", regex : /\/\/.*$/ }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token: ["meta.preprocessor.script.dart"], regex: "^(#!.*)$" }, { token: "keyword.other.import.dart", regex: "(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)" }, { token : ["keyword.other.import.dart", "text"], regex : "(?:\\b)(prefix)(\\s*:)" }, { regex: "\\bas\\b", token: "keyword.cast.dart" }, { regex: "\\?|:", token: "keyword.control.ternary.dart" }, { regex: "(?:\\b)(is\\!?)(?:\\b)", token: ["keyword.operator.dart"] }, { regex: "(<<|>>>?|~|\\^|\\||&)", token: ["keyword.operator.bitwise.dart"] }, { regex: "((?:&|\\^|\\||<<|>>>?)=)", token: ["keyword.operator.assignment.bitwise.dart"] }, { regex: "(===?|!==?|<=?|>=?)", token: ["keyword.operator.comparison.dart"] }, { regex: "((?:[+*/%-]|\\~)=)", token: ["keyword.operator.assignment.arithmetic.dart"] }, { regex: "=", token: "keyword.operator.assignment.dart" }, { token : "string", regex : "'''", next : "qdoc" }, { token : "string", regex : '"""', next : "qqdoc" }, { token : "string", regex : "'", next : "qstring" }, { token : "string", regex : '"', next : "qqstring" }, { regex: "(\\-\\-|\\+\\+)", token: ["keyword.operator.increment-decrement.dart"] }, { regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)", token: ["keyword.operator.arithmetic.dart"] }, { regex: "(!|&&|\\|\\|)", token: ["keyword.operator.logical.dart"] }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", next : "start" }, { token : "comment", // comment spanning whole line regex : ".+" } ], "qdoc" : [ { token : "string", regex : ".*?'''", next : "start" }, stringfill], "qqdoc" : [ { token : "string", regex : '.*?"""', next : "start" }, stringfill], "qstring" : [ { token : "string", regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'", next : "start" }, stringfill], "qqstring" : [ { token : "string", regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', next : "start" }, stringfill] } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(DartHighlightRules, TextHighlightRules); exports.DartHighlightRules = DartHighlightRules; }); define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { CMode.call(this); this.HighlightRules = DartHighlightRules; this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, CMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/dart"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-velocity.js0000644000076400007640000031540012554155240024013 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "no_regex" : [ { token : "comment", regex : "\\/\\/", next : "line_comment" }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "start" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["support.constant"], regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, next : "start" }, { token : "punctuation.operator", regex : /[?:,;.]/, next : "start" }, { token : "paren.lparen", regex : /[\[({]/, next : "start" }, { token : "paren.rparen", regex : /[\])}]/ }, { token: "comment", regex: /^#!.*$/ } ], "start": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/", next : "line_comment_regex_allowed" }, { token: "string.regexp", regex: "\\/", next: "regex" }, { token : "text", regex : "\\s+|^$", next : "start" }, { token: "empty", regex: "", next: "no_regex" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token : "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token : "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" } ], "regex_character_class": [ { token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" } ], "comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "\\*\\/", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment_regex_allowed" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "start"}, {defaultToken : "comment", caseInsensitive: true} ], "line_comment" : [ DocCommentHighlightRules.getTagRule(), {token : "comment", regex : "$|^", next : "no_regex"}, {defaultToken : "comment", caseInsensitive: true} ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qqstring" }, { token : "string", regex : '"|$', next : "no_regex" }, { defaultToken: "string" } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "\\\\$", next : "qstring" }, { token : "string", regex : "'|$", next : "no_regex" }, { defaultToken: "string" } ] }; if (!options || !options.noES6) { this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function(val, state, stack) { this.next = val == "{" ? this.nextState : ""; if (val == "{" && stack.length) { stack.unshift("start", state); return "paren"; } if (val == "}" && stack.length) { stack.shift(); this.next = stack.shift(); if (this.next.indexOf("string") != -1) return "paren.quasi.end"; } return val == "{" ? "paren.lparen" : "paren.rparen"; }, nextState: "start" }, { token : "string.quasi.start", regex : /`/, push : [{ token : "constant.language.escape", regex : escapedRe }, { token : "paren.quasi.start", regex : /\${/, push : "start" }, { token : "string.quasi.end", regex : /`/, next : "pop" }, { defaultToken: "string.quasi" }] }); } this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("no_regex") ]); this.normalizeRules(); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string/.test(token.type); var stringAfter = !rightToken || /string/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = JavaScriptHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "no_regex") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || endState == "no_regex") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/javascript"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; var CssHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": supportFunction, "support.constant": supportConstant, "support.type": supportType, "support.constant.color": supportConstantColor, "support.constant.fonts": supportConstantFonts }, "text", true); this.$rules = { "start" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "@.*?{", push: "media" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "media" : [{ token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token: "paren.lparen", regex: "\\{", push: "ruleset" }, { token: "string", regex: "\\}", next: "pop" }, { token: "keyword", regex: "#[a-z0-9-_]+" }, { token: "variable", regex: "\\.[a-z0-9-_]+" }, { token: "string", regex: ":[a-z0-9-_]+" }, { token: "constant", regex: "[a-z0-9-_]+" }, { caseInsensitive: true }], "comment" : [{ token : "comment", regex : "\\*\\/", next : "pop" }, { defaultToken : "comment" }], "ruleset" : [ { token : "paren.rparen", regex : "\\}", next: "pop" }, { token : "comment", // multi line comment regex : "\\/\\*", push : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : ["constant.numeric", "keyword"], regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : "constant.numeric", regex : numRe }, { token : "constant.numeric", // hex6 color regex : "#[a-f0-9]{6}" }, { token : "constant.numeric", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex : pseudoElements }, { token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex : pseudoClasses }, { token : ["support.function", "string", "support.function"], regex : "(url\\()(.*)(\\))" }, { token : keywordMapper, regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" }, { caseInsensitive: true }] }; this.normalizeRules(); }; oop.inherits(CssHighlightRules, TextHighlightRules); exports.CssHighlightRules = CssHighlightRules; }); define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var CstyleBehaviour = require("./cstyle").CstyleBehaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { if (text === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ':') { return { text: '', selection: [1, 1] } } if (!line.substring(cursor.column).match(/^\s*;/)) { return { text: ':;', selection: [1, 1] } } } } }); this.add("colon", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected === ':') { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.value.match(/\s+/)) { token = iterator.stepBackward(); } if (token && token.type === 'support.type') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar === ';') { range.end.column ++; return range; } } } }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { if (text === ';') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === ';') { return { text: '', selection: [1, 1] } } } }); } oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; var CssBehaviour = require("./behaviour/css").CssBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = CssHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CssBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.foldingRules = "cStyle"; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokens = this.getTokenizer().getLineTokens(line, state).tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } var match = line.match(/^.*\{\s*$/); if (match) { indent += tab; } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); worker.attachToDocument(session.getDocument()); worker.on("annotate", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/css"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*"; this.$rules = { start : [ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, { token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true }, { token : ["punctuation.instruction.xml", "keyword.instruction.xml"], regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", }, {token : "comment.xml", regex : "<\\!--", next : "comment"}, { token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true }, {include : "tag"}, {token : "text.end-tag-open.xml", regex: "", next : "start" }], processing_instruction : [ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, {defaultToken : "instruction.xml"} ], doctype : [ {include : "whitespace"}, {include : "string"}, {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} ], int_subset : [{ token : "text.xml", regex : "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex : "(<\\!)(" + tagRegex + ")", push : [{ token : "text", regex : "\\s+" }, { token : "punctuation.markup-decl.xml", regex : ">", next : "pop" }, {include : "string"}] }], cdata : [ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, {token : "text.xml", regex : "\\s+"}, {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} ], comment : [ {token : "comment.xml", regex : "-->", next : "start"}, {defaultToken : "comment.xml"} ], reference : [{ token : "constant.language.escape.reference.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference : [{ token : "constant.language.escape.reference.attribute-value.xml", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag : [{ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex : "(?:(<)|(", next : "start"} ] }], tag_whitespace : [ {token : "text.tag-whitespace.xml", regex : "\\s+"} ], whitespace : [ {token : "text.whitespace.xml", regex : "\\s+"} ], string: [{ token : "string.xml", regex : "'", push : [ {token : "string.xml", regex: "'", next: "pop"}, {defaultToken : "string.xml"} ] }, { token : "string.xml", regex : '"', push : [ {token : "string.xml", regex: '"', next: "pop"}, {defaultToken : "string.xml"} ] }], attributes: [{ token : "entity.other.attribute-name.xml", regex : "(?:" + tagRegex + ":)?" + tagRegex + "" }, { token : "keyword.operator.attribute-equals.xml", regex : "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token : "string.attribute-value.xml", regex : "'", push : [ {token : "string.attribute-value.xml", regex: "'", next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }, { token : "string.attribute-value.xml", regex : '"', push : [ {token : "string.attribute-value.xml", regex: '"', next: "pop"}, {include : "attr_reference"}, {defaultToken : "string.attribute-value.xml"} ] }] }; if (this.constructor === XmlHighlightRules) this.normalizeRules(); }; (function() { this.embedTagRules = function(HighlightRules, prefix, tag){ this.$rules.tag.unshift({ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(<)(" + tag + "(?=\\s|>|$))", next: [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} ] }); this.$rules[tag + "-end"] = [ {include : "attributes"}, {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", onMatch : function(value, currentState, stack) { stack.splice(0); return this.token; }} ] this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], regex : "(|$))", next: tag + "-end" }, { token: "string.cdata.xml", regex : "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex : "\\]\\]>" }]); }; }).call(TextHighlightRules.prototype); oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var tagMap = lang.createMap({ a : 'anchor', button : 'form', form : 'form', img : 'image', input : 'form', label : 'form', option : 'form', script : 'script', select : 'form', textarea : 'form', style : 'style', table : 'table', tbody : 'table', td : 'table', tfoot : 'table', th : 'table', tr : 'table' }); var HtmlHighlightRules = function() { XmlHighlightRules.call(this); this.addRules({ attributes: [{ include : "tag_whitespace" }, { token : "entity.other.attribute-name.xml", regex : "[-_a-zA-Z0-9:]+" }, { token : "keyword.operator.attribute-equals.xml", regex : "=", push : [{ include: "tag_whitespace" }, { token : "string.unquoted.attribute-value.html", regex : "[^<>='\"`\\s]+", next : "pop" }, { token : "empty", regex : "", next : "pop" }] }, { include : "attribute_value" }], tag: [{ token : function(start, tag) { var group = tagMap[tag]; return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; }, regex : "(", next : "start"} ], }); this.embedTagRules(CssHighlightRules, "css-", "style"); this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); if (this.constructor === HtmlHighlightRules) this.normalizeRules(); }; oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selected = session.doc.getTextRange(editor.getSelectionRange()); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { return { text: "", selection: [1, 1] }; } if (!token) token = iterator.stepBackward(); if (!token) return; while (is(token, "tag-whitespace") || is(token, "whitespace")) { token = iterator.stepBackward(); } var rightSpace = !rightChar || rightChar.match(/\s/); if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { return { text: quote + quote, selection: [1, 1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); this.add("autoclosing", "insertion", function (state, action, editor, session, text) { if (text == '>') { var position = editor.getCursorPosition(); var iterator = new TokenIterator(session, position.row, position.column); var token = iterator.getCurrentToken() || iterator.stepBackward(); if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) return; if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { var firstChar = token.value.charAt(0); if (firstChar == '"' || firstChar == "'") { var lastChar = token.value.charAt(token.value.length - 1); var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) return; } } while (!is(token, "tag-name")) { token = iterator.stepBackward(); } var tokenRow = iterator.getCurrentTokenRow(); var tokenColumn = iterator.getCurrentTokenColumn(); if (is(iterator.stepBackward(), "end-tag-open")) return; var element = token.value; if (tokenRow == position.row) element = element.substring(0, position.column - tokenColumn); if (this.voidElements.hasOwnProperty(element.toLowerCase())) return; return { text: ">" + "", selection: [1, 1] }; } }); this.add("autoindent", "insertion", function (state, action, editor, session, text) { if (text == "\n") { var cursor = editor.getCursorPosition(); var line = session.getLine(cursor.row); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); if (token && token.type.indexOf("tag-close") !== -1) { if (token.value == "/>") return; while (token && token.type.indexOf("tag-name") === -1) { token = iterator.stepBackward(); } if (!token) { return; } var tag = token.value; var row = iterator.getCurrentTokenRow(); token = iterator.stepBackward(); if (!token || token.type.indexOf("end-tag") !== -1) { return; } if (this.voidElements && !this.voidElements[tag]) { var nextToken = session.getTokenAt(cursor.row, cursor.column+1); var line = session.getLine(row); var nextIndent = this.$getIndent(line); var indent = nextIndent + session.getTabString(); if (nextToken && nextToken.value === " -1; } (function() { this.getFoldWidget = function(session, foldStyle, row) { var tag = this._getFirstTagInLine(session, row); if (!tag) return ""; if (tag.closing || (!tag.tagName && tag.selfClosing)) return foldStyle == "markbeginend" ? "end" : ""; if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) return ""; if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) return ""; return "start"; }; this._getFirstTagInLine = function(session, row) { var tokens = session.getTokens(row); var tag = new Tag(); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (is(token, "tag-open")) { tag.end.column = tag.start.column + token.value.length; tag.closing = is(token, "end-tag-open"); token = tokens[++i]; if (!token) return null; tag.tagName = token.value; tag.end.column += token.value.length; for (i++; i < tokens.length; i++) { token = tokens[i]; tag.end.column += token.value.length; if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; break; } } return tag; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == '/>'; return tag; } tag.start.column += token.value.length; } return null; }; this._findEndTagInLine = function(session, row, tagName, startColumn) { var tokens = session.getTokens(row); var column = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; column += token.value.length; if (column < startColumn) continue; if (is(token, "end-tag-open")) { token = tokens[i + 1]; if (token && token.value == tagName) return true; } } return false; }; this._readTagForward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; iterator.stepForward(); return tag; } } while(token = iterator.stepForward()); return null; }; this._readTagBackward = function(iterator) { var token = iterator.getCurrentToken(); if (!token) return null; var tag = new Tag(); do { if (is(token, "tag-open")) { tag.closing = is(token, "end-tag-open"); tag.start.row = iterator.getCurrentTokenRow(); tag.start.column = iterator.getCurrentTokenColumn(); iterator.stepBackward(); return tag; } else if (is(token, "tag-name")) { tag.tagName = token.value; } else if (is(token, "tag-close")) { tag.selfClosing = token.value == "/>"; tag.end.row = iterator.getCurrentTokenRow(); tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; } } while(token = iterator.stepBackward()); return null; }; this._pop = function(stack, tag) { while (stack.length) { var top = stack[stack.length-1]; if (!tag || top.tagName == tag.tagName) { return stack.pop(); } else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { stack.pop(); continue; } else { return null; } } }; this.getFoldWidgetRange = function(session, foldStyle, row) { var firstTag = this._getFirstTagInLine(session, row); if (!firstTag) return null; var isBackward = firstTag.closing || firstTag.selfClosing; var stack = []; var tag; if (!isBackward) { var iterator = new TokenIterator(session, row, firstTag.start.column); var start = { row: row, column: firstTag.start.column + firstTag.tagName.length + 2 }; if (firstTag.start.row == firstTag.end.row) start.column = firstTag.end.column; while (tag = this._readTagForward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (tag.closing) { this._pop(stack, tag); if (stack.length == 0) return Range.fromPoints(start, tag.start); } else { stack.push(tag); } } } else { var iterator = new TokenIterator(session, row, firstTag.end.column); var end = { row: row, column: firstTag.start.column }; while (tag = this._readTagBackward(iterator)) { if (tag.selfClosing) { if (!stack.length) { tag.start.column += tag.tagName.length + 2; tag.end.column -= 2; return Range.fromPoints(tag.start, tag.end); } else continue; } if (!tag.closing) { this._pop(stack, tag); if (stack.length == 0) { tag.start.column += tag.tagName.length + 2; if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) tag.start.column = tag.end.column; return Range.fromPoints(tag.start, end); } } else { stack.push(tag); } } } }; }).call(FoldMode.prototype); }); define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var MixedFoldMode = require("./mixed").FoldMode; var XmlFoldMode = require("./xml").FoldMode; var CStyleFoldMode = require("./cstyle").FoldMode; var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { "js-": new CStyleFoldMode(), "css-": new CStyleFoldMode() }); }; oop.inherits(FoldMode, MixedFoldMode); }); define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var commonAttributes = [ "accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate" ]; var eventAttributes = [ "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting" ]; var globalAttributes = commonAttributes.concat(eventAttributes); var attributeMap = { "html": ["manifest"], "head": [], "title": [], "base": ["href", "target"], "link": ["href", "hreflang", "rel", "media", "type", "sizes"], "meta": ["http-equiv", "name", "content", "charset"], "style": ["type", "media", "scoped"], "script": ["charset", "type", "src", "defer", "async"], "noscript": ["href"], "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], "section": [], "nav": [], "article": ["pubdate"], "aside": [], "h1": [], "h2": [], "h3": [], "h4": [], "h5": [], "h6": [], "header": [], "footer": [], "address": [], "main": [], "p": [], "hr": [], "pre": [], "blockquote": ["cite"], "ol": ["start", "reversed"], "ul": [], "li": ["value"], "dl": [], "dt": [], "dd": [], "figure": [], "figcaption": [], "div": [], "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], "em": [], "strong": [], "small": [], "s": [], "cite": [], "q": ["cite"], "dfn": [], "abbr": [], "data": [], "time": ["datetime"], "code": [], "var": [], "samp": [], "kbd": [], "sub": [], "sup": [], "i": [], "b": [], "u": [], "mark": [], "ruby": [], "rt": [], "rp": [], "bdi": [], "bdo": [], "span": [], "br": [], "wbr": [], "ins": ["cite", "datetime"], "del": ["cite", "datetime"], "img": ["alt", "src", "height", "width", "usemap", "ismap"], "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], "embed": ["src", "height", "width", "type"], "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], "param": ["name", "value"], "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], "source": ["src", "type", "media"], "track": ["kind", "src", "srclang", "label", "default"], "canvas": ["width", "height"], "map": ["name"], "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], "svg": [], "math": [], "table": ["summary"], "caption": [], "colgroup": ["span"], "col": ["span"], "tbody": [], "thead": [], "tfoot": [], "tr": [], "td": ["headers", "rowspan", "colspan"], "th": ["headers", "rowspan", "colspan", "scope"], "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], "fieldset": ["disabled", "form", "name"], "legend": [], "label": ["form", "for"], "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], "datalist": [], "optgroup": ["disabled", "label"], "option": ["disabled", "selected", "label", "value"], "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], "output": ["for", "form", "name"], "progress": ["value", "max"], "meter": ["value", "min", "max", "low", "high", "optimum"], "details": ["open"], "summary": [], "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], "menu": ["type", "label"], "dialog": ["open"] }; var elements = Object.keys(attributeMap); function is(token, type) { return token.type.lastIndexOf(type + ".xml") > -1; } function findTagName(session, pos) { var iterator = new TokenIterator(session, pos.row, pos.column); var token = iterator.getCurrentToken(); while (token && !is(token, "tag-name")){ token = iterator.stepBackward(); } if (token) return token.value; } var HtmlCompletions = function() { }; (function() { this.getCompletions = function(state, session, pos, prefix) { var token = session.getTokenAt(pos.row, pos.column); if (!token) return []; if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) return this.getTagCompletions(state, session, pos, prefix); if (is(token, "tag-whitespace") || is(token, "attribute-name")) return this.getAttributeCompetions(state, session, pos, prefix); return []; }; this.getTagCompletions = function(state, session, pos, prefix) { return elements.map(function(element){ return { value: element, meta: "tag", score: Number.MAX_VALUE }; }); }; this.getAttributeCompetions = function(state, session, pos, prefix) { var tagName = findTagName(session, pos); if (!tagName) return []; var attributes = globalAttributes; if (tagName in attributeMap) { attributes = attributes.concat(attributeMap[tagName]); } return attributes.map(function(attribute){ return { caption: attribute, snippet: attribute + '="$0"', meta: "attribute", score: Number.MAX_VALUE }; }); }; }).call(HtmlCompletions.prototype); exports.HtmlCompletions = HtmlCompletions; }); define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; var HtmlCompletions = require("./html_completions").HtmlCompletions; var WorkerClient = require("../worker/worker_client").WorkerClient; var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; var Mode = function(options) { this.fragmentContext = options && options.fragmentContext; this.HighlightRules = HtmlHighlightRules; this.$behaviour = new XmlBehaviour(); this.$completer = new HtmlCompletions(); this.createModeDelegates({ "js-": JavaScriptMode, "css-": CssMode }); this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); }; oop.inherits(Mode, TextMode); (function() { this.blockComment = {start: ""}; this.voidElements = lang.arrayToMap(voidElements); this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.getCompletions = function(state, session, pos, prefix) { return this.$completer.getCompletions(state, session, pos, prefix); }; this.createWorker = function(session) { if (this.constructor != Mode) return; var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); worker.attachToDocument(session.getDocument()); if (this.fragmentContext) worker.call("setOptions", [{context: this.fragmentContext}]); worker.on("error", function(e) { session.setAnnotations(e.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; this.$id = "ace/mode/html"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var VelocityHighlightRules = function() { HtmlHighlightRules.call(this); var builtinConstants = lang.arrayToMap( ('true|false|null').split('|') ); var builtinFunctions = lang.arrayToMap( ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|') ); var builtinVariables = lang.arrayToMap( ('$contentRoot|$foreach').split('|') ); var keywords = lang.arrayToMap( ("#set|#macro|#include|#parse|" + "#if|#elseif|#else|#foreach|" + "#break|#end|#stop" ).split('|') ); this.$rules.start.push( { token : "comment", regex : "##.*$" },{ token : "comment.block", // multi line comment regex : "#\\*", next : "vm_comment" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : function(value) { if (keywords.hasOwnProperty(value)) return "keyword"; else if (builtinConstants.hasOwnProperty(value)) return "constant.language"; else if (builtinVariables.hasOwnProperty(value)) return "variable.language"; else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) return "support.function"; else if (value == "debugger") return "invalid.deprecated"; else if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)) return "variable"; return "identifier"; }, regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b" }, { token : "keyword.operator", regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" }, { token : "lparen", regex : "[[({]" }, { token : "rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ); this.$rules["vm_comment"] = [ { token : "comment", // closing comment regex : "\\*#|-->", next : "start" }, { defaultToken: "comment" } ]; this.$rules["vm_start"] = [ { token: "variable", regex: "}", next: "pop" }, { token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // single line regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "constant.numeric", // hex regex : "0[xX][0-9a-fA-F]+\\b" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" }, { token : function(value) { if (keywords.hasOwnProperty(value)) return "keyword"; else if (builtinConstants.hasOwnProperty(value)) return "constant.language"; else if (builtinVariables.hasOwnProperty(value)) return "variable.language"; else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) return "support.function"; else if (value == "debugger") return "invalid.deprecated"; else if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)) return "variable"; return "identifier"; }, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" }, { token : "lparen", regex : "[[({]" }, { token : "rparen", regex : "[\\])}]" }, { token : "text", regex : "\\s+" } ]; for (var i in this.$rules) { this.$rules[i].unshift({ token: "variable", regex: "\\${", push: "vm_start" }); } this.normalizeRules(); }; oop.inherits(VelocityHighlightRules, TextHighlightRules); exports.VelocityHighlightRules = VelocityHighlightRules; }); define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.getFoldWidgetRange = function(session, foldStyle, row) { var range = this.indentationBlock(session, row); if (range) return range; var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1 || line[startLevel] != "##") return; var startColumn = line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { line = session.getLine(row); var level = line.search(re); if (level == -1) continue; if (line[level] != "##") break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); var indent = line.search(/\S/); var next = session.getLine(row + 1); var prev = session.getLine(row - 1); var prevIndent = prev.search(/\S/); var nextIndent = next.search(/\S/); if (indent == -1) { session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; return ""; } if (prevIndent == -1) { if (indent == nextIndent && line[indent] == "##" && next[indent] == "##") { session.foldWidgets[row - 1] = ""; session.foldWidgets[row + 1] = ""; return "start"; } } else if (prevIndent == indent && line[indent] == "##" && prev[indent] == "##") { if (session.getLine(row - 2).search(/\S/) == -1) { session.foldWidgets[row - 1] = "start"; session.foldWidgets[row + 1] = ""; return ""; } } if (prevIndent!= -1 && prevIndent < indent) session.foldWidgets[row - 1] = "start"; else session.foldWidgets[row - 1] = ""; if (indent < nextIndent) return "start"; else return ""; }; }).call(FoldMode.prototype); }); define("ace/mode/velocity",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/velocity_highlight_rules","ace/mode/folding/velocity"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules; var FoldMode = require("./folding/velocity").FoldMode; var Mode = function() { HtmlMode.call(this); this.HighlightRules = VelocityHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, HtmlMode); (function() { this.lineCommentStart = "##"; this.blockComment = {start: "#*", end: "*#"}; this.$id = "ace/mode/velocity"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-mysql.js0000644000076400007640000002064312554155240023324 0ustar pravipravidefine("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var MysqlHighlightRules = function() { var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where" + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat"; var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric" var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee" var keywordMapper = this.createKeywordMapper({ "support.function": builtins, "keyword": mySqlKeywords, "constant": "false|true|null|unknown|date|time|timestamp|ODBCdotTable|zerolessFloat", "variable.language": variable }, "identifier", true); function string(rule) { var start = rule.start; var escapeSeq = rule.escape; return { token: "string.start", regex: start, next: [ {token: "constant.language.escape", regex: escapeSeq}, {token: "string.end", next: "start", regex: start}, {defaultToken: "string"} ] }; } this.$rules = { "start" : [ { token : "comment", regex : "(?:-- |#).*$" }, string({start: '"', escape: /\\[0'"bnrtZ\\%_]?/}), string({start: "'", escape: /\\[0'"bnrtZ\\%_]?/}), DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, next : "comment" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/ }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "constant.class", regex : "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "constant.buildin", regex : "`[^`]*`" }, { token : "keyword.operator", regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" }, { token : "paren.lparen", regex : "[\\(]" }, { token : "paren.rparen", regex : "[\\)]" }, { token : "text", regex : "\\s+" } ], "comment" : [ {token : "comment", regex : "\\*\\/", next : "start"}, {defaultToken : "comment"} ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); this.normalizeRules(); }; oop.inherits(MysqlHighlightRules, TextHighlightRules); exports.MysqlHighlightRules = MysqlHighlightRules; }); define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules","ace/range"], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("../mode/text").Mode; var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = MysqlHighlightRules; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ["--", "#"]; // todo space this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/mysql"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-prolog.js0000644000076400007640000003331012554155240023454 0ustar pravipravidefine("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var PrologHighlightRules = function() { this.$rules = { start: [ { include: '#comment' }, { include: '#basic_fact' }, { include: '#rule' }, { include: '#directive' }, { include: '#fact' } ], '#atom': [ { token: 'constant.other.atom.prolog', regex: '\\b[a-z][a-zA-Z0-9_]*\\b' }, { token: 'constant.numeric.prolog', regex: '-?\\d+(?:\\.\\d+)?' }, { include: '#string' } ], '#basic_elem': [ { include: '#comment' }, { include: '#statement' }, { include: '#constants' }, { include: '#operators' }, { include: '#builtins' }, { include: '#list' }, { include: '#atom' }, { include: '#variable' } ], '#basic_fact': [ { token: [ 'entity.name.function.fact.basic.prolog', 'punctuation.end.fact.basic.prolog' ], regex: '([a-z]\\w*)(\\.)' } ], '#builtins': [ { token: 'support.function.builtin.prolog', regex: '\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b' } ], '#comment': [ { token: [ 'punctuation.definition.comment.prolog', 'comment.line.percentage.prolog' ], regex: '(%)(.*$)' }, { token: 'punctuation.definition.comment.prolog', regex: '/\\*', push: [ { token: 'punctuation.definition.comment.prolog', regex: '\\*/', next: 'pop' }, { defaultToken: 'comment.block.prolog' } ] } ], '#constants': [ { token: 'constant.language.prolog', regex: '\\b(?:true|false|yes|no)\\b' } ], '#directive': [ { token: 'keyword.operator.directive.prolog', regex: ':-', push: [ { token: 'meta.directive.prolog', regex: '\\.', next: 'pop' }, { include: '#comment' }, { include: '#statement' }, { defaultToken: 'meta.directive.prolog' } ] } ], '#expr': [ { include: '#comments' }, { token: 'meta.expression.prolog', regex: '\\(', push: [ { token: 'meta.expression.prolog', regex: '\\)', next: 'pop' }, { include: '#expr' }, { defaultToken: 'meta.expression.prolog' } ] }, { token: 'keyword.control.cutoff.prolog', regex: '!' }, { token: 'punctuation.control.and.prolog', regex: ',' }, { token: 'punctuation.control.or.prolog', regex: ';' }, { include: '#basic_elem' } ], '#fact': [ { token: [ 'entity.name.function.fact.prolog', 'punctuation.begin.fact.parameters.prolog' ], regex: '([a-z]\\w*)(\\()(?!.*:-)', push: [ { token: [ 'punctuation.end.fact.parameters.prolog', 'punctuation.end.fact.prolog' ], regex: '(\\))(\\.?)', next: 'pop' }, { include: '#parameter' }, { defaultToken: 'meta.fact.prolog' } ] } ], '#list': [ { token: 'punctuation.begin.list.prolog', regex: '\\[(?=.*\\])', push: [ { token: 'punctuation.end.list.prolog', regex: '\\]', next: 'pop' }, { include: '#comment' }, { token: 'punctuation.separator.list.prolog', regex: ',' }, { token: 'punctuation.concat.list.prolog', regex: '\\|', push: [ { token: 'meta.list.concat.prolog', regex: '(?=\\s*\\])', next: 'pop' }, { include: '#basic_elem' }, { defaultToken: 'meta.list.concat.prolog' } ] }, { include: '#basic_elem' }, { defaultToken: 'meta.list.prolog' } ] } ], '#operators': [ { token: 'keyword.operator.prolog', regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' } ], '#parameter': [ { token: 'variable.language.anonymous.prolog', regex: '\\b_\\b' }, { token: 'variable.parameter.prolog', regex: '\\b[A-Z_]\\w*\\b' }, { token: 'punctuation.separator.parameters.prolog', regex: ',' }, { include: '#basic_elem' }, { token: 'text', regex: '[^\\s]' } ], '#rule': [ { token: 'meta.rule.prolog', regex: '(?=[a-z]\\w*.*:-)', push: [ { token: 'punctuation.rule.end.prolog', regex: '\\.', next: 'pop' }, { token: 'meta.rule.signature.prolog', regex: '(?=[a-z]\\w*.*:-)', push: [ { token: 'meta.rule.signature.prolog', regex: '(?=:-)', next: 'pop' }, { token: 'entity.name.function.rule.prolog', regex: '[a-z]\\w*(?=\\(|\\s*:-)' }, { token: 'punctuation.rule.parameters.begin.prolog', regex: '\\(', push: [ { token: 'punctuation.rule.parameters.end.prolog', regex: '\\)', next: 'pop' }, { include: '#parameter' }, { defaultToken: 'meta.rule.parameters.prolog' } ] }, { defaultToken: 'meta.rule.signature.prolog' } ] }, { token: 'keyword.operator.definition.prolog', regex: ':-', push: [ { token: 'meta.rule.definition.prolog', regex: '(?=\\.)', next: 'pop' }, { include: '#comment' }, { include: '#expr' }, { defaultToken: 'meta.rule.definition.prolog' } ] }, { defaultToken: 'meta.rule.prolog' } ] } ], '#statement': [ { token: 'meta.statement.prolog', regex: '(?=[a-z]\\w*\\()', push: [ { token: 'punctuation.end.statement.parameters.prolog', regex: '\\)', next: 'pop' }, { include: '#builtins' }, { include: '#atom' }, { token: 'punctuation.begin.statement.parameters.prolog', regex: '\\(', push: [ { token: 'meta.statement.parameters.prolog', regex: '(?=\\))', next: 'pop' }, { token: 'punctuation.separator.statement.prolog', regex: ',' }, { include: '#basic_elem' }, { defaultToken: 'meta.statement.parameters.prolog' } ] }, { defaultToken: 'meta.statement.prolog' } ] } ], '#string': [ { token: 'punctuation.definition.string.begin.prolog', regex: '\'', push: [ { token: 'punctuation.definition.string.end.prolog', regex: '\'', next: 'pop' }, { token: 'constant.character.escape.prolog', regex: '\\\\.' }, { token: 'constant.character.escape.quote.prolog', regex: '\'\'' }, { defaultToken: 'string.quoted.single.prolog' } ] } ], '#variable': [ { token: 'variable.language.anonymous.prolog', regex: '\\b_\\b' }, { token: 'variable.other.prolog', regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] } this.normalizeRules(); }; PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ], foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)', foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)', keyEquivalent: '^~P', name: 'Prolog', scopeName: 'source.prolog' } oop.inherits(PrologHighlightRules, TextHighlightRules); exports.PrologHighlightRules = PrologHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = PrologHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "%"; this.blockComment = {start: "/*", end: "*/"}; this.$id = "ace/mode/prolog"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/mode-dot.js0000644000076400007640000003310012554155240022735 0ustar pravipravidefine("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, DocCommentHighlightRules.getTagRule(), { defaultToken : "comment.doc", caseInsensitive: true }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getTagRule = function(start) { return { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; } DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var DotHighlightRules = function() { var keywords = lang.arrayToMap( ("strict|node|edge|graph|digraph|subgraph").split("|") ); var attributes = lang.arrayToMap( ("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z").split("|") ); this.$rules = { "start" : [ { token : "comment", regex : /\/\/.*$/ }, { token : "comment", regex : /#.*$/ }, { token : "comment", // multi line comment merge : true, regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", regex : /[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/ }, { token : "keyword.operator", regex : /\+|=|\->/ }, { token : "punctuation.operator", regex : /,|;/ }, { token : "paren.lparen", regex : /[\[{]/ }, { token : "paren.rparen", regex : /[\]}]/ }, { token: "comment", regex: /^#!.*$/ }, { token: function(value) { if (keywords.hasOwnProperty(value.toLowerCase())) { return "keyword"; } else if (attributes.hasOwnProperty(value.toLowerCase())) { return "variable"; } else { return "text"; } }, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", merge : true, next : "start" }, { token : "comment", // comment spanning whole line merge : true, regex : ".+" } ], "qqstring" : [ { token : "string", regex : '[^"\\\\]+', merge : true }, { token : "string", regex : "\\\\$", next : "qqstring", merge : true }, { token : "string", regex : '"|$', next : "start", merge : true } ], "qstring" : [ { token : "string", regex : "[^'\\\\]+", merge : true }, { token : "string", regex : "\\\\$", next : "qstring", merge : true }, { token : "string", regex : "'|$", next : "start", merge : true } ] }; }; oop.inherits(DotHighlightRules, TextHighlightRules); exports.DotHighlightRules = DotHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules; var DotFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = DotHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.foldingRules = new DotFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = ["//", "#"]; this.blockComment = {start: "/*", end: "*/"}; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/dot"; }).call(Mode.prototype); exports.Mode = Mode; }); ace-rails-ap-3.0.3/vendor/assets/javascripts/ace/worker-css.js0000644000076400007640000107417412554155240023345 0ustar pravipravi"no use strict"; ;(function(window) { if (typeof window.window != "undefined" && window.document) { return; } window.console = function() { var msgs = Array.prototype.slice.call(arguments, 0); postMessage({type: "log", data: msgs}); }; window.console.error = window.console.warn = window.console.log = window.console.trace = window.console; window.window = window; window.ace = window; window.onerror = function(message, file, line, col, err) { postMessage({type: "error", data: { message: message, file: file, line: line, col: col, stack: err.stack }}); }; window.normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = (base ? base + "/" : "") + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; window.require = function(parentId, id) { if (!id) { id = parentId; parentId = null; } if (!id.charAt) throw new Error("worker.js require() accepts only (parentId, id) as arguments"); id = window.normalizeModule(parentId, id); var module = window.require.modules[id]; if (module) { if (!module.initialized) { module.initialized = true; module.exports = module.factory().exports; } return module.exports; } var chunks = id.split("/"); if (!window.require.tlns) return console.log("unable to load " + id); chunks[0] = window.require.tlns[chunks[0]] || chunks[0]; var path = chunks.join("/") + ".js"; window.require.id = id; importScripts(path); return window.require(parentId, id); }; window.require.modules = {}; window.require.tlns = {}; window.define = function(id, deps, factory) { if (arguments.length == 2) { factory = deps; if (typeof id != "string") { deps = id; id = window.require.id; } } else if (arguments.length == 1) { factory = id; deps = []; id = window.require.id; } if (typeof factory != "function") { window.require.modules[id] = { exports: factory, initialized: true }; return; } if (!deps.length) // If there is no dependencies, we inject 'require', 'exports' and // 'module' as dependencies, to provide CommonJS compatibility. deps = ['require', 'exports', 'module']; var req = function(childId) { return window.require(id, childId); }; window.require.modules[id] = { exports: {}, factory: function() { var module = this; var returnExports = factory.apply(this, deps.map(function(dep) { switch(dep) { // Because 'require', 'exports' and 'module' aren't actual // dependencies, we must handle them seperately. case 'require': return req; case 'exports': return module.exports; case 'module': return module; // But for all other dependencies, we can just go ahead and // require them. default: return req(dep); } })); if (returnExports) module.exports = returnExports; return module; } }; }; window.define.amd = {}; window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { require.tlns = topLevelNamespaces; }; window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; var oop = window.require("ace/lib/oop"); var Sender = function() {}; (function() { oop.implement(this, EventEmitter); this.callback = function(data, callbackId) { postMessage({ type: "call", id: callbackId, data: data }); }; this.emit = function(name, data) { postMessage({ type: "event", name: name, data: data }); }; }).call(Sender.prototype); return new Sender(); }; var main = window.main = null; var sender = window.sender = null; window.onmessage = function(e) { var msg = e.data; if (msg.command) { if (main[msg.command]) main[msg.command].apply(main, msg.args); else throw new Error("Unknown command:" + msg.command); } else if (msg.init) { initBaseUrls(msg.tlns); require("ace/lib/es5-shim"); sender = window.sender = initSender(); var clazz = require(msg.module)[msg.classname]; main = window.main = new clazz(sender); } else if (msg.event && sender) { sender._signal(msg.event, msg.data); } }; })(this); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) { "use strict"; var Document = require("../document").Document; var lang = require("../lib/lang"); var Mirror = exports.Mirror = function(sender) { this.sender = sender; var doc = this.doc = new Document(""); var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); var _self = this; sender.on("change", function(e) { doc.applyDeltas(e.data); if (_self.$timeout) return deferredUpdate.schedule(_self.$timeout); _self.onUpdate(); }); }; (function() { this.$timeout = 500; this.setTimeout = function(timeout) { this.$timeout = timeout; }; this.setValue = function(value) { this.doc.setValue(value); this.deferredUpdate.schedule(this.$timeout); }; this.getValue = function(callbackId) { this.sender.callback(this.doc.getValue(), callbackId); }; this.onUpdate = function() { }; this.isPending = function() { return this.deferredUpdate.isPending(); }; }).call(Mirror.prototype); }); define("ace/mode/css/csslint",["require","exports","module"], function(require, exports, module) { var parserlib = {}; (function(){ function EventTarget(){ this._listeners = {}; } EventTarget.prototype = { constructor: EventTarget, addListener: function(type, listener){ if (!this._listeners[type]){ this._listeners[type] = []; } this._listeners[type].push(listener); }, fire: function(event){ if (typeof event == "string"){ event = { type: event }; } if (typeof event.target != "undefined"){ event.target = this; } if (typeof event.type == "undefined"){ throw new Error("Event object missing 'type' property."); } if (this._listeners[event.type]){ var listeners = this._listeners[event.type].concat(); for (var i=0, len=listeners.length; i < len; i++){ listeners[i].call(this, event); } } }, removeListener: function(type, listener){ if (this._listeners[type]){ var listeners = this._listeners[type]; for (var i=0, len=listeners.length; i < len; i++){ if (listeners[i] === listener){ listeners.splice(i, 1); break; } } } } }; function StringReader(text){ this._input = text.replace(/\n\r?/g, "\n"); this._line = 1; this._col = 1; this._cursor = 0; } StringReader.prototype = { constructor: StringReader, getCol: function(){ return this._col; }, getLine: function(){ return this._line ; }, eof: function(){ return (this._cursor == this._input.length); }, peek: function(count){ var c = null; count = (typeof count == "undefined" ? 1 : count); if (this._cursor < this._input.length){ c = this._input.charAt(this._cursor + count - 1); } return c; }, read: function(){ var c = null; if (this._cursor < this._input.length){ if (this._input.charAt(this._cursor) == "\n"){ this._line++; this._col=1; } else { this._col++; } c = this._input.charAt(this._cursor++); } return c; }, mark: function(){ this._bookmark = { cursor: this._cursor, line: this._line, col: this._col }; }, reset: function(){ if (this._bookmark){ this._cursor = this._bookmark.cursor; this._line = this._bookmark.line; this._col = this._bookmark.col; delete this._bookmark; } }, readTo: function(pattern){ var buffer = "", c; while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) != buffer.length - pattern.length){ c = this.read(); if (c){ buffer += c; } else { throw new Error("Expected \"" + pattern + "\" at line " + this._line + ", col " + this._col + "."); } } return buffer; }, readWhile: function(filter){ var buffer = "", c = this.read(); while(c !== null && filter(c)){ buffer += c; c = this.read(); } return buffer; }, readMatch: function(matcher){ var source = this._input.substring(this._cursor), value = null; if (typeof matcher == "string"){ if (source.indexOf(matcher) === 0){ value = this.readCount(matcher.length); } } else if (matcher instanceof RegExp){ if (matcher.test(source)){ value = this.readCount(RegExp.lastMatch.length); } } return value; }, readCount: function(count){ var buffer = ""; while(count--){ buffer += this.read(); } return buffer; } }; function SyntaxError(message, line, col){ this.col = col; this.line = line; this.message = message; } SyntaxError.prototype = new Error(); function SyntaxUnit(text, line, col, type){ this.col = col; this.line = line; this.text = text; this.type = type; } SyntaxUnit.fromToken = function(token){ return new SyntaxUnit(token.value, token.startLine, token.startCol); }; SyntaxUnit.prototype = { constructor: SyntaxUnit, valueOf: function(){ return this.text; }, toString: function(){ return this.text; } }; function TokenStreamBase(input, tokenData){ this._reader = input ? new StringReader(input.toString()) : null; this._token = null; this._tokenData = tokenData; this._lt = []; this._ltIndex = 0; this._ltIndexCache = []; } TokenStreamBase.createTokenData = function(tokens){ var nameMap = [], typeMap = {}, tokenData = tokens.concat([]), i = 0, len = tokenData.length+1; tokenData.UNKNOWN = -1; tokenData.unshift({name:"EOF"}); for (; i < len; i++){ nameMap.push(tokenData[i].name); tokenData[tokenData[i].name] = i; if (tokenData[i].text){ typeMap[tokenData[i].text] = i; } } tokenData.name = function(tt){ return nameMap[tt]; }; tokenData.type = function(c){ return typeMap[c]; }; return tokenData; }; TokenStreamBase.prototype = { constructor: TokenStreamBase, match: function(tokenTypes, channel){ if (!(tokenTypes instanceof Array)){ tokenTypes = [tokenTypes]; } var tt = this.get(channel), i = 0, len = tokenTypes.length; while(i < len){ if (tt == tokenTypes[i++]){ return true; } } this.unget(); return false; }, mustMatch: function(tokenTypes, channel){ var token; if (!(tokenTypes instanceof Array)){ tokenTypes = [tokenTypes]; } if (!this.match.apply(this, arguments)){ token = this.LT(1); throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name + " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); } }, advance: function(tokenTypes, channel){ while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){ this.get(); } return this.LA(0); }, get: function(channel){ var tokenInfo = this._tokenData, reader = this._reader, value, i =0, len = tokenInfo.length, found = false, token, info; if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){ i++; this._token = this._lt[this._ltIndex++]; info = tokenInfo[this._token.type]; while((info.channel !== undefined && channel !== info.channel) && this._ltIndex < this._lt.length){ this._token = this._lt[this._ltIndex++]; info = tokenInfo[this._token.type]; i++; } if ((info.channel === undefined || channel === info.channel) && this._ltIndex <= this._lt.length){ this._ltIndexCache.push(i); return this._token.type; } } token = this._getToken(); if (token.type > -1 && !tokenInfo[token.type].hide){ token.channel = tokenInfo[token.type].channel; this._token = token; this._lt.push(token); this._ltIndexCache.push(this._lt.length - this._ltIndex + i); if (this._lt.length > 5){ this._lt.shift(); } if (this._ltIndexCache.length > 5){ this._ltIndexCache.shift(); } this._ltIndex = this._lt.length; } info = tokenInfo[token.type]; if (info && (info.hide || (info.channel !== undefined && channel !== info.channel))){ return this.get(channel); } else { return token.type; } }, LA: function(index){ var total = index, tt; if (index > 0){ if (index > 5){ throw new Error("Too much lookahead."); } while(total){ tt = this.get(); total--; } while(total < index){ this.unget(); total++; } } else if (index < 0){ if(this._lt[this._ltIndex+index]){ tt = this._lt[this._ltIndex+index].type; } else { throw new Error("Too much lookbehind."); } } else { tt = this._token.type; } return tt; }, LT: function(index){ this.LA(index); return this._lt[this._ltIndex+index-1]; }, peek: function(){ return this.LA(1); }, token: function(){ return this._token; }, tokenName: function(tokenType){ if (tokenType < 0 || tokenType > this._tokenData.length){ return "UNKNOWN_TOKEN"; } else { return this._tokenData[tokenType].name; } }, tokenType: function(tokenName){ return this._tokenData[tokenName] || -1; }, unget: function(){ if (this._ltIndexCache.length){ this._ltIndex -= this._ltIndexCache.pop();//--; this._token = this._lt[this._ltIndex - 1]; } else { throw new Error("Too much lookahead."); } } }; parserlib.util = { StringReader: StringReader, SyntaxError : SyntaxError, SyntaxUnit : SyntaxUnit, EventTarget : EventTarget, TokenStreamBase : TokenStreamBase }; })(); (function(){ var EventTarget = parserlib.util.EventTarget, TokenStreamBase = parserlib.util.TokenStreamBase, StringReader = parserlib.util.StringReader, SyntaxError = parserlib.util.SyntaxError, SyntaxUnit = parserlib.util.SyntaxUnit; var Colors = { aliceblue :"#f0f8ff", antiquewhite :"#faebd7", aqua :"#00ffff", aquamarine :"#7fffd4", azure :"#f0ffff", beige :"#f5f5dc", bisque :"#ffe4c4", black :"#000000", blanchedalmond :"#ffebcd", blue :"#0000ff", blueviolet :"#8a2be2", brown :"#a52a2a", burlywood :"#deb887", cadetblue :"#5f9ea0", chartreuse :"#7fff00", chocolate :"#d2691e", coral :"#ff7f50", cornflowerblue :"#6495ed", cornsilk :"#fff8dc", crimson :"#dc143c", cyan :"#00ffff", darkblue :"#00008b", darkcyan :"#008b8b", darkgoldenrod :"#b8860b", darkgray :"#a9a9a9", darkgrey :"#a9a9a9", darkgreen :"#006400", darkkhaki :"#bdb76b", darkmagenta :"#8b008b", darkolivegreen :"#556b2f", darkorange :"#ff8c00", darkorchid :"#9932cc", darkred :"#8b0000", darksalmon :"#e9967a", darkseagreen :"#8fbc8f", darkslateblue :"#483d8b", darkslategray :"#2f4f4f", darkslategrey :"#2f4f4f", darkturquoise :"#00ced1", darkviolet :"#9400d3", deeppink :"#ff1493", deepskyblue :"#00bfff", dimgray :"#696969", dimgrey :"#696969", dodgerblue :"#1e90ff", firebrick :"#b22222", floralwhite :"#fffaf0", forestgreen :"#228b22", fuchsia :"#ff00ff", gainsboro :"#dcdcdc", ghostwhite :"#f8f8ff", gold :"#ffd700", goldenrod :"#daa520", gray :"#808080", grey :"#808080", green :"#008000", greenyellow :"#adff2f", honeydew :"#f0fff0", hotpink :"#ff69b4", indianred :"#cd5c5c", indigo :"#4b0082", ivory :"#fffff0", khaki :"#f0e68c", lavender :"#e6e6fa", lavenderblush :"#fff0f5", lawngreen :"#7cfc00", lemonchiffon :"#fffacd", lightblue :"#add8e6", lightcoral :"#f08080", lightcyan :"#e0ffff", lightgoldenrodyellow :"#fafad2", lightgray :"#d3d3d3", lightgrey :"#d3d3d3", lightgreen :"#90ee90", lightpink :"#ffb6c1", lightsalmon :"#ffa07a", lightseagreen :"#20b2aa", lightskyblue :"#87cefa", lightslategray :"#778899", lightslategrey :"#778899", lightsteelblue :"#b0c4de", lightyellow :"#ffffe0", lime :"#00ff00", limegreen :"#32cd32", linen :"#faf0e6", magenta :"#ff00ff", maroon :"#800000", mediumaquamarine:"#66cdaa", mediumblue :"#0000cd", mediumorchid :"#ba55d3", mediumpurple :"#9370d8", mediumseagreen :"#3cb371", mediumslateblue :"#7b68ee", mediumspringgreen :"#00fa9a", mediumturquoise :"#48d1cc", mediumvioletred :"#c71585", midnightblue :"#191970", mintcream :"#f5fffa", mistyrose :"#ffe4e1", moccasin :"#ffe4b5", navajowhite :"#ffdead", navy :"#000080", oldlace :"#fdf5e6", olive :"#808000", olivedrab :"#6b8e23", orange :"#ffa500", orangered :"#ff4500", orchid :"#da70d6", palegoldenrod :"#eee8aa", palegreen :"#98fb98", paleturquoise :"#afeeee", palevioletred :"#d87093", papayawhip :"#ffefd5", peachpuff :"#ffdab9", peru :"#cd853f", pink :"#ffc0cb", plum :"#dda0dd", powderblue :"#b0e0e6", purple :"#800080", red :"#ff0000", rosybrown :"#bc8f8f", royalblue :"#4169e1", saddlebrown :"#8b4513", salmon :"#fa8072", sandybrown :"#f4a460", seagreen :"#2e8b57", seashell :"#fff5ee", sienna :"#a0522d", silver :"#c0c0c0", skyblue :"#87ceeb", slateblue :"#6a5acd", slategray :"#708090", slategrey :"#708090", snow :"#fffafa", springgreen :"#00ff7f", steelblue :"#4682b4", tan :"#d2b48c", teal :"#008080", thistle :"#d8bfd8", tomato :"#ff6347", turquoise :"#40e0d0", violet :"#ee82ee", wheat :"#f5deb3", white :"#ffffff", whitesmoke :"#f5f5f5", yellow :"#ffff00", yellowgreen :"#9acd32", activeBorder :"Active window border.", activecaption :"Active window caption.", appworkspace :"Background color of multiple document interface.", background :"Desktop background.", buttonface :"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.", buttonhighlight :"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.", buttonshadow :"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.", buttontext :"Text on push buttons.", captiontext :"Text in caption, size box, and scrollbar arrow box.", graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.", greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.", highlight :"Item(s) selected in a control.", highlighttext :"Text of item(s) selected in a control.", inactiveborder :"Inactive window border.", inactivecaption :"Inactive window caption.", inactivecaptiontext :"Color of text in an inactive caption.", infobackground :"Background color for tooltip controls.", infotext :"Text color for tooltip controls.", menu :"Menu background.", menutext :"Text in menus.", scrollbar :"Scroll bar gray area.", threeddarkshadow :"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", threedface :"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", threedhighlight :"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", threedlightshadow :"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", threedshadow :"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.", window :"Window background.", windowframe :"Window frame.", windowtext :"Text in windows." }; function Combinator(text, line, col){ SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE); this.type = "unknown"; if (/^\s+$/.test(text)){ this.type = "descendant"; } else if (text == ">"){ this.type = "child"; } else if (text == "+"){ this.type = "adjacent-sibling"; } else if (text == "~"){ this.type = "sibling"; } } Combinator.prototype = new SyntaxUnit(); Combinator.prototype.constructor = Combinator; function MediaFeature(name, value){ SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE); this.name = name; this.value = value; } MediaFeature.prototype = new SyntaxUnit(); MediaFeature.prototype.constructor = MediaFeature; function MediaQuery(modifier, mediaType, features, line, col){ SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE); this.modifier = modifier; this.mediaType = mediaType; this.features = features; } MediaQuery.prototype = new SyntaxUnit(); MediaQuery.prototype.constructor = MediaQuery; function Parser(options){ EventTarget.call(this); this.options = options || {}; this._tokenStream = null; } Parser.DEFAULT_TYPE = 0; Parser.COMBINATOR_TYPE = 1; Parser.MEDIA_FEATURE_TYPE = 2; Parser.MEDIA_QUERY_TYPE = 3; Parser.PROPERTY_NAME_TYPE = 4; Parser.PROPERTY_VALUE_TYPE = 5; Parser.PROPERTY_VALUE_PART_TYPE = 6; Parser.SELECTOR_TYPE = 7; Parser.SELECTOR_PART_TYPE = 8; Parser.SELECTOR_SUB_PART_TYPE = 9; Parser.prototype = function(){ var proto = new EventTarget(), //new prototype prop, additions = { constructor: Parser, DEFAULT_TYPE : 0, COMBINATOR_TYPE : 1, MEDIA_FEATURE_TYPE : 2, MEDIA_QUERY_TYPE : 3, PROPERTY_NAME_TYPE : 4, PROPERTY_VALUE_TYPE : 5, PROPERTY_VALUE_PART_TYPE : 6, SELECTOR_TYPE : 7, SELECTOR_PART_TYPE : 8, SELECTOR_SUB_PART_TYPE : 9, _stylesheet: function(){ var tokenStream = this._tokenStream, charset = null, count, token, tt; this.fire("startstylesheet"); this._charset(); this._skipCruft(); while (tokenStream.peek() == Tokens.IMPORT_SYM){ this._import(); this._skipCruft(); } while (tokenStream.peek() == Tokens.NAMESPACE_SYM){ this._namespace(); this._skipCruft(); } tt = tokenStream.peek(); while(tt > Tokens.EOF){ try { switch(tt){ case Tokens.MEDIA_SYM: this._media(); this._skipCruft(); break; case Tokens.PAGE_SYM: this._page(); this._skipCruft(); break; case Tokens.FONT_FACE_SYM: this._font_face(); this._skipCruft(); break; case Tokens.KEYFRAMES_SYM: this._keyframes(); this._skipCruft(); break; case Tokens.VIEWPORT_SYM: this._viewport(); this._skipCruft(); break; case Tokens.UNKNOWN_SYM: //unknown @ rule tokenStream.get(); if (!this.options.strict){ this.fire({ type: "error", error: null, message: "Unknown @ rule: " + tokenStream.LT(0).value + ".", line: tokenStream.LT(0).startLine, col: tokenStream.LT(0).startCol }); count=0; while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) == Tokens.LBRACE){ count++; //keep track of nesting depth } while(count){ tokenStream.advance([Tokens.RBRACE]); count--; } } else { throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol); } break; case Tokens.S: this._readWhitespace(); break; default: if(!this._ruleset()){ switch(tt){ case Tokens.CHARSET_SYM: token = tokenStream.LT(1); this._charset(false); throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol); case Tokens.IMPORT_SYM: token = tokenStream.LT(1); this._import(false); throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol); case Tokens.NAMESPACE_SYM: token = tokenStream.LT(1); this._namespace(false); throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol); default: tokenStream.get(); //get the last token this._unexpectedToken(tokenStream.token()); } } } } catch(ex) { if (ex instanceof SyntaxError && !this.options.strict){ this.fire({ type: "error", error: ex, message: ex.message, line: ex.line, col: ex.col }); } else { throw ex; } } tt = tokenStream.peek(); } if (tt != Tokens.EOF){ this._unexpectedToken(tokenStream.token()); } this.fire("endstylesheet"); }, _charset: function(emit){ var tokenStream = this._tokenStream, charset, token, line, col; if (tokenStream.match(Tokens.CHARSET_SYM)){ line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); tokenStream.mustMatch(Tokens.STRING); token = tokenStream.token(); charset = token.value; this._readWhitespace(); tokenStream.mustMatch(Tokens.SEMICOLON); if (emit !== false){ this.fire({ type: "charset", charset:charset, line: line, col: col }); } } }, _import: function(emit){ var tokenStream = this._tokenStream, tt, uri, importToken, mediaList = []; tokenStream.mustMatch(Tokens.IMPORT_SYM); importToken = tokenStream.token(); this._readWhitespace(); tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1"); this._readWhitespace(); mediaList = this._media_query_list(); tokenStream.mustMatch(Tokens.SEMICOLON); this._readWhitespace(); if (emit !== false){ this.fire({ type: "import", uri: uri, media: mediaList, line: importToken.startLine, col: importToken.startCol }); } }, _namespace: function(emit){ var tokenStream = this._tokenStream, line, col, prefix, uri; tokenStream.mustMatch(Tokens.NAMESPACE_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); if (tokenStream.match(Tokens.IDENT)){ prefix = tokenStream.token().value; this._readWhitespace(); } tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1"); this._readWhitespace(); tokenStream.mustMatch(Tokens.SEMICOLON); this._readWhitespace(); if (emit !== false){ this.fire({ type: "namespace", prefix: prefix, uri: uri, line: line, col: col }); } }, _media: function(){ var tokenStream = this._tokenStream, line, col, mediaList;// = []; tokenStream.mustMatch(Tokens.MEDIA_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); mediaList = this._media_query_list(); tokenStream.mustMatch(Tokens.LBRACE); this._readWhitespace(); this.fire({ type: "startmedia", media: mediaList, line: line, col: col }); while(true) { if (tokenStream.peek() == Tokens.PAGE_SYM){ this._page(); } else if (tokenStream.peek() == Tokens.FONT_FACE_SYM){ this._font_face(); } else if (tokenStream.peek() == Tokens.VIEWPORT_SYM){ this._viewport(); } else if (!this._ruleset()){ break; } } tokenStream.mustMatch(Tokens.RBRACE); this._readWhitespace(); this.fire({ type: "endmedia", media: mediaList, line: line, col: col }); }, _media_query_list: function(){ var tokenStream = this._tokenStream, mediaList = []; this._readWhitespace(); if (tokenStream.peek() == Tokens.IDENT || tokenStream.peek() == Tokens.LPAREN){ mediaList.push(this._media_query()); } while(tokenStream.match(Tokens.COMMA)){ this._readWhitespace(); mediaList.push(this._media_query()); } return mediaList; }, _media_query: function(){ var tokenStream = this._tokenStream, type = null, ident = null, token = null, expressions = []; if (tokenStream.match(Tokens.IDENT)){ ident = tokenStream.token().value.toLowerCase(); if (ident != "only" && ident != "not"){ tokenStream.unget(); ident = null; } else { token = tokenStream.token(); } } this._readWhitespace(); if (tokenStream.peek() == Tokens.IDENT){ type = this._media_type(); if (token === null){ token = tokenStream.token(); } } else if (tokenStream.peek() == Tokens.LPAREN){ if (token === null){ token = tokenStream.LT(1); } expressions.push(this._media_expression()); } if (type === null && expressions.length === 0){ return null; } else { this._readWhitespace(); while (tokenStream.match(Tokens.IDENT)){ if (tokenStream.token().value.toLowerCase() != "and"){ this._unexpectedToken(tokenStream.token()); } this._readWhitespace(); expressions.push(this._media_expression()); } } return new MediaQuery(ident, type, expressions, token.startLine, token.startCol); }, _media_type: function(){ return this._media_feature(); }, _media_expression: function(){ var tokenStream = this._tokenStream, feature = null, token, expression = null; tokenStream.mustMatch(Tokens.LPAREN); feature = this._media_feature(); this._readWhitespace(); if (tokenStream.match(Tokens.COLON)){ this._readWhitespace(); token = tokenStream.LT(1); expression = this._expression(); } tokenStream.mustMatch(Tokens.RPAREN); this._readWhitespace(); return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null)); }, _media_feature: function(){ var tokenStream = this._tokenStream; tokenStream.mustMatch(Tokens.IDENT); return SyntaxUnit.fromToken(tokenStream.token()); }, _page: function(){ var tokenStream = this._tokenStream, line, col, identifier = null, pseudoPage = null; tokenStream.mustMatch(Tokens.PAGE_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); if (tokenStream.match(Tokens.IDENT)){ identifier = tokenStream.token().value; if (identifier.toLowerCase() === "auto"){ this._unexpectedToken(tokenStream.token()); } } if (tokenStream.peek() == Tokens.COLON){ pseudoPage = this._pseudo_page(); } this._readWhitespace(); this.fire({ type: "startpage", id: identifier, pseudo: pseudoPage, line: line, col: col }); this._readDeclarations(true, true); this.fire({ type: "endpage", id: identifier, pseudo: pseudoPage, line: line, col: col }); }, _margin: function(){ var tokenStream = this._tokenStream, line, col, marginSym = this._margin_sym(); if (marginSym){ line = tokenStream.token().startLine; col = tokenStream.token().startCol; this.fire({ type: "startpagemargin", margin: marginSym, line: line, col: col }); this._readDeclarations(true); this.fire({ type: "endpagemargin", margin: marginSym, line: line, col: col }); return true; } else { return false; } }, _margin_sym: function(){ var tokenStream = this._tokenStream; if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM, Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM, Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM, Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM, Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM, Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM, Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM])) { return SyntaxUnit.fromToken(tokenStream.token()); } else { return null; } }, _pseudo_page: function(){ var tokenStream = this._tokenStream; tokenStream.mustMatch(Tokens.COLON); tokenStream.mustMatch(Tokens.IDENT); return tokenStream.token().value; }, _font_face: function(){ var tokenStream = this._tokenStream, line, col; tokenStream.mustMatch(Tokens.FONT_FACE_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); this.fire({ type: "startfontface", line: line, col: col }); this._readDeclarations(true); this.fire({ type: "endfontface", line: line, col: col }); }, _viewport: function(){ var tokenStream = this._tokenStream, line, col; tokenStream.mustMatch(Tokens.VIEWPORT_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); this.fire({ type: "startviewport", line: line, col: col }); this._readDeclarations(true); this.fire({ type: "endviewport", line: line, col: col }); }, _operator: function(inFunction){ var tokenStream = this._tokenStream, token = null; if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) || (inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))){ token = tokenStream.token(); this._readWhitespace(); } return token ? PropertyValuePart.fromToken(token) : null; }, _combinator: function(){ var tokenStream = this._tokenStream, value = null, token; if(tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])){ token = tokenStream.token(); value = new Combinator(token.value, token.startLine, token.startCol); this._readWhitespace(); } return value; }, _unary_operator: function(){ var tokenStream = this._tokenStream; if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])){ return tokenStream.token().value; } else { return null; } }, _property: function(){ var tokenStream = this._tokenStream, value = null, hack = null, tokenValue, token, line, col; if (tokenStream.peek() == Tokens.STAR && this.options.starHack){ tokenStream.get(); token = tokenStream.token(); hack = token.value; line = token.startLine; col = token.startCol; } if(tokenStream.match(Tokens.IDENT)){ token = tokenStream.token(); tokenValue = token.value; if (tokenValue.charAt(0) == "_" && this.options.underscoreHack){ hack = "_"; tokenValue = tokenValue.substring(1); } value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol)); this._readWhitespace(); } return value; }, _ruleset: function(){ var tokenStream = this._tokenStream, tt, selectors; try { selectors = this._selectors_group(); } catch (ex){ if (ex instanceof SyntaxError && !this.options.strict){ this.fire({ type: "error", error: ex, message: ex.message, line: ex.line, col: ex.col }); tt = tokenStream.advance([Tokens.RBRACE]); if (tt == Tokens.RBRACE){ } else { throw ex; } } else { throw ex; } return true; } if (selectors){ this.fire({ type: "startrule", selectors: selectors, line: selectors[0].line, col: selectors[0].col }); this._readDeclarations(true); this.fire({ type: "endrule", selectors: selectors, line: selectors[0].line, col: selectors[0].col }); } return selectors; }, _selectors_group: function(){ var tokenStream = this._tokenStream, selectors = [], selector; selector = this._selector(); if (selector !== null){ selectors.push(selector); while(tokenStream.match(Tokens.COMMA)){ this._readWhitespace(); selector = this._selector(); if (selector !== null){ selectors.push(selector); } else { this._unexpectedToken(tokenStream.LT(1)); } } } return selectors.length ? selectors : null; }, _selector: function(){ var tokenStream = this._tokenStream, selector = [], nextSelector = null, combinator = null, ws = null; nextSelector = this._simple_selector_sequence(); if (nextSelector === null){ return null; } selector.push(nextSelector); do { combinator = this._combinator(); if (combinator !== null){ selector.push(combinator); nextSelector = this._simple_selector_sequence(); if (nextSelector === null){ this._unexpectedToken(tokenStream.LT(1)); } else { selector.push(nextSelector); } } else { if (this._readWhitespace()){ ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol); combinator = this._combinator(); nextSelector = this._simple_selector_sequence(); if (nextSelector === null){ if (combinator !== null){ this._unexpectedToken(tokenStream.LT(1)); } } else { if (combinator !== null){ selector.push(combinator); } else { selector.push(ws); } selector.push(nextSelector); } } else { break; } } } while(true); return new Selector(selector, selector[0].line, selector[0].col); }, _simple_selector_sequence: function(){ var tokenStream = this._tokenStream, elementName = null, modifiers = [], selectorText= "", components = [ function(){ return tokenStream.match(Tokens.HASH) ? new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : null; }, this._class, this._attrib, this._pseudo, this._negation ], i = 0, len = components.length, component = null, found = false, line, col; line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol; elementName = this._type_selector(); if (!elementName){ elementName = this._universal(); } if (elementName !== null){ selectorText += elementName; } while(true){ if (tokenStream.peek() === Tokens.S){ break; } while(i < len && component === null){ component = components[i++].call(this); } if (component === null){ if (selectorText === ""){ return null; } else { break; } } else { i = 0; modifiers.push(component); selectorText += component.toString(); component = null; } } return selectorText !== "" ? new SelectorPart(elementName, modifiers, selectorText, line, col) : null; }, _type_selector: function(){ var tokenStream = this._tokenStream, ns = this._namespace_prefix(), elementName = this._element_name(); if (!elementName){ if (ns){ tokenStream.unget(); if (ns.length > 1){ tokenStream.unget(); } } return null; } else { if (ns){ elementName.text = ns + elementName.text; elementName.col -= ns.length; } return elementName; } }, _class: function(){ var tokenStream = this._tokenStream, token; if (tokenStream.match(Tokens.DOT)){ tokenStream.mustMatch(Tokens.IDENT); token = tokenStream.token(); return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1); } else { return null; } }, _element_name: function(){ var tokenStream = this._tokenStream, token; if (tokenStream.match(Tokens.IDENT)){ token = tokenStream.token(); return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol); } else { return null; } }, _namespace_prefix: function(){ var tokenStream = this._tokenStream, value = ""; if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE){ if(tokenStream.match([Tokens.IDENT, Tokens.STAR])){ value += tokenStream.token().value; } tokenStream.mustMatch(Tokens.PIPE); value += "|"; } return value.length ? value : null; }, _universal: function(){ var tokenStream = this._tokenStream, value = "", ns; ns = this._namespace_prefix(); if(ns){ value += ns; } if(tokenStream.match(Tokens.STAR)){ value += "*"; } return value.length ? value : null; }, _attrib: function(){ var tokenStream = this._tokenStream, value = null, ns, token; if (tokenStream.match(Tokens.LBRACKET)){ token = tokenStream.token(); value = token.value; value += this._readWhitespace(); ns = this._namespace_prefix(); if (ns){ value += ns; } tokenStream.mustMatch(Tokens.IDENT); value += tokenStream.token().value; value += this._readWhitespace(); if(tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH, Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])){ value += tokenStream.token().value; value += this._readWhitespace(); tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); value += tokenStream.token().value; value += this._readWhitespace(); } tokenStream.mustMatch(Tokens.RBRACKET); return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol); } else { return null; } }, _pseudo: function(){ var tokenStream = this._tokenStream, pseudo = null, colons = ":", line, col; if (tokenStream.match(Tokens.COLON)){ if (tokenStream.match(Tokens.COLON)){ colons += ":"; } if (tokenStream.match(Tokens.IDENT)){ pseudo = tokenStream.token().value; line = tokenStream.token().startLine; col = tokenStream.token().startCol - colons.length; } else if (tokenStream.peek() == Tokens.FUNCTION){ line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol - colons.length; pseudo = this._functional_pseudo(); } if (pseudo){ pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col); } } return pseudo; }, _functional_pseudo: function(){ var tokenStream = this._tokenStream, value = null; if(tokenStream.match(Tokens.FUNCTION)){ value = tokenStream.token().value; value += this._readWhitespace(); value += this._expression(); tokenStream.mustMatch(Tokens.RPAREN); value += ")"; } return value; }, _expression: function(){ var tokenStream = this._tokenStream, value = ""; while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION, Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH, Tokens.FREQ, Tokens.ANGLE, Tokens.TIME, Tokens.RESOLUTION, Tokens.SLASH])){ value += tokenStream.token().value; value += this._readWhitespace(); } return value.length ? value : null; }, _negation: function(){ var tokenStream = this._tokenStream, line, col, value = "", arg, subpart = null; if (tokenStream.match(Tokens.NOT)){ value = tokenStream.token().value; line = tokenStream.token().startLine; col = tokenStream.token().startCol; value += this._readWhitespace(); arg = this._negation_arg(); value += arg; value += this._readWhitespace(); tokenStream.match(Tokens.RPAREN); value += tokenStream.token().value; subpart = new SelectorSubPart(value, "not", line, col); subpart.args.push(arg); } return subpart; }, _negation_arg: function(){ var tokenStream = this._tokenStream, args = [ this._type_selector, this._universal, function(){ return tokenStream.match(Tokens.HASH) ? new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : null; }, this._class, this._attrib, this._pseudo ], arg = null, i = 0, len = args.length, elementName, line, col, part; line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol; while(i < len && arg === null){ arg = args[i].call(this); i++; } if (arg === null){ this._unexpectedToken(tokenStream.LT(1)); } if (arg.type == "elementName"){ part = new SelectorPart(arg, [], arg.toString(), line, col); } else { part = new SelectorPart(null, [arg], arg.toString(), line, col); } return part; }, _declaration: function(){ var tokenStream = this._tokenStream, property = null, expr = null, prio = null, error = null, invalid = null, propertyName= ""; property = this._property(); if (property !== null){ tokenStream.mustMatch(Tokens.COLON); this._readWhitespace(); expr = this._expr(); if (!expr || expr.length === 0){ this._unexpectedToken(tokenStream.LT(1)); } prio = this._prio(); propertyName = property.toString(); if (this.options.starHack && property.hack == "*" || this.options.underscoreHack && property.hack == "_") { propertyName = property.text; } try { this._validateProperty(propertyName, expr); } catch (ex) { invalid = ex; } this.fire({ type: "property", property: property, value: expr, important: prio, line: property.line, col: property.col, invalid: invalid }); return true; } else { return false; } }, _prio: function(){ var tokenStream = this._tokenStream, result = tokenStream.match(Tokens.IMPORTANT_SYM); this._readWhitespace(); return result; }, _expr: function(inFunction){ var tokenStream = this._tokenStream, values = [], value = null, operator = null; value = this._term(inFunction); if (value !== null){ values.push(value); do { operator = this._operator(inFunction); if (operator){ values.push(operator); } /*else { values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col)); valueParts = []; }*/ value = this._term(inFunction); if (value === null){ break; } else { values.push(value); } } while(true); } return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null; }, _term: function(inFunction){ var tokenStream = this._tokenStream, unary = null, value = null, endChar = null, token, line, col; unary = this._unary_operator(); if (unary !== null){ line = tokenStream.token().startLine; col = tokenStream.token().startCol; } if (tokenStream.peek() == Tokens.IE_FUNCTION && this.options.ieFilters){ value = this._ie_function(); if (unary === null){ line = tokenStream.token().startLine; col = tokenStream.token().startCol; } } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])){ token = tokenStream.token(); endChar = token.endChar; value = token.value + this._expr(inFunction).text; if (unary === null){ line = tokenStream.token().startLine; col = tokenStream.token().startCol; } tokenStream.mustMatch(Tokens.type(endChar)); value += endChar; this._readWhitespace(); } else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH, Tokens.ANGLE, Tokens.TIME, Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])){ value = tokenStream.token().value; if (unary === null){ line = tokenStream.token().startLine; col = tokenStream.token().startCol; } this._readWhitespace(); } else { token = this._hexcolor(); if (token === null){ if (unary === null){ line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol; } if (value === null){ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){ value = this._ie_function(); } else { value = this._function(); } } } else { value = token.value; if (unary === null){ line = token.startLine; col = token.startCol; } } } return value !== null ? new PropertyValuePart(unary !== null ? unary + value : value, line, col) : null; }, _function: function(){ var tokenStream = this._tokenStream, functionText = null, expr = null, lt; if (tokenStream.match(Tokens.FUNCTION)){ functionText = tokenStream.token().value; this._readWhitespace(); expr = this._expr(true); functionText += expr; if (this.options.ieFilters && tokenStream.peek() == Tokens.EQUALS){ do { if (this._readWhitespace()){ functionText += tokenStream.token().value; } if (tokenStream.LA(0) == Tokens.COMMA){ functionText += tokenStream.token().value; } tokenStream.match(Tokens.IDENT); functionText += tokenStream.token().value; tokenStream.match(Tokens.EQUALS); functionText += tokenStream.token().value; lt = tokenStream.peek(); while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){ tokenStream.get(); functionText += tokenStream.token().value; lt = tokenStream.peek(); } } while(tokenStream.match([Tokens.COMMA, Tokens.S])); } tokenStream.match(Tokens.RPAREN); functionText += ")"; this._readWhitespace(); } return functionText; }, _ie_function: function(){ var tokenStream = this._tokenStream, functionText = null, expr = null, lt; if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){ functionText = tokenStream.token().value; do { if (this._readWhitespace()){ functionText += tokenStream.token().value; } if (tokenStream.LA(0) == Tokens.COMMA){ functionText += tokenStream.token().value; } tokenStream.match(Tokens.IDENT); functionText += tokenStream.token().value; tokenStream.match(Tokens.EQUALS); functionText += tokenStream.token().value; lt = tokenStream.peek(); while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){ tokenStream.get(); functionText += tokenStream.token().value; lt = tokenStream.peek(); } } while(tokenStream.match([Tokens.COMMA, Tokens.S])); tokenStream.match(Tokens.RPAREN); functionText += ")"; this._readWhitespace(); } return functionText; }, _hexcolor: function(){ var tokenStream = this._tokenStream, token = null, color; if(tokenStream.match(Tokens.HASH)){ token = tokenStream.token(); color = token.value; if (!/#[a-f0-9]{3,6}/i.test(color)){ throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); } this._readWhitespace(); } return token; }, _keyframes: function(){ var tokenStream = this._tokenStream, token, tt, name, prefix = ""; tokenStream.mustMatch(Tokens.KEYFRAMES_SYM); token = tokenStream.token(); if (/^@\-([^\-]+)\-/.test(token.value)) { prefix = RegExp.$1; } this._readWhitespace(); name = this._keyframe_name(); this._readWhitespace(); tokenStream.mustMatch(Tokens.LBRACE); this.fire({ type: "startkeyframes", name: name, prefix: prefix, line: token.startLine, col: token.startCol }); this._readWhitespace(); tt = tokenStream.peek(); while(tt == Tokens.IDENT || tt == Tokens.PERCENTAGE) { this._keyframe_rule(); this._readWhitespace(); tt = tokenStream.peek(); } this.fire({ type: "endkeyframes", name: name, prefix: prefix, line: token.startLine, col: token.startCol }); this._readWhitespace(); tokenStream.mustMatch(Tokens.RBRACE); }, _keyframe_name: function(){ var tokenStream = this._tokenStream, token; tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); return SyntaxUnit.fromToken(tokenStream.token()); }, _keyframe_rule: function(){ var tokenStream = this._tokenStream, token, keyList = this._key_list(); this.fire({ type: "startkeyframerule", keys: keyList, line: keyList[0].line, col: keyList[0].col }); this._readDeclarations(true); this.fire({ type: "endkeyframerule", keys: keyList, line: keyList[0].line, col: keyList[0].col }); }, _key_list: function(){ var tokenStream = this._tokenStream, token, key, keyList = []; keyList.push(this._key()); this._readWhitespace(); while(tokenStream.match(Tokens.COMMA)){ this._readWhitespace(); keyList.push(this._key()); this._readWhitespace(); } return keyList; }, _key: function(){ var tokenStream = this._tokenStream, token; if (tokenStream.match(Tokens.PERCENTAGE)){ return SyntaxUnit.fromToken(tokenStream.token()); } else if (tokenStream.match(Tokens.IDENT)){ token = tokenStream.token(); if (/from|to/i.test(token.value)){ return SyntaxUnit.fromToken(token); } tokenStream.unget(); } this._unexpectedToken(tokenStream.LT(1)); }, _skipCruft: function(){ while(this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])){ } }, _readDeclarations: function(checkStart, readMargins){ var tokenStream = this._tokenStream, tt; this._readWhitespace(); if (checkStart){ tokenStream.mustMatch(Tokens.LBRACE); } this._readWhitespace(); try { while(true){ if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){ } else if (this._declaration()){ if (!tokenStream.match(Tokens.SEMICOLON)){ break; } } else { break; } this._readWhitespace(); } tokenStream.mustMatch(Tokens.RBRACE); this._readWhitespace(); } catch (ex) { if (ex instanceof SyntaxError && !this.options.strict){ this.fire({ type: "error", error: ex, message: ex.message, line: ex.line, col: ex.col }); tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]); if (tt == Tokens.SEMICOLON){ this._readDeclarations(false, readMargins); } else if (tt != Tokens.RBRACE){ throw ex; } } else { throw ex; } } }, _readWhitespace: function(){ var tokenStream = this._tokenStream, ws = ""; while(tokenStream.match(Tokens.S)){ ws += tokenStream.token().value; } return ws; }, _unexpectedToken: function(token){ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); }, _verifyEnd: function(){ if (this._tokenStream.LA(1) != Tokens.EOF){ this._unexpectedToken(this._tokenStream.LT(1)); } }, _validateProperty: function(property, value){ Validation.validate(property, value); }, parse: function(input){ this._tokenStream = new TokenStream(input, Tokens); this._stylesheet(); }, parseStyleSheet: function(input){ return this.parse(input); }, parseMediaQuery: function(input){ this._tokenStream = new TokenStream(input, Tokens); var result = this._media_query(); this._verifyEnd(); return result; }, parsePropertyValue: function(input){ this._tokenStream = new TokenStream(input, Tokens); this._readWhitespace(); var result = this._expr(); this._readWhitespace(); this._verifyEnd(); return result; }, parseRule: function(input){ this._tokenStream = new TokenStream(input, Tokens); this._readWhitespace(); var result = this._ruleset(); this._readWhitespace(); this._verifyEnd(); return result; }, parseSelector: function(input){ this._tokenStream = new TokenStream(input, Tokens); this._readWhitespace(); var result = this._selector(); this._readWhitespace(); this._verifyEnd(); return result; }, parseStyleAttribute: function(input){ input += "}"; // for error recovery in _readDeclarations() this._tokenStream = new TokenStream(input, Tokens); this._readDeclarations(); } }; for (prop in additions){ if (additions.hasOwnProperty(prop)){ proto[prop] = additions[prop]; } } return proto; }(); var Properties = { "align-items" : "flex-start | flex-end | center | baseline | stretch", "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", "align-self" : "auto | flex-start | flex-end | center | baseline | stretch", "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch", "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch", "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ", "alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", "animation" : 1, "animation-delay" : { multi: "