aboutsummaryrefslogtreecommitdiffstats
path: root/trunk/infrastructure/ace
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/infrastructure/ace')
-rw-r--r--trunk/infrastructure/ace/.gitignore1
-rw-r--r--trunk/infrastructure/ace/README69
-rwxr-xr-xtrunk/infrastructure/ace/bin/make337
-rwxr-xr-xtrunk/infrastructure/ace/bin/serve45
-rw-r--r--trunk/infrastructure/ace/blog.txt390
-rw-r--r--trunk/infrastructure/ace/build/.gitignore2
-rw-r--r--trunk/infrastructure/ace/build/index.html47
-rw-r--r--trunk/infrastructure/ace/build/jquery-1.2.1.js2992
-rw-r--r--trunk/infrastructure/ace/build/testcode.js36
-rw-r--r--trunk/infrastructure/ace/easysync-notes.txt129
l---------trunk/infrastructure/ace/lib/rhino-js-1.7r1.jar1
l---------trunk/infrastructure/ace/lib/yuicompressor-2.4-appjet.jar1
-rw-r--r--trunk/infrastructure/ace/notes.txt195
-rw-r--r--trunk/infrastructure/ace/www/ace2_common.js115
-rw-r--r--trunk/infrastructure/ace/www/ace2_common_dev.js296
-rw-r--r--trunk/infrastructure/ace/www/ace2_inner.js4778
-rw-r--r--trunk/infrastructure/ace/www/ace2_outer.js214
-rw-r--r--trunk/infrastructure/ace/www/ace2_wrapper.js226
-rw-r--r--trunk/infrastructure/ace/www/bbtree.js372
-rw-r--r--trunk/infrastructure/ace/www/changesettracker.js170
-rw-r--r--trunk/infrastructure/ace/www/colorutils.js91
-rw-r--r--trunk/infrastructure/ace/www/contentcollector.js509
-rw-r--r--trunk/infrastructure/ace/www/cssmanager.js88
-rw-r--r--trunk/infrastructure/ace/www/dev.html39
-rw-r--r--trunk/infrastructure/ace/www/domline.js210
-rw-r--r--trunk/infrastructure/ace/www/easy_sync.js923
-rw-r--r--trunk/infrastructure/ace/www/easysync2.js1968
-rw-r--r--trunk/infrastructure/ace/www/easysync2_tests.js877
-rw-r--r--trunk/infrastructure/ace/www/editor.css109
-rw-r--r--trunk/infrastructure/ace/www/firebug/errorIcon.pngbin457 -> 0 bytes
-rw-r--r--trunk/infrastructure/ace/www/firebug/firebug.css209
-rw-r--r--trunk/infrastructure/ace/www/firebug/firebug.html23
-rw-r--r--trunk/infrastructure/ace/www/firebug/firebug.js688
-rw-r--r--trunk/infrastructure/ace/www/firebug/firebugx.js26
-rw-r--r--trunk/infrastructure/ace/www/firebug/infoIcon.pngbin524 -> 0 bytes
-rw-r--r--trunk/infrastructure/ace/www/firebug/warningIcon.pngbin516 -> 0 bytes
-rw-r--r--trunk/infrastructure/ace/www/index.html50
-rw-r--r--trunk/infrastructure/ace/www/inner.css48
-rw-r--r--trunk/infrastructure/ace/www/jquery-1.2.1.js2992
-rw-r--r--trunk/infrastructure/ace/www/lang_html.js1685
-rw-r--r--trunk/infrastructure/ace/www/lang_js.js102
-rw-r--r--trunk/infrastructure/ace/www/lexer_support.js1068
-rw-r--r--trunk/infrastructure/ace/www/linestylefilter.js247
-rw-r--r--trunk/infrastructure/ace/www/magicdom.js293
-rw-r--r--trunk/infrastructure/ace/www/multilang_lexer.js349
-rw-r--r--trunk/infrastructure/ace/www/processing.js1714
-rw-r--r--trunk/infrastructure/ace/www/profiler.js117
-rw-r--r--trunk/infrastructure/ace/www/skiplist.js347
-rw-r--r--trunk/infrastructure/ace/www/spanlist.js279
-rw-r--r--trunk/infrastructure/ace/www/syntax-new.css35
-rw-r--r--trunk/infrastructure/ace/www/syntax.css32
-rw-r--r--trunk/infrastructure/ace/www/test.html11
-rw-r--r--trunk/infrastructure/ace/www/testcode.js36
-rw-r--r--trunk/infrastructure/ace/www/toSource.js274
-rw-r--r--trunk/infrastructure/ace/www/undomodule.js258
-rw-r--r--trunk/infrastructure/ace/www/virtual_lines.js287
56 files changed, 0 insertions, 26400 deletions
diff --git a/trunk/infrastructure/ace/.gitignore b/trunk/infrastructure/ace/.gitignore
deleted file mode 100644
index 4083037..0000000
--- a/trunk/infrastructure/ace/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-local
diff --git a/trunk/infrastructure/ace/README b/trunk/infrastructure/ace/README
deleted file mode 100644
index 275684f..0000000
--- a/trunk/infrastructure/ace/README
+++ /dev/null
@@ -1,69 +0,0 @@
-=====
-ACE2 (originally AppJet Code Editor)
-=====
-
-(This doc started Dec 2009 by dgreenspan.)
-
-ACE2 is EtherPad's editor, a content-editable-based rich text editor
-that supports IE6+, FF(2?/)3+, Safari(3?/)4+. It supports
-collaborative editing using operation transforms (easysync2),
-undo/redo, copy/paste.
-
-The name "ACE2" is because this is a rewrite of aiba's original
-content-editable AppJet Code Editor.
-
-== Building it
-
-In this directory, run `bin/make normal etherpad` (requires scala),
-which generates `build/ace2.js` and copies this and other files into
-the etherpad source tree. To have the script keep running and
-automatically rebuild when source files change, run `bin/make auto
-etherpad`.
-
-The original reason for the build process was that ACE needs to
-construct two nested iframes on the client, and to do this without
-incurring round-trips to the server, it programmatically loads code
-into the outer iframe that loads code into the inner iframe; so the
-bulk of ACE's code is compressed into a string literal (twice). Later
-on, refactoring meant that the source is also divided into more than a
-dozen files that the build script combines, and some are also
-server-side EtherPad modules or client-side libraries (or both).
-
-The master copy of the operational transform (OT) library, easysync2,
-lives here.
-
-In the early days it was possible to run ACE in a sort of development
-mode, without the compression and iframe injection, by running it out
-of the 'www' directory, but this is no longer possible.
-
-== Browser support
-
-We went out of our way to support IE6+. IE's design-mode is quite
-robust, though there are some differences in manipulation of the
-selection and insertion point and in the DOM representation we had to
-use.
-
-We don't support Opera. Opera is a problematic case, because
-apparently JS running in different iframes is run concurrently, not
-linearized into a single event thread. This seems to be a rather
-obscure fact and is almost difficult to believe. As if iframes don't
-complicate scripting enough!
-
-== Syntax highlighting
-
-Though syntax highlighting predated rich text as the original
-motivation for the design of ACE, support was eventually dropped in
-EtherPad. At first the plan was to generalize it to other programming
-languages, but the task was deprioritized (and difficult), and during
-subsequent optimization and refactoring of ACE, calls to the
-incremental lexer were stripped out because they complicated things.
-
-One plan for multi-language syntax highlighting, never implemented,
-was to calculate syntax highlighting on the server as a sort of "style
-overlay" and feed updates to the client along with updates to the
-document text.
-
-== Changeset format
-
-See easysync-notes.txt for some notes on the changeset format, which
-was redesigned with the advent of rich text.
diff --git a/trunk/infrastructure/ace/bin/make b/trunk/infrastructure/ace/bin/make
deleted file mode 100755
index dad11ff..0000000
--- a/trunk/infrastructure/ace/bin/make
+++ /dev/null
@@ -1,337 +0,0 @@
-#!/bin/sh
-exec scala -classpath lib/yuicompressor-2.4-appjet.jar:lib/rhino-js-1.7r1.jar $0 $@
-!#
-
-import java.io._;
-
-def superpack(input: String): String = {
- // this function is self-contained; takes a string, returns an expression
- // that evaluates to that string
- // XXX (This compresses well but decompression is too slow)
-
- // constraints on special chars:
- // - this string must be able to go in a character class
- // - each char must be able to go in single quotes
- val specialChars = "-~@%$#*^_`()|abcdefghijklmnopqrstuvwxyz=!+,.;:?{}";
- val specialCharsSet:Set[Char] = Set(specialChars:_*);
- def containsSpecialChar(str: String) = str.exists(specialCharsSet.contains(_));
-
- val toks:Array[String] = (
- "@|[a-zA-Z0-9]+|[^@a-zA-Z0-9]{1,3}").r.findAllIn(input).collect.toArray;
-
- val stringCounts = {
- val m = new scala.collection.mutable.HashMap[String,Int];
- def incrementCount(s: String) = { m(s) = m.getOrElse(s, 0) + 1; }
- for(s <- toks) incrementCount(s);
- m;
- }
-
- val estimatedSavings = scala.util.Sorting.stableSort(
- for((s,n) <- stringCounts.toArray; savings = s.length*n
- if (savings > 8 || containsSpecialChar(s)))
- yield (s,n,savings),
- (x:(String,Int,Int))=> -x._3);
-
- def strLast(str: String, n: Int) = str.substring(str.length - n, str.length);
- // order of encodeNames is very important!
- val encodeNames = for(n <- 0 until (36*36); c <- specialChars) yield c.toString+strLast("0"+Integer.toString(n, 36).toUpperCase, 2);
-
- val thingsToReplace:Seq[String] = estimatedSavings.map(_._1);
- assert(encodeNames.length >= thingsToReplace.length);
-
- val replacements = Map(thingsToReplace.elements.zipWithIndex.map({
- case (str, i) => (str, encodeNames(i));
- }).collect:_*);
- def encode(tk: String) = if (replacements.contains(tk)) replacements(tk) else tk;
-
- val afterReplace = toks.map(encode(_)).mkString.replaceAll(
- "(["+specialChars+"])(?=..[^0-9A-Z])(00|0)", "$1");
-
- def makeSingleQuotedContents(str: String): String = {
- str.replace("\\", "\\\\").replace("'", "\\'").replace("<", "\\x3c").replace("\n", "\\n").
- replace("\r", "\\n").replace("\t", "\\t");
- }
-
- val expansionMap = new scala.collection.mutable.HashMap[Char,scala.collection.mutable.ArrayBuffer[String]];
- for(i <- 0 until thingsToReplace.length; sc = encodeNames(i).charAt(0);
- e = thingsToReplace(i)) {
- expansionMap.getOrElseUpdate(sc, new scala.collection.mutable.ArrayBuffer[String]) +=
- (if (e == "@") "" else e);
- }
- val expansionMapLiteral = "{"+(for((sc,strs) <- expansionMap) yield {
- "'"+sc+"':'"+makeSingleQuotedContents(strs.mkString("@"))+"'";
- }).mkString(",")+"}";
-
- val expr = ("(function(m){m="+expansionMapLiteral+
- ";for(var k in m){if(m.hasOwnProperty(k))m[k]=m[k].split('@')};return '"+
- makeSingleQuotedContents(afterReplace)+
- "'.replace(/(["+specialChars+
- "])([0-9A-Z]{0,2})/g,function(a,b,c){return m[b][parseInt(c||'0',36)]||'@'})}())");
- /*val expr = ("(function(m){m="+expansionMapLiteral+
- ";for(var k in m){if(m.hasOwnProperty(k))m[k]=m[k].split('@')};"+
- "var result=[];var i=0;var s='"+makeSingleQuotedContents(afterReplace)+
- "';var len=s.length;while (i<len) {var x=s.charAt(i); var L=m[x],a = s.charAt(i+1),b = s.charAt(i+2);if (L) { var c;if (!(a >= 'A' && a <= 'Z' || a >= '0' && a <= '9')) {c=L[0];i++} else if (!(b >= 'A' && b <= 'Z' || b >= '0' && b <= '9')) {c = L[parseInt(a,36)]; i+=2} else {c = L[parseInt(a+b,36)]; i+=3}; result.push(c||'@'); } else {result.push(x); i++} }; return result.join(''); }())");*/
-
- def evaluateString(js: String): String = {
- import org.mozilla.javascript._;
- ContextFactory.getGlobal.call(new ContextAction {
- def run(cx: Context) = {
- val scope = cx.initStandardObjects;
- cx.evaluateString(scope, js, "<cmd>", 1, null) } }).asInstanceOf[String];
- }
-
- def putFile(str: String, path: String): Unit = {
- import java.io._;
- val writer = new FileWriter(path);
- writer.write(str);
- writer.close;
- }
-
- val exprOut = evaluateString(expr);
- if (exprOut != input) {
- putFile(input, "/tmp/superpack.input");
- putFile(expr, "/tmp/superpack.expr");
- putFile(exprOut, "/tmp/superpack.output");
- error("Superpacked string does not evaluate to original string; check /tmp/superpack.*");
- }
-
- val singleLiteral = "'"+makeSingleQuotedContents(input)+"'";
- if (singleLiteral.length < expr.length) {
- singleLiteral;
- }
- else {
- expr;
- }
-}
-
-def doMake {
-
- lazy val isEtherPad = (args.length >= 2 && args(1) == "etherpad");
- lazy val isNoHelma = (args.length >= 2 && args(1) == "nohelma");
-
- def getFile(path:String): String = {
- val builder = new StringBuilder(1000);
- val reader = new BufferedReader(new FileReader(path));
- val buf = new Array[Char](1024);
- var numRead = 0;
- while({ numRead = reader.read(buf); numRead } != -1) {
- builder.append(buf, 0, numRead);
- }
- reader.close;
- return builder.toString;
- }
-
- def putFile(str: String, path: String): Unit = {
- val writer = new FileWriter(path);
- writer.write(str);
- writer.close;
- }
-
- def writeToString(func:(Writer=>Unit)): String = {
- val writer = new StringWriter;
- func(writer);
- return writer.toString;
- }
-
- def compressJS(code: String, wrap: Boolean): String = {
- import yuicompressor.org.mozilla.javascript.{ErrorReporter, EvaluatorException};
- object MyErrorReporter extends ErrorReporter {
- def warning(message:String, sourceName:String, line:Int, lineSource:String, lineOffset:Int) {
- if (message startsWith "Try to use a single 'var' statement per scope.") return;
- if (line < 0) System.err.println("\n[WARNING] " + message);
- else System.err.println("\n[WARNING] " + line + ':' + lineOffset + ':' + message);
- }
- def error(message:String, sourceName:String, line:Int, lineSource:String, lineOffset:Int) {
- if (line < 0) System.err.println("\n[ERROR] " + message);
- else System.err.println("\n[ERROR] " + line + ':' + lineOffset + ':' + message);
- }
- def runtimeError(message:String, sourceName:String, line:Int, lineSource:String, lineOffset:Int): EvaluatorException = {
- error(message, sourceName, line, lineSource, lineOffset);
- return new EvaluatorException(message);
- }
- }
-
- val munge = true;
- val verbose = false;
- val optimize = true;
- val compressor = new com.yahoo.platform.yui.compressor.JavaScriptCompressor(new StringReader(code), MyErrorReporter);
- return writeToString(compressor.compress(_, if (wrap) 100 else -1, munge, verbose, true, !optimize));
- }
-
- def compressCSS(code: String, wrap: Boolean): String = {
- val compressor = new com.yahoo.platform.yui.compressor.CssCompressor(new StringReader(code));
- return writeToString(compressor.compress(_, if (wrap) 100 else -1));
- }
-
- import java.util.regex.{Pattern, Matcher, MatchResult};
-
- def stringReplace(orig: String, regex: String, groupReferences:Boolean, func:(MatchResult=>String)): String = {
- val buf = new StringBuffer;
- val m = Pattern.compile(regex).matcher(orig);
- while (m.find) {
- var str = func(m);
- if (! groupReferences) {
- str = str.replace("\\", "\\\\").replace("$", "\\$");
- }
- m.appendReplacement(buf, str);
- }
- m.appendTail(buf);
- return buf.toString;
- }
-
- def stringToExpression(str: String): String = {
- var contents = str.replace("\\", "\\\\").replace("'", "\\'").replace("<", "\\x3c").replace("\n", "\\n").
- replace("\r", "\\n").replace("\t", "\\t");
- contents = contents.replace("\\/", "\\\\x2f"); // for Norton Internet Security
- val result = "'"+contents+"'";
- result;
- }
-
- val srcDir = "www";
- val destDir = "build";
- var code = getFile(srcDir+"/ace2_outer.js");
-
- val useCompression = true; //if (isEtherPad) false else true;
-
- code = stringReplace(code, "\\$\\$INCLUDE_([A-Z_]+)\\([\"']([^\"']+)[\"']\\)", false, (m:MatchResult) => {
- val includeType = m.group(1);
- val paths = m.group(2);
- val pathsArray = paths.replaceAll("""/\*.*?\*/""", "").split(" +").filter(_.length > 0);
- def getSubcode = pathsArray.map(p => getFile(srcDir+"/"+p)).mkString("\n");
- val doPack = (stringToExpression _);
- includeType match {
- case "JS" => {
- var subcode = getSubcode;
- subcode = subcode.replaceAll("var DEBUG=true;//\\$\\$[^\n\r]*", "var DEBUG=false;");
- if (useCompression) subcode = compressJS(subcode, true);
- "('\\x3cscript type=\"text/javascript\">//<!--\\n'+" + doPack(subcode) +
- "+'//-->\\n</script>')";
- }
- case "CSS" => {
- var subcode = getSubcode;
- if (useCompression) subcode = compressCSS(subcode, false);
- "('<style type=\"text/css\">'+" + doPack(subcode) + "+'</style>')";
- }
- case "JS_Q" => {
- var subcode = getSubcode
- subcode = subcode.replaceAll("var DEBUG=true;//\\$\\$[^\n\r]*", "var DEBUG=false;");
- if (useCompression) subcode = compressJS(subcode, true);
- "('(\\'\\\\x3cscript type=\"text/javascript\">//<!--\\\\n\\'+'+" +
- doPack(stringToExpression(subcode)) +
- "+'+\\'//-->\\\\n\\\\x3c/script>\\')')";
- }
- case "CSS_Q" => {
- var subcode = getSubcode;
- if (useCompression) subcode = compressCSS(subcode, false);
- "('(\\'<style type=\"text/css\">\\'+'+" + doPack(stringToExpression(subcode)) +
- "+'+\\'\\\\x3c/style>\\')')";
- }
- case ("JS_DEV" | "CSS_DEV") => "''";
- case ("JS_Q_DEV" | "CSS_Q_DEV") => "'\\'\\''";
- //case _ => "$$INCLUDE_"+includeType+"(\"../www/"+path+"\")";
- }
- });
-
- if (useCompression) code = compressJS(code, true);
-
- putFile(code, destDir+"/ace2bare.js");
-
- //var wrapper = getFile(srcDir+"/ace2_wrapper.js");
- //if (useCompression) wrapper = compressJS(wrapper, true);
- putFile(/*wrapper+"\n"+*/code, destDir+"/ace2.js");
-
- var index = getFile(srcDir+"/index.html");
- index = index.replaceAll("<!--\\s*DEBUG\\s*-->\\s*([\\s\\S]+?)\\s*<!--\\s*/DEBUG\\s*-->", "");
- index = index.replaceAll("<!--\\s*PROD:\\s*([\\s\\S]+?)\\s*-->", "$1");
- putFile(index, destDir+"/index.html");
-
- putFile(getFile(srcDir+"/testcode.js"), destDir+"/testcode.js");
-
- def copyFile(fromFile: String, toFile: String) {
- if (0 != Runtime.getRuntime.exec("cp "+fromFile+" "+toFile).waitFor) {
- printf("copy failed (%s -> %s).\n", fromFile, toFile);
- }
- }
-
- def replaceFirstLine(txt: String, newFirstLine: String): String = {
- var newlinePos = txt.indexOf('\n');
- newFirstLine + txt.substring(newlinePos);
- }
-
- if (isEtherPad) {
- copyFile("build/ace2.js", "../../etherpad/src/static/js/ace.js");
-
- def copyFileToEtherpad(fromName: String, toName: String) {
- var code = getFile(srcDir+"/"+fromName);
- code = replaceFirstLine(code, "// DO NOT EDIT THIS FILE, edit "+
- "infrastructure/ace/www/"+fromName);
- code = code.replaceAll("""(?<=\n)\s*//\s*%APPJET%:\s*""", "");
- putFile(code, "../../etherpad/src/etherpad/collab/ace/"+toName);
- }
- def copyFileToClientSide(fromName: String, toName: String) {
- var code = getFile(srcDir+"/"+fromName);
- code = replaceFirstLine(code, "// DO NOT EDIT THIS FILE, edit "+
- "infrastructure/ace/www/"+fromName);
- code = code.replaceAll("""(?<=\n)\s*//\s*%APPJET%:.*?\n""", "");
- code = code.replaceAll("""(?<=\n)\s*//\s*%CLIENT FILE ENDS HERE%[\s\S]*""",
- "");
- putFile(code, "../../etherpad/src/static/js/"+toName);
- }
-
- copyFileToEtherpad("easy_sync.js", "easysync1.js");
- copyFileToEtherpad("easysync2.js", "easysync2.js");
- copyFileToEtherpad("contentcollector.js", "contentcollector.js");
- copyFileToEtherpad("easysync2_tests.js", "easysync2_tests.js");
- copyFileToClientSide("colorutils.js", "colorutils.js");
- copyFileToClientSide("easysync2.js", "easysync2_client.js");
- copyFileToEtherpad("linestylefilter.js", "linestylefilter.js");
- copyFileToClientSide("linestylefilter.js", "linestylefilter_client.js");
- copyFileToEtherpad("domline.js", "domline.js");
- copyFileToClientSide("domline.js", "domline_client.js");
- copyFileToClientSide("cssmanager.js", "cssmanager_client.js");
- }
- /*else if (! isNoHelma) {
- copyFile("build/ace2.js", "../helma_apps/appjet/protectedStatic/js/ace.js");
- }*/
-}
-
-def remakeLoop {
-
- def getStamp: Long = {
- return (new java.io.File("www").listFiles.
- filter(! _.getName.endsWith("~")).
- filter(! _.getName.endsWith("#")).
- filter(! _.getName.startsWith(".")).map(_.lastModified).
- reduceLeft(Math.max(_:Long,_:Long)));
- }
-
- var madeStamp:Long = 0;
- var errorStamp:Long = 0;
- while (true) {
- Thread.sleep(500);
- val s = getStamp;
- if (s > madeStamp && s != errorStamp) {
- Thread.sleep(1000);
- if (getStamp == s) {
- madeStamp = s;
- print("Remaking... ");
- try {
- doMake;
- println("OK");
- }
- catch { case e => {
- println("ERROR");
- errorStamp = s;
- } }
- }
- }
- }
-
-}
-
-if (args.length >= 1 && args(0) == "auto") {
- remakeLoop;
-}
-else {
- doMake;
-}
diff --git a/trunk/infrastructure/ace/bin/serve b/trunk/infrastructure/ace/bin/serve
deleted file mode 100755
index e02e042..0000000
--- a/trunk/infrastructure/ace/bin/serve
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-scala -nocompdaemon -Dlog4j.mortbay.loglevel=WARN -classpath lib/jetty-6.1.7.jar:lib/jetty-util-6.1.7.jar:lib/servlet-api-2.5-6.1.3.jar $0 $@ &
-exit
-!#
-
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.servlet.Context;
-import org.mortbay.jetty.servlet.ServletHolder;
-import org.mortbay.jetty.servlet.DefaultServlet;
-import javax.servlet.http.{HttpServletRequest, HttpServletResponse};
-
-object NonCachingDefaultServlet extends DefaultServlet() {
-
- private def setHeaders(response:HttpServletResponse) {
- response.setHeader("Cache-Control","no-cache"); // for HTTP 1.1
- response.setHeader("Pragma","no-cache"); //for HTTP 1.0
- response.setDateHeader ("Expires", 0); //for proxy server
- response.setHeader("Cache-Control","no-store"); //HTTP 1.1
- }
-
- override def doGet(request:HttpServletRequest, response:HttpServletResponse) {
- setHeaders(response);
- super.doGet(request, response);
- }
-
- override def doHead(request:HttpServletRequest, response:HttpServletResponse) {
- setHeaders(response);
- super.doHead(request, response);
- }
-}
-
-val port = if (args.length >= 1) args(0).toInt else 80;
-val dir = if (args.length >= 2) args(1) else "www";
-
-val server = new Server(port);
-
-val context = new Context(server, "/", Context.SESSIONS);
-context.setResourceBase(dir+"/");
-context.addServlet(new ServletHolder(NonCachingDefaultServlet), "/");
-context.setWelcomeFiles(Array[String]("index.html"));
-
-println("pid: "+java.lang.management.ManagementFactory.getRuntimeMXBean.getName.split("@")(0));
-
-server.start();
-server.join();
diff --git a/trunk/infrastructure/ace/blog.txt b/trunk/infrastructure/ace/blog.txt
deleted file mode 100644
index 0b095a2..0000000
--- a/trunk/infrastructure/ace/blog.txt
+++ /dev/null
@@ -1,390 +0,0 @@
-ACE.js: In-Browser Code Editing Finally Solved
-
-You may have seen them around -- "in-browser code editors" are text
-editors that run on the web in your browser, supporting editing,
-syntax highlighting, indentation, and other features familiar from a
-desktop editor/IDE like Emacs, Eclipse, or TextMate. Compared to
-desktop editors, the in-browser knock-offs I've seen leave me quite
-dissatisfied. I can deal with the lack of power-user features, but
-just in terms of basic usability, these web-based editors are
-sputtering at the starting line. On the whole, they feel unresponsive
-on small files, they slow to a crawl on large files, and they tend to
-have unaddressed quirks, artifacts, and differences from native
-appearance and behavior. Anyway, that's enough negativity; I have a
-lot of respect for the authors and their hard work, and in writing ACE
-I'm standing on their shoulders. But I was curious to see if I could
-take AppJet's editor to the next level and approach the speed and
-robustness of a desktop editor. After a few months of work, I'm proud
-to declare success.
-
-Here's a walk-through of ACE.js, our new in-browser code editor.
-ACE.js is a self-contained, cross-browser JavaScript file that allows
-a web page to embed scrolling panes of editable code. Typing text is
-snappy and there are no visual artifacts or clutter.
-Syntax-highlighting happens live, as you type. Amazingly, operations
-scale up well with document size. You can paste in 1,000 lines of
-text, or more, and after a second or two of thought, the editor is
-fully responsive again. While you keep typing, it unobtrusively
-finishes syntax-highlighting the whole buffer in a matter of seconds.
-Local edits to the text are just as fast on long documents as on short
-ones. Changes that require large-scale re-highlighting, like opening
-or closing a multi-line comment, affect the text in view almost
-instantaneously, and then ACE.js quitely goes to work on the rest of
-the document over the next few seconds without holding you up. ACE.js
-supports advanced features like Emacs-style unlimited undo, flashing
-matching parentheses as you type them or move across them, and basic
-auto-indentation. Full functionality is supported across Internet
-Explorer 6+, Firefox 2+, Safari 3+, and Camino 1.5+.
-
-I've emphasized "scalability" a lot so far, by which I mean efficiency
-and responsiveness in the face of large documents, because that's the
-aspect of ACE that so clearly sets it apart. But that's only one of
-three "axes" that the ultimate editor needs to excel on.
-
-The second is what I'll call "nativity", meaning how close the editor
-comes to the gold standard of the desktop editor experience. This
-includes responsiveness (some in-browser editors have sluggish typing
-even on small documents), but also things like undo, copy/paste,
-selection, arrow-keys, shift-arrow-keys, different input methods and
-devices, and so on.
-
-The third axis is "flexibility". How easy is it to add features? To
-support more languages for the incremental highlighting, different
-undo models, different indentation schemes, macros that expand as you
-type, auto-complete, go-to-line by number, and whatever else you can
-imagine.
-
-Why am I lecturing you on these theoretical principles? Well, there's
-an interesting insight that explains a lot about the existing crop of
-editors, and it isn't one you'd hit upon without spending a lot of
-time in the trenches (yes, specifically the trenches of writing an
-in-browser code editor). Based on the hodge-podge of facilities that
-browsers happen to make available, you basically end up with the
-following slogan: "scalability, nativity, flexibility, pick any two".
-Based on this, we can classify editors into three types, which I'll
-describe briefly from the point of view of someone writing an editor
-(like me); if you're not familiar with browser scripting, hopefully
-this won't be too hard to get through.
-
-Type I editors sacrifice scalability. The typical implementation is a
-text-area to handle the typing, covered by a block of colored text to
-handle the display. You (the person making the editor) get a boost in
-nativity at the start, because you inherit the browser's text
-handling, all the stuff I mentioned above, like undo and copy/paste.
-The degree of flexibility is also good, because you can style the
-colored text independently of the editing in the textarea, and you can
-manipulate the textarea easily, such as by assigning a new content
-string. Unfortunately, this scales quite badly with document size.
-The good Type I editors are slick and responsive, but pretty limited
-in how large files can get.
-
-Type II editors sacrifice nativity. This is the kind of editor where
-you manually manipulate document (DOM) nodes as the user types. You
-have to re-implement the desktop's native editing behavior from
-scratch, first putting in support for typing and selecting text (both
-by mouse and keyboard), and hopefully eventually supporting undo and
-copy/paste with other programs (through some elaborate hack). This
-type is attractive because it offers unlimited flexibility, and
-theoretical scalability. In practice, you end up with mostly
-flexibility, because getting the nativity right is such a huge task,
-and scalability takes a back seat to general responsiveness. Type II
-editors are fancy but feel slow and quirky.
-
-Type III editors, as you've probably guessed by now, are the category
-ACE falls into, and are the ones that sacrifice flexibility, the third
-axis, though in fact they make you work for all three axes. The crazy
-idea here, which seems to have originated with Dutch programmer Marijn
-Haverbeke, is to take advantage of a browser feature called "design
-mode" (or "content editable"), a mode which allows the user to
-directly edit an HTML document. This feature has quietly been added
-to all major browsers over time. In fact, it's what GMail uses to let
-users compose rich-text e-mail. The advantages of basing an editor on
-a design-mode buffer are that such a buffer has a full DOM (document
-model), which allows arbitrary styling and swapping of parts of the
-document, and that native editing operations (selection, copy/paste)
-are mapped by the browser onto operations on the DOM.
-
-What's the downside of a Type III editor? It's a nightmare to
-implement! GMail skirts the issue by only using hard-coded browser
-commands like "make the selection bold" or "insert unordered list".
-What happens if you stray from this set of basic commands, and access
-that alluring DOM directly, without careful preparation? Disaster!
-Building a robust, extensible editor on top of design mode is kind of
-like landing a man safely on the moon, where you design the
-spacecraft, the mission control computer, and the pressurized suit.
-You're constantly trying to insulate yourself from a hostile
-environment.
-
-More specifically, any change your editor makes to the design mode DOM
-causes the browser to instantly lose track of the selection range or
-insertion point if any, the undo history, and basically any other
-useful editing state. (This can be worked around with a lot of
-selection manipulation, though IE in particular lacks even a way to
-access the current selection relative to the DOM.) A simple edit like
-the user pressing the "enter" key to start a new line may cause the
-browser to insert a line break tag (BR), or split a block element into
-two, whatever it wishes. Pasted text is converted into HTML, through
-a somewhat arbitrary process, and inserted into the document. In
-fact, the DOM is constantly being modified by the browser in response
-to user actions (like typing), and you have to peek at it and
-efficiently make sense of it, determine what's changed, incorporate it
-into your representation, make any of your own changes (e.g. indent a
-line), modify the DOM to display your changes to the user, and have it
-all look like nothing special happened. A more Draconian policy for
-dealing with the browser, like trapping all mouse and key events,
-would just leave you with a Type II editor. The key is to treat the
-DOM as a hugely complicated I/O device between you and the browser,
-and carefully make rules to constrain it.
-
-You also deal with the fact that design mode's "native" behavior is
-HTML-oriented, not text-oriented, and the fact that it tends to have a
-lot of quirks and bugs. You don't get scalability for free, either,
-you need some clever data structures. For example, determining the
-absolute line number of the blinking insertion point is an
-order-of-document-size operation without the aid of efficient data
-structures that can be maintained as the document changes.
-
-The plus side is that once you've systematically beat design mode into
-submission, you can have an unmatched degree of scalability and
-nativity. From there, it's just a matter of keeping your layers of
-abstraction scalable, and being aware of "nativity"-style constraints
-(like responsiveness and events), and you can build up to flexibility,
-the crown jewel. The reward is how easy it is to add new editor
-features!
-
-Speaking of which, here is a list of current ACE features. Some of
-them are small and just required recognizing their benefit, while
-others are more significant. Some features, like "Emacs-style undo"
-and "highlight matching parentheses", are significant despite having
-been implemented in a couple hours each, and are signs of what's to
-come in the future of ACE.
-
-General
- - Numbered lines
- - Correct vert/horiz scroll-bar behavior
- - Handles large documents (thousands of lines, but see "quirks")
-Browser support
- - Internet Explorer 6+, Firefox 2+, Safari 3+, Camino 1.5+
- - Text size scales with page when changed by user
-Syntax highlighting
- - Correct JavaScript syntax (including regular expression subtleties)
- - Extensible for other programming languages
- - Incremental rehighlighting with minimal recalculation for each edit
- - Highlight live as you type
- - Moves highlighting task to background if not finished right away
-Editing
- - Emacs-style unlimited undo
- - Native copy/paste, within editor and with other programs
- - Highlight matching (or mis-matched) parentheses, brackets, and braces
- - Basic auto-indentation
- - Multi-stroke international characters on Mac
-Interface
- - Import/export text string
- - Toggle editor between ACE and textarea
- - Resize, focus, register key event handlers
- - Multiple ACE editors allowed per page
- - Packaged in one JavaScript file
- - Can be created inside an iframe, any domain, any nesting
-Future
- - Super-extensible
- - More languages?
- - Smarter auto-indentation?
- - Indent/unindent selection?
- - Auto-complete?
- - Macros?
- - User extensibility, a la Emacs??
-Bugs/Quirks
- - Firefox 2/3: Document height and width are limited to 32767 pixels
- (about 2,045 lines of text at default text size) due to Firefox bug,
- not scheduled for resolution for FF3 launch
-
-======
-
->> TO ADD:
- - link to demo
- - what to {say,ask} about {interest, use, licensing, source}?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ACE.js: In-Browser Code Editing Finally Solved
-
-You may have seen them around -- "in-browser code editors" are text
-editors that run over the web in a browser, supporting editing, syntax
-highlighting, indentation, and other features familiar from a desktop
-editor/IDE like Emacs, Eclipse, or TextMate. Compared to desktop
-editors, the in-browser knock-offs that I've seen leave me very
-dissatisfied. I can deal without the power-user features, but just in
-terms of basic usability, these web-based editors are sputtering at
-the starting line. On the whole, they feel unresponsive on small
-files, they slow to a crawl on large files, and they tend to have
-unaddressed quirks, artifacts, and differences from native appearance
-and behavior. Anyway, that's enough negativity; I have a lot of
-respect for the authors and their hard work, and in writing ACE I'm
-standing on their shoulders. But you see, I tend to approach projects
-like this with super-high standards, dangerously so even. Luckily,
-after months of work here at AppJet, there's a happy ending.
-
-[[="I tend to approach projects with super-high standards" is a bit awkward - sounds like tooting your own horn too much for my taste=]]
-
-Here's a walk-through of ACE.js, our new in-browser code editor. It's
-[[="it" the walkthrough? or "it" the browser?=]]
-written in self-contained, cross-browser JavaScript that can be
-dropped into any web page. It looks and feels a lot like a "native"
-editor, meaning typing is fast and there are no artifacts or clutter.
-It does syntax-highlighting live, as you type. Amazingly, it scales
-up with document size. You can paste in 1,000 lines of text, or more,
-and after a second or two of thought, the editor is fully responsive
-again. While you keep typing, it unobtrusively finishes
-syntax-highlighting the whole buffer in a matter of seconds. Local
-edits to the text are just as fast on long documents as on short ones.
-Changes that require large-scale re-highlighting, like opening or
-closing a multi-line comment, affect the text in view almost
-instantaneously, and then ACE quitely goes to work on the rest of the
-document over the next few seconds without holding you up. Advanced
-features include Emacs-style unlimited undo, flashing matching
-parentheses as you type them or move across them, and basic
-auto-indentation. Full functionality is supported on Internet
-Explorer 6+, Firefox 2+, Safari 3+, and Camino 1.5+.
-
-I've emphasized "scalability" a lot so far, by which I mean efficiency
-and responsiveness in the face of large documents, because that's the
-aspect of ACE that so clearly sets it apart. But that's only one of
-three "axes" that the ultimate editor needs to excel on.
-
-The second is what I'll call "nativity", meaning how close the editor
-comes to the gold standard of the desktop editor experience. This
-includes responsiveness (some in-browser editors have sluggish typing
-even on small documents), but also things like undo, copy/paste,
-selection, arrow-keys, shift-arrow-keys, different input methods and
-devices, and so on.
-
-The third axis is "flexibility". How easy is it to add features? To
-support more languages for the incremental highlighting, different
-undo models, different indentation schemes, macros that expand as you
-type, auto-complete, go-to-line by number, and whatever else you can
-imagine.
-
-Why am I lecturing you on these theoretical principles? Well, there's
-an interesting insight that explains a lot about the existing crop of
-editors, and it isn't one you'd hit upon without spending a lot of
-time in the trenches (yes, specifically the trenches of writing an
-in-browser code editor). Based on the hodge-podge of facilities that
-browsers happen to make available, you basically end up with the
-following slogan: "scalability, nativity, flexibility, pick any two".
-Based on this, we can classify editors into three types, which I'll
-describe briefly from the point of view of someone writing an editor
-(like me); if you're not familiar with browser scripting, hopefully
-this won't be too hard to get through.
-
-[[= I'm not a huge fan of "type I-II-III" nomenclature. It's totally opaque. And in this case, they don't even form a continuum, except for type III being better than I and II. =]]
-
-Type I editors sacrifice scalability. The typical implementation is a
-text-area to handle the typing, covered by a block of colored text to
-handle the display. You (the person making the editor) get a boost in
-nativity at the start, because you inherit the browser's text
-handling, all the stuff I mentioned above, like undo and copy/paste.
-The degree of flexibility is also good, because you can style the
-colored text independently of the editing in the textarea, and you can
-manipulate the textarea easily, such as by assigning a new content
-string. Unfortunately, this scales quite badly with document size.
-The good Type I editors are slick and responsive, but pretty limited
-in how large files can get.
-
-Type II editors sacrifice nativity. This is the kind of editor where
-you manually manipulate document (DOM) nodes as the user types. You
-have to re-implement the desktop's native editing behavior from
-scratch, first putting in support for typing and selecting text (both
-by mouse and keyboard), and hopefully eventually supporting undo and
-copy/paste with other programs (through some elaborate hack). This
-type is attractive because it offers unlimited flexibility, and
-theoretical scalability. In practice, you end up with mostly
-flexibility, because getting the nativity right is such a huge task,
-and scalability takes a back seat to general responsiveness. Type II
-editors are fancy but feel slow and quirky.
-
-Type III editors, as you've probably guessed by now, are the category
-ACE falls into, and are the ones that sacrifice flexibility, the third
-axis, though in fact they make you work for all three axes. The crazy
-idea here, which seems to have originated with Dutch programmer Marijn
-Haverbeke, is to take advantage of a browser feature called "design
-mode" (or "content editable"), a mode which allows the user to
-directly edit an HTML document. This feature has quietly been added
-to all major browsers over time. In fact, it's what GMail uses to let
-users compose rich-text e-mail. The advantages of basing an editor on
-a design-mode buffer are that such a buffer has a full DOM (document
-model), which allows arbitrary styling and swapping of parts of the
-document, and that native editing operations (selection, copy/paste)
-are mapped by the browser onto operations on the DOM.
-
-[[= It's not clear how Type III editors sacrifice flexibility =]]
-
-What's the downside of a Type III editor? It's a nightmare to
-implement! GMail skirts the issue by only using hard-coded browser
-commands like "make the selection bold" or "insert unordered list".
-What happens if you stray from this set of basic commands, and access
-that alluring DOM directly, without careful preparation? Disaster!
-Building a robust, extensible editor on top of design mode is kind of
-like landing a man safely on the moon, where you design the
-spacecraft, the mission control computer, and the pressurized suit.
-You're constantly trying to insulate yourself from a hostile
-environment.
-
-More specifically, any change your editor makes to the design mode DOM
-causes the browser to instantly lose track of the selection range or
-insertion point if any, the undo history, and basically any other
-useful editing state. (This can be worked around with a lot of
-selection manipulation, though IE in particular lacks even a way to
-access the current selection relative to the DOM.) A simple edit like
-the user pressing the "enter" key to start a new line may cause the
-browser to insert a line break tag (BR), or split a block element into
-two, whatever it wishes. Pasted text is converted into HTML, through
-a somewhat arbitrary process, and inserted into the document. In
-fact, the DOM is constantly being modified by the browser in response
-to user actions (like typing), and you have to peek at it and
-efficiently make sense of it, determine what's changed, incorporate it
-into your representation, make any of your own changes (e.g. indent a
-line), modify the DOM to display your changes to the user, and have it
-all look like nothing special happened. A more Draconian policy for
-dealing with the browser, like trapping all mouse and key events,
-would just leave you with a Type II editor. The key is to treat the
-DOM as a hugely complicated I/O device between you and the browser,
-and carefully make rules to constrain it. [[= Genius analgy, IMO. :) =]]
-
-You also deal with the fact that design mode's "native" behavior is
-HTML-oriented, not text-oriented, and the fact that it tends to have a
-lot of quirks and bugs. You don't get scalability for free, either,
-you need some clever data structures. For example, determining the
-absolute line number of the blinking insertion point is an
-order-of-document-size operation without the aid of efficient data
-structures that can be maintained as the document changes.
-
-The plus side is that once you've systematically beat design mode into
-submission, you can have an unmatched degree of scalability and
-nativity. From there, it's just a matter of keeping your layers of
-abstraction scalable, and being aware of "nativity"-style constraints
-(like responsiveness and events), and you can build up to flexibility,
-the crown jewel. The reward is how easy it is to add new editor
-features! [[= I'm kind of confused here. You said ACE is a type III editor, sacrificing flexibility, but now you say that ACE *has* flexibility. Huh? =]]
-
-Speaking of which, here is a list of current ACE features. Some of
-them are small and just required recognizing their benefit, while
-others are more significant. [[= awkward sentence =]] Some features, like "Emacs-style undo"
-and "highlight matching parentheses", are significant despite having
-been implemented in a couple hours each, and are signs of what's to
-come in the future of ACE.
diff --git a/trunk/infrastructure/ace/build/.gitignore b/trunk/infrastructure/ace/build/.gitignore
deleted file mode 100644
index 4dc709e..0000000
--- a/trunk/infrastructure/ace/build/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ace2.js
-ace2bare.js
diff --git a/trunk/infrastructure/ace/build/index.html b/trunk/infrastructure/ace/build/index.html
deleted file mode 100644
index b8c8505..0000000
--- a/trunk/infrastructure/ace/build/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
- <head>
- <title>A Code Editor</title>
- <script src="jquery-1.2.1.js"></script>
-
- <script src="testcode.js"></script>
- <script src="ace2.js"></script>
- <script>
- $(document).ready(function() {
- var editor = new Ace2Editor();
- editor.init("editorcontainer", getTestCode(), editorReady);
-
- editor.setOnKeyPress(function (evt) {
- if (evt.ctrlKey && evt.which == "s".charCodeAt(0)) {
- alert("You tried to save.");
- return false;
- }
- return true;
- });
-
- function editorReady() {
- resizeEditor();
- $(window).bind("resize", resizeEditor);
- setTimeout(function() {editor.focus();}, 0);
- }
-
- function resizeEditor() {
- $("#editorcontainer").get(0).style.height = "100%";
- editor.getFrame().style.height = ((document.documentElement.clientHeight)-1)+"px";
- editor.adjustSize();
- }
- });
- </script>
- <style>
- html { overflow: hidden } /* for Win IE 6 */
- body { margin:0; padding:0; border:0; overflow: hidden; }
- #editorcontainer { height: 1000px; /* changed programmatically */ }
- #editorcontainer iframe { width: 100%; height: 100%; border:0; padding:0; margin:0; }
- </style>
- </head>
- <body>
- <div id="editorcontainer"><!-- --></div>
- </body>
-</html>
diff --git a/trunk/infrastructure/ace/build/jquery-1.2.1.js b/trunk/infrastructure/ace/build/jquery-1.2.1.js
deleted file mode 100644
index b4eb132..0000000
--- a/trunk/infrastructure/ace/build/jquery-1.2.1.js
+++ /dev/null
@@ -1,2992 +0,0 @@
-(function(){
-/*
- * jQuery 1.2.1 - New Wave Javascript
- *
- * Copyright (c) 2007 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
- * $Rev: 3353 $
- */
-
-// Map over jQuery in case of overwrite
-if ( typeof jQuery != "undefined" )
- var _jQuery = jQuery;
-
-var jQuery = window.jQuery = function(selector, context) {
- // If the context is a namespace object, return a new object
- return this instanceof jQuery ?
- this.init(selector, context) :
- new jQuery(selector, context);
-};
-
-// Map over the $ in case of overwrite
-if ( typeof $ != "undefined" )
- var _$ = $;
-
-// Map the jQuery namespace to the '$' one
-window.$ = jQuery;
-
-var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
-
-jQuery.fn = jQuery.prototype = {
- init: function(selector, context) {
- // Make sure that a selection was provided
- selector = selector || document;
-
- // Handle HTML strings
- if ( typeof selector == "string" ) {
- var m = quickExpr.exec(selector);
- if ( m && (m[1] || !context) ) {
- // HANDLE: $(html) -> $(array)
- if ( m[1] )
- selector = jQuery.clean( [ m[1] ], context );
-
- // HANDLE: $("#id")
- else {
- var tmp = document.getElementById( m[3] );
- if ( tmp )
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( tmp.id != m[3] )
- return jQuery().find( selector );
- else {
- this[0] = tmp;
- this.length = 1;
- return this;
- }
- else
- selector = [];
- }
-
- // HANDLE: $(expr)
- } else
- return new jQuery( context ).find( selector );
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction(selector) )
- return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector );
-
- return this.setArray(
- // HANDLE: $(array)
- selector.constructor == Array && selector ||
-
- // HANDLE: $(arraylike)
- // Watch for when an array-like object is passed as the selector
- (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
-
- // HANDLE: $(*)
- [ selector ] );
- },
-
- jquery: "1.2.1",
-
- size: function() {
- return this.length;
- },
-
- length: 0,
-
- get: function( num ) {
- return num == undefined ?
-
- // Return a 'clean' array
- jQuery.makeArray( this ) :
-
- // Return just the object
- this[num];
- },
-
- pushStack: function( a ) {
- var ret = jQuery(a);
- ret.prevObject = this;
- return ret;
- },
-
- setArray: function( a ) {
- this.length = 0;
- Array.prototype.push.apply( this, a );
- return this;
- },
-
- each: function( fn, args ) {
- return jQuery.each( this, fn, args );
- },
-
- index: function( obj ) {
- var pos = -1;
- this.each(function(i){
- if ( this == obj ) pos = i;
- });
- return pos;
- },
-
- attr: function( key, value, type ) {
- var obj = key;
-
- // Look for the case where we're accessing a style value
- if ( key.constructor == String )
- if ( value == undefined )
- return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
- else {
- obj = {};
- obj[ key ] = value;
- }
-
- // Check to see if we're setting style values
- return this.each(function(index){
- // Set all the styles
- for ( var prop in obj )
- jQuery.attr(
- type ? this.style : this,
- prop, jQuery.prop(this, obj[prop], type, index, prop)
- );
- });
- },
-
- css: function( key, value ) {
- return this.attr( key, value, "curCSS" );
- },
-
- text: function(e) {
- if ( typeof e != "object" && e != null )
- return this.empty().append( document.createTextNode( e ) );
-
- var t = "";
- jQuery.each( e || this, function(){
- jQuery.each( this.childNodes, function(){
- if ( this.nodeType != 8 )
- t += this.nodeType != 1 ?
- this.nodeValue : jQuery.fn.text([ this ]);
- });
- });
- return t;
- },
-
- wrapAll: function(html) {
- if ( this[0] )
- // The elements to wrap the target around
- jQuery(html, this[0].ownerDocument)
- .clone()
- .insertBefore(this[0])
- .map(function(){
- var elem = this;
- while ( elem.firstChild )
- elem = elem.firstChild;
- return elem;
- })
- .append(this);
-
- return this;
- },
-
- wrapInner: function(html) {
- return this.each(function(){
- jQuery(this).contents().wrapAll(html);
- });
- },
-
- wrap: function(html) {
- return this.each(function(){
- jQuery(this).wrapAll(html);
- });
- },
-
- append: function() {
- return this.domManip(arguments, true, 1, function(a){
- this.appendChild( a );
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, -1, function(a){
- this.insertBefore( a, this.firstChild );
- });
- },
-
- before: function() {
- return this.domManip(arguments, false, 1, function(a){
- this.parentNode.insertBefore( a, this );
- });
- },
-
- after: function() {
- return this.domManip(arguments, false, -1, function(a){
- this.parentNode.insertBefore( a, this.nextSibling );
- });
- },
-
- end: function() {
- return this.prevObject || jQuery([]);
- },
-
- find: function(t) {
- var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
- return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
- jQuery.unique( data ) : data );
- },
-
- clone: function(events) {
- // Do the clone
- var ret = this.map(function(){
- return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
- });
-
- // Need to set the expando to null on the cloned set if it exists
- // removeData doesn't work here, IE removes it from the original as well
- // this is primarily for IE but the data expando shouldn't be copied over in any browser
- var clone = ret.find("*").andSelf().each(function(){
- if ( this[ expando ] != undefined )
- this[ expando ] = null;
- });
-
- // Copy the events from the original to the clone
- if (events === true)
- this.find("*").andSelf().each(function(i) {
- var events = jQuery.data(this, "events");
- for ( var type in events )
- for ( var handler in events[type] )
- jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data);
- });
-
- // Return the cloned set
- return ret;
- },
-
- filter: function(t) {
- return this.pushStack(
- jQuery.isFunction( t ) &&
- jQuery.grep(this, function(el, index){
- return t.apply(el, [index]);
- }) ||
-
- jQuery.multiFilter(t,this) );
- },
-
- not: function(t) {
- return this.pushStack(
- t.constructor == String &&
- jQuery.multiFilter(t, this, true) ||
-
- jQuery.grep(this, function(a) {
- return ( t.constructor == Array || t.jquery )
- ? jQuery.inArray( a, t ) < 0
- : a != t;
- })
- );
- },
-
- add: function(t) {
- return this.pushStack( jQuery.merge(
- this.get(),
- t.constructor == String ?
- jQuery(t).get() :
- t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
- t : [t] )
- );
- },
-
- is: function(expr) {
- return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
- },
-
- hasClass: function(expr) {
- return this.is("." + expr);
- },
-
- val: function( val ) {
- if ( val == undefined ) {
- if ( this.length ) {
- var elem = this[0];
-
- // We need to handle select boxes special
- if ( jQuery.nodeName(elem, "select") ) {
- var index = elem.selectedIndex,
- a = [],
- options = elem.options,
- one = elem.type == "select-one";
-
- // Nothing was selected
- if ( index < 0 )
- return null;
-
- // Loop through all the selected options
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
- var option = options[i];
- if ( option.selected ) {
- // Get the specifc value for the option
- var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value;
-
- // We don't need an array for one selects
- if ( one )
- return val;
-
- // Multi-Selects return an array
- a.push(val);
- }
- }
-
- return a;
-
- // Everything else, we just grab the value
- } else
- return this[0].value.replace(/\r/g, "");
- }
- } else
- return this.each(function(){
- if ( val.constructor == Array && /radio|checkbox/.test(this.type) )
- this.checked = (jQuery.inArray(this.value, val) >= 0 ||
- jQuery.inArray(this.name, val) >= 0);
- else if ( jQuery.nodeName(this, "select") ) {
- var tmp = val.constructor == Array ? val : [val];
-
- jQuery("option", this).each(function(){
- this.selected = (jQuery.inArray(this.value, tmp) >= 0 ||
- jQuery.inArray(this.text, tmp) >= 0);
- });
-
- if ( !tmp.length )
- this.selectedIndex = -1;
- } else
- this.value = val;
- });
- },
-
- html: function( val ) {
- return val == undefined ?
- ( this.length ? this[0].innerHTML : null ) :
- this.empty().append( val );
- },
-
- replaceWith: function( val ) {
- return this.after( val ).remove();
- },
-
- eq: function(i){
- return this.slice(i, i+1);
- },
-
- slice: function() {
- return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
- },
-
- map: function(fn) {
- return this.pushStack(jQuery.map( this, function(elem,i){
- return fn.call( elem, i, elem );
- }));
- },
-
- andSelf: function() {
- return this.add( this.prevObject );
- },
-
- domManip: function(args, table, dir, fn) {
- var clone = this.length > 1, a;
-
- return this.each(function(){
- if ( !a ) {
- a = jQuery.clean(args, this.ownerDocument);
- if ( dir < 0 )
- a.reverse();
- }
-
- var obj = this;
-
- if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
- obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
-
- jQuery.each( a, function(){
- var elem = clone ? this.cloneNode(true) : this;
- if ( !evalScript(0, elem) )
- fn.call( obj, elem );
- });
- });
- }
-};
-
-function evalScript(i, elem){
- var script = jQuery.nodeName(elem, "script");
-
- if ( script ) {
- if ( elem.src )
- jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
- else
- jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-
- if ( elem.parentNode )
- elem.parentNode.removeChild(elem);
-
- } else if ( elem.nodeType == 1 )
- jQuery("script", elem).each(evalScript);
-
- return script;
-}
-
-jQuery.extend = jQuery.fn.extend = function() {
- // copy reference to target object
- var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
-
- // Handle a deep copy situation
- if ( target.constructor == Boolean ) {
- deep = target;
- target = arguments[1] || {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( al == 1 ) {
- target = this;
- a = 0;
- }
-
- var prop;
-
- for ( ; a < al; a++ )
- // Only deal with non-null/undefined values
- if ( (prop = arguments[a]) != null )
- // Extend the base object
- for ( var i in prop ) {
- // Prevent never-ending loop
- if ( target == prop[i] )
- continue;
-
- // Recurse if we're merging object values
- if ( deep && typeof prop[i] == 'object' && target[i] )
- jQuery.extend( target[i], prop[i] );
-
- // Don't bring in undefined values
- else if ( prop[i] != undefined )
- target[i] = prop[i];
- }
-
- // Return the modified object
- return target;
-};
-
-var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {};
-
-jQuery.extend({
- noConflict: function(deep) {
- window.$ = _$;
- if ( deep )
- window.jQuery = _jQuery;
- return jQuery;
- },
-
- // This may seem like some crazy code, but trust me when I say that this
- // is the only cross-browser way to do this. --John
- isFunction: function( fn ) {
- return !!fn && typeof fn != "string" && !fn.nodeName &&
- fn.constructor != Array && /function/i.test( fn + "" );
- },
-
- // check if an element is in a XML document
- isXMLDoc: function(elem) {
- return elem.documentElement && !elem.body ||
- elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
- },
-
- // Evalulates a script in a global context
- // Evaluates Async. in Safari 2 :-(
- globalEval: function( data ) {
- data = jQuery.trim( data );
- if ( data ) {
- if ( window.execScript )
- window.execScript( data );
- else if ( jQuery.browser.safari )
- // safari doesn't provide a synchronous global eval
- window.setTimeout( data, 0 );
- else
- eval.call( window, data );
- }
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
- },
-
- cache: {},
-
- data: function( elem, name, data ) {
- elem = elem == window ? win : elem;
-
- var id = elem[ expando ];
-
- // Compute a unique ID for the element
- if ( !id )
- id = elem[ expando ] = ++uuid;
-
- // Only generate the data cache if we're
- // trying to access or manipulate it
- if ( name && !jQuery.cache[ id ] )
- jQuery.cache[ id ] = {};
-
- // Prevent overriding the named cache with undefined values
- if ( data != undefined )
- jQuery.cache[ id ][ name ] = data;
-
- // Return the named cache data, or the ID for the element
- return name ? jQuery.cache[ id ][ name ] : id;
- },
-
- removeData: function( elem, name ) {
- elem = elem == window ? win : elem;
-
- var id = elem[ expando ];
-
- // If we want to remove a specific section of the element's data
- if ( name ) {
- if ( jQuery.cache[ id ] ) {
- // Remove the section of cache data
- delete jQuery.cache[ id ][ name ];
-
- // If we've removed all the data, remove the element's cache
- name = "";
- for ( name in jQuery.cache[ id ] ) break;
- if ( !name )
- jQuery.removeData( elem );
- }
-
- // Otherwise, we want to remove all of the element's data
- } else {
- // Clean up the element expando
- try {
- delete elem[ expando ];
- } catch(e){
- // IE has trouble directly removing the expando
- // but it's ok with using removeAttribute
- if ( elem.removeAttribute )
- elem.removeAttribute( expando );
- }
-
- // Completely remove the data cache
- delete jQuery.cache[ id ];
- }
- },
-
- // args is for internal usage only
- each: function( obj, fn, args ) {
- if ( args ) {
- if ( obj.length == undefined )
- for ( var i in obj )
- fn.apply( obj[i], args );
- else
- for ( var i = 0, ol = obj.length; i < ol; i++ )
- if ( fn.apply( obj[i], args ) === false ) break;
-
- // A special, fast, case for the most common use of each
- } else {
- if ( obj.length == undefined )
- for ( var i in obj )
- fn.call( obj[i], i, obj[i] );
- else
- for ( var i = 0, ol = obj.length, val = obj[0];
- i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){}
- }
-
- return obj;
- },
-
- prop: function(elem, value, type, index, prop){
- // Handle executable functions
- if ( jQuery.isFunction( value ) )
- value = value.call( elem, [index] );
-
- // exclude the following css properties to add px
- var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
-
- // Handle passing in a number to a CSS property
- return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
- value + "px" :
- value;
- },
-
- className: {
- // internal only, use addClass("class")
- add: function( elem, c ){
- jQuery.each( (c || "").split(/\s+/), function(i, cur){
- if ( !jQuery.className.has( elem.className, cur ) )
- elem.className += ( elem.className ? " " : "" ) + cur;
- });
- },
-
- // internal only, use removeClass("class")
- remove: function( elem, c ){
- elem.className = c != undefined ?
- jQuery.grep( elem.className.split(/\s+/), function(cur){
- return !jQuery.className.has( c, cur );
- }).join(" ") : "";
- },
-
- // internal only, use is(".class")
- has: function( t, c ) {
- return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
- }
- },
-
- swap: function(e,o,f) {
- for ( var i in o ) {
- e.style["old"+i] = e.style[i];
- e.style[i] = o[i];
- }
- f.apply( e, [] );
- for ( var i in o )
- e.style[i] = e.style["old"+i];
- },
-
- css: function(e,p) {
- if ( p == "height" || p == "width" ) {
- var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
-
- jQuery.each( d, function(){
- old["padding" + this] = 0;
- old["border" + this + "Width"] = 0;
- });
-
- jQuery.swap( e, old, function() {
- if ( jQuery(e).is(':visible') ) {
- oHeight = e.offsetHeight;
- oWidth = e.offsetWidth;
- } else {
- e = jQuery(e.cloneNode(true))
- .find(":radio").removeAttr("checked").end()
- .css({
- visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
- }).appendTo(e.parentNode)[0];
-
- var parPos = jQuery.css(e.parentNode,"position") || "static";
- if ( parPos == "static" )
- e.parentNode.style.position = "relative";
-
- oHeight = e.clientHeight;
- oWidth = e.clientWidth;
-
- if ( parPos == "static" )
- e.parentNode.style.position = "static";
-
- e.parentNode.removeChild(e);
- }
- });
-
- return p == "height" ? oHeight : oWidth;
- }
-
- return jQuery.curCSS( e, p );
- },
-
- curCSS: function(elem, prop, force) {
- var ret, stack = [], swap = [];
-
- // A helper method for determining if an element's values are broken
- function color(a){
- if ( !jQuery.browser.safari )
- return false;
-
- var ret = document.defaultView.getComputedStyle(a,null);
- return !ret || ret.getPropertyValue("color") == "";
- }
-
- if (prop == "opacity" && jQuery.browser.msie) {
- ret = jQuery.attr(elem.style, "opacity");
- return ret == "" ? "1" : ret;
- }
-
- if (prop.match(/float/i))
- prop = styleFloat;
-
- if (!force && elem.style[prop])
- ret = elem.style[prop];
-
- else if (document.defaultView && document.defaultView.getComputedStyle) {
-
- if (prop.match(/float/i))
- prop = "float";
-
- prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
- var cur = document.defaultView.getComputedStyle(elem, null);
-
- if ( cur && !color(elem) )
- ret = cur.getPropertyValue(prop);
-
- // If the element isn't reporting its values properly in Safari
- // then some display: none elements are involved
- else {
- // Locate all of the parent display: none elements
- for ( var a = elem; a && color(a); a = a.parentNode )
- stack.unshift(a);
-
- // Go through and make them visible, but in reverse
- // (It would be better if we knew the exact display type that they had)
- for ( a = 0; a < stack.length; a++ )
- if ( color(stack[a]) ) {
- swap[a] = stack[a].style.display;
- stack[a].style.display = "block";
- }
-
- // Since we flip the display style, we have to handle that
- // one special, otherwise get the value
- ret = prop == "display" && swap[stack.length-1] != null ?
- "none" :
- document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || "";
-
- // Finally, revert the display styles back
- for ( a = 0; a < swap.length; a++ )
- if ( swap[a] != null )
- stack[a].style.display = swap[a];
- }
-
- if ( prop == "opacity" && ret == "" )
- ret = "1";
-
- } else if (elem.currentStyle) {
- var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
- ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) {
- var style = elem.style.left;
- var runtimeStyle = elem.runtimeStyle.left;
- elem.runtimeStyle.left = elem.currentStyle.left;
- elem.style.left = ret || 0;
- ret = elem.style.pixelLeft + "px";
- elem.style.left = style;
- elem.runtimeStyle.left = runtimeStyle;
- }
- }
-
- return ret;
- },
-
- clean: function(a, doc) {
- var r = [];
- doc = doc || document;
-
- jQuery.each( a, function(i,arg){
- if ( !arg ) return;
-
- if ( arg.constructor == Number )
- arg = arg.toString();
-
- // Convert html string into DOM nodes
- if ( typeof arg == "string" ) {
- // Fix "XHTML"-style tags in all browsers
- arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){
- return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">";
- });
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
-
- var wrap =
- // option or optgroup
- !s.indexOf("<opt") &&
- [1, "<select>", "</select>"] ||
-
- !s.indexOf("<leg") &&
- [1, "<fieldset>", "</fieldset>"] ||
-
- s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
- [1, "<table>", "</table>"] ||
-
- !s.indexOf("<tr") &&
- [2, "<table><tbody>", "</tbody></table>"] ||
-
- // <thead> matched above
- (!s.indexOf("<td") || !s.indexOf("<th")) &&
- [3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
-
- !s.indexOf("<col") &&
- [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
-
- // IE can't serialize <link> and <script> tags normally
- jQuery.browser.msie &&
- [1, "div<div>", "</div>"] ||
-
- [0,"",""];
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + arg + wrap[2];
-
- // Move to the right depth
- while ( wrap[0]-- )
- div = div.lastChild;
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( jQuery.browser.msie ) {
-
- // String was a <table>, *may* have spurious <tbody>
- if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 )
- tb = div.firstChild && div.firstChild.childNodes;
-
- // String was a bare <thead> or <tfoot>
- else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
- tb = div.childNodes;
-
- for ( var n = tb.length-1; n >= 0 ; --n )
- if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
- tb[n].parentNode.removeChild(tb[n]);
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( /^\s/.test(arg) )
- div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
-
- }
-
- arg = jQuery.makeArray( div.childNodes );
- }
-
- if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) )
- return;
-
- if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options )
- r.push( arg );
- else
- r = jQuery.merge( r, arg );
-
- });
-
- return r;
- },
-
- attr: function(elem, name, value){
- var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
-
- // Safari mis-reports the default selected property of a hidden option
- // Accessing the parent's selectedIndex property fixes it
- if ( name == "selected" && jQuery.browser.safari )
- elem.parentNode.selectedIndex;
-
- // Certain attributes only work when accessed via the old DOM 0 way
- if ( fix[name] ) {
- if ( value != undefined ) elem[fix[name]] = value;
- return elem[fix[name]];
- } else if ( jQuery.browser.msie && name == "style" )
- return jQuery.attr( elem.style, "cssText", value );
-
- else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
- return elem.getAttributeNode(name).nodeValue;
-
- // IE elem.getAttribute passes even for style
- else if ( elem.tagName ) {
-
- if ( value != undefined ) {
- if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode )
- throw "type property can't be changed";
- elem.setAttribute( name, value );
- }
-
- if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) )
- return elem.getAttribute( name, 2 );
-
- return elem.getAttribute( name );
-
- // elem is actually elem.style ... set the style
- } else {
- // IE actually uses filters for opacity
- if ( name == "opacity" && jQuery.browser.msie ) {
- if ( value != undefined ) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- elem.zoom = 1;
-
- // Set the alpha filter to set the opacity
- elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
- (parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
- }
-
- return elem.filter ?
- (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
- }
- name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
- if ( value != undefined ) elem[name] = value;
- return elem[name];
- }
- },
-
- trim: function(t){
- return (t||"").replace(/^\s+|\s+$/g, "");
- },
-
- makeArray: function( a ) {
- var r = [];
-
- // Need to use typeof to fight Safari childNodes crashes
- if ( typeof a != "array" )
- for ( var i = 0, al = a.length; i < al; i++ )
- r.push( a[i] );
- else
- r = a.slice( 0 );
-
- return r;
- },
-
- inArray: function( b, a ) {
- for ( var i = 0, al = a.length; i < al; i++ )
- if ( a[i] == b )
- return i;
- return -1;
- },
-
- merge: function(first, second) {
- // We have to loop this way because IE & Opera overwrite the length
- // expando of getElementsByTagName
-
- // Also, we need to make sure that the correct elements are being returned
- // (IE returns comment nodes in a '*' query)
- if ( jQuery.browser.msie ) {
- for ( var i = 0; second[i]; i++ )
- if ( second[i].nodeType != 8 )
- first.push(second[i]);
- } else
- for ( var i = 0; second[i]; i++ )
- first.push(second[i]);
-
- return first;
- },
-
- unique: function(first) {
- var r = [], done = {};
-
- try {
- for ( var i = 0, fl = first.length; i < fl; i++ ) {
- var id = jQuery.data(first[i]);
- if ( !done[id] ) {
- done[id] = true;
- r.push(first[i]);
- }
- }
- } catch(e) {
- r = first;
- }
-
- return r;
- },
-
- grep: function(elems, fn, inv) {
- // If a string is passed in for the function, make a function
- // for it (a handy shortcut)
- if ( typeof fn == "string" )
- fn = eval("false||function(a,i){return " + fn + "}");
-
- var result = [];
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, el = elems.length; i < el; i++ )
- if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
- result.push( elems[i] );
-
- return result;
- },
-
- map: function(elems, fn) {
- // If a string is passed in for the function, make a function
- // for it (a handy shortcut)
- if ( typeof fn == "string" )
- fn = eval("false||function(a){return " + fn + "}");
-
- var result = [];
-
- // Go through the array, translating each of the items to their
- // new value (or values).
- for ( var i = 0, el = elems.length; i < el; i++ ) {
- var val = fn(elems[i],i);
-
- if ( val !== null && val != undefined ) {
- if ( val.constructor != Array ) val = [val];
- result = result.concat( val );
- }
- }
-
- return result;
- }
-});
-
-var userAgent = navigator.userAgent.toLowerCase();
-
-// Figure out what browser is being used
-jQuery.browser = {
- version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
- safari: /webkit/.test(userAgent),
- opera: /opera/.test(userAgent),
- msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
- mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
-};
-
-var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
-
-jQuery.extend({
- // Check to see if the W3C box model is being used
- boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
-
- styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
-
- props: {
- "for": "htmlFor",
- "class": "className",
- "float": styleFloat,
- cssFloat: styleFloat,
- styleFloat: styleFloat,
- innerHTML: "innerHTML",
- className: "className",
- value: "value",
- disabled: "disabled",
- checked: "checked",
- readonly: "readOnly",
- selected: "selected",
- maxlength: "maxLength"
- }
-});
-
-jQuery.each({
- parent: "a.parentNode",
- parents: "jQuery.dir(a,'parentNode')",
- next: "jQuery.nth(a,2,'nextSibling')",
- prev: "jQuery.nth(a,2,'previousSibling')",
- nextAll: "jQuery.dir(a,'nextSibling')",
- prevAll: "jQuery.dir(a,'previousSibling')",
- siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
- children: "jQuery.sibling(a.firstChild)",
- contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
-}, function(i,n){
- jQuery.fn[ i ] = function(a) {
- var ret = jQuery.map(this,n);
- if ( a && typeof a == "string" )
- ret = jQuery.multiFilter(a,ret);
- return this.pushStack( jQuery.unique(ret) );
- };
-});
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function(i,n){
- jQuery.fn[ i ] = function(){
- var a = arguments;
- return this.each(function(){
- for ( var j = 0, al = a.length; j < al; j++ )
- jQuery(a[j])[n]( this );
- });
- };
-});
-
-jQuery.each( {
- removeAttr: function( key ) {
- jQuery.attr( this, key, "" );
- this.removeAttribute( key );
- },
- addClass: function(c){
- jQuery.className.add(this,c);
- },
- removeClass: function(c){
- jQuery.className.remove(this,c);
- },
- toggleClass: function( c ){
- jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
- },
- remove: function(a){
- if ( !a || jQuery.filter( a, [this] ).r.length ) {
- jQuery.removeData( this );
- this.parentNode.removeChild( this );
- }
- },
- empty: function() {
- // Clean up the cache
- jQuery("*", this).each(function(){ jQuery.removeData(this); });
-
- while ( this.firstChild )
- this.removeChild( this.firstChild );
- }
-}, function(i,n){
- jQuery.fn[ i ] = function() {
- return this.each( n, arguments );
- };
-});
-
-jQuery.each( [ "Height", "Width" ], function(i,name){
- var n = name.toLowerCase();
-
- jQuery.fn[ n ] = function(h) {
- return this[0] == window ?
- jQuery.browser.safari && self["inner" + name] ||
- jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
- document.body["client" + name] :
-
- this[0] == document ?
- Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
-
- h == undefined ?
- ( this.length ? jQuery.css( this[0], n ) : null ) :
- this.css( n, h.constructor == String ? h : h + "px" );
- };
-});
-
-var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
- "(?:[\\w*_-]|\\\\.)" :
- "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
- quickChild = new RegExp("^>\\s*(" + chars + "+)"),
- quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
- quickClass = new RegExp("^([#.]?)(" + chars + "*)");
-
-jQuery.extend({
- expr: {
- "": "m[2]=='*'||jQuery.nodeName(a,m[2])",
- "#": "a.getAttribute('id')==m[2]",
- ":": {
- // Position Checks
- lt: "i<m[3]-0",
- gt: "i>m[3]-0",
- nth: "m[3]-0==i",
- eq: "m[3]-0==i",
- first: "i==0",
- last: "i==r.length-1",
- even: "i%2==0",
- odd: "i%2",
-
- // Child Checks
- "first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
- "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
- "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
-
- // Parent Checks
- parent: "a.firstChild",
- empty: "!a.firstChild",
-
- // Text Check
- contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
-
- // Visibility
- visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
- hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
-
- // Form attributes
- enabled: "!a.disabled",
- disabled: "a.disabled",
- checked: "a.checked",
- selected: "a.selected||jQuery.attr(a,'selected')",
-
- // Form elements
- text: "'text'==a.type",
- radio: "'radio'==a.type",
- checkbox: "'checkbox'==a.type",
- file: "'file'==a.type",
- password: "'password'==a.type",
- submit: "'submit'==a.type",
- image: "'image'==a.type",
- reset: "'reset'==a.type",
- button: '"button"==a.type||jQuery.nodeName(a,"button")',
- input: "/input|select|textarea|button/i.test(a.nodeName)",
-
- // :has()
- has: "jQuery.find(m[3],a).length",
-
- // :header
- header: "/h\\d/i.test(a.nodeName)",
-
- // :animated
- animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
- }
- },
-
- // The regular expressions that power the parsing engine
- parse: [
- // Match: [@value='test'], [@foo]
- /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
-
- // Match: :contains('foo')
- /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
-
- // Match: :even, :last-chlid, #id, .class
- new RegExp("^([:.#]*)(" + chars + "+)")
- ],
-
- multiFilter: function( expr, elems, not ) {
- var old, cur = [];
-
- while ( expr && expr != old ) {
- old = expr;
- var f = jQuery.filter( expr, elems, not );
- expr = f.t.replace(/^\s*,\s*/, "" );
- cur = not ? elems = f.r : jQuery.merge( cur, f.r );
- }
-
- return cur;
- },
-
- find: function( t, context ) {
- // Quickly handle non-string expressions
- if ( typeof t != "string" )
- return [ t ];
-
- // Make sure that the context is a DOM Element
- if ( context && !context.nodeType )
- context = null;
-
- // Set the correct context (if none is provided)
- context = context || document;
-
- // Initialize the search
- var ret = [context], done = [], last;
-
- // Continue while a selector expression exists, and while
- // we're no longer looping upon ourselves
- while ( t && last != t ) {
- var r = [];
- last = t;
-
- t = jQuery.trim(t);
-
- var foundToken = false;
-
- // An attempt at speeding up child selectors that
- // point to a specific element tag
- var re = quickChild;
- var m = re.exec(t);
-
- if ( m ) {
- var nodeName = m[1].toUpperCase();
-
- // Perform our own iteration and filter
- for ( var i = 0; ret[i]; i++ )
- for ( var c = ret[i].firstChild; c; c = c.nextSibling )
- if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) )
- r.push( c );
-
- ret = r;
- t = t.replace( re, "" );
- if ( t.indexOf(" ") == 0 ) continue;
- foundToken = true;
- } else {
- re = /^([>+~])\s*(\w*)/i;
-
- if ( (m = re.exec(t)) != null ) {
- r = [];
-
- var nodeName = m[2], merge = {};
- m = m[1];
-
- for ( var j = 0, rl = ret.length; j < rl; j++ ) {
- var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
- for ( ; n; n = n.nextSibling )
- if ( n.nodeType == 1 ) {
- var id = jQuery.data(n);
-
- if ( m == "~" && merge[id] ) break;
-
- if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
- if ( m == "~" ) merge[id] = true;
- r.push( n );
- }
-
- if ( m == "+" ) break;
- }
- }
-
- ret = r;
-
- // And remove the token
- t = jQuery.trim( t.replace( re, "" ) );
- foundToken = true;
- }
- }
-
- // See if there's still an expression, and that we haven't already
- // matched a token
- if ( t && !foundToken ) {
- // Handle multiple expressions
- if ( !t.indexOf(",") ) {
- // Clean the result set
- if ( context == ret[0] ) ret.shift();
-
- // Merge the result sets
- done = jQuery.merge( done, ret );
-
- // Reset the context
- r = ret = [context];
-
- // Touch up the selector string
- t = " " + t.substr(1,t.length);
-
- } else {
- // Optimize for the case nodeName#idName
- var re2 = quickID;
- var m = re2.exec(t);
-
- // Re-organize the results, so that they're consistent
- if ( m ) {
- m = [ 0, m[2], m[3], m[1] ];
-
- } else {
- // Otherwise, do a traditional filter check for
- // ID, class, and element selectors
- re2 = quickClass;
- m = re2.exec(t);
- }
-
- m[2] = m[2].replace(/\\/g, "");
-
- var elem = ret[ret.length-1];
-
- // Try to do a global search by ID, where we can
- if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
- // Optimization for HTML document case
- var oid = elem.getElementById(m[2]);
-
- // Do a quick check for the existence of the actual ID attribute
- // to avoid selecting by the name attribute in IE
- // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
- if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
- oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
-
- // Do a quick check for node name (where applicable) so
- // that div#foo searches will be really fast
- ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
- } else {
- // We need to find all descendant elements
- for ( var i = 0; ret[i]; i++ ) {
- // Grab the tag name being searched for
- var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
-
- // Handle IE7 being really dumb about <object>s
- if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
- tag = "param";
-
- r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
- }
-
- // It's faster to filter by class and be done with it
- if ( m[1] == "." )
- r = jQuery.classFilter( r, m[2] );
-
- // Same with ID filtering
- if ( m[1] == "#" ) {
- var tmp = [];
-
- // Try to find the element with the ID
- for ( var i = 0; r[i]; i++ )
- if ( r[i].getAttribute("id") == m[2] ) {
- tmp = [ r[i] ];
- break;
- }
-
- r = tmp;
- }
-
- ret = r;
- }
-
- t = t.replace( re2, "" );
- }
-
- }
-
- // If a selector string still exists
- if ( t ) {
- // Attempt to filter it
- var val = jQuery.filter(t,r);
- ret = r = val.r;
- t = jQuery.trim(val.t);
- }
- }
-
- // An error occurred with the selector;
- // just return an empty set instead
- if ( t )
- ret = [];
-
- // Remove the root context
- if ( ret && context == ret[0] )
- ret.shift();
-
- // And combine the results
- done = jQuery.merge( done, ret );
-
- return done;
- },
-
- classFilter: function(r,m,not){
- m = " " + m + " ";
- var tmp = [];
- for ( var i = 0; r[i]; i++ ) {
- var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
- if ( !not && pass || not && !pass )
- tmp.push( r[i] );
- }
- return tmp;
- },
-
- filter: function(t,r,not) {
- var last;
-
- // Look for common filter expressions
- while ( t && t != last ) {
- last = t;
-
- var p = jQuery.parse, m;
-
- for ( var i = 0; p[i]; i++ ) {
- m = p[i].exec( t );
-
- if ( m ) {
- // Remove what we just matched
- t = t.substring( m[0].length );
-
- m[2] = m[2].replace(/\\/g, "");
- break;
- }
- }
-
- if ( !m )
- break;
-
- // :not() is a special case that can be optimized by
- // keeping it out of the expression list
- if ( m[1] == ":" && m[2] == "not" )
- r = jQuery.filter(m[3], r, true).r;
-
- // We can get a big speed boost by filtering by class here
- else if ( m[1] == "." )
- r = jQuery.classFilter(r, m[2], not);
-
- else if ( m[1] == "[" ) {
- var tmp = [], type = m[3];
-
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
- var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
-
- if ( z == null || /href|src|selected/.test(m[2]) )
- z = jQuery.attr(a,m[2]) || '';
-
- if ( (type == "" && !!z ||
- type == "=" && z == m[5] ||
- type == "!=" && z != m[5] ||
- type == "^=" && z && !z.indexOf(m[5]) ||
- type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
- (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
- tmp.push( a );
- }
-
- r = tmp;
-
- // We can get a speed boost by handling nth-child here
- } else if ( m[1] == ":" && m[2] == "nth-child" ) {
- var merge = {}, tmp = [],
- test = /(\d*)n\+?(\d*)/.exec(
- m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
- !/\D/.test(m[3]) && "n+" + m[3] || m[3]),
- first = (test[1] || 1) - 0, last = test[2] - 0;
-
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
- var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
-
- if ( !merge[id] ) {
- var c = 1;
-
- for ( var n = parentNode.firstChild; n; n = n.nextSibling )
- if ( n.nodeType == 1 )
- n.nodeIndex = c++;
-
- merge[id] = true;
- }
-
- var add = false;
-
- if ( first == 1 ) {
- if ( last == 0 || node.nodeIndex == last )
- add = true;
- } else if ( (node.nodeIndex + last) % first == 0 )
- add = true;
-
- if ( add ^ not )
- tmp.push( node );
- }
-
- r = tmp;
-
- // Otherwise, find the expression to execute
- } else {
- var f = jQuery.expr[m[1]];
- if ( typeof f != "string" )
- f = jQuery.expr[m[1]][m[2]];
-
- // Build a custom macro to enclose it
- f = eval("false||function(a,i){return " + f + "}");
-
- // Execute it against the current filter
- r = jQuery.grep( r, f, not );
- }
- }
-
- // Return an array of filtered elements (r)
- // and the modified expression string (t)
- return { r: r, t: t };
- },
-
- dir: function( elem, dir ){
- var matched = [];
- var cur = elem[dir];
- while ( cur && cur != document ) {
- if ( cur.nodeType == 1 )
- matched.push( cur );
- cur = cur[dir];
- }
- return matched;
- },
-
- nth: function(cur,result,dir,elem){
- result = result || 1;
- var num = 0;
-
- for ( ; cur; cur = cur[dir] )
- if ( cur.nodeType == 1 && ++num == result )
- break;
-
- return cur;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType == 1 && (!elem || n != elem) )
- r.push( n );
- }
-
- return r;
- }
-});
-/*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code orignated from
- * Dean Edwards' addEvent library.
- */
-jQuery.event = {
-
- // Bind an event to an element
- // Original by Dean Edwards
- add: function(element, type, handler, data) {
- // For whatever reason, IE has trouble passing the window object
- // around, causing it to be cloned in the process
- if ( jQuery.browser.msie && element.setInterval != undefined )
- element = window;
-
- // Make sure that the function being executed has a unique ID
- if ( !handler.guid )
- handler.guid = this.guid++;
-
- // if data is passed, bind to handler
- if( data != undefined ) {
- // Create temporary function pointer to original handler
- var fn = handler;
-
- // Create unique handler function, wrapped around original handler
- handler = function() {
- // Pass arguments and context to original handler
- return fn.apply(this, arguments);
- };
-
- // Store data in unique handler
- handler.data = data;
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- handler.guid = fn.guid;
- }
-
- // Namespaced event handlers
- var parts = type.split(".");
- type = parts[0];
- handler.type = parts[1];
-
- // Init the element's event structure
- var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
-
- var handle = jQuery.data(element, "handle", function(){
- // returned undefined or false
- var val;
-
- // Handle the second event of a trigger and when
- // an event is called after a page has unloaded
- if ( typeof jQuery == "undefined" || jQuery.event.triggered )
- return val;
-
- val = jQuery.event.handle.apply(element, arguments);
-
- return val;
- });
-
- // Get the current list of functions bound to this event
- var handlers = events[type];
-
- // Init the event handler queue
- if (!handlers) {
- handlers = events[type] = {};
-
- // And bind the global event handler to the element
- if (element.addEventListener)
- element.addEventListener(type, handle, false);
- else
- element.attachEvent("on" + type, handle);
- }
-
- // Add the function to the element's handler list
- handlers[handler.guid] = handler;
-
- // Keep track of which events have been used, for global triggering
- this.global[type] = true;
- },
-
- guid: 1,
- global: {},
-
- // Detach an event or set of events from an element
- remove: function(element, type, handler) {
- var events = jQuery.data(element, "events"), ret, index;
-
- // Namespaced event handlers
- if ( typeof type == "string" ) {
- var parts = type.split(".");
- type = parts[0];
- }
-
- if ( events ) {
- // type is actually an event object here
- if ( type && type.type ) {
- handler = type.handler;
- type = type.type;
- }
-
- if ( !type ) {
- for ( type in events )
- this.remove( element, type );
-
- } else if ( events[type] ) {
- // remove the given handler for the given type
- if ( handler )
- delete events[type][handler.guid];
-
- // remove all handlers for the given type
- else
- for ( handler in events[type] )
- // Handle the removal of namespaced events
- if ( !parts[1] || events[type][handler].type == parts[1] )
- delete events[type][handler];
-
- // remove generic event handler if no more handlers exist
- for ( ret in events[type] ) break;
- if ( !ret ) {
- if (element.removeEventListener)
- element.removeEventListener(type, jQuery.data(element, "handle"), false);
- else
- element.detachEvent("on" + type, jQuery.data(element, "handle"));
- ret = null;
- delete events[type];
- }
- }
-
- // Remove the expando if it's no longer used
- for ( ret in events ) break;
- if ( !ret ) {
- jQuery.removeData( element, "events" );
- jQuery.removeData( element, "handle" );
- }
- }
- },
-
- trigger: function(type, data, element, donative, extra) {
- // Clone the incoming data, if any
- data = jQuery.makeArray(data || []);
-
- // Handle a global trigger
- if ( !element ) {
- // Only trigger if we've ever bound an event for it
- if ( this.global[type] )
- jQuery("*").add([window, document]).trigger(type, data);
-
- // Handle triggering a single element
- } else {
- var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
- // Check to see if we need to provide a fake event, or not
- evt = !data[0] || !data[0].preventDefault;
-
- // Pass along a fake event
- if ( evt )
- data.unshift( this.fix({ type: type, target: element }) );
-
- // Enforce the right trigger type
- data[0].type = type;
-
- // Trigger the event
- if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
- val = jQuery.data(element, "handle").apply( element, data );
-
- // Handle triggering native .onfoo handlers
- if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
- val = false;
-
- // Extra functions don't get the custom event object
- if ( evt )
- data.shift();
-
- // Handle triggering of extra function
- if ( extra && extra.apply( element, data ) === false )
- val = false;
-
- // Trigger the native events (except for clicks on links)
- if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
- this.triggered = true;
- element[ type ]();
- }
-
- this.triggered = false;
- }
-
- return val;
- },
-
- handle: function(event) {
- // returned undefined or false
- var val;
-
- // Empty object is for triggered events with no data
- event = jQuery.event.fix( event || window.event || {} );
-
- // Namespaced event handlers
- var parts = event.type.split(".");
- event.type = parts[0];
-
- var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
- args.unshift( event );
-
- for ( var j in c ) {
- // Pass in a reference to the handler function itself
- // So that we can later remove it
- args[0].handler = c[j];
- args[0].data = c[j].data;
-
- // Filter the functions by class
- if ( !parts[1] || c[j].type == parts[1] ) {
- var tmp = c[j].apply( this, args );
-
- if ( val !== false )
- val = tmp;
-
- if ( tmp === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
-
- // Clean up added properties in IE to prevent memory leak
- if (jQuery.browser.msie)
- event.target = event.preventDefault = event.stopPropagation =
- event.handler = event.data = null;
-
- return val;
- },
-
- fix: function(event) {
- // store a copy of the original event object
- // and clone to set read-only properties
- var originalEvent = event;
- event = jQuery.extend({}, originalEvent);
-
- // add preventDefault and stopPropagation since
- // they will not work on the clone
- event.preventDefault = function() {
- // if preventDefault exists run it on the original event
- if (originalEvent.preventDefault)
- originalEvent.preventDefault();
- // otherwise set the returnValue property of the original event to false (IE)
- originalEvent.returnValue = false;
- };
- event.stopPropagation = function() {
- // if stopPropagation exists run it on the original event
- if (originalEvent.stopPropagation)
- originalEvent.stopPropagation();
- // otherwise set the cancelBubble property of the original event to true (IE)
- originalEvent.cancelBubble = true;
- };
-
- // Fix target property, if necessary
- if ( !event.target && event.srcElement )
- event.target = event.srcElement;
-
- // check if target is a textnode (safari)
- if (jQuery.browser.safari && event.target.nodeType == 3)
- event.target = originalEvent.target.parentNode;
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && event.fromElement )
- event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && event.clientX != null ) {
- var e = document.documentElement, b = document.body;
- event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
- event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
- }
-
- // Add which for key events
- if ( !event.which && (event.charCode || event.keyCode) )
- event.which = event.charCode || event.keyCode;
-
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
- if ( !event.metaKey && event.ctrlKey )
- event.metaKey = event.ctrlKey;
-
- // Add which for click: 1 == left; 2 == middle; 3 == right
- // Note: button is not normalized, so don't use it
- if ( !event.which && event.button )
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
-
- return event;
- }
-};
-
-jQuery.fn.extend({
- bind: function( type, data, fn ) {
- return type == "unload" ? this.one(type, data, fn) : this.each(function(){
- jQuery.event.add( this, type, fn || data, fn && data );
- });
- },
-
- one: function( type, data, fn ) {
- return this.each(function(){
- jQuery.event.add( this, type, function(event) {
- jQuery(this).unbind(event);
- return (fn || data).apply( this, arguments);
- }, fn && data);
- });
- },
-
- unbind: function( type, fn ) {
- return this.each(function(){
- jQuery.event.remove( this, type, fn );
- });
- },
-
- trigger: function( type, data, fn ) {
- return this.each(function(){
- jQuery.event.trigger( type, data, this, true, fn );
- });
- },
-
- triggerHandler: function( type, data, fn ) {
- if ( this[0] )
- return jQuery.event.trigger( type, data, this[0], false, fn );
- },
-
- toggle: function() {
- // Save reference to arguments for access in closure
- var a = arguments;
-
- return this.click(function(e) {
- // Figure out which function to execute
- this.lastToggle = 0 == this.lastToggle ? 1 : 0;
-
- // Make sure that clicks stop
- e.preventDefault();
-
- // and execute the function
- return a[this.lastToggle].apply( this, [e] ) || false;
- });
- },
-
- hover: function(f,g) {
-
- // A private function for handling mouse 'hovering'
- function handleHover(e) {
- // Check if mouse(over|out) are still within the same parent element
- var p = e.relatedTarget;
-
- // Traverse up the tree
- while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
-
- // If we actually just moused on to a sub-element, ignore it
- if ( p == this ) return false;
-
- // Execute the right function
- return (e.type == "mouseover" ? f : g).apply(this, [e]);
- }
-
- // Bind the function to the two event listeners
- return this.mouseover(handleHover).mouseout(handleHover);
- },
-
- ready: function(f) {
- // Attach the listeners
- bindReady();
-
- // If the DOM is already ready
- if ( jQuery.isReady )
- // Execute the function immediately
- f.apply( document, [jQuery] );
-
- // Otherwise, remember the function for later
- else
- // Add the function to the wait list
- jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
-
- return this;
- }
-});
-
-jQuery.extend({
- /*
- * All the code that makes DOM Ready work nicely.
- */
- isReady: false,
- readyList: [],
-
- // Handle when the DOM is ready
- ready: function() {
- // Make sure that the DOM is not already loaded
- if ( !jQuery.isReady ) {
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If there are functions bound, to execute
- if ( jQuery.readyList ) {
- // Execute all of them
- jQuery.each( jQuery.readyList, function(){
- this.apply( document );
- });
-
- // Reset the list of functions
- jQuery.readyList = null;
- }
- // Remove event listener to avoid memory leak
- if ( jQuery.browser.mozilla || jQuery.browser.opera )
- document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
-
- // Remove script element used by IE hack
- if( !window.frames.length ) // don't remove if frames are present (#1187)
- jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
- }
- }
-});
-
-jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
- "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
- "submit,keydown,keypress,keyup,error").split(","), function(i,o){
-
- // Handle event binding
- jQuery.fn[o] = function(f){
- return f ? this.bind(o, f) : this.trigger(o);
- };
-});
-
-var readyBound = false;
-
-function bindReady(){
- if ( readyBound ) return;
- readyBound = true;
-
- // If Mozilla is used
- if ( jQuery.browser.mozilla || jQuery.browser.opera )
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
-
- // If IE is used, use the excellent hack by Matthias Miller
- // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
- else if ( jQuery.browser.msie ) {
-
- // Only works if you document.write() it
- document.write("<scr" + "ipt id=__ie_init defer=true " +
- "src=//:><\/script>");
-
- // Use the defer script hack
- var script = document.getElementById("__ie_init");
-
- // script does not exist if jQuery is loaded dynamically
- if ( script )
- script.onreadystatechange = function() {
- if ( this.readyState != "complete" ) return;
- jQuery.ready();
- };
-
- // Clear from memory
- script = null;
-
- // If Safari is used
- } else if ( jQuery.browser.safari )
- // Continually check to see if the document.readyState is valid
- jQuery.safariTimer = setInterval(function(){
- // loaded and complete are both valid states
- if ( document.readyState == "loaded" ||
- document.readyState == "complete" ) {
-
- // If either one are found, remove the timer
- clearInterval( jQuery.safariTimer );
- jQuery.safariTimer = null;
-
- // and execute any waiting functions
- jQuery.ready();
- }
- }, 10);
-
- // A fallback to window.onload, that will always work
- jQuery.event.add( window, "load", jQuery.ready );
-}
-jQuery.fn.extend({
- load: function( url, params, callback ) {
- if ( jQuery.isFunction( url ) )
- return this.bind("load", url);
-
- var off = url.indexOf(" ");
- if ( off >= 0 ) {
- var selector = url.slice(off, url.length);
- url = url.slice(0, off);
- }
-
- callback = callback || function(){};
-
- // Default to a GET request
- var type = "GET";
-
- // If the second parameter was provided
- if ( params )
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
- // We assume that it's the callback
- callback = params;
- params = null;
-
- // Otherwise, build a param string
- } else {
- params = jQuery.param( params );
- type = "POST";
- }
-
- var self = this;
-
- // Request the remote document
- jQuery.ajax({
- url: url,
- type: type,
- data: params,
- complete: function(res, status){
- // If successful, inject the HTML into all the matched elements
- if ( status == "success" || status == "notmodified" )
- // See if a selector was specified
- self.html( selector ?
- // Create a dummy div to hold the results
- jQuery("<div/>")
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
-
- // Locate the specified elements
- .find(selector) :
-
- // If not, just inject the full result
- res.responseText );
-
- // Add delay to account for Safari's delay in globalEval
- setTimeout(function(){
- self.each( callback, [res.responseText, status, res] );
- }, 13);
- }
- });
- return this;
- },
-
- serialize: function() {
- return jQuery.param(this.serializeArray());
- },
- serializeArray: function() {
- return this.map(function(){
- return jQuery.nodeName(this, "form") ?
- jQuery.makeArray(this.elements) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- (this.checked || /select|textarea/i.test(this.nodeName) ||
- /text|hidden|password/i.test(this.type));
- })
- .map(function(i, elem){
- var val = jQuery(this).val();
- return val == null ? null :
- val.constructor == Array ?
- jQuery.map( val, function(val, i){
- return {name: elem.name, value: val};
- }) :
- {name: elem.name, value: val};
- }).get();
- }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
- jQuery.fn[o] = function(f){
- return this.bind(o, f);
- };
-});
-
-var jsc = (new Date).getTime();
-
-jQuery.extend({
- get: function( url, data, callback, type ) {
- // shift arguments if data argument was ommited
- if ( jQuery.isFunction( data ) ) {
- callback = data;
- data = null;
- }
-
- return jQuery.ajax({
- type: "GET",
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- },
-
- getScript: function( url, callback ) {
- return jQuery.get(url, null, callback, "script");
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get(url, data, callback, "json");
- },
-
- post: function( url, data, callback, type ) {
- if ( jQuery.isFunction( data ) ) {
- callback = data;
- data = {};
- }
-
- return jQuery.ajax({
- type: "POST",
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- },
-
- ajaxSetup: function( settings ) {
- jQuery.extend( jQuery.ajaxSettings, settings );
- },
-
- ajaxSettings: {
- global: true,
- type: "GET",
- timeout: 0,
- contentType: "application/x-www-form-urlencoded",
- processData: true,
- async: true,
- data: null
- },
-
- // Last-Modified header cache for next request
- lastModified: {},
-
- ajax: function( s ) {
- var jsonp, jsre = /=(\?|%3F)/g, status, data;
-
- // Extend the settings, but re-extend 's' so that it can be
- // checked again later (in the test suite, specifically)
- s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
-
- // convert data if not already a string
- if ( s.data && s.processData && typeof s.data != "string" )
- s.data = jQuery.param(s.data);
-
- // Handle JSONP Parameter Callbacks
- if ( s.dataType == "jsonp" ) {
- if ( s.type.toLowerCase() == "get" ) {
- if ( !s.url.match(jsre) )
- s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
- } else if ( !s.data || !s.data.match(jsre) )
- s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
- s.dataType = "json";
- }
-
- // Build temporary JSONP function
- if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
- jsonp = "jsonp" + jsc++;
-
- // Replace the =? sequence both in the query string and the data
- if ( s.data )
- s.data = s.data.replace(jsre, "=" + jsonp);
- s.url = s.url.replace(jsre, "=" + jsonp);
-
- // We need to make sure
- // that a JSONP style response is executed properly
- s.dataType = "script";
-
- // Handle JSONP-style loading
- window[ jsonp ] = function(tmp){
- data = tmp;
- success();
- complete();
- // Garbage collect
- window[ jsonp ] = undefined;
- try{ delete window[ jsonp ]; } catch(e){}
- };
- }
-
- if ( s.dataType == "script" && s.cache == null )
- s.cache = false;
-
- if ( s.cache === false && s.type.toLowerCase() == "get" )
- s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime();
-
- // If data is available, append data to url for get requests
- if ( s.data && s.type.toLowerCase() == "get" ) {
- s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
-
- // IE likes to send both get and post data, prevent this
- s.data = null;
- }
-
- // Watch for a new set of requests
- if ( s.global && ! jQuery.active++ )
- jQuery.event.trigger( "ajaxStart" );
-
- // If we're requesting a remote document
- // and trying to load JSON or Script
- if ( !s.url.indexOf("http") && s.dataType == "script" ) {
- var head = document.getElementsByTagName("head")[0];
- var script = document.createElement("script");
- script.src = s.url;
-
- // Handle Script loading
- if ( !jsonp && (s.success || s.complete) ) {
- var done = false;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function(){
- if ( !done && (!this.readyState ||
- this.readyState == "loaded" || this.readyState == "complete") ) {
- done = true;
- success();
- complete();
- head.removeChild( script );
- }
- };
- }
-
- head.appendChild(script);
-
- // We handle everything using the script element injection
- return;
- }
-
- var requestDone = false;
-
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
- var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
-
- // Open the socket
- xml.open(s.type, s.url, s.async);
-
- // Set the correct header, if data is being sent
- if ( s.data )
- xml.setRequestHeader("Content-Type", s.contentType);
-
- // Set the If-Modified-Since header, if ifModified mode.
- if ( s.ifModified )
- xml.setRequestHeader("If-Modified-Since",
- jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
-
- // Set header so the called script knows that it's an XMLHttpRequest
- xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-
- // Allow custom headers/mimetypes
- if ( s.beforeSend )
- s.beforeSend(xml);
-
- if ( s.global )
- jQuery.event.trigger("ajaxSend", [xml, s]);
-
- // Wait for a response to come back
- var onreadystatechange = function(isTimeout){
- // The transfer is complete and the data is available, or the request timed out
- if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
- requestDone = true;
-
- // clear poll interval
- if (ival) {
- clearInterval(ival);
- ival = null;
- }
-
- status = isTimeout == "timeout" && "timeout" ||
- !jQuery.httpSuccess( xml ) && "error" ||
- s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
- "success";
-
- if ( status == "success" ) {
- // Watch for, and catch, XML document parse errors
- try {
- // process the data (runs the xml through httpData regardless of callback)
- data = jQuery.httpData( xml, s.dataType );
- } catch(e) {
- status = "parsererror";
- }
- }
-
- // Make sure that the request was successful or notmodified
- if ( status == "success" ) {
- // Cache Last-Modified header, if ifModified mode.
- var modRes;
- try {
- modRes = xml.getResponseHeader("Last-Modified");
- } catch(e) {} // swallow exception thrown by FF if header is not available
-
- if ( s.ifModified && modRes )
- jQuery.lastModified[s.url] = modRes;
-
- // JSONP handles its own success callback
- if ( !jsonp )
- success();
- } else
- jQuery.handleError(s, xml, status);
-
- // Fire the complete handlers
- complete();
-
- // Stop memory leaks
- if ( s.async )
- xml = null;
- }
- };
-
- if ( s.async ) {
- // don't attach the handler to the request, just poll it instead
- var ival = setInterval(onreadystatechange, 13);
-
- // Timeout checker
- if ( s.timeout > 0 )
- setTimeout(function(){
- // Check to see if the request is still happening
- if ( xml ) {
- // Cancel the request
- xml.abort();
-
- if( !requestDone )
- onreadystatechange( "timeout" );
- }
- }, s.timeout);
- }
-
- // Send the data
- try {
- xml.send(s.data);
- } catch(e) {
- jQuery.handleError(s, xml, null, e);
- }
-
- // firefox 1.5 doesn't fire statechange for sync requests
- if ( !s.async )
- onreadystatechange();
-
- // return XMLHttpRequest to allow aborting the request etc.
- return xml;
-
- function success(){
- // If a local callback was specified, fire it and pass it the data
- if ( s.success )
- s.success( data, status );
-
- // Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxSuccess", [xml, s] );
- }
-
- function complete(){
- // Process result
- if ( s.complete )
- s.complete(xml, status);
-
- // The request was completed
- if ( s.global )
- jQuery.event.trigger( "ajaxComplete", [xml, s] );
-
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active )
- jQuery.event.trigger( "ajaxStop" );
- }
- },
-
- handleError: function( s, xml, status, e ) {
- // If a local callback was specified, fire it
- if ( s.error ) s.error( xml, status, e );
-
- // Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxError", [xml, s, e] );
- },
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Determines if an XMLHttpRequest was successful or not
- httpSuccess: function( r ) {
- try {
- return !r.status && location.protocol == "file:" ||
- ( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
- jQuery.browser.safari && r.status == undefined;
- } catch(e){}
- return false;
- },
-
- // Determines if an XMLHttpRequest returns NotModified
- httpNotModified: function( xml, url ) {
- try {
- var xmlRes = xml.getResponseHeader("Last-Modified");
-
- // Firefox always returns 200. check Last-Modified date
- return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
- jQuery.browser.safari && xml.status == undefined;
- } catch(e){}
- return false;
- },
-
- httpData: function( r, type ) {
- var ct = r.getResponseHeader("content-type");
- var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
- var data = xml ? r.responseXML : r.responseText;
-
- if ( xml && data.documentElement.tagName == "parsererror" )
- throw "parsererror";
-
- // If the type is "script", eval it in global context
- if ( type == "script" )
- jQuery.globalEval( data );
-
- // Get the JavaScript object, if JSON is used.
- if ( type == "json" )
- data = eval("(" + data + ")");
-
- return data;
- },
-
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a ) {
- var s = [];
-
- // If an array was passed in, assume that it is an array
- // of form elements
- if ( a.constructor == Array || a.jquery )
- // Serialize the form elements
- jQuery.each( a, function(){
- s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
- });
-
- // Otherwise, assume that it's an object of key/value pairs
- else
- // Serialize the key/values
- for ( var j in a )
- // If the value is an array then the key names need to be repeated
- if ( a[j] && a[j].constructor == Array )
- jQuery.each( a[j], function(){
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
- });
- else
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
-
- // Return the resulting serialization
- return s.join("&").replace(/%20/g, "+");
- }
-
-});
-jQuery.fn.extend({
- show: function(speed,callback){
- return speed ?
- this.animate({
- height: "show", width: "show", opacity: "show"
- }, speed, callback) :
-
- this.filter(":hidden").each(function(){
- this.style.display = this.oldblock ? this.oldblock : "";
- if ( jQuery.css(this,"display") == "none" )
- this.style.display = "block";
- }).end();
- },
-
- hide: function(speed,callback){
- return speed ?
- this.animate({
- height: "hide", width: "hide", opacity: "hide"
- }, speed, callback) :
-
- this.filter(":visible").each(function(){
- this.oldblock = this.oldblock || jQuery.css(this,"display");
- if ( this.oldblock == "none" )
- this.oldblock = "block";
- this.style.display = "none";
- }).end();
- },
-
- // Save the old toggle function
- _toggle: jQuery.fn.toggle,
-
- toggle: function( fn, fn2 ){
- return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
- this._toggle( fn, fn2 ) :
- fn ?
- this.animate({
- height: "toggle", width: "toggle", opacity: "toggle"
- }, fn, fn2) :
- this.each(function(){
- jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
- });
- },
-
- slideDown: function(speed,callback){
- return this.animate({height: "show"}, speed, callback);
- },
-
- slideUp: function(speed,callback){
- return this.animate({height: "hide"}, speed, callback);
- },
-
- slideToggle: function(speed, callback){
- return this.animate({height: "toggle"}, speed, callback);
- },
-
- fadeIn: function(speed, callback){
- return this.animate({opacity: "show"}, speed, callback);
- },
-
- fadeOut: function(speed, callback){
- return this.animate({opacity: "hide"}, speed, callback);
- },
-
- fadeTo: function(speed,to,callback){
- return this.animate({opacity: to}, speed, callback);
- },
-
- animate: function( prop, speed, easing, callback ) {
- var opt = jQuery.speed(speed, easing, callback);
-
- return this[ opt.queue === false ? "each" : "queue" ](function(){
- opt = jQuery.extend({}, opt);
- var hidden = jQuery(this).is(":hidden"), self = this;
-
- for ( var p in prop ) {
- if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
- return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
-
- if ( p == "height" || p == "width" ) {
- // Store display property
- opt.display = jQuery.css(this, "display");
-
- // Make sure that nothing sneaks out
- opt.overflow = this.style.overflow;
- }
- }
-
- if ( opt.overflow != null )
- this.style.overflow = "hidden";
-
- opt.curAnim = jQuery.extend({}, prop);
-
- jQuery.each( prop, function(name, val){
- var e = new jQuery.fx( self, opt, name );
-
- if ( /toggle|show|hide/.test(val) )
- e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
- else {
- var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
- start = e.cur(true) || 0;
-
- if ( parts ) {
- var end = parseFloat(parts[2]),
- unit = parts[3] || "px";
-
- // We need to compute starting value
- if ( unit != "px" ) {
- self.style[ name ] = (end || 1) + unit;
- start = ((end || 1) / e.cur(true)) * start;
- self.style[ name ] = start + unit;
- }
-
- // If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] )
- end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
-
- e.custom( start, end, unit );
- } else
- e.custom( start, val, "" );
- }
- });
-
- // For JS strict compliance
- return true;
- });
- },
-
- queue: function(type, fn){
- if ( jQuery.isFunction(type) ) {
- fn = type;
- type = "fx";
- }
-
- if ( !type || (typeof type == "string" && !fn) )
- return queue( this[0], type );
-
- return this.each(function(){
- if ( fn.constructor == Array )
- queue(this, type, fn);
- else {
- queue(this, type).push( fn );
-
- if ( queue(this, type).length == 1 )
- fn.apply(this);
- }
- });
- },
-
- stop: function(){
- var timers = jQuery.timers;
-
- return this.each(function(){
- for ( var i = 0; i < timers.length; i++ )
- if ( timers[i].elem == this )
- timers.splice(i--, 1);
- }).dequeue();
- }
-
-});
-
-var queue = function( elem, type, array ) {
- if ( !elem )
- return;
-
- var q = jQuery.data( elem, type + "queue" );
-
- if ( !q || array )
- q = jQuery.data( elem, type + "queue",
- array ? jQuery.makeArray(array) : [] );
-
- return q;
-};
-
-jQuery.fn.dequeue = function(type){
- type = type || "fx";
-
- return this.each(function(){
- var q = queue(this, type);
-
- q.shift();
-
- if ( q.length )
- q[0].apply( this );
- });
-};
-
-jQuery.extend({
-
- speed: function(speed, easing, fn) {
- var opt = speed && speed.constructor == Object ? speed : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && easing.constructor != Function && easing
- };
-
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
- opt.duration :
- { slow: 600, fast: 200 }[opt.duration]) || 400;
-
- // Queueing
- opt.old = opt.complete;
- opt.complete = function(){
- jQuery(this).dequeue();
- if ( jQuery.isFunction( opt.old ) )
- opt.old.apply( this );
- };
-
- return opt;
- },
-
- easing: {
- linear: function( p, n, firstNum, diff ) {
- return firstNum + diff * p;
- },
- swing: function( p, n, firstNum, diff ) {
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
- }
- },
-
- timers: [],
-
- fx: function( elem, options, prop ){
- this.options = options;
- this.elem = elem;
- this.prop = prop;
-
- if ( !options.orig )
- options.orig = {};
- }
-
-});
-
-jQuery.fx.prototype = {
-
- // Simple function for setting a style value
- update: function(){
- if ( this.options.step )
- this.options.step.apply( this.elem, [ this.now, this ] );
-
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
- // Set display property to block for height/width animations
- if ( this.prop == "height" || this.prop == "width" )
- this.elem.style.display = "block";
- },
-
- // Get the current size
- cur: function(force){
- if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
- return this.elem[ this.prop ];
-
- var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
- return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
- },
-
- // Start an animation from one number to another
- custom: function(from, to, unit){
- this.startTime = (new Date()).getTime();
- this.start = from;
- this.end = to;
- this.unit = unit || this.unit || "px";
- this.now = this.start;
- this.pos = this.state = 0;
- this.update();
-
- var self = this;
- function t(){
- return self.step();
- }
-
- t.elem = this.elem;
-
- jQuery.timers.push(t);
-
- if ( jQuery.timers.length == 1 ) {
- var timer = setInterval(function(){
- var timers = jQuery.timers;
-
- for ( var i = 0; i < timers.length; i++ )
- if ( !timers[i]() )
- timers.splice(i--, 1);
-
- if ( !timers.length )
- clearInterval( timer );
- }, 13);
- }
- },
-
- // Simple 'show' function
- show: function(){
- // Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
- this.options.show = true;
-
- // Begin the animation
- this.custom(0, this.cur());
-
- // Make sure that we start at a small width/height to avoid any
- // flash of content
- if ( this.prop == "width" || this.prop == "height" )
- this.elem.style[this.prop] = "1px";
-
- // Start by showing the element
- jQuery(this.elem).show();
- },
-
- // Simple 'hide' function
- hide: function(){
- // Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
- this.options.hide = true;
-
- // Begin the animation
- this.custom(this.cur(), 0);
- },
-
- // Each step of an animation
- step: function(){
- var t = (new Date()).getTime();
-
- if ( t > this.options.duration + this.startTime ) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- this.options.curAnim[ this.prop ] = true;
-
- var done = true;
- for ( var i in this.options.curAnim )
- if ( this.options.curAnim[i] !== true )
- done = false;
-
- if ( done ) {
- if ( this.options.display != null ) {
- // Reset the overflow
- this.elem.style.overflow = this.options.overflow;
-
- // Reset the display
- this.elem.style.display = this.options.display;
- if ( jQuery.css(this.elem, "display") == "none" )
- this.elem.style.display = "block";
- }
-
- // Hide the element if the "hide" operation was done
- if ( this.options.hide )
- this.elem.style.display = "none";
-
- // Reset the properties, if the item has been hidden or shown
- if ( this.options.hide || this.options.show )
- for ( var p in this.options.curAnim )
- jQuery.attr(this.elem.style, p, this.options.orig[p]);
- }
-
- // If a callback was provided, execute it
- if ( done && jQuery.isFunction( this.options.complete ) )
- // Execute the complete function
- this.options.complete.apply( this.elem );
-
- return false;
- } else {
- var n = t - this.startTime;
- this.state = n / this.options.duration;
-
- // Perform the easing function, defaults to swing
- this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
- this.now = this.start + ((this.end - this.start) * this.pos);
-
- // Perform the next step of the animation
- this.update();
- }
-
- return true;
- }
-
-};
-
-jQuery.fx.step = {
- scrollLeft: function(fx){
- fx.elem.scrollLeft = fx.now;
- },
-
- scrollTop: function(fx){
- fx.elem.scrollTop = fx.now;
- },
-
- opacity: function(fx){
- jQuery.attr(fx.elem.style, "opacity", fx.now);
- },
-
- _default: function(fx){
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
- }
-};
-// The Offset Method
-// Originally By Brandon Aaron, part of the Dimension Plugin
-// http://jquery.com/plugins/project/dimensions
-jQuery.fn.offset = function() {
- var left = 0, top = 0, elem = this[0], results;
-
- if ( elem ) with ( jQuery.browser ) {
- var absolute = jQuery.css(elem, "position") == "absolute",
- parent = elem.parentNode,
- offsetParent = elem.offsetParent,
- doc = elem.ownerDocument,
- safari2 = safari && parseInt(version) < 522;
-
- // Use getBoundingClientRect if available
- if ( elem.getBoundingClientRect ) {
- box = elem.getBoundingClientRect();
-
- // Add the document scroll offsets
- add(
- box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
- box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)
- );
-
- // IE adds the HTML element's border, by default it is medium which is 2px
- // IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
- // IE 7 standards mode, the border is always 2px
- if ( msie ) {
- var border = jQuery("html").css("borderWidth");
- border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
- add( -border, -border );
- }
-
- // Otherwise loop through the offsetParents and parentNodes
- } else {
-
- // Initial element offsets
- add( elem.offsetLeft, elem.offsetTop );
-
- // Get parent offsets
- while ( offsetParent ) {
- // Add offsetParent offsets
- add( offsetParent.offsetLeft, offsetParent.offsetTop );
-
- // Mozilla and Safari > 2 does not include the border on offset parents
- // However Mozilla adds the border for table cells
- if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
- border( offsetParent );
-
- // Safari <= 2 doubles body offsets with an absolutely positioned element or parent
- if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
- absolute = true;
-
- // Get next offsetParent
- offsetParent = offsetParent.offsetParent;
- }
-
- // Get parent scroll offsets
- while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
- // Work around opera inline/table scrollLeft/Top bug
- if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
- // Subtract parent scroll offsets
- add( -parent.scrollLeft, -parent.scrollTop );
-
- // Mozilla does not add the border for a parent that has overflow != visible
- if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
- border( parent );
-
- // Get next parent
- parent = parent.parentNode;
- }
-
- // Safari doubles body offsets with an absolutely positioned element or parent
- if ( safari2 && absolute )
- add( -doc.body.offsetLeft, -doc.body.offsetTop );
- }
-
- // Return an object with top and left properties
- results = { top: top, left: left };
- }
-
- return results;
-
- function border(elem) {
- add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
- }
-
- function add(l, t) {
- left += parseInt(l) || 0;
- top += parseInt(t) || 0;
- }
-};
-})();
diff --git a/trunk/infrastructure/ace/build/testcode.js b/trunk/infrastructure/ace/build/testcode.js
deleted file mode 100644
index f393335..0000000
--- a/trunk/infrastructure/ace/build/testcode.js
+++ /dev/null
@@ -1,36 +0,0 @@
-function getTestCode() {
- var testCode = [
-'/* appjet:version 0.1 */',
-'(function(){',
-'/*',
-' * jQuery 1.2.1 - New Wave Javascript',
-' *',
-' * Copyright (c) 2007 John Resig (jquery.com)',
-' * Dual licensed under the MIT (MIT-LICENSE.txt)',
-' * and GPL (GPL-LICENSE.txt) licenses.',
-' *',
-' * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $',
-' * $Rev: 3353 $',
-' */',
-'',
-'// Map over jQuery in case of overwrite',
-'if ( typeof jQuery != "undefined" )',
-' var _jQuery = jQuery;',
-'',
-'var jQuery = window.jQuery = function(selector, context) {',
-' // If the context is a namespace object, return a new object',
-' return this instanceof jQuery ?',
-' this.init(selector, context) :',
-' new jQuery(selector, context);',
-'};',
-'',
-'// Map over the $ in case of overwrite',
-'if ( typeof $ != "undefined" )',
-' var _$ = $;',
-' ',
-'// Map the jQuery namespace to the \'$\' one',
-'window.$ = jQuery;',
-'',
-'var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;'].join('\n');
- return testCode;
-}
diff --git a/trunk/infrastructure/ace/easysync-notes.txt b/trunk/infrastructure/ace/easysync-notes.txt
deleted file mode 100644
index 6808f40..0000000
--- a/trunk/infrastructure/ace/easysync-notes.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-Goals:
-
-- no unicode (for efficient escaping, sightliness)
-- efficient operations for ACE and collab (attributed text, etc.)
-- good for time-slider
-- good for API
-- line-ending aware
-X more coherent (deleting or styling text merging with insertion)
-- server-side syntax highlighting?
-- unify author map with attribute pool
-- unify attributed text with changeset rep
-- not: reversible
-- force final newline of document to be preserved
-
-- Unicode bad:
- - ugly (hard to read)
- - more complex to parse
- - harder to store and transmit correctly
- - doesn't save all that much space anyway
- - blows up in size when string-escaped
- - embarrassing for API
-
-
-# Attributes:
-
-An "attribute" is a (key,value) pair such as (author,abc123456) or
-(bold,true). Sometimes an attribute is treated as an instruction to
-add that attribute, in which case an empty value means to remove it.
-So (bold,) removes the "bold" attribute. Attributes are interned and
-given numeric IDs, so the number "6" could represent "(bold,true)",
-for example. This mapping is stored in an attribute "pool" which may
-be shared by multiple changesets.
-
-Entries in the pool must be unique, so that attributes can be compared
-by their IDs. Attribute names cannot contain commas.
-
-A changeset looks something like the following:
-
-Z:5g>1|5=2p=v*4*5+1$x
-
-With the corresponding pool containing these entries:
-
-...
-4 -> (author,1059348573)
-5 -> (bold,true)
-...
-
-This changeset, together with the pool, represents inserting
-a bold letter "x" into the middle of a line. The string consists of:
-
-- a letter Z (the "magic character" and format version identifier)
-- a series of opcodes (punctuation) and numeric values in base 36 (the
- alphanumerics)
-- a dollar sign ($)
-- a string of characters used by insertion operations (the "char bank")
-
-If we separate out the operations and convert the numbers to base 10, we get:
-
-Z :196 >1 |5=97 =31 *4 *5 +1 $"x"
-
-Here are descriptions of the operations, where capital letters are variables:
-
-":N" : Source text has length N (must be first op)
-">N" : Final text is N (positive) characters longer than source text (must be second op)
-"<N" : Final text is N (positive) characters shorter than source text (must be second op)
-">0" : Final text is same length as source text
-"+N" : Insert N characters from the bank, none of them newlines
-"-N" : Skip over (delete) N characters from the source text, none of them newlines
-"=N" : Keep N characters from the source text, none of them newlines
-"|L+N" : Insert N characters from the source text, containing L newlines. The last
- character inserted MUST be a newline, but not the (new) document's final newline.
-"|L-N" : Delete N characters from the source text, containing L newlines. The last
- character inserted MUST be a newline, but not the (old) document's final newline.
-"|L=N" : Keep N characters from the source text, containing L newlines. The last character
- kept MUST be a newline, and the final newline of the document is allowed.
-"*I" : Apply attribute I from the pool to the following +, =, |+, or |= command.
- In other words, any number of * ops can come before a +, =, or | but not
- between a | and the corresponding + or =.
- If +, text is inserted having this attribute. If =, text is kept but with
- the attribute applied as an attribute addition or removal.
- Consecutive attributes must be sorted lexically by (key,value) with key
- and value taken as strings. It's illegal to have duplicate keys
- for (key,value) pairs that apply to the same text. It's illegal to
- have an empty value for a key in the case of an insertion (+), the
- pair should just be omitted.
-
-Characters from the source text that aren't accounted for are assumed to be kept
-with the same attributes.
-
-Additional Constraints:
-
-- Consecutive +, -, and = ops of the same type that could be combined are not allowed.
- Whether combination is possible depends on the attributes of the ops and whether
- each is multiline or not. For example, two multiline deletions can never be
- consecutive, nor can any insertion come after a non-multiline insertion with the
- same attributes.
-- "No-op" ops are not allowed, such as deleting 0 characters. However, attribute
- applications that don't have any effect are allowed.
-- Characters at the end of the source text cannot be explicitly kept with no changes;
- if the change doesn't affect the last N characters, those "keep" ops must be left off.
-- In any consecutive sequence of insertions (+) and deletions (-) with no keeps (=),
- the deletions must come before the insertions.
-- The document text before and after will always end with a newline. This policy avoids
- a lot of special-casing of the end of the document. If a final newline is
- always added when importing text and removed when exporting text, then the
- changeset representation can be used to process text files that may or may not
- have a final newline.
-
-Attribution string:
-
-An "attribution string" is a series of inserts with no deletions or keeps.
-For example, "*3+8|1+5" describes the attributes of a string of length 13,
-where the first 8 chars have attribute 3 and the next 5 chars have no
-attributes, with the last of these 5 chars being a newline. Constraints
-apply similar to those affecting changesets, but the restriction about
-the final newline of the new document being added doesn't apply.
-
-Attributes in an attribution string cannot be empty, like "(bold,)", they should
-instead be absent.
-
-
-
-
-
--------
-Considerations:
-
-- composing changesets/attributions with different pools
-- generalizing "applyToAttribution" to make "mutateAttributionLines" and "compose"
diff --git a/trunk/infrastructure/ace/lib/rhino-js-1.7r1.jar b/trunk/infrastructure/ace/lib/rhino-js-1.7r1.jar
deleted file mode 120000
index f41e23b..0000000
--- a/trunk/infrastructure/ace/lib/rhino-js-1.7r1.jar
+++ /dev/null
@@ -1 +0,0 @@
-../../lib/rhino-js-1.7r1.jar \ No newline at end of file
diff --git a/trunk/infrastructure/ace/lib/yuicompressor-2.4-appjet.jar b/trunk/infrastructure/ace/lib/yuicompressor-2.4-appjet.jar
deleted file mode 120000
index 3953af5..0000000
--- a/trunk/infrastructure/ace/lib/yuicompressor-2.4-appjet.jar
+++ /dev/null
@@ -1 +0,0 @@
-../../lib/yuicompressor-2.4-appjet.jar \ No newline at end of file
diff --git a/trunk/infrastructure/ace/notes.txt b/trunk/infrastructure/ace/notes.txt
deleted file mode 100644
index d9e1fda..0000000
--- a/trunk/infrastructure/ace/notes.txt
+++ /dev/null
@@ -1,195 +0,0 @@
-XXX This is a scratch file I used for notes; information may be out of date or random -- dgreenspan
-
-- rename ace2.js to ace.js
-
-
-Editor goals:
-- Highlight JavaScript accurately (including regular expression, etc.)
-- On large documents (say 2000 lines), be responsive to new input and rehighlight the screen quickly
-- Highlight "as you type", not when you're done with the current line
-- Propagate multi-line comment highlighting efficiently
-- Look and feel as "clean" and "native" as possible to the user
-- Support unlimited "undo" with arbitrary undo model
-- Allow features such as auto-indentation and parenthesis-flashing to be added easily
-- Work in IE 6, FF 2, Safari 3, Camino
-- Support native copy and paste, within the buffer and with other programs
-- Not display any flickering, blurring, or any kind of artifact
-- Support incremental syntax-highlighting of other languages too
-- Be extensible -- multiple views of whole document, lines, tokens, characters
-- Support native selection behavior, international input, assistive devices (potentially)
-- Resizable text
-- Unlimited editors per page
-
-
-compatibility, speed, power, generality,
-
-
-
-
-- enhancement ideas
- - show mismatched brackets
- - undo history limit
-
-ace2 changelog for week of 5/9:
-- full "undo" support! control-Z (Windows) or command-Z (Mac)
-- flashing parentheses are back, and better than before!
-- appjet:css sections are syntax-highlighted
-- optimizations for slower machines
-- fixed various quirks
-- lines too long for browser are hard-wrapped on entry
-
-
-== path to calls that change rep
-- doLineSplice
- - incorporateUserChanges
- - idleWorkTimer
- - handleKeyEvent
- - performDocumentLineSplice
- - setCodeText
- - importCode
- - setup
- - handleReturnIndentation
- - handleKeyEvent
- - performDocumentReplaceRange
- - handleKeyEvent
- - performDocumentReplaceSelection
- - handleKeyEvent
-- repSelectionChange
- - incorporateUserChanges
- - idleWorkTimer
- - handleKeyEvent
- - performSelectionChange
- - setCodeText
- - importCode
- - setup
- - handleReturnIndentation
- - handleKeyEvent
- - performDocumentReplaceRange
- - doLineSplice
-
-
-make ace2_common local?
-
-
-next steps:
-- safari scroll jump
-- FF 1.6 support
-- weird "delete" bug
-- speed on slow machines
-- paren flashing
-- undo
-
-
-- investigate errors with special "delete" handling turned off
-- track down FF quirk (delete at begging of line starting with one space)
-- (done for now: look for IE memory leaks)
-
-
-Outstanding issues:
-+ Bugs:
-+ Quirks:
- - FF: delete at beginning of line where line starts with 1 space (space briefly disappears)
- - IE: clicking below document body clears selection (instead of moving caret)
- - IE: horizontal scroll-bar sometimes unnecessary
-+ Speed:
- - skip-list is slow for insert/delete lines on highlighting
- - return at bottom of 3000-line file takes too long to normalize in Firefox (probably worse in IE)
-+ feature parity
- - regular expression highlighting not smart in lexically ambiguous cases (should use previous token)
- - paren flashing
-+ additional features
- - less zealous IDE document-dirty marking (e.g. arrow-key marks dirty)
- - undo
-+ fancy todo
- - bring back rich shell editor
- - use same highlighting for view-source, highlight on server
- - highlight CSS and stuff
-
-+ done
- - multi-line strings
- - does tab do the right thing?
- - indent on return
- - quirk: return key doesn't scroll caret into view
- - line numbers
- - highlight appjet directives
- - IE Support
- - slightly smarter indentation
- - tab deletes until a stop
- - interface: import/export
- - interface: rich/plain
- - bugfix: IE: return, delete, etc. doesn't mark document dirty!
- - bugfix: IE: can't copy/paste within document
- - caret not always in view after an edit
-
-====================
-
-Highlighting strategy:
-- allow incremental dirty-region highlighting, based on time and char to pass
-- first lex the viewport, based on information extending a little before it
-- then highlight the viewport
-- then highlight around the viewport?
-- lex the whole document from the top
-- highlight lines outside the viewport
-
-
-
-
-
-- deal with key events in relation to when they are responded to (doLater after all?)
-- use Pygment!
-
-- handle international characters (fragile DOM state)
-- normalize only when idle (make sure that works)
-- better detection, e.g. paste in Safari
-- selectionchange event?
-
-- can eventually allow discarding user changes!
-
-DONE:
-- editing when lines consist of spans
-- all browsers: scroll to full left on return, etc
-- why does IE let you type without firing events?
-- slow in IE?
-
-tests:
-- type some stuff, return, type more stuff, return
-- return repeatedly starting at end of line, delete repeatedly
-- return repeatedly starting at beginning of line, delete repeatedly
-- return repeatedly starting in middle of line, delete repeatedly
-- return/delete starting between blank lines
-- try to move past end of document, then try to type, then try to move
-- from collapsed selection, shift-left repeatedly, across lines, shift-right repeatedly
-- from collapsed selection, shift-right repeatedly, across lines, shift-left repeatedly
-- shift-up, shift-down; shift-down, shift-up
-- cut-and-paste span of characters into middle of line
-- cut-and-paste span of characters into blank line (FF)
-- cut-and-paste span of characters at end of line (FF)
-- cut-and-paste selection with blank lines in it, make sure lines still blank
-- cut-and-paste selection starting and ending with blank lines (IE, FF)
-- doc with blank lines, select-all, cut, paste
-- doc starting and ending in blank lines, select-all, cut, paste (IE, Firefox)
- - IE currently loses one blank line at end if > 0
- - Safari loses one blank line at end if > 1
-- non-empty doc, select-all, delete, select-all, delete (IE crash, Safari hidden cursor)
-- non-empty doc select-all, return, return, return (IE)
-- on last line of document: type stuff, return, type stuff. down arrow goes down = bad (IE)
-- on last line of document: type stuff, return, return. should be no extra lines (IE)
-- go to start of next-to-last line, shift-down, cut (IE)
-- cursor at start of line, shift-down, cut, paste (IE cursor jump)
-- cursor at start of one empty line, shift-down, cut, paste (IE)
-- cursor at start of two empty lines, shift-down, cut, paste (IE, FF)
- - on IE, no new line is pasted; default behavior is worse, so I'll take it
- - on FF, the equivalent of two returns; good enough
-- cursor at start of two empty lines, shift-down, cut, paste in middle of line (IE, FF)
- - in IE, FF, Safari, the equivalent of two returns
-- type letter on blank line, delete it (IE)
-- type space on blank line, delete it (IE)
-- type space before non-blank line, delete it
-- delete blank line, then delete again quickly
-- delete blank line from caret at start of line starting with one space (FF)
-- type over selection from middle of one line to middle of next
-
-- in middle of a word (span), quickly delete, then type a character, then delete (IE)
-- paste text with blank lines from an external source
-- meta-delete
-- up arrow from beginning of line (WebKit)
diff --git a/trunk/infrastructure/ace/www/ace2_common.js b/trunk/infrastructure/ace/www/ace2_common.js
deleted file mode 100644
index 4a08de6..0000000
--- a/trunk/infrastructure/ace/www/ace2_common.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-function isNodeText(node) {
- return (node.nodeType == 3);
-}
-
-function object(o) {
- var f = function() {};
- f.prototype = o;
- return new f();
-}
-
-function extend(obj, props) {
- for(var p in props) {
- obj[p] = props[p];
- }
- return obj;
-}
-
-function forEach(array, func) {
- for(var i=0;i<array.length;i++) {
- var result = func(array[i], i);
- if (result) break;
- }
-}
-
-function map(array, func) {
- var result = [];
- // must remain compatible with "arguments" pseudo-array
- for(var i=0;i<array.length;i++) {
- if (func) result.push(func(array[i], i));
- else result.push(array[i]);
- }
- return result;
-}
-
-function filter(array, func) {
- var result = [];
- // must remain compatible with "arguments" pseudo-array
- for(var i=0;i<array.length;i++) {
- if (func(array[i], i)) result.push(array[i]);
- }
- return result;
-}
-
-function isArray(testObject) {
- return testObject && typeof testObject === 'object' &&
- !(testObject.propertyIsEnumerable('length')) &&
- typeof testObject.length === 'number';
-}
-
-// Figure out what browser is being used (stolen from jquery 1.2.1)
-var userAgent = navigator.userAgent.toLowerCase();
-var browser = {
- version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
- safari: /webkit/.test(userAgent),
- opera: /opera/.test(userAgent),
- msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
- mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent),
- windows: /windows/.test(userAgent) // dgreensp
-};
-
-function getAssoc(obj, name) {
- return obj["_magicdom_"+name];
-}
-
-function setAssoc(obj, name, value) {
- // note that in IE designMode, properties of a node can get
- // copied to new nodes that are spawned during editing; also,
- // properties representable in HTML text can survive copy-and-paste
- obj["_magicdom_"+name] = value;
-}
-
-// "func" is a function over 0..(numItems-1) that is monotonically
-// "increasing" with index (false, then true). Finds the boundary
-// between false and true, a number between 0 and numItems inclusive.
-function binarySearch(numItems, func) {
- if (numItems < 1) return 0;
- if (func(0)) return 0;
- if (! func(numItems-1)) return numItems;
- var low = 0; // func(low) is always false
- var high = numItems-1; // func(high) is always true
- while ((high - low) > 1) {
- var x = Math.floor((low+high)/2); // x != low, x != high
- if (func(x)) high = x;
- else low = x;
- }
- return high;
-}
-
-function binarySearchInfinite(expectedLength, func) {
- var i = 0;
- while (!func(i)) i += expectedLength;
- return binarySearch(i, func);
-}
-
-function htmlPrettyEscape(str) {
- return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
- .replace(/\r?\n/g, '\\n');
-}
diff --git a/trunk/infrastructure/ace/www/ace2_common_dev.js b/trunk/infrastructure/ace/www/ace2_common_dev.js
deleted file mode 100644
index 8fb88b0..0000000
--- a/trunk/infrastructure/ace/www/ace2_common_dev.js
+++ /dev/null
@@ -1,296 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* Remove non-cross-browser stuff I'm tempted to use */
-if (Array.prototype.filter) delete Array.prototype.filter;
-if (Array.prototype.forEach) delete Array.prototype.forEach;
-if (Array.prototype.map) delete Array.prototype.map;
-/* */
-
-function busyWait(ms) {
- var start = (new Date()).getTime();
- while ((new Date()).getTime() < start+ms) {}
-}
-
-/*
- based on: http://www.JSON.org/json2.js
- 2008-07-15
-*/
-toSource = function () {
-
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- Date.prototype.toJSON = function (key) {
-
- return this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z';
- };
-
- String.prototype.toJSON =
- Number.prototype.toJSON =
- Boolean.prototype.toJSON = function (key) {
- return this.valueOf();
- };
-
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-
- function quote(string) {
-
- // If the string contains no control characters, no quote characters, and no
- // backslash characters, then we can safely slap some quotes around it.
- // Otherwise we must also replace the offending characters with safe escape
- // sequences.
-
- escapeable.lastIndex = 0;
- return escapeable.test(string) ?
- '"' + string.replace(escapeable, function (a) {
- var c = meta[a];
- if (typeof c === 'string') {
- return c;
- }
- return '\\u' + ('0000' +
- (+(a.charCodeAt(0))).toString(16)).slice(-4);
- }) + '"' :
- '"' + string + '"';
- }
-
-
- function str(key, holder) {
-
- // Produce a string from holder[key].
-
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
- // If the value has a toJSON method, call it to obtain a replacement value.
-
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
- // If we were called with a replacer function, then call the replacer to
- // obtain a replacement value.
-
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
- // What happens next depends on the value's type.
-
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
-
- // JSON numbers must be finite. Encode non-finite numbers as null.
-
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
-
- // If the value is a boolean or null, convert it to a string. Note:
- // typeof null does not produce 'null'. The case is included here in
- // the remote chance that this gets fixed someday.
-
- return String(value);
-
- // If the type is 'object', we might be dealing with an object or an array or
- // null.
-
- case 'object':
-
- // Due to a specification blunder in ECMAScript, typeof null is 'object',
- // so watch out for that case.
-
- if (!value) {
- return 'null';
- }
-
- // Make an array to hold the partial results of stringifying this object value.
-
- gap += indent;
- partial = [];
-
- // If the object has a dontEnum length property, we'll treat it as an array.
-
- if (typeof value.length === 'number' &&
- !(value.propertyIsEnumerable('length'))) {
-
- // The object is an array. Stringify every element. Use null as a placeholder
- // for non-JSON values.
-
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
- // Join all of the elements together, separated with commas, and wrap them in
- // brackets.
-
- v = partial.length === 0 ? '[]' :
- gap ? '[\n' + gap +
- partial.join(',\n' + gap) + '\n' +
- mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
- // If the replacer is an array, use it to select the members to be stringified.
-
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- k = rep[i];
- if (typeof k === 'string') {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- } else {
-
- // Otherwise, iterate through all of the keys in the object.
-
- for (k in value) {
- if (Object.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
- // Join all of the member texts together, separated with commas,
- // and wrap them in braces.
-
- v = partial.length === 0 ? '{}' :
- gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
- mind + '}' : '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
- }
-
- return function (value, replacer, space) {
-
- // The stringify method takes a value and an optional replacer, and an optional
- // space parameter, and returns a JSON text. The replacer can be a function
- // that can replace values, or an array of strings that will select the keys.
- // A default replacer method can be provided. Use of the space parameter can
- // produce text that is more easily readable.
-
- var i;
- gap = '';
- indent = '';
-
- // If the space parameter is a number, make an indent string containing that
- // many spaces.
-
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
-
- // If the space parameter is a string, it will be used as the indent string.
-
- } else if (typeof space === 'string') {
- indent = space;
- }
-
- // If there is a replacer, it must be a function or an array.
- // Otherwise, throw an error.
-
- rep = replacer;
- if (replacer && typeof replacer !== 'function' &&
- (typeof replacer !== 'object' ||
- typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
- // Make a fake root object containing our value under the key of ''.
- // Return the result of stringifying the value.
-
- return str('', {'': value});
- }
-}();
-
-function debugFrame(optName, func) {
- var name = "something";
- if ((typeof optName) == "string") {
- name = optName;
- }
- else func = optName;
-
- return function() {
- try {
- return func.apply(this, arguments);
- }
- catch (e) {
- console.warn(name+" didn't complete");
- throw e;
- }
- }
-}
-
-function makeRecentSet(size) {
- var ringBuffer = {};
- var nextIndex = 0;
- return {
- contains: function (elem) {
- for(var i=0;i<size;i++) {
- if (ringBuffer[i] === elem) return true;
- }
- return false;
- },
- addNew: function (elem) {
- // precond: not already in set
- ringBuffer[nextIndex] = elem;
- nextIndex = ((nextIndex+1) % size);
- }
- };
-}
diff --git a/trunk/infrastructure/ace/www/ace2_inner.js b/trunk/infrastructure/ace/www/ace2_inner.js
deleted file mode 100644
index afd1e35..0000000
--- a/trunk/infrastructure/ace/www/ace2_inner.js
+++ /dev/null
@@ -1,4778 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function OUTER(gscope) {
-
- var DEBUG=true;//$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
-
- var isSetUp = false;
-
- var THE_TAB = ' ';//4
- var MAX_LIST_LEVEL = 8;
-
- var LINE_NUMBER_PADDING_RIGHT = 4;
- var LINE_NUMBER_PADDING_LEFT = 4;
- var MIN_LINEDIV_WIDTH = 20;
- var EDIT_BODY_PADDING_TOP = 8;
- var EDIT_BODY_PADDING_LEFT = 8;
-
- var caughtErrors = [];
-
- var thisAuthor = '';
-
- var disposed = false;
-
- var editorInfo = parent.editorInfo;
-
- var iframe = window.frameElement;
- var outerWin = iframe.ace_outerWin;
- iframe.ace_outerWin = null; // prevent IE 6 memory leak
- var sideDiv = iframe.nextSibling;
- var lineMetricsDiv = sideDiv.nextSibling;
- var overlaysdiv = lineMetricsDiv.nextSibling;
- initLineNumbers();
-
- var outsideKeyDown = function(evt) {};
- var outsideKeyPress = function(evt) { return true; };
- var outsideNotifyDirty = function() {};
-
- // selFocusAtStart -- determines whether the selection extends "backwards", so that the focus
- // point (controlled with the arrow keys) is at the beginning; not supported in IE, though
- // native IE selections have that behavior (which we try not to interfere with).
- // Must be false if selection is collapsed!
- var rep = { lines: newSkipList(), selStart: null, selEnd: null, selFocusAtStart: false,
- alltext: "", alines: [],
- apool: new AttribPool() };
- // lines, alltext, alines, and DOM are set up in setup()
- if (undoModule.enabled) {
- undoModule.apool = rep.apool;
- }
-
- var root, doc; // set in setup()
-
- var isEditable = true;
- var doesWrap = true;
- var hasLineNumbers = true;
- var isStyled = true;
-
- // space around the innermost iframe element
- var iframePadLeft = MIN_LINEDIV_WIDTH + LINE_NUMBER_PADDING_RIGHT + EDIT_BODY_PADDING_LEFT;
- var iframePadTop = EDIT_BODY_PADDING_TOP;
- var iframePadBottom = 0, iframePadRight = 0;
-
- var console = (DEBUG && top.console);
- if (! console) {
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
- "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
- console = {};
- for (var i = 0; i < names.length; ++i)
- console[names[i]] = function() {};
- //console.error = function(str) { alert(str); };
- }
- var PROFILER = window.PROFILER;
- if (!PROFILER) {
- PROFILER = function() { return {start:noop, mark:noop, literal:noop, end:noop, cancel:noop}; };
- }
- function noop() {}
- function identity(x) { return x; }
-
- // "dmesg" is for displaying messages in the in-page output pane
- // visible when "?djs=1" is appended to the pad URL. It generally
- // remains a no-op unless djs is enabled, but we make a habit of
- // only calling it in error cases or while debugging.
- var dmesg = noop;
- window.dmesg = noop;
-
- var scheduler = parent;
-
- var textFace = 'monospace';
- var textSize = 12;
- function textLineHeight() { return Math.round(textSize * 4/3); }
-
- var dynamicCSS = null;
- function initDynamicCSS() {
- dynamicCSS = makeCSSManager("dynamicsyntax");
- }
-
- var changesetTracker = makeChangesetTracker(scheduler, rep.apool, {
- withCallbacks: function(operationName, f) {
- inCallStackIfNecessary(operationName, function() {
- fastIncorp(1);
- f({
- setDocumentAttributedText: function(atext) {
- setDocAText(atext);
- },
- applyChangesetToDocument: function(changeset, preferInsertionAfterCaret) {
- var oldEventType = currentCallStack.editEvent.eventType;
- currentCallStack.startNewEvent("nonundoable");
-
- performDocumentApplyChangeset(changeset, preferInsertionAfterCaret);
-
- currentCallStack.startNewEvent(oldEventType);
- }
- });
- });
- }
- });
-
- var authorInfos = {}; // presence of key determines if author is present in doc
-
- function setAuthorInfo(author, info) {
- if ((typeof author) != "string") {
- throw new Error("setAuthorInfo: author ("+author+") is not a string");
- }
- if (! info) {
- delete authorInfos[author];
- if (dynamicCSS) {
- dynamicCSS.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author)));
- }
- }
- else {
- authorInfos[author] = info;
- if (info.bgcolor) {
- if (dynamicCSS) {
- var bgcolor = info.bgcolor;
- if ((typeof info.fade) == "number") {
- bgcolor = fadeColor(bgcolor, info.fade);
- }
-
- dynamicCSS.selectorStyle(getAuthorColorClassSelector(
- getAuthorClassName(author))).backgroundColor = bgcolor;
- }
- }
- }
- }
-
- function getAuthorClassName(author) {
- return "author-"+author.replace(/[^a-y0-9]/g, function(c) {
- if (c == ".") return "-";
- return 'z'+c.charCodeAt(0)+'z';
- });
- }
- function className2Author(className) {
- if (className.substring(0,7) == "author-") {
- return className.substring(7).replace(/[a-y0-9]+|-|z.+?z/g, function(cc) {
- if (cc == '-') return '.';
- else if (cc.charAt(0) == 'z') {
- return String.fromCharCode(Number(cc.slice(1,-1)));
- }
- else {
- return cc;
- }
- });
- }
- return null;
- }
- function getAuthorColorClassSelector(oneClassName) {
- return ".authorColors ."+oneClassName;
- }
- function setUpTrackingCSS() {
- if (dynamicCSS) {
- var backgroundHeight = lineMetricsDiv.offsetHeight;
- var lineHeight = textLineHeight();
- var extraBodding = 0;
- var extraTodding = 0;
- if (backgroundHeight < lineHeight) {
- extraBodding = Math.ceil((lineHeight - backgroundHeight)/2);
- extraTodding = lineHeight - backgroundHeight - extraBodding;
- }
- var spanStyle = dynamicCSS.selectorStyle("#innerdocbody span");
- spanStyle.paddingTop = extraTodding+"px";
- spanStyle.paddingBottom = extraBodding+"px";
- }
- }
- function boldColorFromColor(lightColorCSS) {
- var color = colorutils.css2triple(lightColorCSS);
-
- // amp up the saturation to full
- color = colorutils.saturate(color);
-
- // normalize brightness based on luminosity
- color = colorutils.scaleColor(color, 0, 0.5 / colorutils.luminosity(color));
-
- return colorutils.triple2css(color);
- }
- function fadeColor(colorCSS, fadeFrac) {
- var color = colorutils.css2triple(colorCSS);
- color = colorutils.blend(color, [1,1,1], fadeFrac);
- return colorutils.triple2css(color);
- }
-
- function doAlert(str) {
- scheduler.setTimeout(function() { alert(str); }, 0);
- }
-
- var currentCallStack = null;
- function inCallStack(type, action) {
- if (disposed) return;
-
- if (currentCallStack) {
- console.error("Can't enter callstack "+type+", already in "+
- currentCallStack.type);
- }
-
- var profiling = false;
- function profileRest() {
- profiling = true;
- console.profile();
- }
-
- function newEditEvent(eventType) {
- return {eventType:eventType, backset: null};
- }
-
- function submitOldEvent(evt) {
- if (rep.selStart && rep.selEnd) {
- var selStartChar =
- rep.lines.offsetOfIndex(rep.selStart[0]) + rep.selStart[1];
- var selEndChar =
- rep.lines.offsetOfIndex(rep.selEnd[0]) + rep.selEnd[1];
- evt.selStart = selStartChar;
- evt.selEnd = selEndChar;
- evt.selFocusAtStart = rep.selFocusAtStart;
- }
- if (undoModule.enabled) {
- var undoWorked = false;
- try {
- if (evt.eventType == "setup" || evt.eventType == "importText" ||
- evt.eventType == "setBaseText") {
- undoModule.clearHistory();
- }
- else if (evt.eventType == "nonundoable") {
- if (evt.changeset) {
- undoModule.reportExternalChange(evt.changeset);
- }
- }
- else {
- undoModule.reportEvent(evt);
- }
- undoWorked = true;
- }
- finally {
- if (! undoWorked) {
- undoModule.enabled = false; // for safety
- }
- }
- }
- }
-
- function startNewEvent(eventType, dontSubmitOld) {
- var oldEvent = currentCallStack.editEvent;
- if (! dontSubmitOld) {
- submitOldEvent(oldEvent);
- }
- currentCallStack.editEvent = newEditEvent(eventType);
- return oldEvent;
- }
-
- currentCallStack = {type: type, docTextChanged: false, selectionAffected: false,
- userChangedSelection: false,
- domClean: false, profileRest:profileRest,
- isUserChange: false, // is this a "user change" type of call-stack
- repChanged: false, editEvent: newEditEvent(type),
- startNewEvent:startNewEvent};
- var cleanExit = false;
- var result;
- try {
- result = action();
- //console.log("Just did action for: "+type);
- cleanExit = true;
- }
- catch (e) {
- caughtErrors.push({error: e, time: +new Date()});
- dmesg(e.toString());
- throw e;
- }
- finally {
- var cs = currentCallStack;
- //console.log("Finished action for: "+type);
- if (cleanExit) {
- submitOldEvent(cs.editEvent);
- if (cs.domClean && cs.type != "setup") {
- if (cs.isUserChange) {
- if (cs.repChanged) parenModule.notifyChange();
- else parenModule.notifyTick();
- }
- recolorModule.recolorLines();
- if (cs.selectionAffected) {
- updateBrowserSelectionFromRep();
- }
- if ((cs.docTextChanged || cs.userChangedSelection) && cs.type != "applyChangesToBase") {
- scrollSelectionIntoView();
- }
- if (cs.docTextChanged && cs.type.indexOf("importText") < 0) {
- outsideNotifyDirty();
- }
- }
- }
- else {
- // non-clean exit
- if (currentCallStack.type == "idleWorkTimer") {
- idleWorkTimer.atLeast(1000);
- }
- }
- currentCallStack = null;
- if (profiling) console.profileEnd();
- }
- return result;
- }
-
- function inCallStackIfNecessary(type, action) {
- if (! currentCallStack) {
- inCallStack(type, action);
- }
- else {
- action();
- }
- }
-
- function recolorLineByKey(key) {
- if (rep.lines.containsKey(key)) {
- var offset = rep.lines.offsetOfKey(key);
- var width = rep.lines.atKey(key).width;
- recolorLinesInRange(offset, offset + width);
- }
- }
-
- function getLineKeyForOffset(charOffset) {
- return rep.lines.atOffset(charOffset).key;
- }
-
- var recolorModule = (function() {
- var dirtyLineKeys = {};
-
- var module = {};
- module.setCharNeedsRecoloring = function(offset) {
- if (offset >= rep.alltext.length) {
- offset = rep.alltext.length-1;
- }
- dirtyLineKeys[getLineKeyForOffset(offset)] = true;
- }
-
- module.setCharRangeNeedsRecoloring = function(offset1, offset2) {
- if (offset1 >= rep.alltext.length) {
- offset1 = rep.alltext.length-1;
- }
- if (offset2 >= rep.alltext.length) {
- offset2 = rep.alltext.length-1;
- }
- var firstEntry = rep.lines.atOffset(offset1);
- var lastKey = rep.lines.atOffset(offset2).key;
- dirtyLineKeys[lastKey] = true;
- var entry = firstEntry;
- while (entry && entry.key != lastKey) {
- dirtyLineKeys[entry.key] = true;
- entry = rep.lines.next(entry);
- }
- }
-
- module.recolorLines = function() {
- for(var k in dirtyLineKeys) {
- recolorLineByKey(k);
- }
- dirtyLineKeys = {};
- }
-
- return module;
- })();
-
- var parenModule = (function() {
- var module = {};
- module.notifyTick = function() { handleFlashing(false); };
- module.notifyChange = function() { handleFlashing(true); };
- module.shouldNormalizeOnChar = function (c) {
- if (parenFlashRep.active) {
- // avoid highlight style from carrying on to typed text
- return true;
- }
- c = String.fromCharCode(c);
- return !! (bracketMap[c]);
- }
-
- var parenFlashRep = { active: false, whichChars: null, whichLineKeys: null, expireTime: null };
- var bracketMap = {'(': 1, ')':-1, '[':2, ']':-2, '{':3, '}':-3};
- var bracketRegex = /[{}\[\]()]/g;
- function handleFlashing(docChanged) {
- function getSearchRange(aroundLoc) {
- var rng = getVisibleCharRange();
- var d = 100; // minimum radius
- var e = 3000; // maximum radius;
- if (rng[0] > aroundLoc-d) rng[0] = aroundLoc-d;
- if (rng[0] < aroundLoc-e) rng[0] = aroundLoc-e;
- if (rng[0] < 0) rng[0] = 0;
- if (rng[1] < aroundLoc+d) rng[1] = aroundLoc+d;
- if (rng[1] > aroundLoc+e) rng[1] = aroundLoc+e;
- if (rng[1] > rep.lines.totalWidth()) rng[1] = rep.lines.totalWidth();
- return rng;
- }
- function findMatchingVisibleBracket(startLoc, forwards) {
- var rng = getSearchRange(startLoc);
- var str = rep.alltext.substring(rng[0], rng[1]);
- var bstr = str.replace(bracketRegex, '('); // handy for searching
- var loc = startLoc - rng[0];
- var bracketState = [];
- var foundParen = false;
- var goodParen = false;
- function nextLoc() {
- if (loc < 0) return;
- if (forwards) loc++; else loc--;
- if (loc < 0 || loc >= str.length) loc = -1;
- if (loc >= 0) {
- if (forwards) loc = bstr.indexOf('(', loc);
- else loc = bstr.lastIndexOf('(', loc);
- }
- }
- while ((! foundParen) && (loc >= 0)) {
- if (getCharType(loc + rng[0]) == "p") {
- var b = bracketMap[str.charAt(loc)]; // -1, 1, -2, 2, -3, 3
- var into = forwards;
- var typ = b;
- if (typ < 0) { into = ! into; typ = -typ; }
- if (into) bracketState.push(typ);
- else {
- var recent = bracketState.pop();
- if (recent != typ) {
- foundParen = true; goodParen = false;
- }
- else if (bracketState.length == 0) {
- foundParen = true; goodParen = true;
- }
- }
- }
- //console.log(bracketState.toSource());
- if ((! foundParen) && (loc >= 0)) nextLoc();
- }
- if (! foundParen) return null;
- return {chr: (loc + rng[0]), good: goodParen};
- }
-
- var r = parenFlashRep;
- var charsToHighlight = null;
- var linesToUnhighlight = null;
- if (r.active && (docChanged || (now() > r.expireTime))) {
- linesToUnhighlight = r.whichLineKeys;
- r.active = false;
- }
- if ((! r.active) && docChanged && isCaret() && caretColumn() > 0) {
- var caret = caretDocChar();
- if (caret > 0 && getCharType(caret-1) == "p") {
- var charBefore = rep.alltext.charAt(caret-1);
- if (bracketMap[charBefore]) {
- var lookForwards = (bracketMap[charBefore] > 0);
- var findResult = findMatchingVisibleBracket(caret-1, lookForwards);
- if (findResult) {
- var mateLoc = findResult.chr;
- var mateGood = findResult.good;
- r.active = true;
- charsToHighlight = {};
- charsToHighlight[caret-1] = 'flash';
- charsToHighlight[mateLoc] = (mateGood ? 'flash' : 'flashbad');
- r.whichLineKeys = [];
- r.whichLineKeys.push(getLineKeyForOffset(caret-1));
- r.whichLineKeys.push(getLineKeyForOffset(mateLoc));
- r.expireTime = now() + 4000;
- newlyActive = true;
- }
- }
- }
-
- }
- if (linesToUnhighlight) {
- recolorLineByKey(linesToUnhighlight[0]);
- recolorLineByKey(linesToUnhighlight[1]);
- }
- if (r.active && charsToHighlight) {
- function f(txt, cls, next, ofst) {
- var flashClass = charsToHighlight[ofst];
- if (cls) {
- next(txt, cls+" "+flashClass);
- }
- else next(txt, cls);
- }
- for(var c in charsToHighlight) {
- recolorLinesInRange((+c), (+c)+1, null, f);
- }
- }
- }
-
- return module;
- })();
-
- function dispose() {
- disposed = true;
- if (idleWorkTimer) idleWorkTimer.never();
- teardown();
- }
-
- function checkALines() {
- return; // disable for speed
- function error() { throw new Error("checkALines"); }
- if (rep.alines.length != rep.lines.length()) {
- error();
- }
- for(var i=0;i<rep.alines.length;i++) {
- var aline = rep.alines[i];
- var lineText = rep.lines.atIndex(i).text+"\n";
- var lineTextLength = lineText.length;
- var opIter = Changeset.opIterator(aline);
- var alineLength = 0;
- while (opIter.hasNext()) {
- var o = opIter.next();
- alineLength += o.chars;
- if (opIter.hasNext()) {
- if (o.lines != 0) error();
- }
- else {
- if (o.lines != 1) error();
- }
- }
- if (alineLength != lineTextLength) {
- error();
- }
- }
- }
-
- function setWraps(newVal) {
- doesWrap = newVal;
- var dwClass = "doesWrap";
- setClassPresence(root, "doesWrap", doesWrap);
- scheduler.setTimeout(function() {
- inCallStackIfNecessary("setWraps", function() {
- fastIncorp(7);
- recreateDOM();
- fixView();
- });
- }, 0);
- }
-
- function setStyled(newVal) {
- var oldVal = isStyled;
- isStyled = !!newVal;
-
- if (newVal != oldVal) {
- if (! newVal) {
- // clear styles
- inCallStackIfNecessary("setStyled", function() {
- fastIncorp(12);
- var clearStyles = [];
- for(var k in STYLE_ATTRIBS) {
- clearStyles.push([k,'']);
- }
- performDocumentApplyAttributesToCharRange(0, rep.alltext.length, clearStyles);
- });
- }
- }
- }
-
- function setTextFace(face) {
- textFace = face;
- root.style.fontFamily = textFace;
- lineMetricsDiv.style.fontFamily = textFace;
- scheduler.setTimeout(function() {
- setUpTrackingCSS();
- }, 0);
- }
-
- function setTextSize(size) {
- textSize = size;
- root.style.fontSize = textSize+"px";
- root.style.lineHeight = textLineHeight()+"px";
- sideDiv.style.lineHeight = textLineHeight()+"px";
- lineMetricsDiv.style.fontSize = textSize+"px";
- scheduler.setTimeout(function() {
- setUpTrackingCSS();
- }, 0);
- }
-
- function recreateDOM() {
- // precond: normalized
- recolorLinesInRange(0, rep.alltext.length);
- }
-
- function setEditable(newVal) {
- isEditable = newVal;
-
- // the following may fail, e.g. if iframe is hidden
- if (! isEditable) {
- setDesignMode(false);
- }
- else {
- setDesignMode(true);
- }
- setClassPresence(root, "static", ! isEditable);
- }
-
- function enforceEditability() {
- setEditable(isEditable);
- }
-
- function importText(text, undoable, dontProcess) {
- var lines;
- if (dontProcess) {
- if (text.charAt(text.length-1) != "\n") {
- throw new Error("new raw text must end with newline");
- }
- if (/[\r\t\xa0]/.exec(text)) {
- throw new Error("new raw text must not contain CR, tab, or nbsp");
- }
- lines = text.substring(0, text.length-1).split('\n');
- }
- else {
- lines = map(text.split('\n'), textify);
- }
- var newText = "\n";
- if (lines.length > 0) {
- newText = lines.join('\n')+'\n';
- }
-
- inCallStackIfNecessary("importText"+(undoable?"Undoable":""), function() {
- setDocText(newText);
- });
-
- if (dontProcess && rep.alltext != text) {
- throw new Error("mismatch error setting raw text in importText");
- }
- }
-
- function importAText(atext, apoolJsonObj, undoable) {
- atext = Changeset.cloneAText(atext);
- if (apoolJsonObj) {
- var wireApool = (new AttribPool()).fromJsonable(apoolJsonObj);
- atext.attribs = Changeset.moveOpsToNewPool(atext.attribs, wireApool, rep.apool);
- }
- inCallStackIfNecessary("importText"+(undoable?"Undoable":""), function() {
- setDocAText(atext);
- });
- }
-
- function setDocAText(atext) {
- fastIncorp(8);
-
- var oldLen = rep.lines.totalWidth();
- var numLines = rep.lines.length();
- var upToLastLine = rep.lines.offsetOfIndex(numLines-1);
- var lastLineLength = rep.lines.atIndex(numLines-1).text.length;
- var assem = Changeset.smartOpAssembler();
- var o = Changeset.newOp('-');
- o.chars = upToLastLine;
- o.lines = numLines-1;
- assem.append(o);
- o.chars = lastLineLength;
- o.lines = 0;
- assem.append(o);
- Changeset.appendATextToAssembler(atext, assem);
- var newLen = oldLen + assem.getLengthChange();
- var changeset = Changeset.checkRep(
- Changeset.pack(oldLen, newLen, assem.toString(),
- atext.text.slice(0, -1)));
- performDocumentApplyChangeset(changeset);
-
- performSelectionChange([0,rep.lines.atIndex(0).lineMarker],
- [0,rep.lines.atIndex(0).lineMarker]);
-
- idleWorkTimer.atMost(100);
-
- if (rep.alltext != atext.text) {
- dmesg(htmlPrettyEscape(rep.alltext));
- dmesg(htmlPrettyEscape(atext.text));
- throw new Error("mismatch error setting raw text in setDocAText");
- }
- }
-
- function setDocText(text) {
- setDocAText(Changeset.makeAText(text));
- }
-
- function getDocText() {
- var alltext = rep.alltext;
- var len = alltext.length;
- if (len > 0) len--; // final extra newline
- return alltext.substring(0, len);
- }
-
- function exportText() {
- if (currentCallStack && ! currentCallStack.domClean) {
- inCallStackIfNecessary("exportText", function() { fastIncorp(2); });
- }
- return getDocText();
- }
-
- function editorChangedSize() {
- fixView();
- }
-
- function setOnKeyPress(handler) {
- outsideKeyPress = handler;
- }
-
- function setOnKeyDown(handler) {
- outsideKeyDown = handler;
- }
-
- function setNotifyDirty(handler) {
- outsideNotifyDirty = handler;
- }
-
- function getFormattedCode() {
- if (currentCallStack && ! currentCallStack.domClean) {
- inCallStackIfNecessary("getFormattedCode", incorporateUserChanges);
- }
- var buf = [];
- if (rep.lines.length() > 0) {
- // should be the case, even for empty file
- var entry = rep.lines.atIndex(0);
- while (entry) {
- var domInfo = entry.domInfo;
- buf.push((domInfo && domInfo.getInnerHTML()) ||
- domline.processSpaces(domline.escapeHTML(entry.text),
- doesWrap) ||
- '&nbsp;' /*empty line*/);
- entry = rep.lines.next(entry);
- }
- }
- return '<div class="syntax"><div>'+buf.join('</div>\n<div>')+
- '</div></div>';
- }
-
- var CMDS = {
- bold: function() { toggleAttributeOnSelection('bold'); },
- italic: function() { toggleAttributeOnSelection('italic'); },
- underline: function() { toggleAttributeOnSelection('underline'); },
- strikethrough: function() { toggleAttributeOnSelection('strikethrough'); },
- undo: function() { doUndoRedo('undo'); },
- redo: function() { doUndoRedo('redo'); },
- clearauthorship: function(prompt) {
- if ((!(rep.selStart && rep.selEnd)) || isCaret()) {
- if (prompt) {
- prompt();
- }
- else {
- performDocumentApplyAttributesToCharRange(0, rep.alltext.length,
- [['author', '']]);
- }
- }
- else {
- setAttributeOnSelection('author', '');
- }
- },
- insertunorderedlist: doInsertUnorderedList,
- indent: function() {
- if (! doIndentOutdent(false)) {
- doInsertUnorderedList();
- }
- },
- outdent: function() { doIndentOutdent(true); }
- };
-
- function execCommand(cmd) {
- cmd = cmd.toLowerCase();
- var cmdArgs = Array.prototype.slice.call(arguments, 1);
- if (CMDS[cmd]) {
- inCallStack(cmd, function() {
- fastIncorp(9);
- CMDS[cmd].apply(CMDS, cmdArgs);
- });
- }
- }
-
- editorInfo.ace_focus = focus;
- editorInfo.ace_importText = importText;
- editorInfo.ace_importAText = importAText;
- editorInfo.ace_exportText = exportText;
- editorInfo.ace_editorChangedSize = editorChangedSize;
- editorInfo.ace_setOnKeyPress = setOnKeyPress;
- editorInfo.ace_setOnKeyDown = setOnKeyDown;
- editorInfo.ace_setNotifyDirty = setNotifyDirty;
- editorInfo.ace_dispose = dispose;
- editorInfo.ace_getFormattedCode = getFormattedCode;
- editorInfo.ace_setEditable = setEditable;
- editorInfo.ace_execCommand = execCommand;
-
- editorInfo.ace_setProperty = function(key, value) {
- var k = key.toLowerCase();
- if (k == "wraps") {
- setWraps(value);
- }
- else if (k == "showsauthorcolors") {
- setClassPresence(root, "authorColors", !!value);
- }
- else if (k == "showsuserselections") {
- setClassPresence(root, "userSelections", !!value);
- }
- else if (k == "showslinenumbers") {
- hasLineNumbers = !!value;
- setClassPresence(sideDiv, "sidedivhidden", ! hasLineNumbers);
- fixView();
- }
- else if (k == "grayedout") {
- setClassPresence(outerWin.document.body, "grayedout", !!value);
- }
- else if (k == "dmesg") {
- dmesg = value;
- window.dmesg = value;
- }
- else if (k == 'userauthor') {
- thisAuthor = String(value);
- }
- else if (k == 'styled') {
- setStyled(value);
- }
- else if (k == 'textface') {
- setTextFace(value);
- }
- else if (k == 'textsize') {
- setTextSize(value);
- }
- }
-
- editorInfo.ace_setBaseText = function(txt) {
- changesetTracker.setBaseText(txt);
- };
- editorInfo.ace_setBaseAttributedText = function(atxt, apoolJsonObj) {
- setUpTrackingCSS();
- changesetTracker.setBaseAttributedText(atxt, apoolJsonObj);
- };
- editorInfo.ace_applyChangesToBase = function(c, optAuthor, apoolJsonObj) {
- changesetTracker.applyChangesToBase(c, optAuthor, apoolJsonObj);
- };
- editorInfo.ace_prepareUserChangeset = function() {
- return changesetTracker.prepareUserChangeset();
- };
- editorInfo.ace_applyPreparedChangesetToBase = function() {
- changesetTracker.applyPreparedChangesetToBase();
- };
- editorInfo.ace_setUserChangeNotificationCallback = function(f) {
- changesetTracker.setUserChangeNotificationCallback(f);
- };
- editorInfo.ace_setAuthorInfo = function(author, info) {
- setAuthorInfo(author, info);
- };
- editorInfo.ace_setAuthorSelectionRange = function(author, start, end) {
- changesetTracker.setAuthorSelectionRange(author, start, end);
- };
-
- editorInfo.ace_getUnhandledErrors = function() {
- return caughtErrors.slice();
- };
-
- editorInfo.ace_getDebugProperty = function(prop) {
- if (prop == "debugger") {
- // obfuscate "eval" so as not to scare yuicompressor
- window['ev'+'al']("debugger");
- }
- else if (prop == "rep") {
- return rep;
- }
- else if (prop == "window") {
- return window;
- }
- else if (prop == "document") {
- return document;
- }
- return undefined;
- };
-
- function now() { return (new Date()).getTime(); }
-
- function newTimeLimit(ms) {
- //console.debug("new time limit");
- var startTime = now();
- var lastElapsed = 0;
- var exceededAlready = false;
- var printedTrace = false;
- var isTimeUp = function () {
- if (exceededAlready) {
- if ((! printedTrace)) {// && now() - startTime - ms > 300) {
- //console.trace();
- printedTrace = true;
- }
- return true;
- }
- var elapsed = now() - startTime;
- if (elapsed > ms) {
- exceededAlready = true;
- //console.debug("time limit hit, before was %d/%d", lastElapsed, ms);
- //console.trace();
- return true;
- }
- else {
- lastElapsed = elapsed;
- return false;
- }
- }
- isTimeUp.elapsed = function() { return now() - startTime; }
- return isTimeUp;
- }
-
-
- function makeIdleAction(func) {
- var scheduledTimeout = null;
- var scheduledTime = 0;
- function unschedule() {
- if (scheduledTimeout) {
- scheduler.clearTimeout(scheduledTimeout);
- scheduledTimeout = null;
- }
- }
- function reschedule(time) {
- unschedule();
- scheduledTime = time;
- var delay = time - now();
- if (delay < 0) delay = 0;
- scheduledTimeout = scheduler.setTimeout(callback, delay);
- }
- function callback() {
- scheduledTimeout = null;
- // func may reschedule the action
- func();
- }
- return {
- atMost: function (ms) {
- var latestTime = now() + ms;
- if ((! scheduledTimeout) || scheduledTime > latestTime) {
- reschedule(latestTime);
- }
- },
- // atLeast(ms) will schedule the action if not scheduled yet.
- // In other words, "infinity" is replaced by ms, even though
- // it is technically larger.
- atLeast: function (ms) {
- var earliestTime = now()+ms;
- if ((! scheduledTimeout) || scheduledTime < earliestTime) {
- reschedule(earliestTime);
- }
- },
- never: function() {
- unschedule();
- }
- }
- }
-
- function fastIncorp(n) {
- // normalize but don't do any lexing or anything
- incorporateUserChanges(newTimeLimit(0));
- }
-
- function incorpIfQuick() {
- var me = incorpIfQuick;
- var failures = (me.failures || 0);
- if (failures < 5) {
- var isTimeUp = newTimeLimit(40);
- var madeChanges = incorporateUserChanges(isTimeUp);
- if (isTimeUp()) {
- me.failures = failures+1;
- }
- return true;
- }
- else {
- var skipCount = (me.skipCount || 0);
- skipCount++;
- if (skipCount == 20) {
- skipCount = 0;
- me.failures = 0;
- }
- me.skipCount = skipCount;
- }
- return false;
- }
-
- var idleWorkTimer = makeIdleAction(function() {
-
- //if (! top.BEFORE) top.BEFORE = [];
- //top.BEFORE.push(magicdom.root.dom.innerHTML);
-
- if (! isEditable) return; // and don't reschedule
-
- if (inInternationalComposition) {
- // don't do idle input incorporation during international input composition
- idleWorkTimer.atLeast(500);
- return;
- }
-
- inCallStack("idleWorkTimer", function() {
-
- var isTimeUp = newTimeLimit(250);
-
- //console.time("idlework");
-
- var finishedImportantWork = false;
- var finishedWork = false;
-
- try {
-
- // isTimeUp() is a soft constraint for incorporateUserChanges,
- // which always renormalizes the DOM, no matter how long it takes,
- // but doesn't necessarily lex and highlight it
- incorporateUserChanges(isTimeUp);
-
- if (isTimeUp()) return;
-
- updateLineNumbers(); // update line numbers if any time left
-
- if (isTimeUp()) return;
-
- var visibleRange = getVisibleCharRange();
- var docRange = [0, rep.lines.totalWidth()];
- //console.log("%o %o", docRange, visibleRange);
-
- finishedImportantWork = true;
- finishedWork = true;
- }
- finally {
- //console.timeEnd("idlework");
- if (finishedWork) {
- idleWorkTimer.atMost(1000);
- }
- else if (finishedImportantWork) {
- // if we've finished highlighting the view area,
- // more highlighting could be counter-productive,
- // e.g. if the user just opened a triple-quote and will soon close it.
- idleWorkTimer.atMost(500);
- }
- else {
- var timeToWait = Math.round(isTimeUp.elapsed() / 2);
- if (timeToWait < 100) timeToWait = 100;
- idleWorkTimer.atMost(timeToWait);
- }
- }
- });
-
- //if (! top.AFTER) top.AFTER = [];
- //top.AFTER.push(magicdom.root.dom.innerHTML);
-
- });
-
- var _nextId = 1;
- function uniqueId(n) {
- // not actually guaranteed to be unique, e.g. if user copy-pastes
- // nodes with ids
- var nid = n.id;
- if (nid) return nid;
- return (n.id = "magicdomid"+(_nextId++));
- }
-
-
- function recolorLinesInRange(startChar, endChar, isTimeUp, optModFunc) {
- if (endChar <= startChar) return;
- if (startChar < 0 || startChar >= rep.lines.totalWidth()) return;
- var lineEntry = rep.lines.atOffset(startChar); // rounds down to line boundary
- var lineStart = rep.lines.offsetOfEntry(lineEntry);
- var lineIndex = rep.lines.indexOfEntry(lineEntry);
- var selectionNeedsResetting = false;
- var firstLine = null;
- var lastLine = null;
- isTimeUp = (isTimeUp || noop);
-
- // tokenFunc function; accesses current value of lineEntry and curDocChar,
- // also mutates curDocChar
- var curDocChar;
- var tokenFunc = function(tokenText, tokenClass) {
- lineEntry.domInfo.appendSpan(tokenText, tokenClass);
- };
- if (optModFunc) {
- var f = tokenFunc;
- tokenFunc = function(tokenText, tokenClass) {
- optModFunc(tokenText, tokenClass, f, curDocChar);
- curDocChar += tokenText.length;
- };
- }
-
- while (lineEntry && lineStart < endChar && ! isTimeUp()) {
- //var timer = newTimeLimit(200);
- var lineEnd = lineStart + lineEntry.width;
-
- curDocChar = lineStart;
- lineEntry.domInfo.clearSpans();
- getSpansForLine(lineEntry, tokenFunc, lineStart);
- lineEntry.domInfo.finishUpdate();
-
- markNodeClean(lineEntry.lineNode);
-
- if (rep.selStart && rep.selStart[0] == lineIndex ||
- rep.selEnd && rep.selEnd[0] == lineIndex) {
- selectionNeedsResetting = true;
- }
-
- //if (timer()) console.dirxml(lineEntry.lineNode.dom);
-
- if (firstLine === null) firstLine = lineIndex;
- lastLine = lineIndex;
- lineStart = lineEnd;
- lineEntry = rep.lines.next(lineEntry);
- lineIndex++;
- }
- if (selectionNeedsResetting) {
- currentCallStack.selectionAffected = true;
- }
- //console.debug("Recolored line range %d-%d", firstLine, lastLine);
- }
-
- // like getSpansForRange, but for a line, and the func takes (text,class)
- // instead of (width,class); excludes the trailing '\n' from
- // consideration by func
- function getSpansForLine(lineEntry, textAndClassFunc, lineEntryOffsetHint) {
- var lineEntryOffset = lineEntryOffsetHint;
- if ((typeof lineEntryOffset) != "number") {
- lineEntryOffset = rep.lines.offsetOfEntry(lineEntry);
- }
- var text = lineEntry.text;
- var width = lineEntry.width; // text.length+1
-
- if (text.length == 0) {
- // allow getLineStyleFilter to set line-div styles
- var func = linestylefilter.getLineStyleFilter(
- 0, '', textAndClassFunc, rep.apool);
- func('', '');
- }
- else {
- var offsetIntoLine = 0;
- var filteredFunc = textAndClassFunc;
- filteredFunc = linestylefilter.getURLFilter(text, filteredFunc);
- if (browser.msie) {
- // IE7+ will take an e-mail address like <foo@bar.com> and linkify it to foo@bar.com.
- // We then normalize it back to text with no angle brackets. It's weird. So always
- // break spans at an "at" sign.
- filteredFunc = linestylefilter.getAtSignSplitterFilter(
- text, filteredFunc);
- }
- var lineNum = rep.lines.indexOfEntry(lineEntry);
- var aline = rep.alines[lineNum];
- filteredFunc = linestylefilter.getLineStyleFilter(
- text.length, aline, filteredFunc, rep.apool);
- filteredFunc(text, '');
- }
- }
-
-
- function getCharType(charIndex) {
- return '';
- }
-
- var observedChanges;
- function clearObservedChanges() {
- observedChanges = { cleanNodesNearChanges: {} };
- }
- clearObservedChanges();
-
- function getCleanNodeByKey(key) {
- var p = PROFILER("getCleanNodeByKey", false);
- p.extra = 0;
- var n = doc.getElementById(key);
- // copying and pasting can lead to duplicate ids
- while (n && isNodeDirty(n)) {
- p.extra++;
- n.id = "";
- n = doc.getElementById(key);
- }
- p.literal(p.extra, "extra");
- p.end();
- return n;
- }
-
- function observeChangesAroundNode(node) {
- // Around this top-level DOM node, look for changes to the document
- // (from how it looks in our representation) and record them in a way
- // that can be used to "normalize" the document (apply the changes to our
- // representation, and put the DOM in a canonical form).
-
- //top.console.log("observeChangesAroundNode(%o)", node);
-
- var cleanNode;
- var hasAdjacentDirtyness;
- if (! isNodeDirty(node)) {
- cleanNode = node;
- var prevSib = cleanNode.previousSibling;
- var nextSib = cleanNode.nextSibling;
- hasAdjacentDirtyness = ((prevSib && isNodeDirty(prevSib))
- || (nextSib && isNodeDirty(nextSib)));
- }
- else {
- // node is dirty, look for clean node above
- var upNode = node.previousSibling;
- while (upNode && isNodeDirty(upNode)) {
- upNode = upNode.previousSibling;
- }
- if (upNode) {
- cleanNode = upNode;
- }
- else {
- var downNode = node.nextSibling;
- while (downNode && isNodeDirty(downNode)) {
- downNode = downNode.nextSibling;
- }
- if (downNode) {
- cleanNode = downNode;
- }
- }
- if (! cleanNode) {
- // Couldn't find any adjacent clean nodes!
- // Since top and bottom of doc is dirty, the dirty area will be detected.
- return;
- }
- hasAdjacentDirtyness = true;
- }
-
- if (hasAdjacentDirtyness) {
- // previous or next line is dirty
- observedChanges.cleanNodesNearChanges['$'+uniqueId(cleanNode)] = true;
- }
- else {
- // next and prev lines are clean (if they exist)
- var lineKey = uniqueId(cleanNode);
- var prevSib = cleanNode.previousSibling;
- var nextSib = cleanNode.nextSibling;
- var actualPrevKey = ((prevSib && uniqueId(prevSib)) || null);
- var actualNextKey = ((nextSib && uniqueId(nextSib)) || null);
- var repPrevEntry = rep.lines.prev(rep.lines.atKey(lineKey));
- var repNextEntry = rep.lines.next(rep.lines.atKey(lineKey));
- var repPrevKey = ((repPrevEntry && repPrevEntry.key) || null);
- var repNextKey = ((repNextEntry && repNextEntry.key) || null);
- if (actualPrevKey != repPrevKey || actualNextKey != repNextKey) {
- observedChanges.cleanNodesNearChanges['$'+uniqueId(cleanNode)] = true;
- }
- }
- }
-
- function observeChangesAroundSelection() {
- if (currentCallStack.observedSelection) return;
- currentCallStack.observedSelection = true;
-
- var p = PROFILER("getSelection", false);
- var selection = getSelection();
- p.end();
- if (selection) {
- function topLevel(n) {
- if ((!n) || n == root) return null;
- while (n.parentNode != root) {
- n = n.parentNode;
- }
- return n;
- }
- var node1 = topLevel(selection.startPoint.node);
- var node2 = topLevel(selection.endPoint.node);
- if (node1) observeChangesAroundNode(node1);
- if (node2 && node1 != node2) {
- observeChangesAroundNode(node2);
- }
- }
- }
-
- function observeSuspiciousNodes() {
- // inspired by Firefox bug #473255, where pasting formatted text
- // causes the cursor to jump away, making the new HTML never found.
- if (root.getElementsByTagName) {
- var nds = root.getElementsByTagName("style");
- for(var i=0;i<nds.length;i++) {
- var n = nds[i];
- while (n.parentNode && n.parentNode != root) {
- n = n.parentNode;
- }
- if (n.parentNode == root) {
- observeChangesAroundNode(n);
- }
- }
- }
- }
-
- function incorporateUserChanges(isTimeUp) {
-
- if (currentCallStack.domClean) return false;
-
- inInternationalComposition = false; // if we need the document normalized, so be it
-
- currentCallStack.isUserChange = true;
-
- isTimeUp = (isTimeUp || function() { return false; });
-
- if (DEBUG && top.DONT_INCORP || window.DEBUG_DONT_INCORP) return false;
-
- var p = PROFILER("incorp", false);
-
- //if (doc.body.innerHTML.indexOf("AppJet") >= 0)
- //dmesg(htmlPrettyEscape(doc.body.innerHTML));
- //if (top.RECORD) top.RECORD.push(doc.body.innerHTML);
-
- // returns true if dom changes were made
-
- if (! root.firstChild) {
- root.innerHTML = "<div><!-- --></div>";
- }
-
- p.mark("obs");
- observeChangesAroundSelection();
- observeSuspiciousNodes();
- p.mark("dirty");
- var dirtyRanges = getDirtyRanges();
- //console.log("dirtyRanges: "+toSource(dirtyRanges));
-
- var dirtyRangesCheckOut = true;
- var j = 0;
- var a,b;
- while (j < dirtyRanges.length) {
- a = dirtyRanges[j][0];
- b = dirtyRanges[j][1];
- if (! ((a == 0 || getCleanNodeByKey(rep.lines.atIndex(a-1).key)) &&
- (b == rep.lines.length() || getCleanNodeByKey(rep.lines.atIndex(b).key)))) {
- dirtyRangesCheckOut = false;
- break;
- }
- j++;
- }
- if (! dirtyRangesCheckOut) {
- var numBodyNodes = root.childNodes.length;
- for(var k=0;k<numBodyNodes;k++) {
- var bodyNode = root.childNodes.item(k);
- if ((bodyNode.tagName) && ((! bodyNode.id) || (! rep.lines.containsKey(bodyNode.id)))) {
- observeChangesAroundNode(bodyNode);
- }
- }
- dirtyRanges = getDirtyRanges();
- }
-
- clearObservedChanges();
-
- p.mark("getsel");
- var selection = getSelection();
-
- //console.log(magicdom.root.dom.innerHTML);
- //console.log("got selection: %o", selection);
- var selStart, selEnd; // each one, if truthy, has [line,char] needed to set selection
-
- var i = 0;
- var splicesToDo = [];
- var netNumLinesChangeSoFar = 0;
- var toDeleteAtEnd = [];
- p.mark("ranges");
- p.literal(dirtyRanges.length, "numdirt");
- var domInsertsNeeded = []; // each entry is [nodeToInsertAfter, [info1, info2, ...]]
- while (i < dirtyRanges.length) {
- var range = dirtyRanges[i];
- a = range[0];
- b = range[1];
- var firstDirtyNode = (((a == 0) && root.firstChild) ||
- getCleanNodeByKey(rep.lines.atIndex(a-1).key).nextSibling);
- firstDirtyNode = (firstDirtyNode && isNodeDirty(firstDirtyNode) && firstDirtyNode);
- var lastDirtyNode = (((b == rep.lines.length()) && root.lastChild) ||
- getCleanNodeByKey(rep.lines.atIndex(b).key).previousSibling);
- lastDirtyNode = (lastDirtyNode && isNodeDirty(lastDirtyNode) && lastDirtyNode);
- if (firstDirtyNode && lastDirtyNode) {
- var cc = makeContentCollector(isStyled, browser, rep.apool, null,
- className2Author);
- cc.notifySelection(selection);
- var dirtyNodes = [];
- for(var n = firstDirtyNode; n && ! (n.previousSibling &&
- n.previousSibling == lastDirtyNode);
- n = n.nextSibling) {
- if (browser.msie) {
- // try to undo IE's pesky and overzealous linkification
- try { n.createTextRange().execCommand("unlink", false, null); }
- catch (e) {}
- }
- cc.collectContent(n);
- dirtyNodes.push(n);
- }
- cc.notifyNextNode(lastDirtyNode.nextSibling);
- var lines = cc.getLines();
- if ((lines.length <= 1 || lines[lines.length-1] !== "")
- && lastDirtyNode.nextSibling) {
- // dirty region doesn't currently end a line, even taking the following node
- // (or lack of node) into account, so include the following clean node.
- // It could be SPAN or a DIV; basically this is any case where the contentCollector
- // decides it isn't done.
- // Note that this clean node might need to be there for the next dirty range.
- //console.log("inclusive of "+lastDirtyNode.next().dom.tagName);
- b++;
- var cleanLine = lastDirtyNode.nextSibling;
- cc.collectContent(cleanLine);
- toDeleteAtEnd.push(cleanLine);
- cc.notifyNextNode(cleanLine.nextSibling);
- }
-
- var ccData = cc.finish();
- var ss = ccData.selStart;
- var se = ccData.selEnd;
- lines = ccData.lines;
- var lineAttribs = ccData.lineAttribs;
- var linesWrapped = ccData.linesWrapped;
-
- if (linesWrapped > 0) {
- doAlert("Editor warning: "+linesWrapped+" long line"+
- (linesWrapped == 1 ? " was" : "s were")+" hard-wrapped into "+
- ccData.numLinesAfter
- +" lines.");
- }
-
- if (ss[0] >= 0) selStart = [ss[0]+a+netNumLinesChangeSoFar, ss[1]];
- if (se[0] >= 0) selEnd = [se[0]+a+netNumLinesChangeSoFar, se[1]];
-
- /*var oldLines = rep.alltext.substring(rep.lines.offsetOfIndex(a),
- rep.lines.offsetOfIndex(b));
- var newLines = lines.join('\n')+'\n';
- dmesg("OLD: "+htmlPrettyEscape(oldLines));
- dmesg("NEW: "+htmlPrettyEscape(newLines));*/
-
- var entries = [];
- var nodeToAddAfter = lastDirtyNode;
- var lineNodeInfos = new Array(lines.length);
- for(var k=0;k<lines.length;k++) {
- var lineString = lines[k];
- var newEntry = createDomLineEntry(lineString);
- entries.push(newEntry);
- lineNodeInfos[k] = newEntry.domInfo;
- }
- //var fragment = magicdom.wrapDom(document.createDocumentFragment());
- domInsertsNeeded.push([nodeToAddAfter, lineNodeInfos]);
- forEach(dirtyNodes, function (n) { toDeleteAtEnd.push(n); });
- var spliceHints = {};
- if (selStart) spliceHints.selStart = selStart;
- if (selEnd) spliceHints.selEnd = selEnd;
- splicesToDo.push([a+netNumLinesChangeSoFar, b-a, entries, lineAttribs, spliceHints]);
- netNumLinesChangeSoFar += (lines.length - (b-a));
- }
- else if (b > a) {
- splicesToDo.push([a+netNumLinesChangeSoFar, b-a, [], []]);
- }
- i++;
- }
-
- var domChanges = (splicesToDo.length > 0);
-
- // update the representation
- p.mark("splice");
- forEach(splicesToDo, function (splice) {
- doIncorpLineSplice(splice[0], splice[1], splice[2], splice[3], splice[4]);
- });
-
- //p.mark("relex");
- //rep.lexer.lexCharRange(getVisibleCharRange(), function() { return false; });
- //var isTimeUp = newTimeLimit(100);
-
- // do DOM inserts
- p.mark("insert");
- forEach(domInsertsNeeded, function (ins) {
- insertDomLines(ins[0], ins[1], isTimeUp);
- });
-
- p.mark("del");
- // delete old dom nodes
- forEach(toDeleteAtEnd, function (n) {
- //var id = n.uniqueId();
-
- // parent of n may not be "root" in IE due to non-tree-shaped DOM (wtf)
- n.parentNode.removeChild(n);
-
- //dmesg(htmlPrettyEscape(htmlForRemovedChild(n)));
- //console.log("removed: "+id);
- });
-
- p.mark("findsel");
- // if the nodes that define the selection weren't encountered during
- // content collection, figure out where those nodes are now.
- if (selection && !selStart) {
- //if (domChanges) dmesg("selection not collected");
- selStart = getLineAndCharForPoint(selection.startPoint);
- }
- if (selection && !selEnd) {
- selEnd = getLineAndCharForPoint(selection.endPoint);
- }
-
- // selection from content collection can, in various ways, extend past final
- // BR in firefox DOM, so cap the line
- var numLines = rep.lines.length();
- if (selStart && selStart[0] >= numLines) {
- selStart[0] = numLines-1;
- selStart[1] = rep.lines.atIndex(selStart[0]).text.length;
- }
- if (selEnd && selEnd[0] >= numLines) {
- selEnd[0] = numLines-1;
- selEnd[1] = rep.lines.atIndex(selEnd[0]).text.length;
- }
-
- p.mark("repsel");
- // update rep
- repSelectionChange(selStart, selEnd, selection && selection.focusAtStart);
- // update browser selection
- p.mark("browsel");
- if (selection && (domChanges || isCaret())) {
- // if no DOM changes (not this case), want to treat range selection delicately,
- // e.g. in IE not lose which end of the selection is the focus/anchor;
- // on the other hand, we may have just noticed a press of PageUp/PageDown
- currentCallStack.selectionAffected = true;
- }
-
- currentCallStack.domClean = true;
-
- p.mark("fixview");
-
- fixView();
-
- p.end("END");
-
- return domChanges;
- }
-
- function htmlForRemovedChild(n) {
- var div = doc.createElement("DIV");
- div.appendChild(n);
- return div.innerHTML;
- }
-
- var STYLE_ATTRIBS = {bold: true, italic: true, underline: true,
- strikethrough: true, list: true};
- var OTHER_INCORPED_ATTRIBS = {insertorder: true, author: true};
-
- function isStyleAttribute(aname) {
- return !! STYLE_ATTRIBS[aname];
- }
- function isIncorpedAttribute(aname) {
- return (!! STYLE_ATTRIBS[aname]) || (!! OTHER_INCORPED_ATTRIBS[aname]);
- }
-
- function insertDomLines(nodeToAddAfter, infoStructs, isTimeUp) {
- isTimeUp = (isTimeUp || function() { return false; });
-
- var lastEntry;
- var lineStartOffset;
- if (infoStructs.length < 1) return;
- var startEntry = rep.lines.atKey(uniqueId(infoStructs[0].node));
- var endEntry = rep.lines.atKey(uniqueId(infoStructs[infoStructs.length-1].node));
- var charStart = rep.lines.offsetOfEntry(startEntry);
- var charEnd = rep.lines.offsetOfEntry(endEntry) + endEntry.width;
-
- //rep.lexer.lexCharRange([charStart, charEnd], isTimeUp);
-
- forEach(infoStructs, function (info) {
- var p2 = PROFILER("insertLine", false);
- var node = info.node;
- var key = uniqueId(node);
- var entry;
- p2.mark("findEntry");
- if (lastEntry) {
- // optimization to avoid recalculation
- var next = rep.lines.next(lastEntry);
- if (next && next.key == key) {
- entry = next;
- lineStartOffset += lastEntry.width;
- }
- }
- if (! entry) {
- p2.literal(1, "nonopt");
- entry = rep.lines.atKey(key);
- lineStartOffset = rep.lines.offsetOfKey(key);
- }
- else p2.literal(0, "nonopt");
- lastEntry = entry;
- p2.mark("spans");
- getSpansForLine(entry, function (tokenText, tokenClass) {
- info.appendSpan(tokenText, tokenClass);
- }, lineStartOffset, isTimeUp());
- //else if (entry.text.length > 0) {
- //info.appendSpan(entry.text, 'dirty');
- //}
- p2.mark("addLine");
- info.prepareForAdd();
- entry.lineMarker = info.lineMarker;
- if (! nodeToAddAfter) {
- root.insertBefore(node, root.firstChild);
- }
- else {
- root.insertBefore(node, nodeToAddAfter.nextSibling);
- }
- nodeToAddAfter = node;
- info.notifyAdded();
- p2.mark("markClean");
- markNodeClean(node);
- p2.end();
- });
- }
-
- function isCaret() {
- return (rep.selStart && rep.selEnd && rep.selStart[0] == rep.selEnd[0] &&
- rep.selStart[1] == rep.selEnd[1]);
- }
-
- // prereq: isCaret()
- function caretLine() { return rep.selStart[0]; }
- function caretColumn() { return rep.selStart[1]; }
- function caretDocChar() {
- return rep.lines.offsetOfIndex(caretLine()) + caretColumn();
- }
-
- function handleReturnIndentation() {
- // on return, indent to level of previous line
- if (isCaret() && caretColumn() == 0 && caretLine() > 0) {
- var lineNum = caretLine();
- var thisLine = rep.lines.atIndex(lineNum);
- var prevLine = rep.lines.prev(thisLine);
- var prevLineText = prevLine.text;
- var theIndent = /^ *(?:)/.exec(prevLineText)[0];
- if (/[\[\(\{]\s*$/.exec(prevLineText)) theIndent += THE_TAB;
- var cs = Changeset.builder(rep.lines.totalWidth()).keep(
- rep.lines.offsetOfIndex(lineNum), lineNum).insert(
- theIndent, [['author',thisAuthor]], rep.apool).toString();
- performDocumentApplyChangeset(cs);
- performSelectionChange([lineNum, theIndent.length], [lineNum, theIndent.length]);
- }
- }
-
-
- function setupMozillaCaretHack(lineNum) {
- // This is really ugly, but by god, it works!
- // Fixes annoying Firefox caret artifact (observed in 2.0.0.12
- // and unfixed in Firefox 2 as of now) where mutating the DOM
- // and then moving the caret to the beginning of a line causes
- // an image of the caret to be XORed at the top of the iframe.
- // The previous solution involved remembering to set the selection
- // later, in response to the next event in the queue, which was hugely
- // annoying.
- // This solution: add a space character (0x20) to the beginning of the line.
- // After setting the selection, remove the space.
- var lineNode = rep.lines.atIndex(lineNum).lineNode;
-
- var fc = lineNode.firstChild;
- while (isBlockElement(fc) && fc.firstChild) {
- fc = fc.firstChild;
- }
- var textNode;
- if (isNodeText(fc)) {
- fc.nodeValue = " "+fc.nodeValue;
- textNode = fc;
- }
- else {
- textNode = doc.createTextNode(" ");
- fc.parentNode.insertBefore(textNode, fc);
- }
- markNodeClean(lineNode);
- return { unhack: function() {
- if (textNode.nodeValue == " ") {
- textNode.parentNode.removeChild(textNode);
- }
- else {
- textNode.nodeValue = textNode.nodeValue.substring(1);
- }
- markNodeClean(lineNode);
- } };
- }
-
-
- function getPointForLineAndChar(lineAndChar) {
- var line = lineAndChar[0];
- var charsLeft = lineAndChar[1];
- //console.log("line: %d, key: %s, node: %o", line, rep.lines.atIndex(line).key,
- //getCleanNodeByKey(rep.lines.atIndex(line).key));
- var lineEntry = rep.lines.atIndex(line);
- charsLeft -= lineEntry.lineMarker;
- if (charsLeft < 0) {
- charsLeft = 0;
- }
- var lineNode = lineEntry.lineNode;
- var n = lineNode;
- var after = false;
- if (charsLeft == 0) {
- var index = 0;
- if (browser.msie && line == (rep.lines.length()-1) && lineNode.childNodes.length == 0) {
- // best to stay at end of last empty div in IE
- index = 1;
- }
- return {node: lineNode, index:index, maxIndex:1};
- }
- while (!(n == lineNode && after)) {
- if (after) {
- if (n.nextSibling) {
- n = n.nextSibling;
- after = false;
- }
- else n = n.parentNode;
- }
- else {
- if (isNodeText(n)) {
- var len = n.nodeValue.length;
- if (charsLeft <= len) {
- return {node: n, index:charsLeft, maxIndex:len};
- }
- charsLeft -= len;
- after = true;
- }
- else {
- if (n.firstChild) n = n.firstChild;
- else after = true;
- }
- }
- }
- return {node: lineNode, index:1, maxIndex:1};
- }
-
- function nodeText(n) {
- return n.innerText || n.textContent || n.nodeValue || '';
- }
-
- function getLineAndCharForPoint(point) {
- // Turn DOM node selection into [line,char] selection.
- // This method has to work when the DOM is not pristine,
- // assuming the point is not in a dirty node.
- if (point.node == root) {
- if (point.index == 0) {
- return [0, 0];
- }
- else {
- var N = rep.lines.length();
- var ln = rep.lines.atIndex(N-1);
- return [N-1, ln.text.length];
- }
- }
- else {
- var n = point.node;
- var col = 0;
- // if this part fails, it probably means the selection node
- // was dirty, and we didn't see it when collecting dirty nodes.
- if (isNodeText(n)) {
- col = point.index;
- }
- else if (point.index > 0) {
- col = nodeText(n).length;
- }
- var parNode, prevSib;
- while ((parNode = n.parentNode) != root) {
- if ((prevSib = n.previousSibling)) {
- n = prevSib;
- col += nodeText(n).length;
- }
- else {
- n = parNode;
- }
- }
- if (n.id == "") console.debug("BAD");
- if (n.firstChild && isBlockElement(n.firstChild)) {
- col += 1; // lineMarker
- }
- var lineEntry = rep.lines.atKey(n.id);
- var lineNum = rep.lines.indexOfEntry(lineEntry);
- return [lineNum, col];
- }
- }
-
- function createDomLineEntry(lineString) {
- var info = doCreateDomLine(lineString.length > 0);
- var newNode = info.node;
- return {key: uniqueId(newNode), text: lineString, lineNode: newNode,
- domInfo: info, lineMarker: 0};
- }
-
- function canApplyChangesetToDocument(changes) {
- return Changeset.oldLen(changes) == rep.alltext.length;
- }
-
- function performDocumentApplyChangeset(changes, insertsAfterSelection) {
- doRepApplyChangeset(changes, insertsAfterSelection);
-
- var requiredSelectionSetting = null;
- if (rep.selStart && rep.selEnd) {
- var selStartChar = rep.lines.offsetOfIndex(rep.selStart[0]) + rep.selStart[1];
- var selEndChar = rep.lines.offsetOfIndex(rep.selEnd[0]) + rep.selEnd[1];
- var result = Changeset.characterRangeFollow(changes, selStartChar, selEndChar,
- insertsAfterSelection);
- requiredSelectionSetting = [result[0], result[1], rep.selFocusAtStart];
- }
-
- var linesMutatee = {
- splice: function(start, numRemoved, newLinesVA) {
- domAndRepSplice(start, numRemoved,
- map(Array.prototype.slice.call(arguments, 2),
- function(s) { return s.slice(0,-1); }),
- null);
- },
- get: function(i) { return rep.lines.atIndex(i).text+'\n'; },
- length: function() { return rep.lines.length(); },
- slice_notused: function(start, end) {
- return map(rep.lines.slice(start, end), function(e) { return e.text+'\n'; });
- }
- };
-
- Changeset.mutateTextLines(changes, linesMutatee);
-
- checkALines();
-
- if (requiredSelectionSetting) {
- performSelectionChange(lineAndColumnFromChar(requiredSelectionSetting[0]),
- lineAndColumnFromChar(requiredSelectionSetting[1]),
- requiredSelectionSetting[2]);
- }
-
- function domAndRepSplice(startLine, deleteCount, newLineStrings, isTimeUp) {
- // dgreensp 3/2009: the spliced lines may be in the middle of a dirty region,
- // so if no explicit time limit, don't spend a lot of time highlighting
- isTimeUp = (isTimeUp || newTimeLimit(50));
-
- var keysToDelete = [];
- if (deleteCount > 0) {
- var entryToDelete = rep.lines.atIndex(startLine);
- for(var i=0;i<deleteCount;i++) {
- keysToDelete.push(entryToDelete.key);
- entryToDelete = rep.lines.next(entryToDelete);
- }
- }
-
- var lineEntries = map(newLineStrings, createDomLineEntry);
-
- doRepLineSplice(startLine, deleteCount, lineEntries);
-
- var nodeToAddAfter;
- if (startLine > 0) {
- nodeToAddAfter = getCleanNodeByKey(rep.lines.atIndex(startLine-1).key);
- }
- else nodeToAddAfter = null;
-
- insertDomLines(nodeToAddAfter, map(lineEntries, function (entry) { return entry.domInfo; }),
- isTimeUp);
-
- forEach(keysToDelete, function (k) {
- var n = doc.getElementById(k);
- n.parentNode.removeChild(n);
- });
-
- if ((rep.selStart && rep.selStart[0] >= startLine && rep.selStart[0] <= startLine+deleteCount) ||
- (rep.selEnd && rep.selEnd[0] >= startLine && rep.selEnd[0] <= startLine+deleteCount)) {
- currentCallStack.selectionAffected = true;
- }
- }
- }
-
- function checkChangesetLineInformationAgainstRep(changes) {
- return true; // disable for speed
- var opIter = Changeset.opIterator(Changeset.unpack(changes).ops);
- var curOffset = 0;
- var curLine = 0;
- var curCol = 0;
- while (opIter.hasNext()) {
- var o = opIter.next();
- if (o.opcode == '-' || o.opcode == '=') {
- curOffset += o.chars;
- if (o.lines) {
- curLine += o.lines;
- curCol = 0;
- }
- else {
- curCol += o.chars;
- }
- }
- var calcLine = rep.lines.indexOfOffset(curOffset);
- var calcLineStart = rep.lines.offsetOfIndex(calcLine);
- var calcCol = curOffset - calcLineStart;
- if (calcCol != curCol || calcLine != curLine) {
- return false;
- }
- }
- return true;
- }
-
- function doRepApplyChangeset(changes, insertsAfterSelection) {
- Changeset.checkRep(changes);
-
- if (Changeset.oldLen(changes) != rep.alltext.length)
- throw new Error("doRepApplyChangeset length mismatch: "+
- Changeset.oldLen(changes)+"/"+rep.alltext.length);
-
- if (! checkChangesetLineInformationAgainstRep(changes)) {
- throw new Error("doRepApplyChangeset line break mismatch");
- }
-
- (function doRecordUndoInformation(changes) {
- var editEvent = currentCallStack.editEvent;
- if (editEvent.eventType == "nonundoable") {
- if (! editEvent.changeset) {
- editEvent.changeset = changes;
- }
- else {
- editEvent.changeset = Changeset.compose(editEvent.changeset, changes,
- rep.apool);
- }
- }
- else {
- var inverseChangeset = Changeset.inverse(changes, {get: function(i) {
- return rep.lines.atIndex(i).text+'\n';
- }, length: function() { return rep.lines.length(); }},
- rep.alines, rep.apool);
-
- if (! editEvent.backset) {
- editEvent.backset = inverseChangeset;
- }
- else {
- editEvent.backset = Changeset.compose(inverseChangeset,
- editEvent.backset, rep.apool);
- }
- }
- })(changes);
-
- //rep.alltext = Changeset.applyToText(changes, rep.alltext);
- Changeset.mutateAttributionLines(changes, rep.alines, rep.apool);
-
- if (changesetTracker.isTracking()) {
- changesetTracker.composeUserChangeset(changes);
- }
-
- }
-
- function lineAndColumnFromChar(x) {
- var lineEntry = rep.lines.atOffset(x);
- var lineStart = rep.lines.offsetOfEntry(lineEntry);
- var lineNum = rep.lines.indexOfEntry(lineEntry);
- return [lineNum, x - lineStart];
- }
-
- function performDocumentReplaceCharRange(startChar, endChar, newText) {
- if (startChar == endChar && newText.length == 0) {
- return;
- }
- // Requires that the replacement preserve the property that the
- // internal document text ends in a newline. Given this, we
- // rewrite the splice so that it doesn't touch the very last
- // char of the document.
- if (endChar == rep.alltext.length) {
- if (startChar == endChar) {
- // an insert at end
- startChar--;
- endChar--;
- newText = '\n'+newText.substring(0, newText.length-1);
- }
- else if (newText.length == 0) {
- // a delete at end
- startChar--;
- endChar--;
- }
- else {
- // a replace at end
- endChar--;
- newText = newText.substring(0, newText.length-1);
- }
- }
- performDocumentReplaceRange(lineAndColumnFromChar(startChar),
- lineAndColumnFromChar(endChar),
- newText);
- }
-
- function performDocumentReplaceRange(start, end, newText) {
- //dmesg(String([start.toSource(),end.toSource(),newText.toSource()]));
-
- // start[0]: <--- start[1] --->CCCCCCCCCCC\n
- // CCCCCCCCCCCCCCCCCCCC\n
- // CCCC\n
- // end[0]: <CCC end[1] CCC>-------\n
-
- var builder = Changeset.builder(rep.lines.totalWidth());
- buildKeepToStartOfRange(builder, start);
- buildRemoveRange(builder, start, end);
- builder.insert(newText, [['author',thisAuthor]], rep.apool);
- var cs = builder.toString();
-
- performDocumentApplyChangeset(cs);
- }
-
- function performDocumentApplyAttributesToCharRange(start, end, attribs) {
- if (end >= rep.alltext.length) {
- end = rep.alltext.length-1;
- }
- performDocumentApplyAttributesToRange(lineAndColumnFromChar(start),
- lineAndColumnFromChar(end), attribs);
- }
-
- function performDocumentApplyAttributesToRange(start, end, attribs) {
- var builder = Changeset.builder(rep.lines.totalWidth());
- buildKeepToStartOfRange(builder, start);
- buildKeepRange(builder, start, end, attribs, rep.apool);
- var cs = builder.toString();
- performDocumentApplyChangeset(cs);
- }
-
- function buildKeepToStartOfRange(builder, start) {
- var startLineOffset = rep.lines.offsetOfIndex(start[0]);
-
- builder.keep(startLineOffset, start[0]);
- builder.keep(start[1]);
- }
- function buildRemoveRange(builder, start, end) {
- var startLineOffset = rep.lines.offsetOfIndex(start[0]);
- var endLineOffset = rep.lines.offsetOfIndex(end[0]);
-
- if (end[0] > start[0]) {
- builder.remove(endLineOffset - startLineOffset - start[1], end[0] - start[0]);
- builder.remove(end[1]);
- }
- else {
- builder.remove(end[1] - start[1]);
- }
- }
- function buildKeepRange(builder, start, end, attribs, pool) {
- var startLineOffset = rep.lines.offsetOfIndex(start[0]);
- var endLineOffset = rep.lines.offsetOfIndex(end[0]);
-
- if (end[0] > start[0]) {
- builder.keep(endLineOffset - startLineOffset - start[1], end[0] - start[0], attribs, pool);
- builder.keep(end[1], 0, attribs, pool);
- }
- else {
- builder.keep(end[1] - start[1], 0, attribs, pool);
- }
- }
-
- function setAttributeOnSelection(attributeName, attributeValue) {
- if (!(rep.selStart && rep.selEnd)) return;
-
- performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd,
- [[attributeName, attributeValue]]);
- }
-
- function toggleAttributeOnSelection(attributeName) {
- if (!(rep.selStart && rep.selEnd)) return;
-
- var selectionAllHasIt = true;
- var withIt = Changeset.makeAttribsString('+', [[attributeName, 'true']], rep.apool);
- var withItRegex = new RegExp(withIt.replace(/\*/g,'\\*')+"(\\*|$)");
- function hasIt(attribs) { return withItRegex.test(attribs); }
-
- var selStartLine = rep.selStart[0];
- var selEndLine = rep.selEnd[0];
- for(var n=selStartLine; n<=selEndLine; n++) {
- var opIter = Changeset.opIterator(rep.alines[n]);
- var indexIntoLine = 0;
- var selectionStartInLine = 0;
- var selectionEndInLine = rep.lines.atIndex(n).text.length; // exclude newline
- if (n == selStartLine) {
- selectionStartInLine = rep.selStart[1];
- }
- if (n == selEndLine) {
- selectionEndInLine = rep.selEnd[1];
- }
- while (opIter.hasNext()) {
- var op = opIter.next();
- var opStartInLine = indexIntoLine;
- var opEndInLine = opStartInLine + op.chars;
- if (! hasIt(op.attribs)) {
- // does op overlap selection?
- if (! (opEndInLine <= selectionStartInLine || opStartInLine >= selectionEndInLine)) {
- selectionAllHasIt = false;
- break;
- }
- }
- indexIntoLine = opEndInLine;
- }
- if (! selectionAllHasIt) {
- break;
- }
- }
-
- if (selectionAllHasIt) {
- performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd,
- [[attributeName,'']]);
- }
- else {
- performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd,
- [[attributeName,'true']]);
- }
- }
-
- function performDocumentReplaceSelection(newText) {
- if (!(rep.selStart && rep.selEnd)) return;
- performDocumentReplaceRange(rep.selStart, rep.selEnd, newText);
- }
-
- // Change the abstract representation of the document to have a different set of lines.
- // Must be called after rep.alltext is set.
- function doRepLineSplice(startLine, deleteCount, newLineEntries) {
-
- forEach(newLineEntries, function (entry) { entry.width = entry.text.length+1; });
-
- var startOldChar = rep.lines.offsetOfIndex(startLine);
- var endOldChar = rep.lines.offsetOfIndex(startLine+deleteCount);
-
- var oldRegionStart = rep.lines.offsetOfIndex(startLine);
- var oldRegionEnd = rep.lines.offsetOfIndex(startLine+deleteCount);
- rep.lines.splice(startLine, deleteCount, newLineEntries);
- currentCallStack.docTextChanged = true;
- currentCallStack.repChanged = true;
- var newRegionEnd = rep.lines.offsetOfIndex(startLine + newLineEntries.length);
-
- var newText = map(newLineEntries, function (e) { return e.text+'\n'; }).join('');
-
- rep.alltext = rep.alltext.substring(0, startOldChar) + newText +
- rep.alltext.substring(endOldChar, rep.alltext.length);
-
- //var newTotalLength = rep.alltext.length;
-
- //rep.lexer.updateBuffer(rep.alltext, oldRegionStart, oldRegionEnd - oldRegionStart,
- //newRegionEnd - oldRegionStart);
- }
-
- function doIncorpLineSplice(startLine, deleteCount, newLineEntries, lineAttribs, hints) {
-
- var startOldChar = rep.lines.offsetOfIndex(startLine);
- var endOldChar = rep.lines.offsetOfIndex(startLine+deleteCount);
-
- var oldRegionStart = rep.lines.offsetOfIndex(startLine);
-
- var selStartHintChar, selEndHintChar;
- if (hints && hints.selStart) {
- selStartHintChar = rep.lines.offsetOfIndex(hints.selStart[0]) + hints.selStart[1] -
- oldRegionStart;
- }
- if (hints && hints.selEnd) {
- selEndHintChar = rep.lines.offsetOfIndex(hints.selEnd[0]) + hints.selEnd[1] -
- oldRegionStart;
- }
-
- var newText = map(newLineEntries, function (e) { return e.text+'\n'; }).join('');
- var oldText = rep.alltext.substring(startOldChar, endOldChar);
- var oldAttribs = rep.alines.slice(startLine, startLine+deleteCount).join('');
- var newAttribs = lineAttribs.join('|1+1')+'|1+1'; // not valid in a changeset
- var analysis = analyzeChange(oldText, newText, oldAttribs, newAttribs,
- selStartHintChar, selEndHintChar);
- var commonStart = analysis[0];
- var commonEnd = analysis[1];
- var shortOldText = oldText.substring(commonStart, oldText.length - commonEnd);
- var shortNewText = newText.substring(commonStart, newText.length - commonEnd);
- var spliceStart = startOldChar+commonStart;
- var spliceEnd = endOldChar-commonEnd;
- var shiftFinalNewlineToBeforeNewText = false;
-
- // adjust the splice to not involve the final newline of the document;
- // be very defensive
- if (shortOldText.charAt(shortOldText.length-1) == '\n' &&
- shortNewText.charAt(shortNewText.length-1) == '\n') {
- // replacing text that ends in newline with text that also ends in newline
- // (still, after analysis, somehow)
- shortOldText = shortOldText.slice(0,-1);
- shortNewText = shortNewText.slice(0,-1);
- spliceEnd--;
- commonEnd++;
- }
- if (shortOldText.length == 0 && spliceStart == rep.alltext.length
- && shortNewText.length > 0) {
- // inserting after final newline, bad
- spliceStart--;
- spliceEnd--;
- shortNewText = '\n'+shortNewText.slice(0,-1);
- shiftFinalNewlineToBeforeNewText = true;
- }
- if (spliceEnd == rep.alltext.length && shortOldText.length > 0 &&
- shortNewText.length == 0) {
- // deletion at end of rep.alltext
- if (rep.alltext.charAt(spliceStart-1) == '\n') {
- // (if not then what the heck? it will definitely lead
- // to a rep.alltext without a final newline)
- spliceStart--;
- spliceEnd--;
- }
- }
-
- if (! (shortOldText.length == 0 && shortNewText.length == 0)) {
- var oldDocText = rep.alltext;
- var oldLen = oldDocText.length;
-
- var spliceStartLine = rep.lines.indexOfOffset(spliceStart);
- var spliceStartLineStart = rep.lines.offsetOfIndex(spliceStartLine);
- function startBuilder() {
- var builder = Changeset.builder(oldLen);
- builder.keep(spliceStartLineStart, spliceStartLine);
- builder.keep(spliceStart - spliceStartLineStart);
- return builder;
- }
-
- function eachAttribRun(attribs, func/*(startInNewText, endInNewText, attribs)*/) {
- var attribsIter = Changeset.opIterator(attribs);
- var textIndex = 0;
- var newTextStart = commonStart;
- var newTextEnd = newText.length - commonEnd - (shiftFinalNewlineToBeforeNewText ? 1 : 0);
- while (attribsIter.hasNext()) {
- var op = attribsIter.next();
- var nextIndex = textIndex + op.chars;
- if (!(nextIndex <= newTextStart || textIndex >= newTextEnd)) {
- func(Math.max(newTextStart, textIndex), Math.min(newTextEnd, nextIndex), op.attribs);
- }
- textIndex = nextIndex;
- }
- }
-
- var justApplyStyles = (shortNewText == shortOldText);
- var theChangeset;
-
- if (justApplyStyles) {
- // create changeset that clears the incorporated styles on
- // the existing text. we compose this with the
- // changeset the applies the styles found in the DOM.
- // This allows us to incorporate, e.g., Safari's native "unbold".
-
- var incorpedAttribClearer = cachedStrFunc(function (oldAtts) {
- return Changeset.mapAttribNumbers(oldAtts, function(n) {
- var k = rep.apool.getAttribKey(n);
- if (isStyleAttribute(k)) {
- return rep.apool.putAttrib([k,'']);
- }
- return false;
- });
- });
-
- var builder1 = startBuilder();
- if (shiftFinalNewlineToBeforeNewText) {
- builder1.keep(1, 1);
- }
- eachAttribRun(oldAttribs, function(start, end, attribs) {
- builder1.keepText(newText.substring(start, end), incorpedAttribClearer(attribs));
- });
- var clearer = builder1.toString();
-
- var builder2 = startBuilder();
- if (shiftFinalNewlineToBeforeNewText) {
- builder2.keep(1, 1);
- }
- eachAttribRun(newAttribs, function(start, end, attribs) {
- builder2.keepText(newText.substring(start, end), attribs);
- });
- var styler = builder2.toString();
-
- theChangeset = Changeset.compose(clearer, styler, rep.apool);
- }
- else {
- var builder = startBuilder();
-
- var spliceEndLine = rep.lines.indexOfOffset(spliceEnd);
- var spliceEndLineStart = rep.lines.offsetOfIndex(spliceEndLine);
- if (spliceEndLineStart > spliceStart) {
- builder.remove(spliceEndLineStart - spliceStart, spliceEndLine - spliceStartLine);
- builder.remove(spliceEnd - spliceEndLineStart);
- }
- else {
- builder.remove(spliceEnd - spliceStart);
- }
-
- var isNewTextMultiauthor = false;
- var authorAtt = Changeset.makeAttribsString(
- '+', (thisAuthor ? [['author', thisAuthor]] : []), rep.apool);
- var authorizer = cachedStrFunc(function(oldAtts) {
- if (isNewTextMultiauthor) {
- // prefer colors from DOM
- return Changeset.composeAttributes(authorAtt, oldAtts, true, rep.apool);
- }
- else {
- // use this author's color
- return Changeset.composeAttributes(oldAtts, authorAtt, true, rep.apool);
- }
- });
-
- var foundDomAuthor = '';
- eachAttribRun(newAttribs, function(start, end, attribs) {
- var a = Changeset.attribsAttributeValue(attribs, 'author', rep.apool);
- if (a && a != foundDomAuthor) {
- if (! foundDomAuthor) {
- foundDomAuthor = a;
- }
- else {
- isNewTextMultiauthor = true; // multiple authors in DOM!
- }
- }
- });
-
- if (shiftFinalNewlineToBeforeNewText) {
- builder.insert('\n', authorizer(''));
- }
-
- eachAttribRun(newAttribs, function(start, end, attribs) {
- builder.insert(newText.substring(start, end), authorizer(attribs));
- });
- theChangeset = builder.toString();
- }
-
- //dmesg(htmlPrettyEscape(theChangeset));
-
- doRepApplyChangeset(theChangeset);
- }
-
- // do this no matter what, because we need to get the right
- // line keys into the rep.
- doRepLineSplice(startLine, deleteCount, newLineEntries);
-
- checkALines();
- }
-
- function cachedStrFunc(func) {
- var cache = {};
- return function(s) {
- if (! cache[s]) {
- cache[s] = func(s);
- }
- return cache[s];
- };
- }
-
- function analyzeChange(oldText, newText, oldAttribs, newAttribs, optSelStartHint, optSelEndHint) {
- function incorpedAttribFilter(anum) {
- return isStyleAttribute(rep.apool.getAttribKey(anum));
- }
- function attribRuns(attribs) {
- var lengs = [];
- var atts = [];
- var iter = Changeset.opIterator(attribs);
- while (iter.hasNext()) {
- var op = iter.next();
- lengs.push(op.chars);
- atts.push(op.attribs);
- }
- return [lengs,atts];
- }
- function attribIterator(runs, backward) {
- var lengs = runs[0];
- var atts = runs[1];
- var i = (backward ? lengs.length-1 : 0);
- var j = 0;
- return function next() {
- while (j >= lengs[i]) {
- if (backward) i--; else i++;
- j = 0;
- }
- var a = atts[i];
- j++;
- return a;
- };
- }
-
- var oldLen = oldText.length;
- var newLen = newText.length;
- var minLen = Math.min(oldLen, newLen);
-
- var oldARuns = attribRuns(Changeset.filterAttribNumbers(oldAttribs, incorpedAttribFilter));
- var newARuns = attribRuns(Changeset.filterAttribNumbers(newAttribs, incorpedAttribFilter));
-
- var commonStart = 0;
- var oldStartIter = attribIterator(oldARuns, false);
- var newStartIter = attribIterator(newARuns, false);
- while (commonStart < minLen) {
- if (oldText.charAt(commonStart) == newText.charAt(commonStart) &&
- oldStartIter() == newStartIter()) {
- commonStart++;
- }
- else break;
- }
-
- var commonEnd = 0;
- var oldEndIter = attribIterator(oldARuns, true);
- var newEndIter = attribIterator(newARuns, true);
- while (commonEnd < minLen) {
- if (commonEnd == 0) {
- // assume newline in common
- oldEndIter(); newEndIter();
- commonEnd++;
- }
- else if (oldText.charAt(oldLen-1-commonEnd) == newText.charAt(newLen-1-commonEnd) &&
- oldEndIter() == newEndIter()) {
- commonEnd++;
- }
- else break;
- }
-
- var hintedCommonEnd = -1;
- if ((typeof optSelEndHint) == "number") {
- hintedCommonEnd = newLen - optSelEndHint;
- }
-
-
- if (commonStart + commonEnd > oldLen) {
- // ambiguous insertion
- var minCommonEnd = oldLen - commonStart;
- var maxCommonEnd = commonEnd;
- if (hintedCommonEnd >= minCommonEnd && hintedCommonEnd <= maxCommonEnd) {
- commonEnd = hintedCommonEnd;
- }
- else {
- commonEnd = minCommonEnd;
- }
- commonStart = oldLen - commonEnd;
- }
- if (commonStart + commonEnd > newLen) {
- // ambiguous deletion
- var minCommonEnd = newLen - commonStart;
- var maxCommonEnd = commonEnd;
- if (hintedCommonEnd >= minCommonEnd && hintedCommonEnd <= maxCommonEnd) {
- commonEnd = hintedCommonEnd;
- }
- else {
- commonEnd = minCommonEnd;
- }
- commonStart = newLen - commonEnd;
- }
-
- return [commonStart, commonEnd];
- }
-
- function equalLineAndChars(a, b) {
- if (!a) return !b;
- if (!b) return !a;
- return (a[0] == b[0] && a[1] == b[1]);
- }
-
- function performSelectionChange(selectStart, selectEnd, focusAtStart) {
- if (repSelectionChange(selectStart, selectEnd, focusAtStart)) {
- currentCallStack.selectionAffected = true;
- }
- }
-
- // Change the abstract representation of the document to have a different selection.
- // Should not rely on the line representation. Should not affect the DOM.
- function repSelectionChange(selectStart, selectEnd, focusAtStart) {
- focusAtStart = !! focusAtStart;
-
- var newSelFocusAtStart = (focusAtStart &&
- ((! selectStart) || (! selectEnd) ||
- (selectStart[0] != selectEnd[0]) ||
- (selectStart[1] != selectEnd[1])));
-
- if ((! equalLineAndChars(rep.selStart, selectStart)) ||
- (! equalLineAndChars(rep.selEnd, selectEnd)) ||
- (rep.selFocusAtStart != newSelFocusAtStart)) {
- rep.selStart = selectStart;
- rep.selEnd = selectEnd;
- rep.selFocusAtStart = newSelFocusAtStart;
- if (mozillaFakeArrows) mozillaFakeArrows.notifySelectionChanged();
- currentCallStack.repChanged = true;
-
- return true;
- //console.log("selStart: %o, selEnd: %o, focusAtStart: %s", rep.selStart, rep.selEnd,
- //String(!!rep.selFocusAtStart));
- }
- return false;
- //console.log("%o %o %s", rep.selStart, rep.selEnd, rep.selFocusAtStart);
- }
-
- /*function escapeHTML(s) {
- var re = /[&<>'"]/g; /']/; // stupid indentation thing
- if (! re.MAP) {
- // persisted across function calls!
- re.MAP = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&#34;',
- "'": '&#39;'
- };
- }
- return s.replace(re, function(c) { return re.MAP[c]; });
- }*/
-
- function doCreateDomLine(nonEmpty) {
- if (browser.msie && (! nonEmpty)) {
- var result = { node: null,
- appendSpan: noop,
- prepareForAdd: noop,
- notifyAdded: noop,
- clearSpans: noop,
- finishUpdate: noop,
- lineMarker: 0 };
-
- var lineElem = doc.createElement("div");
- result.node = lineElem;
-
- result.notifyAdded = function() {
- // magic -- settng an empty div's innerHTML to the empty string
- // keeps it from collapsing. Apparently innerHTML must be set *after*
- // adding the node to the DOM.
- // Such a div is what IE 6 creates naturally when you make a blank line
- // in a document of divs. However, when copy-and-pasted the div will
- // contain a space, so we note its emptiness with a property.
- lineElem.innerHTML = "";
- // a primitive-valued property survives copy-and-paste
- setAssoc(lineElem, "shouldBeEmpty", true);
- // an object property doesn't
- setAssoc(lineElem, "unpasted", {});
- };
- var lineClass = 'ace-line';
- result.appendSpan = function(txt, cls) {
- if ((! txt) && cls) {
- // gain a whole-line style (currently to show insertion point in CSS)
- lineClass = domline.addToLineClass(lineClass, cls);
- }
- // otherwise, ignore appendSpan, this is an empty line
- };
- result.clearSpans = function() {
- lineClass = ''; // non-null to cause update
- };
- function writeClass() {
- if (lineClass !== null) lineElem.className = lineClass;
- }
- result.prepareForAdd = writeClass;
- result.finishUpdate = writeClass;
- result.getInnerHTML = function() { return ""; };
-
- return result;
- }
- else {
- return domline.createDomLine(nonEmpty, doesWrap, browser, doc);
- }
- }
-
- function textify(str) {
- return str.replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' ');
- }
-
- var _blockElems = { "div":1, "p":1, "pre":1, "li":1, "ol":1, "ul":1 };
- function isBlockElement(n) {
- return !!_blockElems[(n.tagName || "").toLowerCase()];
- }
-
- function getDirtyRanges() {
- // based on observedChanges, return a list of ranges of original lines
- // that need to be removed or replaced with new user content to incorporate
- // the user's changes into the line representation. ranges may be zero-length,
- // indicating inserted content. for example, [0,0] means content was inserted
- // at the top of the document, while [3,4] means line 3 was deleted, modified,
- // or replaced with one or more new lines of content. ranges do not touch.
-
- var p = PROFILER("getDirtyRanges", false);
- p.forIndices = 0;
- p.consecutives = 0;
- p.corrections = 0;
-
- var cleanNodeForIndexCache = {};
- var N = rep.lines.length(); // old number of lines
- function cleanNodeForIndex(i) {
- // if line (i) in the un-updated line representation maps to a clean node
- // in the document, return that node.
- // if (i) is out of bounds, return true. else return false.
- if (cleanNodeForIndexCache[i] === undefined) {
- p.forIndices++;
- var result;
- if (i < 0 || i >= N) {
- result = true; // truthy, but no actual node
- }
- else {
- var key = rep.lines.atIndex(i).key;
- result = (getCleanNodeByKey(key) || false);
- }
- cleanNodeForIndexCache[i] = result;
- }
- return cleanNodeForIndexCache[i];
- }
- var isConsecutiveCache = {};
- function isConsecutive(i) {
- if (isConsecutiveCache[i] === undefined) {
- p.consecutives++;
- isConsecutiveCache[i] = (function() {
- // returns whether line (i) and line (i-1), assumed to be map to clean DOM nodes,
- // or document boundaries, are consecutive in the changed DOM
- var a = cleanNodeForIndex(i-1);
- var b = cleanNodeForIndex(i);
- if ((!a) || (!b)) return false; // violates precondition
- if ((a === true) && (b === true)) return ! root.firstChild;
- if ((a === true) && b.previousSibling) return false;
- if ((b === true) && a.nextSibling) return false;
- if ((a === true) || (b === true)) return true;
- return a.nextSibling == b;
- })();
- }
- return isConsecutiveCache[i];
- }
- function isClean(i) {
- // returns whether line (i) in the un-updated representation maps to a clean node,
- // or is outside the bounds of the document
- return !! cleanNodeForIndex(i);
- }
- // list of pairs, each representing a range of lines that is clean and consecutive
- // in the changed DOM. lines (-1) and (N) are always clean, but may or may not
- // be consecutive with lines in the document. pairs are in sorted order.
- var cleanRanges = [[-1,N+1]];
- function rangeForLine(i) {
- // returns index of cleanRange containing i, or -1 if none
- var answer = -1;
- forEach(cleanRanges, function (r, idx) {
- if (i >= r[1]) return false; // keep looking
- if (i < r[0]) return true; // not found, stop looking
- answer = idx;
- return true; // found, stop looking
- });
- return answer;
- }
- function removeLineFromRange(rng, line) {
- // rng is index into cleanRanges, line is line number
- // precond: line is in rng
- var a = cleanRanges[rng][0];
- var b = cleanRanges[rng][1];
- if ((a+1) == b) cleanRanges.splice(rng, 1);
- else if (line == a) cleanRanges[rng][0]++;
- else if (line == (b-1)) cleanRanges[rng][1]--;
- else cleanRanges.splice(rng, 1, [a,line], [line+1,b]);
- }
- function splitRange(rng, pt) {
- // precond: pt splits cleanRanges[rng] into two non-empty ranges
- var a = cleanRanges[rng][0];
- var b = cleanRanges[rng][1];
- cleanRanges.splice(rng, 1, [a,pt], [pt,b]);
- }
- var correctedLines = {};
- function correctlyAssignLine(line) {
- if (correctedLines[line]) return true;
- p.corrections++;
- correctedLines[line] = true;
- // "line" is an index of a line in the un-updated rep.
- // returns whether line was already correctly assigned (i.e. correctly
- // clean or dirty, according to cleanRanges, and if clean, correctly
- // attached or not attached (i.e. in the same range as) the prev and next lines).
- //console.log("correctly assigning: %d", line);
- var rng = rangeForLine(line);
- var lineClean = isClean(line);
- if (rng < 0) {
- if (lineClean) {
- console.debug("somehow lost clean line");
- }
- return true;
- }
- if (! lineClean) {
- // a clean-range includes this dirty line, fix it
- removeLineFromRange(rng, line);
- return false;
- }
- else {
- // line is clean, but could be wrongly connected to a clean line
- // above or below
- var a = cleanRanges[rng][0];
- var b = cleanRanges[rng][1];
- var didSomething = false;
- // we'll leave non-clean adjacent nodes in the clean range for the caller to
- // detect and deal with. we deal with whether the range should be split
- // just above or just below this line.
- if (a < line && isClean(line-1) && ! isConsecutive(line)) {
- splitRange(rng, line);
- didSomething = true;
- }
- if (b > (line+1) && isClean(line+1) && ! isConsecutive(line+1)) {
- splitRange(rng, line+1);
- didSomething = true;
- }
- return ! didSomething;
- }
- }
- function detectChangesAroundLine(line, reqInARow) {
- // make sure cleanRanges is correct about line number "line" and the surrounding
- // lines; only stops checking at end of document or after no changes need
- // making for several consecutive lines. note that iteration is over old lines,
- // so this operation takes time proportional to the number of old lines
- // that are changed or missing, not the number of new lines inserted.
- var correctInARow = 0;
- var currentIndex = line;
- while (correctInARow < reqInARow && currentIndex >= 0) {
- if (correctlyAssignLine(currentIndex)) {
- correctInARow++;
- }
- else correctInARow = 0;
- currentIndex--;
- }
- correctInARow = 0;
- currentIndex = line;
- while (correctInARow < reqInARow && currentIndex < N) {
- if (correctlyAssignLine(currentIndex)) {
- correctInARow++;
- }
- else correctInARow = 0;
- currentIndex++;
- }
- }
-
- if (N == 0) {
- p.cancel();
- if (! isConsecutive(0)) {
- splitRange(0, 0);
- }
- }
- else {
- p.mark("topbot");
- detectChangesAroundLine(0,1);
- detectChangesAroundLine(N-1,1);
-
- p.mark("obs");
- //console.log("observedChanges: "+toSource(observedChanges));
- for (var k in observedChanges.cleanNodesNearChanges) {
- var key = k.substring(1);
- if (rep.lines.containsKey(key)) {
- var line = rep.lines.indexOfKey(key);
- detectChangesAroundLine(line,2);
- }
- }
- p.mark("stats&calc");
- p.literal(p.forIndices, "byidx");
- p.literal(p.consecutives, "cons");
- p.literal(p.corrections, "corr");
- }
-
- var dirtyRanges = [];
- for(var r=0;r<cleanRanges.length-1;r++) {
- dirtyRanges.push([cleanRanges[r][1], cleanRanges[r+1][0]]);
- }
-
- p.end();
-
- return dirtyRanges;
- }
-
- function markNodeClean(n) {
- // clean nodes have knownHTML that matches their innerHTML
- var dirtiness = {};
- dirtiness.nodeId = uniqueId(n);
- dirtiness.knownHTML = n.innerHTML;
- if (browser.msie) {
- // adding a space to an "empty" div in IE designMode doesn't
- // change the innerHTML of the div's parent; also, other
- // browsers don't support innerText
- dirtiness.knownText = n.innerText;
- }
- setAssoc(n, "dirtiness", dirtiness);
- }
-
- function isNodeDirty(n) {
- var p = PROFILER("cleanCheck", false);
- if (n.parentNode != root) return true;
- var data = getAssoc(n, "dirtiness");
- if (!data) return true;
- if (n.id !== data.nodeId) return true;
- if (browser.msie) {
- if (n.innerText !== data.knownText) return true;
- }
- if (n.innerHTML !== data.knownHTML) return true;
- p.end();
- return false;
- }
-
- function getLineEntryTopBottom(entry, destObj) {
- var dom = entry.lineNode;
- var top = dom.offsetTop;
- var height = dom.offsetHeight;
- var obj = (destObj || {});
- obj.top = top;
- obj.bottom = (top+height);
- return obj;
- }
-
- function getViewPortTopBottom() {
- var theTop = getScrollY();
- var doc = outerWin.document;
- var height = doc.documentElement.clientHeight;
- return {top:theTop, bottom:(theTop+height)};
- }
-
- function getVisibleLineRange() {
- var viewport = getViewPortTopBottom();
- //console.log("viewport top/bottom: %o", viewport);
- var obj = {};
- var start = rep.lines.search(function (e) {
- return getLineEntryTopBottom(e, obj).bottom > viewport.top;
- });
- var end = rep.lines.search(function(e) {
- return getLineEntryTopBottom(e, obj).top >= viewport.bottom;
- });
- if (end < start) end = start; // unlikely
- //console.log(start+","+end);
- return [start,end];
- }
-
- function getVisibleCharRange() {
- var lineRange = getVisibleLineRange();
- return [rep.lines.offsetOfIndex(lineRange[0]),
- rep.lines.offsetOfIndex(lineRange[1])];
- }
-
- function handleClick(evt) {
- inCallStack("handleClick", function() {
- idleWorkTimer.atMost(200);
- });
-
- // only want to catch left-click
- if ((! evt.ctrlKey) && (evt.button != 2) && (evt.button != 3)) {
- // find A tag with HREF
- function isLink(n) { return (n.tagName||'').toLowerCase() == "a" && n.href; }
- var n = evt.target;
- while (n && n.parentNode && ! isLink(n)) { n = n.parentNode; }
- if (n && isLink(n)) {
- try {
- var newWindow = window.open(n.href, '_blank');
- newWindow.focus();
- }
- catch (e) {
- // absorb "user canceled" error in IE for certain prompts
- }
- evt.preventDefault();
- }
- }
- }
-
- function doReturnKey() {
- if (! (rep.selStart && rep.selEnd)) {
- return;
- }
- var lineNum = rep.selStart[0];
- var listType = getLineListType(lineNum);
-
- performDocumentReplaceSelection('\n');
- if (listType) {
- if (lineNum+1 < rep.lines.length()) {
- setLineListType(lineNum+1, listType);
- }
- }
- else {
- handleReturnIndentation();
- }
- }
-
- function doIndentOutdent(isOut) {
- if (! (rep.selStart && rep.selEnd)) {
- return false;
- }
-
- var firstLine, lastLine;
- firstLine = rep.selStart[0];
- lastLine = Math.max(firstLine,
- rep.selEnd[0] - ((rep.selEnd[1] == 0) ? 1 : 0));
-
- var mods = [];
- var foundLists = false;
- for(var n=firstLine;n<=lastLine;n++) {
- var listType = getLineListType(n);
- if (listType) {
- listType = /([a-z]+)([12345678])/.exec(listType);
- if (listType) {
- foundLists = true;
- var t = listType[1];
- var level = Number(listType[2]);
- var newLevel =
- Math.max(1, Math.min(MAX_LIST_LEVEL,
- level + (isOut ? -1 : 1)));
- if (level != newLevel) {
- mods.push([n, t+newLevel]);
- }
- }
- }
- }
-
- if (mods.length > 0) {
- setLineListTypes(mods);
- }
-
- return foundLists;
- }
-
- function doTabKey(shiftDown) {
- if (! doIndentOutdent(shiftDown)) {
- performDocumentReplaceSelection(THE_TAB);
- }
- }
-
- function doDeleteKey(optEvt) {
- var evt = optEvt || {};
- var handled = false;
- if (rep.selStart) {
- if (isCaret()) {
- var lineNum = caretLine();
- var col = caretColumn();
- var lineEntry = rep.lines.atIndex(lineNum);
- var lineText = lineEntry.text;
- var lineMarker = lineEntry.lineMarker;
- if (/^ +$/.exec(lineText.substring(lineMarker, col))) {
- var col2 = col - lineMarker;
- var tabSize = THE_TAB.length;
- var toDelete = ((col2 - 1) % tabSize)+1;
- performDocumentReplaceRange([lineNum,col-toDelete],
- [lineNum,col], '');
- //scrollSelectionIntoView();
- handled = true;
- }
- }
- if (! handled) {
- if (isCaret()) {
- var theLine = caretLine();
- var lineEntry = rep.lines.atIndex(theLine);
- if (caretColumn() <= lineEntry.lineMarker) {
- // delete at beginning of line
- var action = 'delete_newline';
- var prevLineListType =
- (theLine > 0 ? getLineListType(theLine-1) : '');
- var thisLineListType = getLineListType(theLine);
- var prevLineEntry = (theLine > 0 &&
- rep.lines.atIndex(theLine-1));
- var prevLineBlank = (prevLineEntry &&
- prevLineEntry.text.length ==
- prevLineEntry.lineMarker);
- if (thisLineListType) {
- // this line is a list
- /*if (prevLineListType) {
- // prev line is a list too, remove this bullet
- performDocumentReplaceRange([theLine-1, prevLineEntry.text.length],
- [theLine, lineEntry.lineMarker], '');
- }
- else*/ if (prevLineBlank && ! prevLineListType) {
- // previous line is blank, remove it
- performDocumentReplaceRange([theLine-1, prevLineEntry.text.length],
- [theLine, 0], '');
- }
- else {
- // delistify
- performDocumentReplaceRange([theLine, 0],
- [theLine, lineEntry.lineMarker], '');
- }
- }
- else if (theLine > 0) {
- // remove newline
- performDocumentReplaceRange([theLine-1, prevLineEntry.text.length],
- [theLine, 0], '');
- }
- }
- else {
- var docChar = caretDocChar();
- if (docChar > 0) {
- if (evt.metaKey || evt.ctrlKey || evt.altKey) {
- // delete as many unicode "letters or digits" in a row as possible;
- // always delete one char, delete further even if that first char
- // isn't actually a word char.
- var deleteBackTo = docChar-1;
- while (deleteBackTo > lineEntry.lineMarker &&
- isWordChar(rep.alltext.charAt(deleteBackTo-1))) {
- deleteBackTo--;
- }
- performDocumentReplaceCharRange(deleteBackTo, docChar, '');
- }
- else {
- // normal delete
- performDocumentReplaceCharRange(docChar-1, docChar, '');
- }
- }
- }
- }
- else {
- performDocumentReplaceSelection('');
- }
- }
- }
- }
-
- // set of "letter or digit" chars is based on section 20.5.16 of the original Java Language Spec
- var REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/;
- var REGEX_SPACE = /\s/;
-
- function isWordChar(c) {
- return !! REGEX_WORDCHAR.exec(c);
- }
- function isSpaceChar(c) {
- return !! REGEX_SPACE.exec(c);
- }
-
- function moveByWordInLine(lineText, initialIndex, forwardNotBack) {
- var i = initialIndex;
- function nextChar() {
- if (forwardNotBack) return lineText.charAt(i);
- else return lineText.charAt(i-1);
- }
- function advance() { if (forwardNotBack) i++; else i--; }
- function isDone() {
- if (forwardNotBack) return i >= lineText.length;
- else return i <= 0;
- }
-
- // On Mac and Linux, move right moves to end of word and move left moves to start;
- // on Windows, always move to start of word.
- // On Windows, Firefox and IE disagree on whether to stop for punctuation (FF says no).
- if (browser.windows && forwardNotBack) {
- while ((! isDone()) && isWordChar(nextChar())) { advance(); }
- while ((! isDone()) && ! isWordChar(nextChar())) { advance(); }
- }
- else {
- while ((! isDone()) && ! isWordChar(nextChar())) { advance(); }
- while ((! isDone()) && isWordChar(nextChar())) { advance(); }
- }
-
- return i;
- }
-
- function handleKeyEvent(evt) {
- if (DEBUG && top.DONT_INCORP) return;
-
- /*if (evt.which == 48) {
- //setEditable(! isEditable);
- //doAlert(getInnerWidth());
- //doAlert(doc.documentElement.innerWidth)
- alert(eval(prompt()));
- evt.preventDefault();
- return;
- }*/
- /*if (evt.which == 48) {
- alert(doc.body.innerHTML);
- }*/
- /*if (evt.which == 48 && evt.type == "keydown") {
- var lineHeights = [];
- function eachChild(node, func) {
- if (node.firstChild) {
- var n = node.firstChild;
- while (n) {
- func(n);
- n = n.nextSibling;
- }
- }
- }
- eachChild(doc.body, function (n) {
- if (n.clientHeight) {
- lineHeights.push(n.clientHeight);
- }
- });
- alert(lineHeights.join(','));
- }*/
- /*if (evt.which == 48) {
- top.DONT_INCORP = true;
- var cmdTarget = doc;
- if (browser.msie) {
- if (doc.selection) {
- cmdTarget = doc.selection.createRange();
- }
- else cmdTarget = null;
- }
- if (cmdTarget) {
- cmdTarget.execCommand("Bold", false, null);
- }
- alert(doc.body.innerHTML);
- evt.preventDefault();
- return;
- }*/
- /*if (evt.which == 48) {
- if (evt.type == "keypress") {
- top.console.log(window.getSelection().getRangeAt(0));
- evt.preventDefault();
- }
- return;
- }*/
- /*if (evt.which == 48) {
- if (evt.type == "keypress") {
- inCallStack("bold", function() {
- fastIncorp(9);
- toggleAttributeOnSelection('bold');
- });
- evt.preventDefault();
- }
- return;
- }*/
- /*if (evt.which == 48) {
- if (evt.type == "keypress") {
- inCallStack("insertunorderedlist", function() {
- fastIncorp(9);
- doInsertUnorderedList();
- });
- evt.preventDefault();
- }
- return;
- }*/
-
- if (! isEditable) return;
-
- var type = evt.type;
- var charCode = evt.charCode;
- var keyCode = evt.keyCode;
- var mods = "";
- if (evt.altKey) mods = mods+"A";
- if (evt.ctrlKey) mods = mods+"C";
- if (evt.shiftKey) mods = mods+"S";
- if (evt.metaKey) mods = mods+"M";
- var modsPrfx = "";
- if (mods) modsPrfx = mods+"-";
- var which = evt.which;
-
- //dmesg("keyevent type: "+type+", which: "+which);
-
- // Don't take action based on modifier keys going up and down.
- // Modifier keys do not generate "keypress" events.
- // 224 is the command-key under Mac Firefox.
- // 91 is the Windows key in IE; it is ASCII for open-bracket but isn't the keycode for that key
- // 20 is capslock in IE.
- var isModKey = ((!charCode) &&
- ((type == "keyup") || (type == "keydown")) &&
- (keyCode == 16 || keyCode == 17 || keyCode == 18 || keyCode == 20 || keyCode == 224
- || keyCode == 91));
- if (isModKey) return;
-
- var specialHandled = false;
- var isTypeForSpecialKey = ((browser.msie || browser.safari) ?
- (type == "keydown") : (type == "keypress"));
- var isTypeForCmdKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
-
- var stopped = false;
-
- inCallStack("handleKeyEvent", function() {
-
- if (type == "keypress" ||
- (isTypeForSpecialKey && keyCode == 13/*return*/)) {
- // in IE, special keys don't send keypress, the keydown does the action
- if (! outsideKeyPress(evt)) {
- evt.preventDefault();
- stopped = true;
- }
- }
- else if (type == "keydown") {
- outsideKeyDown(evt);
- }
-
- if (! stopped) {
- if (isTypeForSpecialKey && keyCode == 8) {
- // "delete" key; in mozilla, if we're at the beginning of a line, normalize now,
- // or else deleting a blank line can take two delete presses.
- // --
- // we do deletes completely customly now:
- // - allows consistent (and better) meta-delete behavior
- // - normalizing and then allowing default behavior confused IE
- // - probably eliminates a few minor quirks
- fastIncorp(3);
- evt.preventDefault();
- doDeleteKey(evt);
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForSpecialKey && keyCode == 13) {
- // return key, handle specially;
- // note that in mozilla we need to do an incorporation for proper return behavior anyway.
- fastIncorp(4);
- evt.preventDefault();
- doReturnKey();
- //scrollSelectionIntoView();
- scheduler.setTimeout(function() {outerWin.scrollBy(-100,0);}, 0);
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForSpecialKey && keyCode == 9 &&
- ! (evt.metaKey || evt.ctrlKey)) {
- // tab
- fastIncorp(5);
- evt.preventDefault();
- doTabKey(evt.shiftKey);
- //scrollSelectionIntoView();
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "z" &&
- (evt.metaKey || evt.ctrlKey)) {
- // cmd-Z (undo)
- fastIncorp(6);
- evt.preventDefault();
- if (evt.shiftKey) {
- doUndoRedo("redo");
- }
- else {
- doUndoRedo("undo");
- }
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "y" &&
- (evt.metaKey || evt.ctrlKey)) {
- // cmd-Y (redo)
- fastIncorp(10);
- evt.preventDefault();
- doUndoRedo("redo");
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "b" &&
- (evt.metaKey || evt.ctrlKey)) {
- // cmd-B (bold)
- fastIncorp(13);
- evt.preventDefault();
- toggleAttributeOnSelection('bold');
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "i" &&
- (evt.metaKey || evt.ctrlKey)) {
- // cmd-I (italic)
- fastIncorp(14);
- evt.preventDefault();
- toggleAttributeOnSelection('italic');
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "u" &&
- (evt.metaKey || evt.ctrlKey)) {
- // cmd-U (underline)
- fastIncorp(15);
- evt.preventDefault();
- toggleAttributeOnSelection('underline');
- specialHandled = true;
- }
- if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "h" &&
- (evt.ctrlKey)) {
- // cmd-H (backspace)
- fastIncorp(20);
- evt.preventDefault();
- doDeleteKey();
- specialHandled = true;
- }
- /*if ((!specialHandled) && isTypeForCmdKey &&
- String.fromCharCode(which).toLowerCase() == "u" &&
- (evt.metaKey || evt.ctrlKey)) {
- // cmd-U
- doc.body.innerHTML = '';
- evt.preventDefault();
- specialHandled = true;
- }*/
-
- if (mozillaFakeArrows && mozillaFakeArrows.handleKeyEvent(evt)) {
- evt.preventDefault();
- specialHandled = true;
- }
- }
-
- if (type == "keydown") {
- idleWorkTimer.atLeast(500);
- }
- else if (type == "keypress") {
- if ((! specialHandled) && parenModule.shouldNormalizeOnChar(charCode)) {
- idleWorkTimer.atMost(0);
- }
- else {
- idleWorkTimer.atLeast(500);
- }
- }
- else if (type == "keyup") {
- var wait = 200;
- idleWorkTimer.atLeast(wait);
- idleWorkTimer.atMost(wait);
- }
-
- // Is part of multi-keystroke international character on Firefox Mac
- var isFirefoxHalfCharacter =
- (browser.mozilla && evt.altKey && charCode == 0 && keyCode == 0);
-
- // Is part of multi-keystroke international character on Safari Mac
- var isSafariHalfCharacter =
- (browser.safari && evt.altKey && keyCode == 229);
-
- if (thisKeyDoesntTriggerNormalize || isFirefoxHalfCharacter || isSafariHalfCharacter) {
- idleWorkTimer.atLeast(3000); // give user time to type
- // if this is a keydown, e.g., the keyup shouldn't trigger a normalize
- thisKeyDoesntTriggerNormalize = true;
- }
-
- if ((! specialHandled) && (! thisKeyDoesntTriggerNormalize) &&
- (! inInternationalComposition)) {
- if (type != "keyup" || ! incorpIfQuick()) {
- observeChangesAroundSelection();
- }
- }
-
- if (type == "keyup") {
- thisKeyDoesntTriggerNormalize = false;
- }
- });
- }
-
- var thisKeyDoesntTriggerNormalize = false;
-
- function doUndoRedo(which) {
- // precond: normalized DOM
- if (undoModule.enabled) {
- var whichMethod;
- if (which == "undo") whichMethod = 'performUndo';
- if (which == "redo") whichMethod = 'performRedo';
- if (whichMethod) {
- var oldEventType = currentCallStack.editEvent.eventType;
- currentCallStack.startNewEvent(which);
- undoModule[whichMethod](function(backset, selectionInfo) {
- if (backset) {
- performDocumentApplyChangeset(backset);
- }
- if (selectionInfo) {
- performSelectionChange(lineAndColumnFromChar(selectionInfo.selStart),
- lineAndColumnFromChar(selectionInfo.selEnd),
- selectionInfo.selFocusAtStart);
- }
- var oldEvent = currentCallStack.startNewEvent(oldEventType, true);
- return oldEvent;
- });
- }
- }
- }
-
- /*function enforceNewTextTypedStyle() {
- var sel = getSelection();
- var n = (sel && sel.startPoint && sel.startPoint.node);
- if (!n) return;
- var isInOurNode = false;
- while (n) {
- if (n.tagName) {
- var tag = n.tagName.toLowerCase();
- if (tag == "b" || tag == "strong") {
- isInOurNode = true;
- break;
- }
- if (((typeof n.className) == "string") &&
- n.className.toLowerCase().indexOf("Apple-style-span") >= 0) {
- isInOurNode = true;
- break;
- }
- }
- n = n.parentNode;
- }
-
- if (! isInOurNode) {
- doc.execCommand("Bold", false, null);
- }
-
- if (! browser.msie) {
- var browserSelection = window.getSelection();
- if (browserSelection && browserSelection.type != "None" &&
- browserSelection.rangeCount !== 0) {
- var range = browserSelection.getRangeAt(0);
- var surrounder = doc.createElement("B");
- range.surroundContents(surrounder);
- range.selectNodeContents(surrounder);
- browserSelection.removeAllRanges();
- browserSelection.addRange(range);
- }
- }
- }*/
-
- function updateBrowserSelectionFromRep() {
- // requires normalized DOM!
- var selStart = rep.selStart, selEnd = rep.selEnd;
-
- if (!(selStart && selEnd)) {
- setSelection(null);
- return;
- }
-
- var mozillaCaretHack = (false && browser.mozilla && selStart && selEnd &&
- selStart[0] == selEnd[0]
- && selStart[1] == rep.lines.atIndex(selStart[0]).lineMarker
- && selEnd[1] == rep.lines.atIndex(selEnd[0]).lineMarker &&
- setupMozillaCaretHack(selStart[0]));
-
- var selection = {};
-
- var ss = [selStart[0], selStart[1]];
- if (mozillaCaretHack) ss[1] += 1;
- selection.startPoint = getPointForLineAndChar(ss);
-
- var se = [selEnd[0], selEnd[1]];
- if (mozillaCaretHack) se[1] += 1;
- selection.endPoint = getPointForLineAndChar(se);
-
- selection.focusAtStart = !!rep.selFocusAtStart;
-
- setSelection(selection);
-
- if (mozillaCaretHack) {
- mozillaCaretHack.unhack();
- }
- }
-
- function getRepHTML() {
- /*function lineWithSelection(text, lineNum) {
- var haveSelStart = (rep.selStart && rep.selStart[0] == lineNum);
- var haveSelEnd = (rep.selEnd && rep.selEnd[0] == lineNum);
- var startCol = (haveSelStart && rep.selStart[1]);
- var endCol = (haveSelEnd && rep.selEnd[1]);
- var len = text.length;
- if (haveSelStart && haveSelEnd && startCol == endCol) {
- var color = "#000";
- if (endCol == len) {
- return '<span style="border-right: 1px solid '+color+'">'+
- htmlEscape(text)+'</span>';
- }
- else {
- return htmlEscape
- }
- }
- }*/
-
- return map(rep.lines.slice(), function (entry) {
- var text = entry.text;
- var content;
- if (text.length == 0) {
- content = '<span style="color: #aaa">--</span>';
- }
- else {
- content = htmlPrettyEscape(text);
- }
- return '<div><code>'+content+'</div></code>';
- }).join('');
- }
-
- function nodeMaxIndex(nd) {
- if (isNodeText(nd)) return nd.nodeValue.length;
- else return 1;
- }
-
- function hasIESelection() {
- var browserSelection;
- try { browserSelection = doc.selection; } catch (e) {}
- if (! browserSelection) return false;
- var origSelectionRange;
- try { origSelectionRange = browserSelection.createRange(); } catch (e) {}
- if (! origSelectionRange) return false;
- var selectionParent = origSelectionRange.parentElement();
- if (selectionParent.ownerDocument != doc) return false;
- return true;
- }
-
- function getSelection() {
- // returns null, or a structure containing startPoint and endPoint,
- // each of which has node (a magicdom node), index, and maxIndex. If the node
- // is a text node, maxIndex is the length of the text; else maxIndex is 1.
- // index is between 0 and maxIndex, inclusive.
- if (browser.msie) {
- var browserSelection;
- try { browserSelection = doc.selection; } catch (e) {}
- if (! browserSelection) return null;
- var origSelectionRange;
- try { origSelectionRange = browserSelection.createRange(); } catch (e) {}
- if (! origSelectionRange) return null;
- var selectionParent = origSelectionRange.parentElement();
- if (selectionParent.ownerDocument != doc) return null;
- function newRange() {
- return doc.body.createTextRange();
- }
- function rangeForElementNode(nd) {
- var rng = newRange();
- // doesn't work on text nodes
- rng.moveToElementText(nd);
- return rng;
- }
- function pointFromCollapsedRange(rng) {
- var parNode = rng.parentElement();
- var elemBelow = -1;
- var elemAbove = parNode.childNodes.length;
- var rangeWithin = rangeForElementNode(parNode);
-
- if (rng.compareEndPoints("StartToStart", rangeWithin) == 0) {
- return {node:parNode, index:0, maxIndex:1};
- }
- else if (rng.compareEndPoints("EndToEnd", rangeWithin) == 0) {
- if (isBlockElement(parNode) && parNode.nextSibling) {
- // caret after block is not consistent across browsers
- // (same line vs next) so put caret before next node
- return {node:parNode.nextSibling, index:0, maxIndex:1};
- }
- return {node:parNode, index:1, maxIndex:1};
- }
- else if (parNode.childNodes.length == 0) {
- return {node:parNode, index:0, maxIndex:1};
- }
-
- for(var i=0;i<parNode.childNodes.length;i++) {
- var n = parNode.childNodes.item(i);
- if (! isNodeText(n)) {
- var nodeRange = rangeForElementNode(n);
- var startComp = rng.compareEndPoints("StartToStart", nodeRange);
- var endComp = rng.compareEndPoints("EndToEnd", nodeRange);
- if (startComp >= 0 && endComp <= 0) {
- var index = 0;
- if (startComp > 0) {
- index = 1;
- }
- return {node:n, index:index, maxIndex:1};
- }
- else if (endComp > 0) {
- if (i > elemBelow) {
- elemBelow = i;
- rangeWithin.setEndPoint("StartToEnd", nodeRange);
- }
- }
- else if (startComp < 0) {
- if (i < elemAbove) {
- elemAbove = i;
- rangeWithin.setEndPoint("EndToStart", nodeRange);
- }
- }
- }
- }
- if ((elemAbove - elemBelow) == 1) {
- if (elemBelow >= 0) {
- return {node:parNode.childNodes.item(elemBelow), index:1, maxIndex:1};
- }
- else {
- return {node:parNode.childNodes.item(elemAbove), index:0, maxIndex:1};
- }
- }
- var idx = 0;
- var r = rng.duplicate();
- // infinite stateful binary search! call function for values 0 to inf,
- // expecting the answer to be about 40. return index of smallest
- // true value.
- var indexIntoRange = binarySearchInfinite(40, function (i) {
- // the search algorithm whips the caret back and forth,
- // though it has to be moved relatively and may hit
- // the end of the buffer
- var delta = i-idx;
- var moved = Math.abs(r.move("character", -delta));
- // next line is work-around for fact that when moving left, the beginning
- // of a text node is considered to be after the start of the parent element:
- if (r.move("character", -1)) r.move("character", 1);
- if (delta < 0) idx -= moved;
- else idx += moved;
- return (r.compareEndPoints("StartToStart", rangeWithin) <= 0);
- });
- // iterate over consecutive text nodes, point is in one of them
- var textNode = elemBelow+1;
- var indexLeft = indexIntoRange;
- while (textNode < elemAbove) {
- var tn = parNode.childNodes.item(textNode);
- if (indexLeft <= tn.nodeValue.length) {
- return {node:tn, index:indexLeft, maxIndex:tn.nodeValue.length};
- }
- indexLeft -= tn.nodeValue.length;
- textNode++;
- }
- var tn = parNode.childNodes.item(textNode-1);
- return {node:tn, index:tn.nodeValue.length, maxIndex:tn.nodeValue.length};
- }
- var selection = {};
- if (origSelectionRange.compareEndPoints("StartToEnd", origSelectionRange) == 0) {
- // collapsed
- var pnt = pointFromCollapsedRange(origSelectionRange);
- selection.startPoint = pnt;
- selection.endPoint = {node:pnt.node, index:pnt.index, maxIndex:pnt.maxIndex};
- }
- else {
- var start = origSelectionRange.duplicate();
- start.collapse(true);
- var end = origSelectionRange.duplicate();
- end.collapse(false);
- selection.startPoint = pointFromCollapsedRange(start);
- selection.endPoint = pointFromCollapsedRange(end);
- /*if ((!selection.startPoint.node.isText) && (!selection.endPoint.node.isText)) {
- console.log(selection.startPoint.node.uniqueId()+","+
- selection.startPoint.index+" / "+
- selection.endPoint.node.uniqueId()+","+
- selection.endPoint.index);
- }*/
- }
- return selection;
- }
- else {
- // non-IE browser
- var browserSelection = window.getSelection();
- if (browserSelection && browserSelection.type != "None" &&
- browserSelection.rangeCount !== 0) {
- var range = browserSelection.getRangeAt(0);
- function isInBody(n) {
- while (n && ! (n.tagName && n.tagName.toLowerCase() == "body")) {
- n = n.parentNode;
- }
- return !!n;
- }
- function pointFromRangeBound(container, offset) {
- if (! isInBody(container)) {
- // command-click in Firefox selects whole document, HEAD and BODY!
- return {node:root, index:0, maxIndex:1};
- }
- var n = container;
- var childCount = n.childNodes.length;
- if (isNodeText(n)) {
- return {node:n, index:offset, maxIndex:n.nodeValue.length};
- }
- else if (childCount == 0) {
- return {node:n, index:0, maxIndex:1};
- }
- // treat point between two nodes as BEFORE the second (rather than after the first)
- // if possible; this way point at end of a line block-element is treated as
- // at beginning of next line
- else if (offset == childCount) {
- var nd = n.childNodes.item(childCount-1);
- var max = nodeMaxIndex(nd);
- return {node:nd, index:max, maxIndex:max};
- }
- else {
- var nd = n.childNodes.item(offset);
- var max = nodeMaxIndex(nd);
- return {node:nd, index:0, maxIndex:max};
- }
- }
- var selection = {};
- selection.startPoint = pointFromRangeBound(range.startContainer, range.startOffset);
- selection.endPoint = pointFromRangeBound(range.endContainer, range.endOffset);
- selection.focusAtStart = (((range.startContainer != range.endContainer) ||
- (range.startOffset != range.endOffset)) &&
- browserSelection.anchorNode &&
- (browserSelection.anchorNode == range.endContainer) &&
- (browserSelection.anchorOffset == range.endOffset));
- return selection;
- }
- else return null;
- }
- }
-
- function setSelection(selection) {
- function copyPoint(pt) {
- return {node:pt.node, index:pt.index, maxIndex:pt.maxIndex};
- }
- if (browser.msie) {
- // Oddly enough, accessing scrollHeight fixes return key handling on IE 8,
- // presumably by forcing some kind of internal DOM update.
- doc.body.scrollHeight;
-
- function moveToElementText(s, n) {
- while (n.firstChild && ! isNodeText(n.firstChild)) {
- n = n.firstChild;
- }
- s.moveToElementText(n);
- }
- function newRange() {
- return doc.body.createTextRange();
- }
- function setCollapsedBefore(s, n) {
- // s is an IE TextRange, n is a dom node
- if (isNodeText(n)) {
- // previous node should not also be text, but prevent inf recurs
- if (n.previousSibling && ! isNodeText(n.previousSibling)) {
- setCollapsedAfter(s, n.previousSibling);
- }
- else {
- setCollapsedBefore(s, n.parentNode);
- }
- }
- else {
- moveToElementText(s, n);
- // work around for issue that caret at beginning of line
- // somehow ends up at end of previous line
- if (s.move('character', 1)) {
- s.move('character', -1);
- }
- s.collapse(true); // to start
- }
- }
- function setCollapsedAfter(s, n) {
- // s is an IE TextRange, n is a magicdom node
- if (isNodeText(n)) {
- // can't use end of container when no nextSibling (could be on next line),
- // so use previousSibling or start of container and move forward.
- setCollapsedBefore(s, n);
- s.move("character", n.nodeValue.length);
- }
- else {
- moveToElementText(s, n);
- s.collapse(false); // to end
- }
- }
- function getPointRange(point) {
- var s = newRange();
- var n = point.node;
- if (isNodeText(n)) {
- setCollapsedBefore(s, n);
- s.move("character", point.index);
- }
- else if (point.index == 0) {
- setCollapsedBefore(s, n);
- }
- else {
- setCollapsedAfter(s, n);
- }
- return s;
- }
-
- if (selection) {
- if (! hasIESelection()) {
- return; // don't steal focus
- }
-
- var startPoint = copyPoint(selection.startPoint);
- var endPoint = copyPoint(selection.endPoint);
-
- // fix issue where selection can't be extended past end of line
- // with shift-rightarrow or shift-downarrow
- if (endPoint.index == endPoint.maxIndex && endPoint.node.nextSibling) {
- endPoint.node = endPoint.node.nextSibling;
- endPoint.index = 0;
- endPoint.maxIndex = nodeMaxIndex(endPoint.node);
- }
- var range = getPointRange(startPoint);
- range.setEndPoint("EndToEnd", getPointRange(endPoint));
-
- // setting the selection in IE causes everything to scroll
- // so that the selection is visible. if setting the selection
- // definitely accomplishes nothing, don't do it.
- function isEqualToDocumentSelection(rng) {
- var browserSelection;
- try { browserSelection = doc.selection; } catch (e) {}
- if (! browserSelection) return false;
- var rng2 = browserSelection.createRange();
- if (rng2.parentElement().ownerDocument != doc) return false;
- if (rng.compareEndPoints("StartToStart", rng2) !== 0) return false;
- if (rng.compareEndPoints("EndToEnd", rng2) !== 0) return false;
- return true;
- }
- if (! isEqualToDocumentSelection(range)) {
- //dmesg(toSource(selection));
- //dmesg(escapeHTML(doc.body.innerHTML));
- range.select();
- }
- }
- else {
- try { doc.selection.empty(); } catch (e) {}
- }
- }
- else {
- // non-IE browser
- var isCollapsed;
- function pointToRangeBound(pt) {
- var p = copyPoint(pt);
- // Make sure Firefox cursor is deep enough; fixes cursor jumping when at top level,
- // and also problem where cut/copy of a whole line selected with fake arrow-keys
- // copies the next line too.
- if (isCollapsed) {
- function diveDeep() {
- while (p.node.childNodes.length > 0) {
- //&& (p.node == root || p.node.parentNode == root)) {
- if (p.index == 0) {
- p.node = p.node.firstChild;
- p.maxIndex = nodeMaxIndex(p.node);
- }
- else if (p.index == p.maxIndex) {
- p.node = p.node.lastChild;
- p.maxIndex = nodeMaxIndex(p.node);
- p.index = p.maxIndex;
- }
- else break;
- }
- }
- // now fix problem where cursor at end of text node at end of span-like element
- // with background doesn't seem to show up...
- if (isNodeText(p.node) && p.index == p.maxIndex) {
- var n = p.node;
- while ((! n.nextSibling) && (n != root) && (n.parentNode != root)) {
- n = n.parentNode;
- }
- if (n.nextSibling &&
- (! ((typeof n.nextSibling.tagName) == "string" &&
- n.nextSibling.tagName.toLowerCase() == "br")) &&
- (n != p.node) && (n != root) && (n.parentNode != root)) {
- // found a parent, go to next node and dive in
- p.node = n.nextSibling;
- p.maxIndex = nodeMaxIndex(p.node);
- p.index = 0;
- diveDeep();
- }
- }
- // try to make sure insertion point is styled;
- // also fixes other FF problems
- if (! isNodeText(p.node)) {
- diveDeep();
- }
- }
- /*// make sure Firefox cursor is shallow enough;
- // to fix problem where "return" between two spans doesn't move the caret to
- // the next line
- // (decided against)
- while (!(p.node.isRoot || p.node.parent().isRoot || p.node.parent().parent().isRoot)) {
- if (p.index == 0 && ! p.node.prev()) {
- p.node = p.node.parent();
- p.maxIndex = 1;
- }
- else if (p.index == p.maxIndex && ! p.node.next()) {
- p.node = p.node.parent();
- p.maxIndex = 1;
- p.index = 1;
- }
- else break;
- }
- if ((! p.node.isRoot) && (!p.node.parent().isRoot) &&
- (p.index == p.maxIndex) && p.node.next()) {
- p.node = p.node.next();
- p.maxIndex = nodeMaxIndex(p.node);
- p.index = 0;
- }*/
- if (isNodeText(p.node)) {
- return { container: p.node, offset: p.index };
- }
- else {
- // p.index in {0,1}
- return { container: p.node.parentNode, offset: childIndex(p.node) + p.index };
- }
- }
- var browserSelection = window.getSelection();
- if (browserSelection) {
- browserSelection.removeAllRanges();
- if (selection) {
- isCollapsed = (selection.startPoint.node === selection.endPoint.node &&
- selection.startPoint.index === selection.endPoint.index);
- var start = pointToRangeBound(selection.startPoint);
- var end = pointToRangeBound(selection.endPoint);
-
- if ((!isCollapsed) && selection.focusAtStart && browserSelection.collapse && browserSelection.extend) {
- // can handle "backwards"-oriented selection, shift-arrow-keys move start
- // of selection
- browserSelection.collapse(end.container, end.offset);
- //console.trace();
- //console.log(htmlPrettyEscape(rep.alltext));
- //console.log("%o %o", rep.selStart, rep.selEnd);
- //console.log("%o %d", start.container, start.offset);
- browserSelection.extend(start.container, start.offset);
- }
- else {
- var range = doc.createRange();
- range.setStart(start.container, start.offset);
- range.setEnd(end.container, end.offset);
- browserSelection.removeAllRanges();
- browserSelection.addRange(range);
- }
- }
- }
- }
- }
-
- function childIndex(n) {
- var idx = 0;
- while (n.previousSibling) {
- idx++;
- n = n.previousSibling;
- }
- return idx;
- }
-
- function fixView() {
- // calling this method repeatedly should be fast
-
- if (getInnerWidth() == 0 || getInnerHeight() == 0) {
- return;
- }
-
- function setIfNecessary(obj, prop, value) {
- if (obj[prop] != value) {
- obj[prop] = value;
- }
- }
-
- var lineNumberWidth = sideDiv.firstChild.offsetWidth;
- var newSideDivWidth = lineNumberWidth + LINE_NUMBER_PADDING_LEFT;
- if (newSideDivWidth < MIN_LINEDIV_WIDTH) newSideDivWidth = MIN_LINEDIV_WIDTH;
- iframePadLeft = EDIT_BODY_PADDING_LEFT;
- if (hasLineNumbers) iframePadLeft += newSideDivWidth + LINE_NUMBER_PADDING_RIGHT;
- setIfNecessary(iframe.style, "left", iframePadLeft+"px");
- setIfNecessary(sideDiv.style, "width", newSideDivWidth+"px");
-
- for(var i=0;i<2;i++) {
- var newHeight = root.clientHeight;
- var newWidth = (browser.msie ? root.createTextRange().boundingWidth : root.clientWidth);
- var viewHeight = getInnerHeight() - iframePadBottom - iframePadTop;
- var viewWidth = getInnerWidth() - iframePadLeft - iframePadRight;
- if (newHeight < viewHeight) {
- newHeight = viewHeight;
- if (browser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'auto');
- }
- else {
- if (browser.msie) setIfNecessary(outerWin.document.documentElement.style, 'overflowY', 'scroll');
- }
- if (doesWrap) {
- newWidth = viewWidth;
- }
- else {
- if (newWidth < viewWidth) newWidth = viewWidth;
- }
- if (newHeight > 32000) newHeight = 32000;
- if (newWidth > 32000) newWidth = 32000;
- setIfNecessary(iframe.style, "height", newHeight+"px");
- setIfNecessary(iframe.style, "width", newWidth+"px");
- setIfNecessary(sideDiv.style, "height", newHeight+"px");
- }
- if (browser.mozilla) {
- if (! doesWrap) {
- // the body:display:table-cell hack makes mozilla do scrolling
- // correctly by shrinking the <body> to fit around its content,
- // but mozilla won't act on clicks below the body. We keep the
- // style.height property set to the viewport height (editor height
- // not including scrollbar), so it will never shrink so that part of
- // the editor isn't clickable.
- var body = root;
- var styleHeight = viewHeight+"px";
- setIfNecessary(body.style, "height", styleHeight);
- }
- else {
- setIfNecessary(root.style, "height", "");
- }
- }
- // if near edge, scroll to edge
- var scrollX = getScrollX();
- var scrollY = getScrollY();
- var win = outerWin;
- var r = 20;
- /*if (scrollX <= iframePadLeft+r) win.scrollBy(-iframePadLeft-r, 0);
- else if (getPageWidth() - scrollX - getInnerWidth() <= iframePadRight+r)
- scrollBy(iframePadRight+r, 0);*/
- /*if (scrollY <= iframePadTop+r) win.scrollBy(0, -iframePadTop-r);
- else if (getPageHeight() - scrollY - getInnerHeight() <= iframePadBottom+r)
- scrollBy(0, iframePadBottom+r);*/
-
- enforceEditability();
-
- addClass(sideDiv, 'sidedivdelayed');
- }
-
- function getScrollXY() {
- var win = outerWin;
- var odoc = outerWin.document;
- if (typeof(win.pageYOffset) == "number") {
- return {x: win.pageXOffset, y: win.pageYOffset};
- }
- var docel = odoc.documentElement;
- if (docel && typeof(docel.scrollTop) == "number") {
- return {x:docel.scrollLeft, y:docel.scrollTop};
- }
- }
-
- function getScrollX() {
- return getScrollXY().x;
- }
-
- function getScrollY() {
- return getScrollXY().y;
- }
-
- function setScrollX(x) {
- outerWin.scrollTo(x, getScrollY());
- }
-
- function setScrollY(y) {
- outerWin.scrollTo(getScrollX(), y);
- }
-
- function setScrollXY(x, y) {
- outerWin.scrollTo(x, y);
- }
-
- var _teardownActions = [];
- function teardown() {
- forEach(_teardownActions, function (a) { a(); });
- }
-
- bindEventHandler(window, "load", setup);
-
- function setDesignMode(newVal) {
- try {
- function setIfNecessary(target, prop, val) {
- if (String(target[prop]).toLowerCase() != val) {
- target[prop] = val;
- return true;
- }
- return false;
- }
- if (browser.msie || browser.safari) {
- setIfNecessary(root, 'contentEditable', (newVal ? 'true' : 'false'));
- }
- else {
- var wasSet = setIfNecessary(doc, 'designMode', (newVal ? 'on' : 'off'));
- if (wasSet && newVal && browser.opera) {
- // turning on designMode clears event handlers
- bindTheEventHandlers();
- }
- }
- return true;
- }
- catch (e) {
- return false;
- }
- }
-
- var iePastedLines = null;
- function handleIEPaste(evt) {
- // Pasting in IE loses blank lines in a way that loses information;
- // "one\n\ntwo\nthree" becomes "<p>one</p><p>two</p><p>three</p>",
- // which becomes "one\ntwo\nthree". We can get the correct text
- // from the clipboard directly, but we still have to let the paste
- // happen to get the style information.
-
- var clipText = window.clipboardData && window.clipboardData.getData("Text");
- if (clipText && doc.selection) {
- // this "paste" event seems to mess with the selection whether we try to
- // stop it or not, so can't really do document-level manipulation now
- // or in an idle call-stack. instead, use IE native manipulation
- //function escapeLine(txt) {
- //return processSpaces(escapeHTML(textify(txt)));
- //}
- //var newHTML = map(clipText.replace(/\r/g,'').split('\n'), escapeLine).join('<br>');
- //doc.selection.createRange().pasteHTML(newHTML);
- //evt.preventDefault();
-
- //iePastedLines = map(clipText.replace(/\r/g,'').split('\n'), textify);
- }
- }
-
- var inInternationalComposition = false;
-
- function handleCompositionEvent(evt) {
- // international input events, fired in FF3, at least; allow e.g. Japanese input
- if (evt.type == "compositionstart") {
- inInternationalComposition = true;
- }
- else if (evt.type == "compositionend") {
- inInternationalComposition = false;
- }
- }
-
- /*function handleTextEvent(evt) {
- top.console.log("TEXT EVENT");
- inCallStackIfNecessary("handleTextEvent", function() {
- observeChangesAroundSelection();
- });
- }*/
-
- function bindTheEventHandlers() {
- bindEventHandler(window, "unload", teardown);
- bindEventHandler(document, "keydown", handleKeyEvent);
- bindEventHandler(document, "keypress", handleKeyEvent);
- bindEventHandler(document, "keyup", handleKeyEvent);
- bindEventHandler(document, "click", handleClick);
- bindEventHandler(root, "blur", handleBlur);
- if (browser.msie) {
- bindEventHandler(document, "click", handleIEOuterClick);
- }
- if (browser.msie) bindEventHandler(root, "paste", handleIEPaste);
- if ((! browser.msie) && document.documentElement) {
- bindEventHandler(document.documentElement, "compositionstart", handleCompositionEvent);
- bindEventHandler(document.documentElement, "compositionend", handleCompositionEvent);
- }
-
- /*bindEventHandler(window, "mousemove", function(e) {
- if (e.pageX < 10) {
- window.DEBUG_DONT_INCORP = (e.pageX < 2);
- }
- });*/
- }
-
- function handleIEOuterClick(evt) {
- if ((evt.target.tagName||'').toLowerCase() != "html") {
- return;
- }
- if (!(evt.pageY > root.clientHeight)) {
- return;
- }
-
- // click below the body
- inCallStack("handleOuterClick", function() {
- // put caret at bottom of doc
- fastIncorp(11);
- if (isCaret()) { // don't interfere with drag
- var lastLine = rep.lines.length()-1;
- var lastCol = rep.lines.atIndex(lastLine).text.length;
- performSelectionChange([lastLine,lastCol],[lastLine,lastCol]);
- }
- });
- }
-
- function getClassArray(elem, optFilter) {
- var bodyClasses = [];
- (elem.className || '').replace(/\S+/g, function (c) {
- if ((! optFilter) || (optFilter(c))) {
- bodyClasses.push(c);
- }
- });
- return bodyClasses;
- }
- function setClassArray(elem, array) {
- elem.className = array.join(' ');
- }
- function addClass(elem, className) {
- var seen = false;
- var cc = getClassArray(elem, function(c) { if (c == className) seen = true; return true; });
- if (! seen) {
- cc.push(className);
- setClassArray(elem, cc);
- }
- }
- function removeClass(elem, className) {
- var seen = false;
- var cc = getClassArray(elem, function(c) {
- if (c == className) { seen = true; return false; } return true; });
- if (seen) {
- setClassArray(elem, cc);
- }
- }
- function setClassPresence(elem, className, present) {
- if (present) addClass(elem, className);
- else removeClass(elem, className);
- }
-
- function setup() {
- doc = document; // defined as a var in scope outside
- inCallStack("setup", function() {
- var body = doc.getElementById("innerdocbody");
- root = body; // defined as a var in scope outside
-
- if (browser.mozilla) addClass(root, "mozilla");
- if (browser.safari) addClass(root, "safari");
- if (browser.msie) addClass(root, "msie");
- if (browser.msie) {
- // cache CSS background images
- try {
- doc.execCommand("BackgroundImageCache", false, true);
- }
- catch (e) {
- /* throws an error in some IE 6 but not others! */
- }
- }
- setClassPresence(root, "authorColors", true);
- setClassPresence(root, "doesWrap", doesWrap);
-
- initDynamicCSS();
-
- enforceEditability();
-
- // set up dom and rep
- while (root.firstChild) root.removeChild(root.firstChild);
- var oneEntry = createDomLineEntry("");
- doRepLineSplice(0, rep.lines.length(), [oneEntry]);
- insertDomLines(null, [oneEntry.domInfo], null);
- rep.alines = Changeset.splitAttributionLines(
- Changeset.makeAttribution("\n"), "\n");
-
- bindTheEventHandlers();
-
- });
-
- scheduler.setTimeout(function() {
- parent.readyFunc(); // defined in code that sets up the inner iframe
- }, 0);
-
- isSetUp = true;
- }
-
- function focus() {
- window.focus();
- }
-
- function handleBlur(evt) {
- if (browser.msie) {
- // a fix: in IE, clicking on a control like a button outside the
- // iframe can "blur" the editor, causing it to stop getting
- // events, though typing still affects it(!).
- setSelection(null);
- }
- }
-
- function bindEventHandler(target, type, func) {
- var handler;
- if ((typeof func._wrapper) != "function") {
- func._wrapper = function(event) {
- func(fixEvent(event || window.event || {}));
- }
- }
- var handler = func._wrapper;
- if (target.addEventListener)
- target.addEventListener(type, handler, false);
- else
- target.attachEvent("on" + type, handler);
- _teardownActions.push(function() {
- unbindEventHandler(target, type, func);
- });
- }
-
- function unbindEventHandler(target, type, func) {
- var handler = func._wrapper;
- if (target.removeEventListener)
- target.removeEventListener(type, handler, false);
- else
- target.detachEvent("on" + type, handler);
- }
-
- /*forEach(['rep', 'getCleanNodeByKey', 'getDirtyRanges', 'isNodeDirty',
- 'getSelection', 'setSelection', 'updateBrowserSelectionFromRep',
- 'makeRecentSet', 'resetProfiler', 'getScrollXY', 'makeIdleAction'], function (k) {
- top['_'+k] = eval(k);
- });*/
-
- function getSelectionPointX(point) {
- // doesn't work in wrap-mode
- var node = point.node;
- var index = point.index;
- function leftOf(n) { return n.offsetLeft; }
- function rightOf(n) { return n.offsetLeft + n.offsetWidth; }
- if (! isNodeText(node)) {
- if (index == 0) return leftOf(node);
- else return rightOf(node);
- }
- else {
- // we can get bounds of element nodes, so look for those.
- // allow consecutive text nodes for robustness.
- var charsToLeft = index;
- var charsToRight = node.nodeValue.length - index;
- var n;
- for(n = node.previousSibling; n && isNodeText(n); n = n.previousSibling)
- charsToLeft += n.nodeValue;
- var leftEdge = (n ? rightOf(n) : leftOf(node.parentNode));
- for(n = node.nextSibling; n && isNodeText(n); n = n.nextSibling)
- charsToRight += n.nodeValue;
- var rightEdge = (n ? leftOf(n) : rightOf(node.parentNode));
- var frac = (charsToLeft / (charsToLeft + charsToRight));
- var pixLoc = leftEdge + frac*(rightEdge - leftEdge);
- return Math.round(pixLoc);
- }
- }
-
- function getPageHeight() {
- var win = outerWin;
- var odoc = win.document;
- if (win.innerHeight && win.scrollMaxY) return win.innerHeight + win.scrollMaxY;
- else if (odoc.body.scrollHeight > odoc.body.offsetHeight) return odoc.body.scrollHeight;
- else return odoc.body.offsetHeight;
- }
-
- function getPageWidth() {
- var win = outerWin;
- var odoc = win.document;
- if (win.innerWidth && win.scrollMaxX) return win.innerWidth + win.scrollMaxX;
- else if (odoc.body.scrollWidth > odoc.body.offsetWidth) return odoc.body.scrollWidth;
- else return odoc.body.offsetWidth;
- }
-
- function getInnerHeight() {
- var win = outerWin;
- var odoc = win.document;
- var h;
- if (browser.opera) h = win.innerHeight;
- else h = odoc.documentElement.clientHeight;
- if (h) return h;
-
- // deal with case where iframe is hidden, hope that
- // style.height of iframe container is set in px
- return Number(editorInfo.frame.parentNode.style.height.replace(/[^0-9]/g,'')
- || 0);
- }
-
- function getInnerWidth() {
- var win = outerWin;
- var odoc = win.document;
- return odoc.documentElement.clientWidth;
- }
-
- function scrollNodeVerticallyIntoView(node) {
- // requires element (non-text) node;
- // if node extends above top of viewport or below bottom of viewport (or top of scrollbar),
- // scroll it the minimum distance needed to be completely in view.
- var win = outerWin;
- var odoc = outerWin.document;
- var distBelowTop = node.offsetTop + iframePadTop - win.scrollY;
- var distAboveBottom = win.scrollY + getInnerHeight() -
- (node.offsetTop +iframePadTop + node.offsetHeight);
-
- if (distBelowTop < 0) {
- win.scrollBy(0, distBelowTop);
- }
- else if (distAboveBottom < 0) {
- win.scrollBy(0, -distAboveBottom);
- }
- }
-
- function scrollXHorizontallyIntoView(pixelX) {
- var win = outerWin;
- var odoc = outerWin.document;
- pixelX += iframePadLeft;
- var distInsideLeft = pixelX - win.scrollX;
- var distInsideRight = win.scrollX + getInnerWidth() - pixelX;
- if (distInsideLeft < 0) {
- win.scrollBy(distInsideLeft, 0);
- }
- else if (distInsideRight < 0) {
- win.scrollBy(-distInsideRight+1, 0);
- }
- }
-
- function scrollSelectionIntoView() {
- if (! rep.selStart) return;
- fixView();
- var focusLine = (rep.selFocusAtStart ? rep.selStart[0] : rep.selEnd[0]);
- scrollNodeVerticallyIntoView(rep.lines.atIndex(focusLine).lineNode);
- if (! doesWrap) {
- var browserSelection = getSelection();
- if (browserSelection) {
- var focusPoint = (browserSelection.focusAtStart ? browserSelection.startPoint :
- browserSelection.endPoint);
- var selectionPointX = getSelectionPointX(focusPoint);
- scrollXHorizontallyIntoView(selectionPointX);
- fixView();
- }
- }
- }
-
- function getLineListType(lineNum) {
- // get "list" attribute of first char of line
- var aline = rep.alines[lineNum];
- if (aline) {
- var opIter = Changeset.opIterator(aline);
- if (opIter.hasNext()) {
- return Changeset.opAttributeValue(opIter.next(), 'list', rep.apool) || '';
- }
- }
- return '';
- }
-
- function setLineListType(lineNum, listType) {
- setLineListTypes([[lineNum, listType]]);
- }
-
- function setLineListTypes(lineNumTypePairsInOrder) {
- var loc = [0,0];
- var builder = Changeset.builder(rep.lines.totalWidth());
- for(var i=0;i<lineNumTypePairsInOrder.length;i++) {
- var pair = lineNumTypePairsInOrder[i];
- var lineNum = pair[0];
- var listType = pair[1];
- buildKeepRange(builder, loc, (loc = [lineNum,0]));
- if (getLineListType(lineNum)) {
- // already a line marker
- if (listType) {
- // make different list type
- buildKeepRange(builder, loc, (loc = [lineNum,1]),
- [['list',listType]], rep.apool);
- }
- else {
- // remove list marker
- buildRemoveRange(builder, loc, (loc = [lineNum,1]));
- }
- }
- else {
- // currently no line marker
- if (listType) {
- // add a line marker
- builder.insert('*', [['author', thisAuthor],
- ['insertorder', 'first'],
- ['list', listType]], rep.apool);
- }
- }
- }
-
- var cs = builder.toString();
- if (! Changeset.isIdentity(cs)) {
- performDocumentApplyChangeset(cs);
- }
- }
-
- function doInsertUnorderedList() {
- if (! (rep.selStart && rep.selEnd)) {
- return;
- }
-
- var firstLine, lastLine;
- firstLine = rep.selStart[0];
- lastLine = Math.max(firstLine,
- rep.selEnd[0] - ((rep.selEnd[1] == 0) ? 1 : 0));
-
- var allLinesAreList = true;
- for(var n=firstLine;n<=lastLine;n++) {
- if (! getLineListType(n)) {
- allLinesAreList = false;
- break;
- }
- }
-
- var mods = [];
- for(var n=firstLine;n<=lastLine;n++) {
- var t = getLineListType(n);
- mods.push([n, allLinesAreList ? '' : (t ? t : 'bullet1')]);
- }
- setLineListTypes(mods);
- }
-
- var mozillaFakeArrows = (browser.mozilla && (function() {
- // In Firefox 2, arrow keys are unstable while DOM-manipulating
- // operations are going on. Specifically, if an operation
- // (computation that ties up the event queue) is going on (in the
- // call-stack of some event, like a timeout) that at some point
- // mutates nodes involved in the selection, then the arrow
- // keypress may (randomly) move the caret to the beginning or end
- // of the document. If the operation also mutates the selection
- // range, the old selection or the new selection may be used, or
- // neither.
-
- // As long as the arrow is pressed during the busy operation, it
- // doesn't seem to matter that the keydown and keypress events
- // aren't generated until afterwards, or that the arrow movement
- // can still be stopped (meaning it hasn't been performed yet);
- // Firefox must be preserving some old information about the
- // selection or the DOM from when the key was initially pressed.
- // However, it also doesn't seem to matter when the key was
- // actually pressed relative to the time of the mutation within
- // the prolonged operation. Also, even in very controlled tests
- // (like a mutation followed by a long period of busyWaiting), the
- // problem shows up often but not every time, with no discernable
- // pattern. Who knows, it could have something to do with the
- // caret-blinking timer, or DOM changes not being applied
- // immediately.
-
- // This problem, mercifully, does not show up at all in IE or
- // Safari. My solution is to have my own, full-featured arrow-key
- // implementation for Firefox.
-
- // Note that the problem addressed here is potentially very subtle,
- // especially if the operation is quick and is timed to usually happen
- // when the user is idle.
-
- // features:
- // - 'up' and 'down' arrows preserve column when passing through shorter lines
- // - shift-arrows extend the "focus" point, which may be start or end of range
- // - the focus point is kept horizontally and vertically scrolled into view
- // - arrows without shift cause caret to move to beginning or end of selection (left,right)
- // or move focus point up or down a line (up,down)
- // - command-(left,right,up,down) on Mac acts like (line-start, line-end, doc-start, doc-end)
- // - takes wrapping into account when doesWrap is true, i.e. up-arrow and down-arrow move
- // between the virtual lines within a wrapped line; this was difficult, and unfortunately
- // requires mutating the DOM to get the necessary information
-
- var savedFocusColumn = 0; // a value of 0 has no effect
- var updatingSelectionNow = false;
-
- function getVirtualLineView(lineNum) {
- var lineNode = rep.lines.atIndex(lineNum).lineNode;
- while (lineNode.firstChild && isBlockElement(lineNode.firstChild)) {
- lineNode = lineNode.firstChild;
- }
- return makeVirtualLineView(lineNode);
- }
-
- function markerlessLineAndChar(line, chr) {
- return [line, chr - rep.lines.atIndex(line).lineMarker];
- }
- function markerfulLineAndChar(line, chr) {
- return [line, chr + rep.lines.atIndex(line).lineMarker];
- }
-
- return {
- notifySelectionChanged: function() {
- if (! updatingSelectionNow) {
- savedFocusColumn = 0;
- }
- },
- handleKeyEvent: function(evt) {
- // returns "true" if handled
- if (evt.type != "keypress") return false;
- var keyCode = evt.keyCode;
- if (keyCode < 37 || keyCode > 40) return false;
- incorporateUserChanges();
-
- if (!(rep.selStart && rep.selEnd)) return true;
-
- // {byWord,toEnd,normal}
- var moveMode = (evt.altKey ? "byWord" :
- (evt.ctrlKey ? "byWord" :
- (evt.metaKey ? "toEnd" :
- "normal")));
-
- var anchorCaret =
- markerlessLineAndChar(rep.selStart[0], rep.selStart[1]);
- var focusCaret =
- markerlessLineAndChar(rep.selEnd[0], rep.selEnd[1]);
- var wasCaret = isCaret();
- if (rep.selFocusAtStart) {
- var tmp = anchorCaret; anchorCaret = focusCaret; focusCaret = tmp;
- }
- var K_UP = 38, K_DOWN = 40, K_LEFT = 37, K_RIGHT = 39;
- var dontMove = false;
- if (wasCaret && ! evt.shiftKey) {
- // collapse, will mutate both together
- anchorCaret = focusCaret;
- }
- else if ((! wasCaret) && (! evt.shiftKey)) {
- if (keyCode == K_LEFT) {
- // place caret at beginning
- if (rep.selFocusAtStart) anchorCaret = focusCaret;
- else focusCaret = anchorCaret;
- if (moveMode == "normal") dontMove = true;
- }
- else if (keyCode == K_RIGHT) {
- // place caret at end
- if (rep.selFocusAtStart) focusCaret = anchorCaret;
- else anchorCaret = focusCaret;
- if (moveMode == "normal") dontMove = true;
- }
- else {
- // collapse, will mutate both together
- anchorCaret = focusCaret;
- }
- }
- if (! dontMove) {
- function lineLength(i) {
- var entry = rep.lines.atIndex(i);
- return entry.text.length - entry.lineMarker;
- }
- function lineText(i) {
- var entry = rep.lines.atIndex(i);
- return entry.text.substring(entry.lineMarker);
- }
-
- if (keyCode == K_UP || keyCode == K_DOWN) {
- var up = (keyCode == K_UP);
- var canChangeLines = ((up && focusCaret[0]) ||
- ((!up) && focusCaret[0] < rep.lines.length()-1));
- var virtualLineView, virtualLineSpot, canChangeVirtualLines = false;
- if (doesWrap) {
- virtualLineView = getVirtualLineView(focusCaret[0]);
- virtualLineSpot = virtualLineView.getVLineAndOffsetForChar(focusCaret[1]);
- canChangeVirtualLines = ((up && virtualLineSpot.vline > 0) ||
- ((!up) && virtualLineSpot.vline < (
- virtualLineView.getNumVirtualLines() - 1)));
- }
- var newColByVirtualLineChange;
- if (moveMode == "toEnd") {
- if (up) {
- focusCaret[0] = 0;
- focusCaret[1] = 0;
- }
- else {
- focusCaret[0] = rep.lines.length()-1;
- focusCaret[1] = lineLength(focusCaret[0]);
- }
- }
- else if (moveMode == "byWord") {
- // move by "paragraph", a feature that Firefox lacks but IE and Safari both have
- if (up) {
- if (focusCaret[1] == 0 && canChangeLines) {
- focusCaret[0]--;
- focusCaret[1] = 0;
- }
- else focusCaret[1] = 0;
- }
- else {
- var lineLen = lineLength(focusCaret[0]);
- if (browser.windows) {
- if (canChangeLines) {
- focusCaret[0]++;
- focusCaret[1] = 0;
- }
- else {
- focusCaret[1] = lineLen;
- }
- }
- else {
- if (focusCaret[1] == lineLen && canChangeLines) {
- focusCaret[0]++;
- focusCaret[1] = lineLength(focusCaret[0]);
- }
- else {
- focusCaret[1] = lineLen;
- }
- }
- }
- savedFocusColumn = 0;
- }
- else if (canChangeVirtualLines) {
- var vline = virtualLineSpot.vline;
- var offset = virtualLineSpot.offset;
- if (up) vline--;
- else vline++;
- if (savedFocusColumn > offset) offset = savedFocusColumn;
- else {
- savedFocusColumn = offset;
- }
- var newSpot = virtualLineView.getCharForVLineAndOffset(vline, offset);
- focusCaret[1] = newSpot.lineChar;
- }
- else if (canChangeLines) {
- if (up) focusCaret[0]--;
- else focusCaret[0]++;
- var offset = focusCaret[1];
- if (doesWrap) {
- offset = virtualLineSpot.offset;
- }
- if (savedFocusColumn > offset) offset = savedFocusColumn;
- else {
- savedFocusColumn = offset;
- }
- if (doesWrap) {
- var newLineView = getVirtualLineView(focusCaret[0]);
- var vline = (up ? newLineView.getNumVirtualLines()-1 : 0);
- var newSpot = newLineView.getCharForVLineAndOffset(vline, offset);
- focusCaret[1] = newSpot.lineChar;
- }
- else {
- var lineLen = lineLength(focusCaret[0]);
- if (offset > lineLen) offset = lineLen;
- focusCaret[1] = offset;
- }
- }
- else {
- if (up) focusCaret[1] = 0;
- else focusCaret[1] = lineLength(focusCaret[0]);
- savedFocusColumn = 0;
- }
- }
- else if (keyCode == K_LEFT || keyCode == K_RIGHT) {
- var left = (keyCode == K_LEFT);
- if (left) {
- if (moveMode == "toEnd") focusCaret[1] = 0;
- else if (focusCaret[1] > 0) {
- if (moveMode == "byWord") {
- focusCaret[1] = moveByWordInLine(lineText(focusCaret[0]), focusCaret[1], false);
- }
- else {
- focusCaret[1]--;
- }
- }
- else if (focusCaret[0] > 0) {
- focusCaret[0]--;
- focusCaret[1] = lineLength(focusCaret[0]);
- if (moveMode == "byWord") {
- focusCaret[1] = moveByWordInLine(lineText(focusCaret[0]), focusCaret[1], false);
- }
- }
- }
- else {
- var lineLen = lineLength(focusCaret[0]);
- if (moveMode == "toEnd") focusCaret[1] = lineLen;
- else if (focusCaret[1] < lineLen) {
- if (moveMode == "byWord") {
- focusCaret[1] = moveByWordInLine(lineText(focusCaret[0]), focusCaret[1], true);
- }
- else {
- focusCaret[1]++;
- }
- }
- else if (focusCaret[0] < rep.lines.length()-1) {
- focusCaret[0]++;
- focusCaret[1] = 0;
- if (moveMode == "byWord") {
- focusCaret[1] = moveByWordInLine(lineText(focusCaret[0]), focusCaret[1], true);
- }
- }
- }
- savedFocusColumn = 0;
- }
- }
-
- var newSelFocusAtStart = ((focusCaret[0] < anchorCaret[0]) ||
- (focusCaret[0] == anchorCaret[0] &&
- focusCaret[1] < anchorCaret[1]));
- var newSelStart = (newSelFocusAtStart ? focusCaret : anchorCaret);
- var newSelEnd = (newSelFocusAtStart ? anchorCaret : focusCaret);
- updatingSelectionNow = true;
- performSelectionChange(markerfulLineAndChar(newSelStart[0],
- newSelStart[1]),
- markerfulLineAndChar(newSelEnd[0],
- newSelEnd[1]),
- newSelFocusAtStart);
- updatingSelectionNow = false;
- currentCallStack.userChangedSelection = true;
- return true;
- }
- };
- })());
-
-
- // stolen from jquery-1.2.1
- function fixEvent(event) {
- // store a copy of the original event object
- // and clone to set read-only properties
- var originalEvent = event;
- event = extend({}, originalEvent);
-
- // add preventDefault and stopPropagation since
- // they will not work on the clone
- event.preventDefault = function() {
- // if preventDefault exists run it on the original event
- if (originalEvent.preventDefault)
- originalEvent.preventDefault();
- // otherwise set the returnValue property of the original event to false (IE)
- originalEvent.returnValue = false;
- };
- event.stopPropagation = function() {
- // if stopPropagation exists run it on the original event
- if (originalEvent.stopPropagation)
- originalEvent.stopPropagation();
- // otherwise set the cancelBubble property of the original event to true (IE)
- originalEvent.cancelBubble = true;
- };
-
- // Fix target property, if necessary
- if ( !event.target && event.srcElement )
- event.target = event.srcElement;
-
- // check if target is a textnode (safari)
- if (browser.safari && event.target.nodeType == 3)
- event.target = originalEvent.target.parentNode;
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && event.fromElement )
- event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && event.clientX != null ) {
- var e = document.documentElement, b = document.body;
- event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
- event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
- }
-
- // Add which for key events
- if ( !event.which && (event.charCode || event.keyCode) )
- event.which = event.charCode || event.keyCode;
-
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
- if ( !event.metaKey && event.ctrlKey )
- event.metaKey = event.ctrlKey;
-
- // Add which for click: 1 == left; 2 == middle; 3 == right
- // Note: button is not normalized, so don't use it
- if ( !event.which && event.button )
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
-
- return event;
- }
-
- var lineNumbersShown;
- var sideDivInner;
- function initLineNumbers() {
- lineNumbersShown = 1;
- sideDiv.innerHTML =
- '<table border="0" cellpadding="0" cellspacing="0" align="right">'+
- '<tr><td id="sidedivinner"><div>1</div></td></tr></table>';
- sideDivInner = outerWin.document.getElementById("sidedivinner");
- }
-
- function updateLineNumbers() {
- var newNumLines = rep.lines.length();
- if (newNumLines < 1) newNumLines = 1;
- if (newNumLines != lineNumbersShown) {
- var container = sideDivInner;
- var odoc = outerWin.document;
- while (lineNumbersShown < newNumLines) {
- lineNumbersShown++;
- var n = lineNumbersShown;
- var div = odoc.createElement("DIV");
- div.appendChild(odoc.createTextNode(String(n)));
- container.appendChild(div);
- }
- while (lineNumbersShown > newNumLines) {
- container.removeChild(container.lastChild);
- lineNumbersShown--;
- }
- }
-
- if (currentCallStack && currentCallStack.domClean) {
- var a = sideDivInner.firstChild;
- var b = doc.body.firstChild;
- while (a && b) {
- var h = (b.clientHeight || b.offsetHeight);
- if (b.nextSibling) {
- // when text is zoomed in mozilla, divs have fractional
- // heights (though the properties are always integers)
- // and the line-numbers don't line up unless we pay
- // attention to where the divs are actually placed...
- // (also: padding on TTs/SPANs in IE...)
- h = b.nextSibling.offsetTop - b.offsetTop;
- }
- if (h) {
- var hpx = h+"px";
- if (a.style.height != hpx)
- a.style.height = hpx;
- }
- a = a.nextSibling;
- b = b.nextSibling;
- }
- }
- }
-
-};
-
-OUTER(this);
diff --git a/trunk/infrastructure/ace/www/ace2_outer.js b/trunk/infrastructure/ace/www/ace2_outer.js
deleted file mode 100644
index b0fc20c..0000000
--- a/trunk/infrastructure/ace/www/ace2_outer.js
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-Ace2Editor.registry = { nextId: 1 };
-
-function Ace2Editor() {
- var thisFunctionsName = "Ace2Editor";
- var ace2 = Ace2Editor;
-
- var editor = {};
- var info = { editor: editor, id: (ace2.registry.nextId++) };
- var loaded = false;
-
- var actionsPendingInit = [];
- function pendingInit(func, optDoNow) {
- return function() {
- var that = this;
- var args = arguments;
- function action() {
- func.apply(that, args);
- }
- if (optDoNow) {
- optDoNow.apply(that, args);
- }
- if (loaded) {
- action();
- }
- else {
- actionsPendingInit.push(action);
- }
- };
- }
- function doActionsPendingInit() {
- for(var i=0;i<actionsPendingInit.length;i++) {
- actionsPendingInit[i]();
- }
- actionsPendingInit = [];
- }
-
- ace2.registry[info.id] = info;
-
- editor.importText = pendingInit(function(newCode, undoable) {
- info.ace_importText(newCode, undoable); });
- editor.importAText = pendingInit(function(newCode, apoolJsonObj, undoable) {
- info.ace_importAText(newCode, apoolJsonObj, undoable); });
- editor.exportText = function() {
- if (! loaded) return "(awaiting init)\n";
- return info.ace_exportText();
- };
- editor.getFrame = function() { return info.frame || null; };
- editor.focus = pendingInit(function() { info.ace_focus(); });
- editor.adjustSize = pendingInit(function() {
- var frameParent = info.frame.parentNode;
- var parentHeight = frameParent.clientHeight;
- // deal with case where iframe is hidden, no clientHeight
- info.frame.style.height = (parentHeight ? parentHeight+"px" :
- frameParent.style.height);
- info.ace_editorChangedSize();
- });
- editor.setEditable = pendingInit(function(newVal) { info.ace_setEditable(newVal); });
- editor.getFormattedCode = function() { return info.ace_getFormattedCode(); };
- editor.setOnKeyPress = pendingInit(function (handler) { info.ace_setOnKeyPress(handler); });
- editor.setOnKeyDown = pendingInit(function (handler) { info.ace_setOnKeyDown(handler); });
- editor.setNotifyDirty = pendingInit(function (handler) { info.ace_setNotifyDirty(handler); });
-
- editor.setProperty = pendingInit(function(key, value) { info.ace_setProperty(key, value); });
- editor.getDebugProperty = function(prop) { return info.ace_getDebugProperty(prop); };
-
- editor.setBaseText = pendingInit(function(txt) { info.ace_setBaseText(txt); });
- editor.setBaseAttributedText = pendingInit(function(atxt, apoolJsonObj) {
- info.ace_setBaseAttributedText(atxt, apoolJsonObj); });
- editor.applyChangesToBase = pendingInit(function (changes, optAuthor,apoolJsonObj) {
- info.ace_applyChangesToBase(changes, optAuthor, apoolJsonObj); });
- // prepareUserChangeset:
- // Returns null if no new changes or ACE not ready. Otherwise, bundles up all user changes
- // to the latest base text into a Changeset, which is returned (as a string if encodeAsString).
- // If this method returns a truthy value, then applyPreparedChangesetToBase can be called
- // at some later point to consider these changes part of the base, after which prepareUserChangeset
- // must be called again before applyPreparedChangesetToBase. Multiple consecutive calls
- // to prepareUserChangeset will return an updated changeset that takes into account the
- // latest user changes, and modify the changeset to be applied by applyPreparedChangesetToBase
- // accordingly.
- editor.prepareUserChangeset = function() {
- if (! loaded) return null;
- return info.ace_prepareUserChangeset();
- };
- editor.applyPreparedChangesetToBase = pendingInit(
- function() { info.ace_applyPreparedChangesetToBase(); });
- editor.setUserChangeNotificationCallback = pendingInit(function(callback) {
- info.ace_setUserChangeNotificationCallback(callback);
- });
- editor.setAuthorInfo = pendingInit(function(author, authorInfo) {
- info.ace_setAuthorInfo(author, authorInfo);
- });
- editor.setAuthorSelectionRange = pendingInit(function(author, start, end) {
- info.ace_setAuthorSelectionRange(author, start, end);
- });
-
- editor.getUnhandledErrors = function() {
- if (! loaded) return [];
- // returns array of {error: <browser Error object>, time: +new Date()}
- return info.ace_getUnhandledErrors();
- };
- editor.execCommand = pendingInit(function(cmd, arg1) {
- info.ace_execCommand(cmd, arg1);
- });
-
- // calls to these functions ($$INCLUDE_...) are replaced when this file is processed
- // and compressed, putting the compressed code from the named file directly into the
- // source here.
-
- var $$INCLUDE_CSS = function(fileName) {
- return '<link rel="stylesheet" type="text/css" href="'+fileName+'"/>';
- };
- var $$INCLUDE_JS = function(fileName) {
- return '\x3cscript type="text/javascript" src="'+fileName+'">\x3c/script>';
- };
- var $$INCLUDE_JS_DEV = $$INCLUDE_JS;
- var $$INCLUDE_CSS_DEV = $$INCLUDE_CSS;
-
- var $$INCLUDE_CSS_Q = function(fileName) {
- return '\'<link rel="stylesheet" type="text/css" href="'+fileName+'"/>\'';
- };
- var $$INCLUDE_JS_Q = function(fileName) {
- return '\'\\x3cscript type="text/javascript" src="'+fileName+'">\\x3c/script>\'';
- };
- var $$INCLUDE_JS_Q_DEV = $$INCLUDE_JS_Q;
- var $$INCLUDE_CSS_Q_DEV = $$INCLUDE_CSS_Q;
-
- editor.destroy = pendingInit(function() {
- info.ace_dispose();
- info.frame.parentNode.removeChild(info.frame);
- delete ace2.registry[info.id];
- info = null; // prevent IE 6 closure memory leaks
- });
-
- editor.init = function(containerId, initialCode, doneFunc) {
-
- editor.importText(initialCode);
-
- info.onEditorReady = function() {
- loaded = true;
- doActionsPendingInit();
- doneFunc();
- };
-
- (function() {
- var doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" '+
- '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
-
- var iframeHTML = ["'"+doctype+"<html><head>'"];
- // these lines must conform to a specific format because they are passed by the build script:
- iframeHTML.push($$INCLUDE_CSS_Q("editor.css syntax.css inner.css"));
- //iframeHTML.push(INCLUDE_JS_Q_DEV("ace2_common_dev.js"));
- //iframeHTML.push(INCLUDE_JS_Q_DEV("profiler.js"));
- iframeHTML.push($$INCLUDE_JS_Q("ace2_common.js skiplist.js virtual_lines.js easysync2.js cssmanager.js colorutils.js undomodule.js contentcollector.js changesettracker.js linestylefilter.js domline.js"));
- iframeHTML.push($$INCLUDE_JS_Q("ace2_inner.js"));
- iframeHTML.push('\'\\n<style type="text/css" title="dynamicsyntax"></style>\\n\'');
- iframeHTML.push('\'</head><body id="innerdocbody" class="syntax" spellcheck="false">&nbsp;</body></html>\'');
-
- var outerScript = 'editorId = "'+info.id+'"; editorInfo = parent.'+
- thisFunctionsName+'.registry[editorId]; '+
- 'window.onload = function() '+
- '{ window.onload = null; setTimeout'+
- '(function() '+
- '{ var iframe = document.createElement("IFRAME"); '+
- 'iframe.scrolling = "no"; var outerdocbody = document.getElementById("outerdocbody"); '+
- 'iframe.frameBorder = 0; iframe.allowTransparency = true; '+ // for IE
- 'outerdocbody.insertBefore(iframe, outerdocbody.firstChild); '+
- 'iframe.ace_outerWin = window; '+
- 'readyFunc = function() { editorInfo.onEditorReady(); readyFunc = null; editorInfo = null; }; '+
- 'var doc = iframe.contentWindow.document; doc.open(); doc.write('+
- iframeHTML.join('+')+'); doc.close(); '+
- '}, 0); }';
-
- var outerHTML = [doctype, '<html><head>',
- $$INCLUDE_CSS("editor.css"),
- // bizarrely, in FF2, a file with no "external" dependencies won't finish loading properly
- // (throbs busy while typing)
- '<link rel="stylesheet" type="text/css" href="data:text/css,"/>',
- '\x3cscript>', outerScript, '\x3c/script>',
- '</head><body id="outerdocbody"><div id="sidediv"><!-- --></div><div id="linemetricsdiv">x</div><div id="overlaysdiv"><!-- --></div></body></html>'];
-
- var outerFrame = document.createElement("IFRAME");
- outerFrame.frameBorder = 0; // for IE
- info.frame = outerFrame;
- document.getElementById(containerId).appendChild(outerFrame);
-
- var editorDocument = outerFrame.contentWindow.document;
-
- editorDocument.open();
- editorDocument.write(outerHTML.join(''));
- editorDocument.close();
-
- editor.adjustSize();
- })();
- };
-
- return editor;
-}
diff --git a/trunk/infrastructure/ace/www/ace2_wrapper.js b/trunk/infrastructure/ace/www/ace2_wrapper.js
deleted file mode 100644
index b62e09d..0000000
--- a/trunk/infrastructure/ace/www/ace2_wrapper.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Exposes interface of Aaron's ace.js, including switching between plain and fancy editor.
-// Currently uses Aaron's code and depends on JQuery for plain editor.
-// -- David
-
-
-AppjetCodeEditor = function() {
- this.browserSupportsModern = false;
- this.aceImpl = null;
- this.containerDiv = null;
- this.containerId = null;
- this.onKeyPress = null;
- this.onKeyDown = null;
- this.notifyDirty = null;
- this.isEditable = true;
-};
-
-// TODO: take editorType as a param
-
-AppjetCodeEditor.prototype.init = function(containerId,
- initialCode,
- startModern,
- done) {
- this.containerId = containerId;
- this.containerDiv = document.getElementById(containerId);
-
- if (startModern) {
- this.aceImplModern = new Ace2Editor();
- this.aceImpl = this.aceImplModern;
- } else {
- this.aceImplPlain = new ACEPlain();
- this.aceImpl = this.aceImplPlain;
- }
- this.aceImpl.init(containerId, initialCode, done);
-};
-
-AppjetCodeEditor.prototype.updateBottomLinks = function() {
- if (ACEPlain.prototype.isPrototypeOf(this.aceImpl)) {
- this.toggleModernLink.innerHTML = 'switch to rich text';
- } else {
- this.toggleModernLink.innerHTML = 'switch to plaintext';
- }
-};
-
-AppjetCodeEditor.prototype.toggleModernImpl = function() {
- var codeSave = this.aceImpl.exportCode();
-
- if (ACEPlain.prototype.isPrototypeOf(this.aceImpl)) {
- this.aceImpl.destroy();
- this.aceImpl = new Ace2Editor();
- } else {
- this.aceImpl.destroy();
- this.aceImpl = new ACEPlain();
- }
- var cont = this.containerDiv;
- while (cont.firstChild) {
- cont.removeChild(cont.firstChild);
- }
- this.aceImpl.init(this.containerId, codeSave, function() {} );
-
- var ace = this;
- function capitalize(str) { return str.substr(0,1).toUpperCase()+str.substr(1); }
- $.each(["onKeyPress", "onKeyDown", "notifyDirty"], function() {
- var setter = 'set'+capitalize(this);
- if (ace[this]) {
- ace.aceImpl[setter](ace[this]);
- }
- });
- this.aceImpl.setEditable(this.isEditable);
-};
-
-AppjetCodeEditor.prototype.adjustContainerSizes = function() {
- // TODO: adjust container sizes here.
-};
-
-//================================================================
-// Interface to ACE
-//================================================================
-
-AppjetCodeEditor.prototype.setOnKeyPress = function(f) {
- this.onKeyPress = f;
- this.aceImpl.setOnKeyPress(this.onKeyPress);
-};
-
-AppjetCodeEditor.prototype.setOnKeyDown = function(f) {
- this.onKeyDown = f;
- this.aceImpl.setOnKeyDown(this.onKeyDown);
-};
-
-AppjetCodeEditor.prototype.setNotifyDirty = function(f) {
- this.notifyDirty = f;
- this.aceImpl.setNotifyDirty(this.notifyDirty);
-};
-
-AppjetCodeEditor.prototype.setEditable = function(x) {
- this.isEditable = x;
- this.aceImpl.setEditable(x);
-};
-
-AppjetCodeEditor.prototype.adjustSize = function() {
- this.adjustContainerSizes();
- this.aceImpl.adjustSize();
-};
-
-//------- straight pass-through functions ---------------
-
-AppjetCodeEditor.prototype.importCode = function(rawCode) {
- this.aceImpl.importCode(rawCode);
-};
-
-AppjetCodeEditor.prototype.exportCode = function() {
- return this.aceImpl.exportCode();
-};
-
-AppjetCodeEditor.prototype.getFormattedCode = function() {
- return this.aceImpl.getFormattedCode();
-};
-
-AppjetCodeEditor.prototype.focus = function() {
- this.aceImpl.focus();
-};
-
-/* implementation of ACE with simple textarea */
-
-ACEPlain = function() {
- this.containerDiv = null;
- this.textArea = null;
- this.onKeyPress = null;
- this.onKeyDown = null;
- this.notifyDirty = null;
-};
-
-ACEPlain.prototype.init = function(containerId, initialCode, done) {
- var container = $('#'+containerId); //document.getElementById(containerId);
-
- // empty container div
- container.empty();
- container.css('padding', 0);
-
- // create textarea
- var textArea = $('<textarea></textarea>');
- textArea.css('border', 0).
- css('margin', 0).
- css('padding', 0).
- css('background', 'transparent').
- css('color', '#000').
- attr('spellcheck', false);
-
- // add textarea to container
- container.append(textArea);
-
- // remember nodes
- this.textArea = textArea;
- this.containerDiv = container;
-
- // first-time size adjustments
- this.adjustSize();
-
- // remember keystrokes
- var ace = this;
- textArea.keydown(function(e) {
- if (ace.onKeyDown) { ace.onKeyDown(e); }
- });
- textArea.keypress(function(e) {
- if (ace.notifyDirty) { ace.notifyDirty(); }
- if (ace.onKeyPress) { ace.onKeyPress(e); }
- });
-
- // set initial code
- textArea.get(0).value = initialCode;
-
- // callback
- done();
-};
-
-ACEPlain.prototype.importCode = function(rawCode) {
- this.textArea.attr('value', rawCode);
-};
-
-ACEPlain.prototype.exportCode = function() {
- return this.textArea.attr('value');
-};
-
-ACEPlain.prototype.adjustSize = function() {
- this.textArea.width('100%');
- this.textArea.height(this.containerDiv.height());
-};
-
-ACEPlain.prototype.setOnKeyPress = function(f) { this.onKeyPress = f; };
-ACEPlain.prototype.setOnKeyDown = function(f) { this.onKeyDown = f; };
-ACEPlain.prototype.setNotifyDirty = function(f) { this.notifyDirty = f; };
-
-ACEPlain.prototype.getFormattedCode = function() {
- return ('<pre>' + this.textArea.attr('value') + '</pre>');
-};
-
-ACEPlain.prototype.setEditable = function(editable) {
- if (editable) {
- this.textArea.removeAttr('disabled');
- } else {
- this.textArea.attr('disabled', true);
- }
-};
-
-ACEPlain.prototype.focus = function() {
- this.textArea.focus();
-};
-
-ACEPlain.prototype.destroy = function() {
- // nothing
-};
diff --git a/trunk/infrastructure/ace/www/bbtree.js b/trunk/infrastructure/ace/www/bbtree.js
deleted file mode 100644
index 70cb8c0..0000000
--- a/trunk/infrastructure/ace/www/bbtree.js
+++ /dev/null
@@ -1,372 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-function makeBBTree(transferContents, augment) {
-
- var nil = [];
- nil.push(nil,nil);
- nil.level = 0;
- var root = nil;
- augment = (augment || (function(n) {}));
-
- function skew(t) {
- if (t != nil && t[0].level == t.level) {
- // rotate right
- var tmp = t;
- t = t[0];
- tmp[0] = t[1];
- t[1] = tmp;
- reaugment(tmp);
- reaugment(t);
- }
- return t;
- }
-
- function split(t) {
- if (t != nil && t[1][1].level == t.level) {
- // rotate left
- var tmp = t;
- t = t[1];
- tmp[1] = t[0];
- t[0] = tmp;
- t.level++;
- reaugment(tmp);
- reaugment(t);
- }
- return t;
- }
-
- function reaugment(n) {
- if (n != nil) augment(n);
- }
-
- var self = {};
-
- self.insert = function(compare) {
- var n;
- function recurse(t) {
- if (t == nil) {
- t = [nil,nil];
- t.level = 1;
- n = t;
- }
- else {
- var cmp = compare(t);
- if (cmp < 0) {
- t[0] = recurse(t[0]);
- }
- else if (cmp > 0) {
- t[1] = recurse(t[1]);
- }
- t = skew(t);
- t = split(t);
- }
- reaugment(t);
- return t;
- }
- root = recurse(root);
- return n;
- }
-
- self.remove = function(compare) {
- var deleted = nil;
- var last;
- var deletedEqual = false;
- function recurse(t) {
- if (t != nil) {
- last = t;
- var cmp = compare(t);
- if (cmp < 0) {
- t[0] = recurse(t[0]);
- }
- else {
- deleted = t;
- // whether the node called "deleted" is actually a
- // match for deletion
- deletedEqual = (cmp == 0);
- t[1] = recurse(t[1]);
- }
- if (t == last && deleted != nil && deletedEqual) {
- // t may be same node as deleted
- transferContents(t, deleted);
- t = t[1];
- reaugment(deleted);
- deleted = nil;
- }
- else {
- reaugment(t);
- if (t[0].level < t.level-1 ||
- t[1].level < t.level-1) {
- t.level--;
- if (t[1].level > t.level)
- t[1].level = t.level;
- t = skew(t);
- t[1] = skew(t[1]);
- t[1][1] = skew(t[1][1]);
- t = split(t);
- t[1] = split(t[1]);
- }
- }
- }
- return t;
- }
- root = recurse(root);
- }
-
- self.find = function(compare) {
- function recurse(t) {
- if (t == nil) return t;
- var cmp = compare(t);
- if (cmp < 0) {
- return recurse(t[0]);
- }
- else if (cmp > 0) {
- return recurse(t[1]);
- }
- else {
- return t;
- }
- }
- var result = recurse(root);
- return (result != nil && result) || null;
- }
-
- self.root = function() { return root; }
-
- self.forEach = function(func) {
- function recurse(t) {
- if (t != nil) {
- recurse(t[0]);
- func(t);
- recurse(t[1]);
- }
- }
- recurse(root);
- }
-
- return self;
-}
-
-function makeBBList() {
- var length = 0;
- var totalWidth = 0;
-
- function _treeSize(n) { return n.size || 0; }
- function _treeWidth(n) { return n.width || 0; }
- function _width(n) { return (n && n.entry && n.entry.width) || 0; }
-
- function _transferContents(a, b) {
- b.key = a.key;
- b.entry = a.entry;
- }
- function _augment(n) {
- n.size = _treeSize(n[0]) + _treeSize(n[1]) + 1;
- n.width = _treeWidth(n[0]) + _treeWidth(n[1]) + _width(n);
- }
-
- var keyToEntry = {};
-
- var bb = makeBBTree(transferContents, augment);
-
- function makeIndexComparator(indexFunc) {
- var curIndex = _treeSize(bb.root()[0]);
- return function (n) {
- var dir = indexFunc(curIndex, n);
- if (dir < 0) {
- curIndex -= _treeSize(n[0][1]) + 1;
- }
- else if (dir >= 0) {
- curIndex += _treeSize(n[1][0]) + 1;
- }
- return dir;
- }
- }
-
- function makeWidthComparator(widthFunc) {
- var curIndex = _treeWidth(bb.root()[0]);
- return function (n) {
- var dir = indexFunc(curIndex, n);
- if (dir < 0) {
- curIndex -= _treeWidth(n[0][1]) + _width(n[0]);
- }
- else if (dir >= 0) {
- curIndex += _treeWidth(n[1][0]) + _width(n);
- }
- return dir;
- }
- }
-
- function numcomp(a,b) { if (a < b) return -1; if (a > b) return 1; return 0; }
-
- function removeByIndex(idx) {
- var entry;
- bb.remove(makeComparator(function (curIndex, n) {
- var cmp = numcomp(idx, curIndex);
- if (cmp == 0) entry = n.entry;
- return cmp;
- }));
- return entry;
- }
-
- function insertAtIndex(idx, entry) {
- var newNode = bb.insert(makeComparator(function (curIndex) {
- if (idx <= curIndex) return -1;
- return 1;
- }));
- newNode.entry = entry;
- return newNode;
- }
-
- var entriesByKey = {};
-
- var self = {
- splice: function (start, deleteCount, newEntryArray) {
- for(var i=0;i<deleteCount;i++) {
- var oldEntry = removeByIndex(start);
- length--;
- totalWidth -= (entry.width || 0);
- delete entriesByKey[oldEntry.key];
- }
- for(var i=0;i<newEntryArray.length;i++) {
- var entry = newEntryArray[i];
- var newNode = insertAtIndex(start+i, entry);
- length++;
- totalWidth += (entry.width || 0);
- entriesByKey[entry.key] = entry;
- }
- },
- next: function (entry) {
-
- }
- };
-
- return self;
-}
-
-/*function size(n) {
- return n.size || 0;
-}
-
-var a = makeBBTree(function (a,b) {
- b.data = a.data;
-},
- function (n) {
- n.size = size(n[0]) + size(n[1]) + 1;
- });
-
-var arrayRep = [];
-
-function makeComparator(indexFunc) {
- var curIndex = size(a.root()[0]);
- return function (n) {
- var dir = indexFunc(curIndex);
- if (dir < 0) {
- curIndex -= size(n[0][1]) + 1;
- }
- else if (dir >= 0) {
- curIndex += size(n[1][0]) + 1;
- }
- return dir;
- }
-}
-
-function insert(idx, data) {
- arrayRep.splice(idx, 0, data);
- var newNode = a.insert(makeComparator(function (curIndex) {
- if (idx <= curIndex) return -1;
- return 1;
- }));
- newNode.data = data;
- checkRep();
-}
-
-function remove(idx) {
- arrayRep.splice(idx, 1);
- a.remove(makeComparator(function (curIndex) {
- return numcomp(idx, curIndex);
- }));
- checkRep();
-}
-
-function genArray() {
- var array = [];
- a.forEach(function (n) { array.push(n.data); });
- return array;
-}
-
-function checkRep() {
- var array2 = genArray();
- var str1 = array2.join(',');
- var str2 = arrayRep.join(',');
- if (str1 != str2) console.error(str1+" != "+str2);
-
- a.forEach(function(n) {
- if (size(n) != size(n[0]) + size(n[1]) + 1) {
- console.error("size of "+n.data+" is wrong");
- }
- });
-}
-
-function print() {
- console.log(genArray().join(','));
-}
-
-insert(0,1);
-insert(0,2);
-insert(0,3);
-insert(1,4);
-insert(4,5);
-insert(0,6);
-print();
-
-function numcomp(a,b) { if (a < b) return -1; if (a > b) return 1; return 0; }
-*/
-/*var tree = makeBBTree(function(a, b) { b.key = a.key; });
-function insert(x) { tree.insert(function(n) { return numcomp(x, n.key) }).key = x; }
-function remove(x) { tree.remove(function (n) { return numcomp(x, n.key); }); }
-function contains(x) { return !! tree.find(function (n) { return numcomp(x, n.key); }); }
-
-function print() {
- function recurse(t) {
- if (! ('key' in t)) return '';
- return '('+recurse(t[0])+','+t.key+','+recurse(t[1])+')';
- }
- return recurse(tree.root());
-}
-
-
-insert(2);
-insert(1);
-insert(8);
-insert(7);
-console.log(print());
-insert(6);
-insert(3);
-insert(5);
-insert(4);
-console.log(print());
-remove(2);
-remove(1);
-remove(8);
-remove(7);
-console.log(print());
-//remove(6);
-//remove(3);
-//remove(5);
-//remove(4);
-//console.log(print());
-*/ \ No newline at end of file
diff --git a/trunk/infrastructure/ace/www/changesettracker.js b/trunk/infrastructure/ace/www/changesettracker.js
deleted file mode 100644
index d6fe018..0000000
--- a/trunk/infrastructure/ace/www/changesettracker.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-function makeChangesetTracker(scheduler, apool, aceCallbacksProvider) {
-
- // latest official text from server
- var baseAText = Changeset.makeAText("\n");
- // changes applied to baseText that have been submitted
- var submittedChangeset = null;
- // changes applied to submittedChangeset since it was prepared
- var userChangeset = Changeset.identity(1);
- // is the changesetTracker enabled
- var tracking = false;
- // stack state flag so that when we change the rep we don't
- // handle the notification recursively. When setting, always
- // unset in a "finally" block. When set to true, the setter
- // takes change of userChangeset.
- var applyingNonUserChanges = false;
-
- var changeCallback = null;
-
- var changeCallbackTimeout = null;
- function setChangeCallbackTimeout() {
- // can call this multiple times per call-stack, because
- // we only schedule a call to changeCallback if it exists
- // and if there isn't a timeout already scheduled.
- if (changeCallback && changeCallbackTimeout === null) {
- changeCallbackTimeout = scheduler.setTimeout(function() {
- try {
- changeCallback();
- }
- finally {
- changeCallbackTimeout = null;
- }
- }, 0);
- }
- }
-
- var self;
- return self = {
- isTracking: function() { return tracking; },
- setBaseText: function(text) {
- self.setBaseAttributedText(Changeset.makeAText(text), null);
- },
- setBaseAttributedText: function(atext, apoolJsonObj) {
- aceCallbacksProvider.withCallbacks("setBaseText", function(callbacks) {
- tracking = true;
- baseAText = Changeset.cloneAText(atext);
- if (apoolJsonObj) {
- var wireApool = (new AttribPool()).fromJsonable(apoolJsonObj);
- baseAText.attribs = Changeset.moveOpsToNewPool(baseAText.attribs, wireApool, apool);
- }
- submittedChangeset = null;
- userChangeset = Changeset.identity(atext.text.length);
- applyingNonUserChanges = true;
- try {
- callbacks.setDocumentAttributedText(atext);
- }
- finally {
- applyingNonUserChanges = false;
- }
- });
- },
- composeUserChangeset: function(c) {
- if (! tracking) return;
- if (applyingNonUserChanges) return;
- if (Changeset.isIdentity(c)) return;
- userChangeset = Changeset.compose(userChangeset, c, apool);
-
- setChangeCallbackTimeout();
- },
- applyChangesToBase: function (c, optAuthor, apoolJsonObj) {
- if (! tracking) return;
-
- aceCallbacksProvider.withCallbacks("applyChangesToBase", function(callbacks) {
-
- if (apoolJsonObj) {
- var wireApool = (new AttribPool()).fromJsonable(apoolJsonObj);
- c = Changeset.moveOpsToNewPool(c, wireApool, apool);
- }
-
- baseAText = Changeset.applyToAText(c, baseAText, apool);
-
- var c2 = c;
- if (submittedChangeset) {
- var oldSubmittedChangeset = submittedChangeset;
- submittedChangeset = Changeset.follow(c, oldSubmittedChangeset, false, apool);
- c2 = Changeset.follow(oldSubmittedChangeset, c, true, apool);
- }
-
- var preferInsertingAfterUserChanges = true;
- var oldUserChangeset = userChangeset;
- userChangeset = Changeset.follow(c2, oldUserChangeset, preferInsertingAfterUserChanges, apool);
- var postChange =
- Changeset.follow(oldUserChangeset, c2, ! preferInsertingAfterUserChanges, apool);
-
- var preferInsertionAfterCaret = true; //(optAuthor && optAuthor > thisAuthor);
-
- applyingNonUserChanges = true;
- try {
- callbacks.applyChangesetToDocument(postChange, preferInsertionAfterCaret);
- }
- finally {
- applyingNonUserChanges = false;
- }
- });
- },
- prepareUserChangeset: function() {
- // If there are user changes to submit, 'changeset' will be the
- // changeset, else it will be null.
- var toSubmit;
- if (submittedChangeset) {
- // submission must have been canceled, prepare new changeset
- // that includes old submittedChangeset
- toSubmit = Changeset.compose(submittedChangeset, userChangeset, apool);
- }
- else {
- if (Changeset.isIdentity(userChangeset)) toSubmit = null;
- else toSubmit = userChangeset;
- }
-
- var cs = null;
- if (toSubmit) {
- submittedChangeset = toSubmit;
- userChangeset = Changeset.identity(Changeset.newLen(toSubmit));
-
- cs = toSubmit;
- }
- var wireApool = null;
- if (cs) {
- var forWire = Changeset.prepareForWire(cs, apool);
- wireApool = forWire.pool.toJsonable();
- cs = forWire.translated;
- }
-
- var data = { changeset: cs, apool: wireApool };
- return data;
- },
- applyPreparedChangesetToBase: function() {
- if (! submittedChangeset) {
- // violation of protocol; use prepareUserChangeset first
- throw new Error("applySubmittedChangesToBase: no submitted changes to apply");
- }
- //bumpDebug("applying committed changeset: "+submittedChangeset.encodeToString(false));
- baseAText = Changeset.applyToAText(submittedChangeset, baseAText, apool);
- submittedChangeset = null;
- },
- setUserChangeNotificationCallback: function (callback) {
- changeCallback = callback;
- },
- hasUncommittedChanges: function() {
- return !!(submittedChangeset || (! Changeset.isIdentity(userChangeset)));
- }
- };
-
-}
diff --git a/trunk/infrastructure/ace/www/colorutils.js b/trunk/infrastructure/ace/www/colorutils.js
deleted file mode 100644
index bb61de3..0000000
--- a/trunk/infrastructure/ace/www/colorutils.js
+++ /dev/null
@@ -1,91 +0,0 @@
-// THIS FILE IS ALSO SERVED AS CLIENT-SIDE JS
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var colorutils = {};
-
-// "#ffffff" or "#fff" or "ffffff" or "fff" to [1.0, 1.0, 1.0]
-colorutils.css2triple = function(cssColor) {
- var sixHex = colorutils.css2sixhex(cssColor);
- function hexToFloat(hh) {
- return Number("0x"+hh)/255;
- }
- return [hexToFloat(sixHex.substr(0,2)),
- hexToFloat(sixHex.substr(2,2)),
- hexToFloat(sixHex.substr(4,2))];
-}
-
-// "#ffffff" or "#fff" or "ffffff" or "fff" to "ffffff"
-colorutils.css2sixhex = function(cssColor) {
- var h = /[0-9a-fA-F]+/.exec(cssColor)[0];
- if (h.length != 6) {
- var a = h.charAt(0);
- var b = h.charAt(1);
- var c = h.charAt(2);
- h = a+a+b+b+c+c;
- }
- return h;
-}
-
-// [1.0, 1.0, 1.0] -> "#ffffff"
-colorutils.triple2css = function(triple) {
- function floatToHex(n) {
- var n2 = colorutils.clamp(Math.round(n*255), 0, 255);
- return ("0"+n2.toString(16)).slice(-2);
- }
- return "#" + floatToHex(triple[0]) +
- floatToHex(triple[1]) + floatToHex(triple[2]);
-}
-
-
-colorutils.clamp = function(v,bot,top) { return v < bot ? bot : (v > top ? top : v); };
-colorutils.min3 = function(a,b,c) { return (a < b) ? (a < c ? a : c) : (b < c ? b : c); };
-colorutils.max3 = function(a,b,c) { return (a > b) ? (a > c ? a : c) : (b > c ? b : c); };
-colorutils.colorMin = function(c) { return colorutils.min3(c[0], c[1], c[2]); };
-colorutils.colorMax = function(c) { return colorutils.max3(c[0], c[1], c[2]); };
-colorutils.scale = function(v, bot, top) { return colorutils.clamp(bot + v*(top-bot), 0, 1); };
-colorutils.unscale = function(v, bot, top) { return colorutils.clamp((v-bot)/(top-bot), 0, 1); };
-
-colorutils.scaleColor = function(c, bot, top) {
- return [colorutils.scale(c[0], bot, top),
- colorutils.scale(c[1], bot, top),
- colorutils.scale(c[2], bot, top)];
-}
-
-colorutils.unscaleColor = function(c, bot, top) {
- return [colorutils.unscale(c[0], bot, top),
- colorutils.unscale(c[1], bot, top),
- colorutils.unscale(c[2], bot, top)];
-}
-
-colorutils.luminosity = function(c) {
- // rule of thumb for RGB brightness; 1.0 is white
- return c[0]*0.30 + c[1]*0.59 + c[2]*0.11;
-}
-
-colorutils.saturate = function(c) {
- var min = colorutils.colorMin(c);
- var max = colorutils.colorMax(c);
- if (max - min <= 0) return [1.0, 1.0, 1.0];
- return colorutils.unscaleColor(c, min, max);
-}
-
-colorutils.blend = function(c1, c2, t) {
- return [colorutils.scale(t, c1[0], c2[0]),
- colorutils.scale(t, c1[1], c2[1]),
- colorutils.scale(t, c1[2], c2[2])];
-}
diff --git a/trunk/infrastructure/ace/www/contentcollector.js b/trunk/infrastructure/ace/www/contentcollector.js
deleted file mode 100644
index c5d8ddb..0000000
--- a/trunk/infrastructure/ace/www/contentcollector.js
+++ /dev/null
@@ -1,509 +0,0 @@
-// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.contentcollector
-// %APPJET%: import("etherpad.collab.ace.easysync2.Changeset")
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var _MAX_LIST_LEVEL = 8;
-
-function sanitizeUnicode(s) {
- return s.replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?');
-}
-
-function makeContentCollector(collectStyles, browser, apool, domInterface,
- className2Author) {
- browser = browser || {};
-
- var dom = domInterface || {
- isNodeText: function(n) {
- return (n.nodeType == 3);
- },
- nodeTagName: function(n) {
- return n.tagName;
- },
- nodeValue: function(n) {
- return n.nodeValue;
- },
- nodeNumChildren: function(n) {
- return n.childNodes.length;
- },
- nodeChild: function(n, i) {
- return n.childNodes.item(i);
- },
- nodeProp: function(n, p) {
- return n[p];
- },
- nodeAttr: function(n, a) {
- return n.getAttribute(a);
- },
- optNodeInnerHTML: function(n) {
- return n.innerHTML;
- }
- };
-
- var _blockElems = { "div":1, "p":1, "pre":1, "li":1 };
- function isBlockElement(n) {
- return !!_blockElems[(dom.nodeTagName(n) || "").toLowerCase()];
- }
- function textify(str) {
- return sanitizeUnicode(
- str.replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' '));
- }
- function getAssoc(node, name) {
- return dom.nodeProp(node, "_magicdom_"+name);
- }
-
- var lines = (function() {
- var textArray = [];
- var attribsArray = [];
- var attribsBuilder = null;
- var op = Changeset.newOp('+');
- var self = {
- length: function() { return textArray.length; },
- atColumnZero: function() {
- return textArray[textArray.length-1] === "";
- },
- startNew: function() {
- textArray.push("");
- self.flush(true);
- attribsBuilder = Changeset.smartOpAssembler();
- },
- textOfLine: function(i) { return textArray[i]; },
- appendText: function(txt, attrString) {
- textArray[textArray.length-1] += txt;
- //dmesg(txt+" / "+attrString);
- op.attribs = attrString;
- op.chars = txt.length;
- attribsBuilder.append(op);
- },
- textLines: function() { return textArray.slice(); },
- attribLines: function() { return attribsArray; },
- // call flush only when you're done
- flush: function(withNewline) {
- if (attribsBuilder) {
- attribsArray.push(attribsBuilder.toString());
- attribsBuilder = null;
- }
- }
- };
- self.startNew();
- return self;
- }());
- var cc = {};
- function _ensureColumnZero(state) {
- if (! lines.atColumnZero()) {
- _startNewLine(state);
- }
- }
- var selection, startPoint, endPoint;
- var selStart = [-1,-1], selEnd = [-1,-1];
- var blockElems = { "div":1, "p":1, "pre":1 };
- function _isEmpty(node, state) {
- // consider clean blank lines pasted in IE to be empty
- if (dom.nodeNumChildren(node) == 0) return true;
- if (dom.nodeNumChildren(node) == 1 &&
- getAssoc(node, "shouldBeEmpty") && dom.optNodeInnerHTML(node) == "&nbsp;"
- && ! getAssoc(node, "unpasted")) {
- if (state) {
- var child = dom.nodeChild(node, 0);
- _reachPoint(child, 0, state);
- _reachPoint(child, 1, state);
- }
- return true;
- }
- return false;
- }
- function _pointHere(charsAfter, state) {
- var ln = lines.length()-1;
- var chr = lines.textOfLine(ln).length;
- if (chr == 0 && state.listType && state.listType != 'none') {
- chr += 1; // listMarker
- }
- chr += charsAfter;
- return [ln, chr];
- }
- function _reachBlockPoint(nd, idx, state) {
- if (! dom.isNodeText(nd)) _reachPoint(nd, idx, state);
- }
- function _reachPoint(nd, idx, state) {
- if (startPoint && nd == startPoint.node && startPoint.index == idx) {
- selStart = _pointHere(0, state);
- }
- if (endPoint && nd == endPoint.node && endPoint.index == idx) {
- selEnd = _pointHere(0, state);
- }
- }
- function _incrementFlag(state, flagName) {
- state.flags[flagName] = (state.flags[flagName] || 0)+1;
- }
- function _decrementFlag(state, flagName) {
- state.flags[flagName]--;
- }
- function _incrementAttrib(state, attribName) {
- if (! state.attribs[attribName]) {
- state.attribs[attribName] = 1;
- }
- else {
- state.attribs[attribName]++;
- }
- _recalcAttribString(state);
- }
- function _decrementAttrib(state, attribName) {
- state.attribs[attribName]--;
- _recalcAttribString(state);
- }
- function _enterList(state, listType) {
- var oldListType = state.listType;
- state.listLevel = (state.listLevel || 0)+1;
- if (listType != 'none') {
- state.listNesting = (state.listNesting || 0)+1;
- }
- state.listType = listType;
- _recalcAttribString(state);
- return oldListType;
- }
- function _exitList(state, oldListType) {
- state.listLevel--;
- if (state.listType != 'none') {
- state.listNesting--;
- }
- state.listType = oldListType;
- _recalcAttribString(state);
- }
- function _enterAuthor(state, author) {
- var oldAuthor = state.author;
- state.authorLevel = (state.authorLevel || 0)+1;
- state.author = author;
- _recalcAttribString(state);
- return oldAuthor;
- }
- function _exitAuthor(state, oldAuthor) {
- state.authorLevel--;
- state.author = oldAuthor;
- _recalcAttribString(state);
- }
- function _recalcAttribString(state) {
- var lst = [];
- for(var a in state.attribs) {
- if (state.attribs[a]) {
- lst.push([a,'true']);
- }
- }
- if (state.authorLevel > 0) {
- var authorAttrib = ['author', state.author];
- if (apool.putAttrib(authorAttrib, true) >= 0) {
- // require that author already be in pool
- // (don't add authors from other documents, etc.)
- lst.push(authorAttrib);
- }
- }
- state.attribString = Changeset.makeAttribsString('+', lst, apool);
- }
- function _produceListMarker(state) {
- lines.appendText('*', Changeset.makeAttribsString(
- '+', [['list', state.listType],
- ['insertorder', 'first']],
- apool));
- }
- function _startNewLine(state) {
- if (state) {
- var atBeginningOfLine = lines.textOfLine(lines.length()-1).length == 0;
- if (atBeginningOfLine && state.listType && state.listType != 'none') {
- _produceListMarker(state);
- }
- }
- lines.startNew();
- }
- cc.notifySelection = function (sel) {
- if (sel) {
- selection = sel;
- startPoint = selection.startPoint;
- endPoint = selection.endPoint;
- }
- };
- cc.collectContent = function (node, state) {
- if (! state) {
- state = {flags: {/*name -> nesting counter*/},
- attribs: {/*name -> nesting counter*/},
- attribString: ''};
- }
- var isBlock = isBlockElement(node);
- var isEmpty = _isEmpty(node, state);
- if (isBlock) _ensureColumnZero(state);
- var startLine = lines.length()-1;
- _reachBlockPoint(node, 0, state);
- if (dom.isNodeText(node)) {
- var txt = dom.nodeValue(node);
- var rest = '';
- var x = 0; // offset into original text
- if (txt.length == 0) {
- if (startPoint && node == startPoint.node) {
- selStart = _pointHere(0, state);
- }
- if (endPoint && node == endPoint.node) {
- selEnd = _pointHere(0, state);
- }
- }
- while (txt.length > 0) {
- var consumed = 0;
- if (state.flags.preMode) {
- var firstLine = txt.split('\n',1)[0];
- consumed = firstLine.length+1;
- rest = txt.substring(consumed);
- txt = firstLine;
- }
- else { /* will only run this loop body once */ }
- if (startPoint && node == startPoint.node &&
- startPoint.index-x <= txt.length) {
- selStart = _pointHere(startPoint.index-x, state);
- }
- if (endPoint && node == endPoint.node &&
- endPoint.index-x <= txt.length) {
- selEnd = _pointHere(endPoint.index-x, state);
- }
- var txt2 = txt;
- if ((! state.flags.preMode) && /^[\r\n]*$/.exec(txt)) {
- // prevents textnodes containing just "\n" from being significant
- // in safari when pasting text, now that we convert them to
- // spaces instead of removing them, because in other cases
- // removing "\n" from pasted HTML will collapse words together.
- txt2 = "";
- }
- var atBeginningOfLine = lines.textOfLine(lines.length()-1).length == 0;
- if (atBeginningOfLine) {
- // newlines in the source mustn't become spaces at beginning of line box
- txt2 = txt2.replace(/^\n*/, '');
- }
- if (atBeginningOfLine && state.listType && state.listType != 'none') {
- _produceListMarker(state);
- }
- lines.appendText(textify(txt2), state.attribString);
- x += consumed;
- txt = rest;
- if (txt.length > 0) {
- _startNewLine(state);
- }
- }
- }
- else {
- var tname = (dom.nodeTagName(node) || "").toLowerCase();
- if (tname == "br") {
- _startNewLine(state);
- }
- else if (tname == "script" || tname == "style") {
- // ignore
- }
- else if (! isEmpty) {
- var styl = dom.nodeAttr(node, "style");
- var cls = dom.nodeProp(node, "className");
-
- var isPre = (tname == "pre");
- if ((! isPre) && browser.safari) {
- isPre = (styl && /\bwhite-space:\s*pre\b/i.exec(styl));
- }
- if (isPre) _incrementFlag(state, 'preMode');
- var attribs = null;
- var oldListTypeOrNull = null;
- var oldAuthorOrNull = null;
- if (collectStyles) {
- function doAttrib(na) {
- attribs = (attribs || []);
- attribs.push(na);
- _incrementAttrib(state, na);
- }
- if (tname == "b" || (styl && /\bfont-weight:\s*bold\b/i.exec(styl)) ||
- tname == "strong") {
- doAttrib("bold");
- }
- if (tname == "i" || (styl && /\bfont-style:\s*italic\b/i.exec(styl)) ||
- tname == "em") {
- doAttrib("italic");
- }
- if (tname == "u" || (styl && /\btext-decoration:\s*underline\b/i.exec(styl)) ||
- tname == "ins") {
- doAttrib("underline");
- }
- if (tname == "s" || (styl && /\btext-decoration:\s*line-through\b/i.exec(styl)) ||
- tname == "del") {
- doAttrib("strikethrough");
- }
- if (tname == "ul") {
- var type;
- var rr = cls && /(?:^| )list-(bullet[12345678])\b/.exec(cls);
- type = rr && rr[1] || "bullet"+
- String(Math.min(_MAX_LIST_LEVEL, (state.listNesting||0)+1));
- oldListTypeOrNull = (_enterList(state, type) || 'none');
- }
- else if ((tname == "div" || tname == "p") && cls &&
- cls.match(/(?:^| )ace-line\b/)) {
- oldListTypeOrNull = (_enterList(state, type) || 'none');
- }
- if (className2Author && cls) {
- var classes = cls.match(/\S+/g);
- if (classes && classes.length > 0) {
- for(var i=0;i<classes.length;i++) {
- var c = classes[i];
- var a = className2Author(c);
- if (a) {
- oldAuthorOrNull = (_enterAuthor(state, a) || 'none');
- break;
- }
- }
- }
- }
- }
-
- var nc = dom.nodeNumChildren(node);
- for(var i=0;i<nc;i++) {
- var c = dom.nodeChild(node, i);
- cc.collectContent(c, state);
- }
-
- if (isPre) _decrementFlag(state, 'preMode');
- if (attribs) {
- for(var i=0;i<attribs.length;i++) {
- _decrementAttrib(state, attribs[i]);
- }
- }
- if (oldListTypeOrNull) {
- _exitList(state, oldListTypeOrNull);
- }
- if (oldAuthorOrNull) {
- _exitAuthor(state, oldAuthorOrNull);
- }
- }
- }
- if (! browser.msie) {
- _reachBlockPoint(node, 1, state);
- }
- if (isBlock) {
- if (lines.length()-1 == startLine) {
- _startNewLine(state);
- }
- else {
- _ensureColumnZero(state);
- }
- }
-
- if (browser.msie) {
- // in IE, a point immediately after a DIV appears on the next line
- _reachBlockPoint(node, 1, state);
- }
- };
- // can pass a falsy value for end of doc
- cc.notifyNextNode = function (node) {
- // an "empty block" won't end a line; this addresses an issue in IE with
- // typing into a blank line at the end of the document. typed text
- // goes into the body, and the empty line div still looks clean.
- // it is incorporated as dirty by the rule that a dirty region has
- // to end a line.
- if ((!node) || (isBlockElement(node) && !_isEmpty(node))) {
- _ensureColumnZero(null);
- }
- };
- // each returns [line, char] or [-1,-1]
- var getSelectionStart = function() { return selStart; };
- var getSelectionEnd = function() { return selEnd; };
-
- // returns array of strings for lines found, last entry will be "" if
- // last line is complete (i.e. if a following span should be on a new line).
- // can be called at any point
- cc.getLines = function() { return lines.textLines(); };
-
- //cc.applyHints = function(hints) {
- //if (hints.pastedLines) {
- //
- //}
- //}
-
- cc.finish = function() {
- lines.flush();
- var lineAttribs = lines.attribLines();
- var lineStrings = cc.getLines();
-
- lineStrings.length--;
- lineAttribs.length--;
-
- var ss = getSelectionStart();
- var se = getSelectionEnd();
-
- function fixLongLines() {
- // design mode does not deal with with really long lines!
- var lineLimit = 2000; // chars
- var buffer = 10; // chars allowed over before wrapping
- var linesWrapped = 0;
- var numLinesAfter = 0;
- for(var i=lineStrings.length-1; i>=0; i--) {
- var oldString = lineStrings[i];
- var oldAttribString = lineAttribs[i];
- if (oldString.length > lineLimit+buffer) {
- var newStrings = [];
- var newAttribStrings = [];
- while (oldString.length > lineLimit) {
- //var semiloc = oldString.lastIndexOf(';', lineLimit-1);
- //var lengthToTake = (semiloc >= 0 ? (semiloc+1) : lineLimit);
- lengthToTake = lineLimit;
- newStrings.push(oldString.substring(0, lengthToTake));
- oldString = oldString.substring(lengthToTake);
- newAttribStrings.push(Changeset.subattribution(oldAttribString,
- 0, lengthToTake));
- oldAttribString = Changeset.subattribution(oldAttribString,
- lengthToTake);
- }
- if (oldString.length > 0) {
- newStrings.push(oldString);
- newAttribStrings.push(oldAttribString);
- }
- function fixLineNumber(lineChar) {
- if (lineChar[0] < 0) return;
- var n = lineChar[0];
- var c = lineChar[1];
- if (n > i) {
- n += (newStrings.length-1);
- }
- else if (n == i) {
- var a = 0;
- while (c > newStrings[a].length) {
- c -= newStrings[a].length;
- a++;
- }
- n += a;
- }
- lineChar[0] = n;
- lineChar[1] = c;
- }
- fixLineNumber(ss);
- fixLineNumber(se);
- linesWrapped++;
- numLinesAfter += newStrings.length;
-
- newStrings.unshift(i, 1);
- lineStrings.splice.apply(lineStrings, newStrings);
- newAttribStrings.unshift(i, 1);
- lineAttribs.splice.apply(lineAttribs, newAttribStrings);
- }
- }
- return {linesWrapped:linesWrapped, numLinesAfter:numLinesAfter};
- }
- var wrapData = fixLongLines();
-
- return { selStart: ss, selEnd: se, linesWrapped: wrapData.linesWrapped,
- numLinesAfter: wrapData.numLinesAfter,
- lines: lineStrings, lineAttribs: lineAttribs };
- }
-
- return cc;
-}
diff --git a/trunk/infrastructure/ace/www/cssmanager.js b/trunk/infrastructure/ace/www/cssmanager.js
deleted file mode 100644
index a5c549b..0000000
--- a/trunk/infrastructure/ace/www/cssmanager.js
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function makeCSSManager(emptyStylesheetTitle) {
-
- function getSheetByTitle(title) {
- var allSheets = document.styleSheets;
- for(var i=0;i<allSheets.length;i++) {
- var s = allSheets[i];
- if (s.title == title) {
- return s;
- }
- }
- return null;
- }
-
- /*function getSheetTagByTitle(title) {
- var allStyleTags = document.getElementsByTagName("style");
- for(var i=0;i<allStyleTags.length;i++) {
- var t = allStyleTags[i];
- if (t.title == title) {
- return t;
- }
- }
- return null;
- }*/
-
- var browserSheet = getSheetByTitle(emptyStylesheetTitle);
- //var browserTag = getSheetTagByTitle(emptyStylesheetTitle);
- function browserRules() { return (browserSheet.cssRules || browserSheet.rules); }
- function browserDeleteRule(i) {
- if (browserSheet.deleteRule) browserSheet.deleteRule(i);
- else browserSheet.removeRule(i);
- }
- function browserInsertRule(i, selector) {
- if (browserSheet.insertRule) browserSheet.insertRule(selector+' {}', i);
- else browserSheet.addRule(selector, null, i);
- }
- var selectorList = [];
-
- function indexOfSelector(selector) {
- for(var i=0;i<selectorList.length;i++) {
- if (selectorList[i] == selector) {
- return i;
- }
- }
- return -1;
- }
-
- function selectorStyle(selector) {
- var i = indexOfSelector(selector);
- if (i < 0) {
- // add selector
- browserInsertRule(0, selector);
- selectorList.splice(0, 0, selector);
- i = 0;
- }
- return browserRules().item(i).style;
- }
-
- function removeSelectorStyle(selector) {
- var i = indexOfSelector(selector);
- if (i >= 0) {
- browserDeleteRule(i);
- selectorList.splice(i, 1);
- }
- }
-
- return {selectorStyle:selectorStyle, removeSelectorStyle:removeSelectorStyle,
- info: function() {
- return selectorList.length+":"+browserRules().length;
- }};
-}
diff --git a/trunk/infrastructure/ace/www/dev.html b/trunk/infrastructure/ace/www/dev.html
deleted file mode 100644
index 0a9768e..0000000
--- a/trunk/infrastructure/ace/www/dev.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html debug="true">
- <head>
- <script src="jquery-1.2.1.js"></script>
- <script src="ace2_common.js"></script>
- <script src="ace2_outer.js"></script>
- <script src="firebug/firebug.js"></script>
- <script>
-function updateHTMLDisplay(html) {
- $("#htmldisplay").html(html);
-}
-
-function addMessage(str) {
- var li = document.createElement("li");
- li.innerHTML = str;
- $("#messages").prepend(li);
-}
- </script>
- <style>
- #devstuff {
- background-color: #ddd;
- padding: 1em;
- }
- #iframecontainer iframe { width: 500px; height: 300px; }
- </style>
- </head>
- <body>
- <div id="iframecontainer"><!-- --></div>
- <hr>
- <div id="devstuff">
- <p><input type="text" id="cmdinput" size="100">
- <button onclick="$('#cmdresult').html(htmlPrettyEscape(String(eval($('#cmdinput').get(0).value))))">Execute</button></p>
- <p id="cmdresult"><!-- --></p>
- <p id="htmldisplay"><!-- --></p>
- <ul id="messages"><!-- --></ul>
- </div>
- </body>
-</html>
diff --git a/trunk/infrastructure/ace/www/domline.js b/trunk/infrastructure/ace/www/domline.js
deleted file mode 100644
index 70f86cc..0000000
--- a/trunk/infrastructure/ace/www/domline.js
+++ /dev/null
@@ -1,210 +0,0 @@
-// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.domline
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var domline = {};
-domline.noop = function() {};
-domline.identity = function(x) { return x; };
-
-domline.addToLineClass = function(lineClass, cls) {
- // an "empty span" at any point can be used to add classes to
- // the line, using line:className. otherwise, we ignore
- // the span.
- cls.replace(/\S+/g, function (c) {
- if (c.indexOf("line:") == 0) {
- // add class to line
- lineClass = (lineClass ? lineClass+' ' : '')+c.substring(5);
- }
- });
- return lineClass;
-}
-
-// if "document" is falsy we don't create a DOM node, just
-// an object with innerHTML and className
-domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) {
- var result = { node: null,
- appendSpan: domline.noop,
- prepareForAdd: domline.noop,
- notifyAdded: domline.noop,
- clearSpans: domline.noop,
- finishUpdate: domline.noop,
- lineMarker: 0 };
-
- var browser = (optBrowser || {});
- var document = optDocument;
-
- if (document) {
- result.node = document.createElement("div");
- }
- else {
- result.node = {innerHTML: '', className: ''};
- }
-
- var html = [];
- var preHtml, postHtml;
- var curHTML = null;
- function processSpaces(s) {
- return domline.processSpaces(s, doesWrap);
- }
- var identity = domline.identity;
- var perTextNodeProcess = (doesWrap ? identity : processSpaces);
- var perHtmlLineProcess = (doesWrap ? processSpaces : identity);
- var lineClass = 'ace-line';
- result.appendSpan = function(txt, cls) {
- if (cls.indexOf('list') >= 0) {
- var listType = /(?:^| )list:(\S+)/.exec(cls);
- if (listType) {
- listType = listType[1];
- if (listType) {
- preHtml = '<ul class="list-'+listType+'"><li>';
- postHtml = '</li></ul>';
- }
- result.lineMarker += txt.length;
- return; // don't append any text
- }
- }
- var href = null;
- var simpleTags = null;
- if (cls.indexOf('url') >= 0) {
- cls = cls.replace(/(^| )url:(\S+)/g, function(x0, space, url) {
- href = url;
- return space+"url";
- });
- }
- if (cls.indexOf('tag') >= 0) {
- cls = cls.replace(/(^| )tag:(\S+)/g, function(x0, space, tag) {
- if (! simpleTags) simpleTags = [];
- simpleTags.push(tag.toLowerCase());
- return space+tag;
- });
- }
- if ((! txt) && cls) {
- lineClass = domline.addToLineClass(lineClass, cls);
- }
- else if (txt) {
- var extraOpenTags = "";
- var extraCloseTags = "";
- if (href) {
- extraOpenTags = extraOpenTags+'<a href="'+
- href.replace(/\"/g, '&quot;')+'">';
- extraCloseTags = '</a>'+extraCloseTags;
- }
- if (simpleTags) {
- simpleTags.sort();
- extraOpenTags = extraOpenTags+'<'+simpleTags.join('><')+'>';
- simpleTags.reverse();
- extraCloseTags = '</'+simpleTags.join('></')+'>'+extraCloseTags;
- }
- html.push('<span class="',cls||'','">',extraOpenTags,
- perTextNodeProcess(domline.escapeHTML(txt)),
- extraCloseTags,'</span>');
- }
- };
- result.clearSpans = function() {
- html = [];
- lineClass = ''; // non-null to cause update
- result.lineMarker = 0;
- };
- function writeHTML() {
- var newHTML = perHtmlLineProcess(html.join(''));
- if (! newHTML) {
- if ((! document) || (! optBrowser)) {
- newHTML += '&nbsp;';
- }
- else if (! browser.msie) {
- newHTML += '<br/>';
- }
- }
- if (nonEmpty) {
- newHTML = (preHtml||'')+newHTML+(postHtml||'');
- }
- html = preHtml = postHtml = null; // free memory
- if (newHTML !== curHTML) {
- curHTML = newHTML;
- result.node.innerHTML = curHTML;
- }
- if (lineClass !== null) result.node.className = lineClass;
- }
- result.prepareForAdd = writeHTML;
- result.finishUpdate = writeHTML;
- result.getInnerHTML = function() { return curHTML || ''; };
-
- return result;
-};
-
-domline.escapeHTML = function(s) {
- var re = /[&<>'"]/g; /']/; // stupid indentation thing
- if (! re.MAP) {
- // persisted across function calls!
- re.MAP = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&#34;',
- "'": '&#39;'
- };
- }
- return s.replace(re, function(c) { return re.MAP[c]; });
-};
-
-domline.processSpaces = function(s, doesWrap) {
- if (s.indexOf("<") < 0 && ! doesWrap) {
- // short-cut
- return s.replace(/ /g, '&nbsp;');
- }
- var parts = [];
- s.replace(/<[^>]*>?| |[^ <]+/g, function(m) { parts.push(m); });
- if (doesWrap) {
- var endOfLine = true;
- var beforeSpace = false;
- // last space in a run is normal, others are nbsp,
- // end of line is nbsp
- for(var i=parts.length-1;i>=0;i--) {
- var p = parts[i];
- if (p == " ") {
- if (endOfLine || beforeSpace)
- parts[i] = '&nbsp;';
- endOfLine = false;
- beforeSpace = true;
- }
- else if (p.charAt(0) != "<") {
- endOfLine = false;
- beforeSpace = false;
- }
- }
- // beginning of line is nbsp
- for(var i=0;i<parts.length;i++) {
- var p = parts[i];
- if (p == " ") {
- parts[i] = '&nbsp;';
- break;
- }
- else if (p.charAt(0) != "<") {
- break;
- }
- }
- }
- else {
- for(var i=0;i<parts.length;i++) {
- var p = parts[i];
- if (p == " ") {
- parts[i] = '&nbsp;';
- }
- }
- }
- return parts.join('');
-};
diff --git a/trunk/infrastructure/ace/www/easy_sync.js b/trunk/infrastructure/ace/www/easy_sync.js
deleted file mode 100644
index 86a4327..0000000
--- a/trunk/infrastructure/ace/www/easy_sync.js
+++ /dev/null
@@ -1,923 +0,0 @@
-// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.easysync1
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function Changeset(arg) {
-
- var array;
- if ((typeof arg) == "string") {
- // constant
- array = [Changeset.MAGIC, 0, arg.length, 0, 0, arg];
- }
- else if ((typeof arg) == "number") {
- var n = Math.round(arg);
- // delete-all on n-length text (useful for making a "builder")
- array = [Changeset.MAGIC, n, 0, 0, 0, ""];
- }
- else if (! arg) {
- // identity on 0-length text
- array = [Changeset.MAGIC, 0, 0, 0, 0, ""];
- }
- else if (arg.isChangeset) {
- return arg;
- }
- else array = arg;
-
- array.isChangeset = true;
-
- // OOP style: attach generic methods to array object, hold no state in environment
-
- //function error(msg) { top.console.error(msg); top.console.trace(); }
- function error(msg) { var e = new Error(msg); e.easysync = true; throw e; }
- function assert(b, msg) { if (! b) error("Changeset: "+String(msg)); }
- function min(x, y) { return (x < y) ? x : y; }
- Changeset._assert = assert;
-
- array.isIdentity = function() {
- return this.length == 6 && this[1] == this[2] && this[3] == 0 &&
- this[4] == this[1] && this[5] == "";
- }
-
- array.eachStrip = function(func, thisObj) {
- // inside "func", the method receiver will be "this" by default,
- // or you can pass an object.
- for(var i=0;i<this.numStrips();i++) {
- var ptr = 3 + i*3;
- if (func.call(thisObj || this, this[ptr], this[ptr+1], this[ptr+2], i))
- return true;
- }
- return false;
- }
-
- array.numStrips = function() { return (this.length-3)/3; };
- array.oldLen = function() { return this[1]; };
- array.newLen = function() { return this[2]; };
-
- array.checkRep = function() {
- assert(this[0] == Changeset.MAGIC, "bad magic");
- assert(this[1] >= 0, "bad old text length");
- assert(this[2] >= 0, "bad new text length");
- assert((this.length % 3) == 0, "bad array length");
- assert(this.length >= 6, "must be at least one strip");
- var numStrips = this.numStrips();
- var oldLen = this[1];
- var newLen = this[2];
- // iterate over the "text strips"
- var actualNewLen = 0;
- this.eachStrip(function(startIndex, numTaken, newText, i) {
- var s = startIndex, t = numTaken, n = newText;
- var isFirst = (i == 0);
- var isLast = (i == numStrips-1);
- assert(t >= 0, "can't take negative number of chars");
- assert(isFirst || t > 0, "all strips but first must take");
- assert((t > 0) || (s == 0), "if first strip doesn't take, must have 0 startIndex");
- assert(s >= 0 && s + t <= oldLen, "bad index: "+this.toString());
- assert(t > 0 || n.length > 0 || (isFirst && isLast), "empty strip must be first and only");
- if (! isLast) {
- var s2 = this[3 + i*3 + 3]; // startIndex of following strip
- var gap = s2 - (s + t);
- assert(gap >= 0, "overlapping or out-of-order strips: "+this.toString());
- assert(gap > 0 || n.length > 0, "touching strips with no added text");
- }
- actualNewLen += t + n.length;
- });
- assert(newLen == actualNewLen, "calculated new text length doesn't match");
- }
-
- array.applyToText = function(text) {
- assert(text.length == this.oldLen(), "mismatched apply: "+text.length+" / "+this.oldLen());
- var buf = [];
- this.eachStrip(function (s, t, n) {
- buf.push(text.substr(s, t), n);
- });
- return buf.join('');
- }
-
- function _makeBuilder(oldLen, supportAuthors) {
- var C = Changeset(oldLen);
- if (supportAuthors) {
- _ensureAuthors(C);
- }
- return C.builder();
- }
-
- function _getNumInserted(C) {
- var numChars = 0;
- C.eachStrip(function(s,t,n) {
- numChars += n.length;
- });
- return numChars;
- }
-
- function _ensureAuthors(C) {
- if (! C.authors) {
- C.setAuthor();
- }
- return C;
- }
-
- array.setAuthor = function(author) {
- var C = this;
- // authors array has even length >= 2;
- // alternates [numChars1, author1, numChars2, author2];
- // all numChars > 0 unless there is exactly one, in which
- // case it can be == 0.
- C.authors = [_getNumInserted(C), author || ''];
- return C;
- }
-
- array.builder = function() {
- // normal pattern is Changeset(oldLength).builder().appendOldText(...). ...
- // builder methods mutate this!
- var C = this;
- // OOP style: state in environment
- var self;
- return self = {
- appendNewText: function(str, author) {
- C[C.length-1] += str;
- C[2] += str.length;
-
- if (C.authors) {
- var a = (author || '');
- var lastAuthorPtr = C.authors.length-1;
- var lastAuthorLengthPtr = C.authors.length-2;
- if ((!a) || a == C.authors[lastAuthorPtr]) {
- C.authors[lastAuthorLengthPtr] += str.length;
- }
- else if (0 == C.authors[lastAuthorLengthPtr]) {
- C.authors[lastAuthorLengthPtr] = str.length;
- C.authors[lastAuthorPtr] = (a || C.authors[lastAuthorPtr]);
- }
- else {
- C.authors.push(str.length, a);
- }
- }
-
- return self;
- },
- appendOldText: function(startIndex, numTaken) {
- if (numTaken == 0) return self;
- // properties of last strip...
- var s = C[C.length-3], t = C[C.length-2], n = C[C.length-1];
- if (t == 0 && n == "") {
- // must be empty changeset, one strip that doesn't take old chars or add new ones
- C[C.length-3] = startIndex;
- C[C.length-2] = numTaken;
- }
- else if (n == "" && (s+t == startIndex)) {
- C[C.length-2] += numTaken; // take more
- }
- else C.push(startIndex, numTaken, ""); // add a strip
- C[2] += numTaken;
- C.checkRep();
- return self;
- },
- toChangeset: function() { return C; }
- };
- }
-
- array.authorSlicer = function(outputBuilder) {
- return _makeAuthorSlicer(this, outputBuilder);
- }
-
- function _makeAuthorSlicer(changesetOrAuthorsIn, builderOut) {
- // "builderOut" only needs to support appendNewText
- var authors; // considered immutable
- if (changesetOrAuthorsIn.isChangeset) {
- authors = changesetOrAuthorsIn.authors;
- }
- else {
- authors = changesetOrAuthorsIn;
- }
-
- // OOP style: state in environment
- var authorPtr = 0;
- var charIndex = 0;
- var charWithinAuthor = 0; // 0 <= charWithinAuthor <= authors[authorPtr]; max value iff atEnd
- var atEnd = false;
- function curAuthor() { return authors[authorPtr+1]; }
- function curAuthorWidth() { return authors[authorPtr]; }
- function assertNotAtEnd() { assert(! atEnd, "_authorSlicer: can't move past end"); }
- function forwardInAuthor(numChars) {
- charWithinAuthor += numChars;
- charIndex += numChars;
- }
- function nextAuthor() {
- assertNotAtEnd();
- assert(charWithinAuthor == curAuthorWidth(), "_authorSlicer: not at author end");
- charWithinAuthor = 0;
- authorPtr += 2;
- if (authorPtr == authors.length) {
- atEnd = true;
- }
- }
-
- var self;
- return self = {
- skipChars: function(n) {
- assert(n >= 0, "_authorSlicer: can't skip negative n");
- if (n == 0) return;
- assertNotAtEnd();
-
- var leftToSkip = n;
- while (leftToSkip > 0) {
- var leftInAuthor = curAuthorWidth() - charWithinAuthor;
- if (leftToSkip >= leftInAuthor) {
- forwardInAuthor(leftInAuthor);
- leftToSkip -= leftInAuthor;
- nextAuthor();
- }
- else {
- forwardInAuthor(leftToSkip);
- leftToSkip = 0;
- }
- }
- },
- takeChars: function(n, text) {
- assert(n >= 0, "_authorSlicer: can't take negative n");
- if (n == 0) return;
- assertNotAtEnd();
- assert(n == text.length, "_authorSlicer: bad text length");
-
- var textLeft = text;
- var leftToTake = n;
- while (leftToTake > 0) {
- if (curAuthorWidth() > 0 && charWithinAuthor < curAuthorWidth()) {
- // at least one char to take from current author
- var leftInAuthor = (curAuthorWidth() - charWithinAuthor);
- assert(leftInAuthor > 0, "_authorSlicer: should have leftInAuthor > 0");
- var toTake = min(leftInAuthor, leftToTake);
- assert(toTake > 0, "_authorSlicer: should have toTake > 0");
- builderOut.appendNewText(textLeft.substring(0, toTake), curAuthor());
- forwardInAuthor(toTake);
- leftToTake -= toTake;
- textLeft = textLeft.substring(toTake);
- }
- assert(charWithinAuthor <= curAuthorWidth(), "_authorSlicer: past end of author");
- if (charWithinAuthor == curAuthorWidth()) {
- nextAuthor();
- }
- }
- },
- setBuilder: function(builder) {
- builderOut = builder;
- }
- };
- }
-
- function _makeSlicer(C, output) {
- // C: Changeset, output: builder from _makeBuilder
- // C is considered immutable, won't change or be changed
-
- // OOP style: state in environment
- var charIndex = 0; // 0 <= charIndex <= C.newLen(); maximum value iff atEnd
- var stripIndex = 0; // 0 <= stripIndex <= C.numStrips(); maximum value iff atEnd
- var charWithinStrip = 0; // 0 <= charWithinStrip < curStripWidth()
- var atEnd = false;
-
- var authorSlicer;
- if (C.authors) {
- authorSlicer = _makeAuthorSlicer(C.authors, output);
- }
-
- var ptr = 3;
- function curStartIndex() { return C[ptr]; }
- function curNumTaken() { return C[ptr+1]; }
- function curNewText() { return C[ptr+2]; }
- function curStripWidth() { return curNumTaken() + curNewText().length; }
- function assertNotAtEnd() { assert(! atEnd, "_slicer: can't move past changeset end"); }
- function forwardInStrip(numChars) {
- charWithinStrip += numChars;
- charIndex += numChars;
- }
- function nextStrip() {
- assertNotAtEnd();
- assert(charWithinStrip == curStripWidth(), "_slicer: not at strip end");
- charWithinStrip = 0;
- stripIndex++;
- ptr += 3;
- if (stripIndex == C.numStrips()) {
- atEnd = true;
- }
- }
- function curNumNewCharsInRange(start, end) {
- // takes two indices into the current strip's combined "taken" and "new"
- // chars, and returns how many "new" chars are included in the range
- assert(start <= end, "_slicer: curNumNewCharsInRange given out-of-order indices");
- var nt = curNumTaken();
- var nn = curNewText().length;
- var s = nt;
- var e = nt+nn;
- if (s < start) s = start;
- if (e > end) e = end;
- if (e < s) return 0;
- return e-s;
- }
-
- var self;
- return self = {
- skipChars: function (n) {
- assert(n >= 0, "_slicer: can't skip negative n");
- if (n == 0) return;
- assertNotAtEnd();
-
- var leftToSkip = n;
- while (leftToSkip > 0) {
- var leftInStrip = curStripWidth() - charWithinStrip;
- if (leftToSkip >= leftInStrip) {
- forwardInStrip(leftInStrip);
-
- if (authorSlicer)
- authorSlicer.skipChars(curNumNewCharsInRange(charWithinStrip,
- charWithinStrip + leftInStrip));
-
- leftToSkip -= leftInStrip;
- nextStrip();
- }
- else {
- if (authorSlicer)
- authorSlicer.skipChars(curNumNewCharsInRange(charWithinStrip,
- charWithinStrip + leftToSkip));
-
- forwardInStrip(leftToSkip);
- leftToSkip = 0;
- }
- }
- },
- takeChars: function (n) {
- assert(n >= 0, "_slicer: can't take negative n");
- if (n == 0) return;
- assertNotAtEnd();
-
- var leftToTake = n;
- while (leftToTake > 0) {
- if (curNumTaken() > 0 && charWithinStrip < curNumTaken()) {
- // at least one char to take from current strip's numTaken
- var leftInTaken = (curNumTaken() - charWithinStrip);
- assert(leftInTaken > 0, "_slicer: should have leftInTaken > 0");
- var toTake = min(leftInTaken, leftToTake);
- assert(toTake > 0, "_slicer: should have toTake > 0");
- output.appendOldText(curStartIndex() + charWithinStrip, toTake);
- forwardInStrip(toTake);
- leftToTake -= toTake;
- }
- if (leftToTake > 0 && curNewText().length > 0 && charWithinStrip >= curNumTaken() &&
- charWithinStrip < curStripWidth()) {
- // at least one char to take from current strip's newText
- var leftInNewText = (curStripWidth() - charWithinStrip);
- assert(leftInNewText > 0, "_slicer: should have leftInNewText > 0");
- var toTake = min(leftInNewText, leftToTake);
- assert(toTake > 0, "_slicer: should have toTake > 0");
- var newText = curNewText().substr(charWithinStrip - curNumTaken(), toTake);
- if (authorSlicer) {
- authorSlicer.takeChars(newText.length, newText);
- }
- else {
- output.appendNewText(newText);
- }
- forwardInStrip(toTake);
- leftToTake -= toTake;
- }
- assert(charWithinStrip <= curStripWidth(), "_slicer: past end of strip");
- if (charWithinStrip == curStripWidth()) {
- nextStrip();
- }
- }
- },
- skipTo: function(n) {
- self.skipChars(n - charIndex);
- }
- };
- }
-
- array.slicer = function(outputBuilder) {
- return _makeSlicer(this, outputBuilder);
- }
-
- array.compose = function(next) {
- assert(next.oldLen() == this.newLen(), "mismatched composition");
-
- var builder = _makeBuilder(this.oldLen(), !!(this.authors || next.authors));
- var slicer = _makeSlicer(this, builder);
-
- var authorSlicer;
- if (next.authors) {
- authorSlicer = _makeAuthorSlicer(next.authors, builder);
- }
-
- next.eachStrip(function(s, t, n) {
- slicer.skipTo(s);
- slicer.takeChars(t);
- if (authorSlicer) {
- authorSlicer.takeChars(n.length, n);
- }
- else {
- builder.appendNewText(n);
- }
- }, this);
-
- return builder.toChangeset();
- };
-
- array.traverser = function() {
- return _makeTraverser(this);
- }
-
- function _makeTraverser(C) {
- var s = C[3], t = C[4], n = C[5];
- var nextIndex = 6;
- var indexIntoNewText = 0;
-
- var authorSlicer;
- if (C.authors) {
- authorSlicer = _makeAuthorSlicer(C.authors, null);
- }
-
- function advanceIfPossible() {
- if (t == 0 && n == "" && nextIndex < C.length) {
- s = C[nextIndex];
- t = C[nextIndex+1];
- n = C[nextIndex+2];
- nextIndex += 3;
- }
- }
-
- var self;
- return self = {
- numTakenChars: function() {
- // if starts with taken characters, then how many, else 0
- return (t > 0) ? t : 0;
- },
- numNewChars: function() {
- // if starts with new characters, then how many, else 0
- return (t == 0 && n.length > 0) ? n.length : 0;
- },
- takenCharsStart: function() {
- return (self.numTakenChars() > 0) ? s : 0;
- },
- hasMore: function() {
- return self.numTakenChars() > 0 || self.numNewChars() > 0;
- },
- curIndex: function() {
- return indexIntoNewText;
- },
- consumeTakenChars: function (x) {
- assert(self.numTakenChars() > 0, "_traverser: no taken chars");
- assert(x >= 0 && x <= self.numTakenChars(), "_traverser: bad number of taken chars");
- if (x == 0) return;
- if (t == x) { s = 0; t = 0; }
- else { s += x; t -= x; }
- indexIntoNewText += x;
- advanceIfPossible();
- },
- consumeNewChars: function(x) {
- return self.appendNewChars(x, null);
- },
- appendNewChars: function(x, builder) {
- assert(self.numNewChars() > 0, "_traverser: no new chars");
- assert(x >= 0 && x <= self.numNewChars(), "_traverser: bad number of new chars");
- if (x == 0) return "";
- var str = n.substring(0, x);
- n = n.substring(x);
- indexIntoNewText += x;
- advanceIfPossible();
-
- if (builder) {
- if (authorSlicer) {
- authorSlicer.setBuilder(builder);
- authorSlicer.takeChars(x, str);
- }
- else {
- builder.appendNewText(str);
- }
- }
- else {
- if (authorSlicer) authorSlicer.skipChars(x);
- return str;
- }
- },
- consumeAvailableTakenChars: function() {
- return self.consumeTakenChars(self.numTakenChars());
- },
- consumeAvailableNewChars: function() {
- return self.consumeNewChars(self.numNewChars());
- },
- appendAvailableNewChars: function(builder) {
- return self.appendNewChars(self.numNewChars(), builder);
- }
- };
- }
-
- array.follow = function(prev, reverseInsertOrder) {
- // prev: Changeset, reverseInsertOrder: boolean
-
- // A.compose(B.follow(A)) is the merging of Changesets A and B, which operate on the same old text.
- // It is always the same as B.compose(A.follow(B, true)).
-
- assert(prev.oldLen() == this.oldLen(), "mismatched follow: "+prev.oldLen()+"/"+this.oldLen());
- var builder = _makeBuilder(prev.newLen(), !! this.authors);
- var a = _makeTraverser(prev);
- var b = _makeTraverser(this);
- while (a.hasMore() || b.hasMore()) {
- if (a.numNewChars() > 0 && ! reverseInsertOrder) {
- builder.appendOldText(a.curIndex(), a.numNewChars());
- a.consumeAvailableNewChars();
- }
- else if (b.numNewChars() > 0) {
- b.appendAvailableNewChars(builder);
- }
- else if (a.numNewChars() > 0 && reverseInsertOrder) {
- builder.appendOldText(a.curIndex(), a.numNewChars());
- a.consumeAvailableNewChars();
- }
- else if (! b.hasMore()) a.consumeAvailableTakenChars();
- else if (! a.hasMore()) b.consumeAvailableTakenChars();
- else {
- var x = a.takenCharsStart();
- var y = b.takenCharsStart();
- if (x < y) a.consumeTakenChars(min(a.numTakenChars(), y-x));
- else if (y < x) b.consumeTakenChars(min(b.numTakenChars(), x-y));
- else {
- var takenByBoth = min(a.numTakenChars(), b.numTakenChars());
- builder.appendOldText(a.curIndex(), takenByBoth);
- a.consumeTakenChars(takenByBoth);
- b.consumeTakenChars(takenByBoth);
- }
- }
- }
- return builder.toChangeset();
- }
-
- array.encodeToString = function(asBinary) {
- var stringDataArray = [];
- var numsArray = [];
- if (! asBinary) numsArray.push(this[0]);
- numsArray.push(this[1], this[2]);
- this.eachStrip(function(s, t, n) {
- numsArray.push(s, t, n.length);
- stringDataArray.push(n);
- }, this);
- if (! asBinary) {
- return numsArray.join(',')+'|'+stringDataArray.join('');
- }
- else {
- return "A" + Changeset.numberArrayToString(numsArray)
- +escapeCrazyUnicode(stringDataArray.join(''));
- }
- }
-
- function escapeCrazyUnicode(str) {
- return str.replace(/\\/g, '\\\\').replace(/[\ud800-\udfff]/g, function (c) {
- return "\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4);
- });
- }
-
- array.applyToAttributedText = Changeset.applyToAttributedText;
-
- function splicesFromChanges(c) {
- var splices = [];
- // get a list of splices, [startChar, endChar, newText]
- var traverser = c.traverser();
- var oldTextLength = c.oldLen();
- var indexIntoOldText = 0;
- while (traverser.hasMore() || indexIntoOldText < oldTextLength) {
- var newText = "";
- var startChar = indexIntoOldText;
- var endChar = indexIntoOldText;
- if (traverser.numNewChars() > 0) {
- newText = traverser.consumeAvailableNewChars();
- }
- if (traverser.hasMore()) {
- endChar = traverser.takenCharsStart();
- indexIntoOldText = endChar + traverser.numTakenChars();
- traverser.consumeAvailableTakenChars();
- }
- else {
- endChar = oldTextLength;
- indexIntoOldText = endChar;
- }
- if (endChar != startChar || newText.length > 0) {
- splices.push([startChar, endChar, newText]);
- }
- }
- return splices;
- }
-
- array.toSplices = function() {
- return splicesFromChanges(this);
- }
-
- array.characterRangeFollowThis = function(selStartChar, selEndChar, insertionsAfter) {
- var changeset = this;
- // represent the selection as a changeset that replaces the selection with some finite string.
- // Because insertions indicate intention, it doesn't matter what this string is, and even
- // if the selectionChangeset is made to "follow" other changes it will still be the only
- // insertion.
- var selectionChangeset =
- Changeset(changeset.oldLen()).builder().appendOldText(0, selStartChar).appendNewText(
- "X").appendOldText(selEndChar, changeset.oldLen() - selEndChar).toChangeset();
- var newSelectionChangeset = selectionChangeset.follow(changeset, insertionsAfter);
- var selectionSplices = newSelectionChangeset.toSplices();
- function includeChar(i) {
- if (! includeChar.calledYet) {
- selStartChar = i;
- selEndChar = i;
- includeChar.calledYet = true;
- }
- else {
- if (i < selStartChar) selStartChar = i;
- if (i > selEndChar) selEndChar = i;
- }
- }
- for(var i=0; i<selectionSplices.length; i++) {
- var s = selectionSplices[i];
- includeChar(s[0]);
- includeChar(s[1]);
- }
- return [selStartChar, selEndChar];
- }
-
- return array;
-}
-
-Changeset.MAGIC = "Changeset";
-Changeset.makeSplice = function(oldLength, spliceStart, numRemoved, stringInserted) {
- oldLength = (oldLength || 0);
- spliceStart = (spliceStart || 0);
- numRemoved = (numRemoved || 0);
- stringInserted = String(stringInserted || "");
-
- var builder = Changeset(oldLength).builder();
- builder.appendOldText(0, spliceStart);
- builder.appendNewText(stringInserted);
- builder.appendOldText(spliceStart + numRemoved, oldLength - numRemoved - spliceStart);
- return builder.toChangeset();
-};
-Changeset.identity = function(len) {
- return Changeset(len).builder().appendOldText(0, len).toChangeset();
-};
-Changeset.decodeFromString = function(str) {
- function error(msg) { var e = new Error(msg); e.easysync = true; throw e; }
- function toHex(str) {
- var a = [];
- a.push("length["+str.length+"]:");
- var TRUNC=20;
- for(var i=0;i<str.substring(0,TRUNC).length;i++) {
- a.push(("000"+str.charCodeAt(i).toString(16)).slice(-4));
- }
- if (str.length > TRUNC) a.push("...");
- return a.join(' ');
- }
- function unescapeCrazyUnicode(str) {
- return str.replace(/\\(u....|\\)/g, function(seq) {
- if (seq == "\\\\") return "\\";
- return String.fromCharCode(Number("0x"+seq.substring(2)));
- });
- }
-
- var numData, stringData;
- var binary = false;
- var typ = str.charAt(0);
- if (typ == "B" || typ == "A") {
- var result = Changeset.numberArrayFromString(str, 1);
- numData = result[0];
- stringData = result[1];
- if (typ == "A") {
- stringData = unescapeCrazyUnicode(stringData);
- }
- binary = true;
- }
- else if (typ == "C") {
- var barPosition = str.indexOf('|');
- numData = str.substring(0, barPosition).split(',');
- stringData = str.substring(barPosition+1);
- }
- else {
- error("Not a changeset: "+toHex(str));
- }
- var stringDataOffset = 0;
- var array = [];
- var ptr;
- if (binary) {
- array.push("Changeset", numData[0], numData[1]);
- var ptr = 2;
- }
- else {
- array.push(numData[0], Number(numData[1]), Number(numData[2]));
- var ptr = 3;
- }
- while (ptr < numData.length) {
- array.push(Number(numData[ptr++]), Number(numData[ptr++]));
- var newTextLength = Number(numData[ptr++]);
- array.push(stringData.substr(stringDataOffset, newTextLength));
- stringDataOffset += newTextLength;
- }
- if (stringDataOffset != stringData.length) {
- error("Extra character data beyond end of encoded string ("+toHex(str)+")");
- }
- return Changeset(array);
-};
-
-Changeset.numberArrayToString = function(nums) {
- var array = [];
- function writeNum(n) {
- // does not support negative numbers
- var twentyEightBit = (n & 0xfffffff);
- if (twentyEightBit <= 0x7fff) {
- array.push(String.fromCharCode(twentyEightBit));
- }
- else {
- array.push(String.fromCharCode(0xa000 | (twentyEightBit >> 15),
- twentyEightBit & 0x7fff));
- }
- }
- writeNum(nums.length);
- var len = nums.length;
- for(var i=0;i<len;i++) {
- writeNum(nums[i]);
- }
- return array.join('');
-};
-
-Changeset.numberArrayFromString = function(str, startIndex) {
- // returns [numberArray, remainingString]
- var nums = [];
- var strIndex = (startIndex || 0);
- function readNum() {
- var n = str.charCodeAt(strIndex++);
- if (n > 0x7fff) {
- if (n >= 0xa000) {
- n = (((n & 0x1fff) << 15) | str.charCodeAt(strIndex++));
- }
- else {
- // legacy format
- n = (((n & 0x1fff) << 16) | str.charCodeAt(strIndex++));
- }
- }
- return n;
- }
- var len = readNum();
- for(var i=0;i<len;i++) {
- nums.push(readNum());
- }
- return [nums, str.substring(strIndex)];
-};
-
-(function() {
- function repeatString(str, times) {
- if (times <= 0) return "";
- var s = repeatString(str, times >> 1);
- s += s;
- if (times & 1) s += str;
- return s;
- }
- function chr(n) { return String.fromCharCode(n+48); }
- function ord(c) { return c.charCodeAt(0)-48; }
- function runMatcher(c) {
- // Takes "A" and returns /\u0041+/g .
- // Avoid creating new objects unnecessarily by caching matchers
- // as properties of this function.
- var re = runMatcher[c];
- if (re) return re;
- re = runMatcher[c] = new RegExp("\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)+"+", 'g');
- return re;
- }
- function runLength(str, idx, c) {
- var re = runMatcher(c);
- re.lastIndex = idx;
- var result = re.exec(str);
- if (result && result[0]) {
- return result[0].length;
- }
- return 0;
- }
-
- // emptyObj may be a StorableObject
- Changeset.initAttributedText = function(emptyObj, initialString, initialAuthor) {
- var obj = emptyObj;
- obj.authorMap = { 1: (initialAuthor || '') };
- obj.text = (initialString || '');
- obj.attribs = repeatString(chr(1), obj.text.length);
- return obj;
- };
- Changeset.gcAttributedText = function(atObj) {
- // "garbage collect" the list of authors
- var removedAuthors = [];
- for(var a in atObj.authorMap) {
- if (atObj.attribs.indexOf(chr(Number(a))) < 0) {
- removedAuthors.push(atObj.authorMap[a]);
- delete atObj.authorMap[a];
- }
- }
- return removedAuthors;
- };
- Changeset.cloneAttributedText = function(emptyObj, atObj) {
- var obj = emptyObj;
- obj.text = atObj.text; // string
- if (atObj.attribs) obj.attribs = atObj.attribs; // string
- if (atObj.attribs_c) obj.attribs_c = atObj.attribs_c; // string
- obj.authorMap = {};
- for(var a in atObj.authorMap) {
- obj.authorMap[a] = atObj.authorMap[a];
- }
- return obj;
- };
- Changeset.applyToAttributedText = function(atObj, C) {
- C = (C || this);
- var oldText = atObj.text;
- var oldAttribs = atObj.attribs;
- Changeset._assert(C.isChangeset, "applyToAttributedText: 'this' is not a changeset");
- Changeset._assert(oldText.length == C.oldLen(),
- "applyToAttributedText: mismatch "+oldText.length+" / "+C.oldLen());
- var textBuf = [];
- var attribsBuf = [];
- var authorMap = atObj.authorMap;
- function authorId(author) {
- for(var a in authorMap) {
- if (authorMap[Number(a)] === author) {
- return Number(a);
- }
- }
- for(var i=1;i<=60000;i++) {
- // don't use "in" because it's currently broken on StorableObjects
- if (authorMap[i] === undefined) {
- authorMap[i] = author;
- return i;
- }
- }
- }
- var myBuilder = { appendNewText: function(txt, author) {
- // object that acts as a "builder" in that it receives requests from
- // authorSlicer to append text attributed to different authors
- attribsBuf.push(repeatString(chr(authorId(author)), txt.length));
- } };
- var authorSlicer;
- if (C.authors) {
- authorSlicer = C.authorSlicer(myBuilder);
- }
- C.eachStrip(function (s, t, n) {
- textBuf.push(oldText.substr(s, t), n);
- attribsBuf.push(oldAttribs.substr(s, t));
- if (authorSlicer) {
- authorSlicer.takeChars(n.length, n);
- }
- else {
- myBuilder.appendNewText(n, '');
- }
- });
- atObj.text = textBuf.join('');
- atObj.attribs = attribsBuf.join('');
- return atObj;
- };
- Changeset.getAttributedTextCharAuthor = function(atObj, idx) {
- return atObj.authorMap[ord(atObj.attribs.charAt(idx))];
- };
- Changeset.getAttributedTextCharRunLength = function(atObj, idx) {
- var c = atObj.attribs.charAt(idx);
- return runLength(atObj.attribs, idx, c);
- };
- Changeset.eachAuthorInAttributedText = function(atObj, func) {
- // call func(author, authorNum)
- for(var a in atObj.authorMap) {
- if (func(atObj.authorMap[a], Number(a))) break;
- }
- };
- Changeset.getAttributedTextAuthorByNum = function(atObj, n) {
- return atObj.authorMap[n];
- };
- // Compressed attributed text can be cloned, but nothing else until uncompressed!!
- Changeset.compressAttributedText = function(atObj) {
- // idempotent, mutates the object, returns it
- if (atObj.attribs) {
- atObj.attribs_c = atObj.attribs.replace(/([\s\S])\1{0,63}/g, function(run) {
- return run.charAt(0)+chr(run.length);;
- });
- delete atObj.attribs;
- }
- return atObj;
- };
- Changeset.decompressAttributedText = function(atObj) {
- // idempotent, mutates the object, returns it
- if (atObj.attribs_c) {
- atObj.attribs = atObj.attribs_c.replace(/[\s\S][\s\S]/g, function(run) {
- return repeatString(run.charAt(0), ord(run.charAt(1)));
- });
- delete atObj.attribs_c;
- }
- return atObj;
- };
-})();
diff --git a/trunk/infrastructure/ace/www/easysync2.js b/trunk/infrastructure/ace/www/easysync2.js
deleted file mode 100644
index efc5b99..0000000
--- a/trunk/infrastructure/ace/www/easysync2.js
+++ /dev/null
@@ -1,1968 +0,0 @@
-// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.easysync2
-// %APPJET%: jimport("com.etherpad.Easysync2Support");
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-//var _opt = (this.Easysync2Support || null);
-var _opt = null; // disable optimization for now
-
-function AttribPool() {
- var p = {};
- p.numToAttrib = {}; // e.g. {0: ['foo','bar']}
- p.attribToNum = {}; // e.g. {'foo,bar': 0}
- p.nextNum = 0;
-
- p.putAttrib = function(attrib, dontAddIfAbsent) {
- var str = String(attrib);
- if (str in p.attribToNum) {
- return p.attribToNum[str];
- }
- if (dontAddIfAbsent) {
- return -1;
- }
- var num = p.nextNum++;
- p.attribToNum[str] = num;
- p.numToAttrib[num] = [String(attrib[0]||''),
- String(attrib[1]||'')];
- return num;
- };
-
- p.getAttrib = function(num) {
- var pair = p.numToAttrib[num];
- if (! pair) return pair;
- return [pair[0], pair[1]]; // return a mutable copy
- };
-
- p.getAttribKey = function(num) {
- var pair = p.numToAttrib[num];
- if (! pair) return '';
- return pair[0];
- };
-
- p.getAttribValue = function(num) {
- var pair = p.numToAttrib[num];
- if (! pair) return '';
- return pair[1];
- };
-
- p.eachAttrib = function(func) {
- for(var n in p.numToAttrib) {
- var pair = p.numToAttrib[n];
- func(pair[0], pair[1]);
- }
- };
-
- p.toJsonable = function() {
- return {numToAttrib: p.numToAttrib, nextNum: p.nextNum};
- };
-
- p.fromJsonable = function(obj) {
- p.numToAttrib = obj.numToAttrib;
- p.nextNum = obj.nextNum;
- p.attribToNum = {};
- for(var n in p.numToAttrib) {
- p.attribToNum[String(p.numToAttrib[n])] = Number(n);
- }
- return p;
- };
-
- return p;
-}
-
-var Changeset = {};
-
-Changeset.error = function error(msg) { var e = new Error(msg); e.easysync = true; throw e; };
-Changeset.assert = function assert(b, msgParts) {
- if (! b) {
- var msg = Array.prototype.slice.call(arguments, 1).join('');
- Changeset.error("Changeset: "+msg);
- }
-};
-
-Changeset.parseNum = function(str) { return parseInt(str, 36); };
-Changeset.numToString = function(num) { return num.toString(36).toLowerCase(); };
-Changeset.toBaseTen = function(cs) {
- var dollarIndex = cs.indexOf('$');
- var beforeDollar = cs.substring(0, dollarIndex);
- var fromDollar = cs.substring(dollarIndex);
- return beforeDollar.replace(/[0-9a-z]+/g, function(s) {
- return String(Changeset.parseNum(s)); }) + fromDollar;
-};
-
-Changeset.oldLen = function(cs) {
- return Changeset.unpack(cs).oldLen;
-};
-Changeset.newLen = function(cs) {
- return Changeset.unpack(cs).newLen;
-};
-
-Changeset.opIterator = function(opsStr, optStartIndex) {
- //print(opsStr);
- var regex = /((?:\*[0-9a-z]+)*)(?:\|([0-9a-z]+))?([-+=])([0-9a-z]+)|\?|/g;
- var startIndex = (optStartIndex || 0);
- var curIndex = startIndex;
- var prevIndex = curIndex;
- function nextRegexMatch() {
- prevIndex = curIndex;
- var result;
- if (_opt) {
- result = _opt.nextOpInString(opsStr, curIndex);
- if (result) {
- if (result.opcode() == '?') {
- Changeset.error("Hit error opcode in op stream");
- }
- curIndex = result.lastIndex();
- }
- }
- else {
- regex.lastIndex = curIndex;
- result = regex.exec(opsStr);
- curIndex = regex.lastIndex;
- if (result[0] == '?') {
- Changeset.error("Hit error opcode in op stream");
- }
- }
- return result;
- }
- var regexResult = nextRegexMatch();
- var obj = Changeset.newOp();
- function next(optObj) {
- var op = (optObj || obj);
- if (_opt && regexResult) {
- op.attribs = regexResult.attribs();
- op.lines = regexResult.lines();
- op.chars = regexResult.chars();
- op.opcode = regexResult.opcode();
- regexResult = nextRegexMatch();
- }
- else if ((! _opt) && regexResult[0]) {
- op.attribs = regexResult[1];
- op.lines = Changeset.parseNum(regexResult[2] || 0);
- op.opcode = regexResult[3];
- op.chars = Changeset.parseNum(regexResult[4]);
- regexResult = nextRegexMatch();
- }
- else {
- Changeset.clearOp(op);
- }
- return op;
- }
- function hasNext() { return !! (_opt ? regexResult : regexResult[0]); }
- function lastIndex() { return prevIndex; }
- return {next: next, hasNext: hasNext, lastIndex: lastIndex};
-};
-
-Changeset.clearOp = function(op) {
- op.opcode = '';
- op.chars = 0;
- op.lines = 0;
- op.attribs = '';
-};
-Changeset.newOp = function(optOpcode) {
- return {opcode:(optOpcode || ''), chars:0, lines:0, attribs:''};
-};
-Changeset.cloneOp = function(op) {
- return {opcode: op.opcode, chars: op.chars, lines: op.lines, attribs: op.attribs};
-};
-Changeset.copyOp = function(op1, op2) {
- op2.opcode = op1.opcode;
- op2.chars = op1.chars;
- op2.lines = op1.lines;
- op2.attribs = op1.attribs;
-};
-Changeset.opString = function(op) {
- // just for debugging
- if (! op.opcode) return 'null';
- var assem = Changeset.opAssembler();
- assem.append(op);
- return assem.toString();
-};
-Changeset.stringOp = function(str) {
- // just for debugging
- return Changeset.opIterator(str).next();
-};
-
-Changeset.checkRep = function(cs) {
- // doesn't check things that require access to attrib pool (e.g. attribute order)
- // or original string (e.g. newline positions)
- var unpacked = Changeset.unpack(cs);
- var oldLen = unpacked.oldLen;
- var newLen = unpacked.newLen;
- var ops = unpacked.ops;
- var charBank = unpacked.charBank;
-
- var assem = Changeset.smartOpAssembler();
- var oldPos = 0;
- var calcNewLen = 0;
- var numInserted = 0;
- var iter = Changeset.opIterator(ops);
- while (iter.hasNext()) {
- var o = iter.next();
- switch (o.opcode) {
- case '=': oldPos += o.chars; calcNewLen += o.chars; break;
- case '-': oldPos += o.chars; Changeset.assert(oldPos < oldLen, oldPos," >= ",oldLen," in ",cs); break;
- case '+': {
- calcNewLen += o.chars; numInserted += o.chars;
- Changeset.assert(calcNewLen < newLen, calcNewLen," >= ",newLen," in ",cs);
- break;
- }
- }
- assem.append(o);
- }
-
- calcNewLen += oldLen - oldPos;
- charBank = charBank.substring(0, numInserted);
- while (charBank.length < numInserted) {
- charBank += "?";
- }
-
- assem.endDocument();
- var normalized = Changeset.pack(oldLen, calcNewLen, assem.toString(), charBank);
- Changeset.assert(normalized == cs, normalized,' != ',cs);
-
- return cs;
-}
-
-Changeset.smartOpAssembler = function() {
- // Like opAssembler but able to produce conforming changesets
- // from slightly looser input, at the cost of speed.
- // Specifically:
- // - merges consecutive operations that can be merged
- // - strips final "="
- // - ignores 0-length changes
- // - reorders consecutive + and - (which margingOpAssembler doesn't do)
-
- var minusAssem = Changeset.mergingOpAssembler();
- var plusAssem = Changeset.mergingOpAssembler();
- var keepAssem = Changeset.mergingOpAssembler();
- var assem = Changeset.stringAssembler();
- var lastOpcode = '';
- var lengthChange = 0;
-
- function flushKeeps() {
- assem.append(keepAssem.toString());
- keepAssem.clear();
- }
-
- function flushPlusMinus() {
- assem.append(minusAssem.toString());
- minusAssem.clear();
- assem.append(plusAssem.toString());
- plusAssem.clear();
- }
-
- function append(op) {
- if (! op.opcode) return;
- if (! op.chars) return;
-
- if (op.opcode == '-') {
- if (lastOpcode == '=') {
- flushKeeps();
- }
- minusAssem.append(op);
- lengthChange -= op.chars;
- }
- else if (op.opcode == '+') {
- if (lastOpcode == '=') {
- flushKeeps();
- }
- plusAssem.append(op);
- lengthChange += op.chars;
- }
- else if (op.opcode == '=') {
- if (lastOpcode != '=') {
- flushPlusMinus();
- }
- keepAssem.append(op);
- }
- lastOpcode = op.opcode;
- }
-
- function appendOpWithText(opcode, text, attribs, pool) {
- var op = Changeset.newOp(opcode);
- op.attribs = Changeset.makeAttribsString(opcode, attribs, pool);
- var lastNewlinePos = text.lastIndexOf('\n');
- if (lastNewlinePos < 0) {
- op.chars = text.length;
- op.lines = 0;
- append(op);
- }
- else {
- op.chars = lastNewlinePos+1;
- op.lines = text.match(/\n/g).length;
- append(op);
- op.chars = text.length - (lastNewlinePos+1);
- op.lines = 0;
- append(op);
- }
- }
-
- function toString() {
- flushPlusMinus();
- flushKeeps();
- return assem.toString();
- }
-
- function clear() {
- minusAssem.clear();
- plusAssem.clear();
- keepAssem.clear();
- assem.clear();
- lengthChange = 0;
- }
-
- function endDocument() {
- keepAssem.endDocument();
- }
-
- function getLengthChange() {
- return lengthChange;
- }
-
- return {append: append, toString: toString, clear: clear, endDocument: endDocument,
- appendOpWithText: appendOpWithText, getLengthChange: getLengthChange };
-};
-
-if (_opt) {
- Changeset.mergingOpAssembler = function() {
- var assem = _opt.mergingOpAssembler();
-
- function append(op) {
- assem.append(op.opcode, op.chars, op.lines, op.attribs);
- }
- function toString() {
- return assem.toString();
- }
- function clear() {
- assem.clear();
- }
- function endDocument() {
- assem.endDocument();
- }
-
- return {append: append, toString: toString, clear: clear, endDocument: endDocument};
- };
-}
-else {
- Changeset.mergingOpAssembler = function() {
- // This assembler can be used in production; it efficiently
- // merges consecutive operations that are mergeable, ignores
- // no-ops, and drops final pure "keeps". It does not re-order
- // operations.
- var assem = Changeset.opAssembler();
- var bufOp = Changeset.newOp();
-
- // If we get, for example, insertions [xxx\n,yyy], those don't merge,
- // but if we get [xxx\n,yyy,zzz\n], that merges to [xxx\nyyyzzz\n].
- // This variable stores the length of yyy and any other newline-less
- // ops immediately after it.
- var bufOpAdditionalCharsAfterNewline = 0;
-
- function flush(isEndDocument) {
- if (bufOp.opcode) {
- if (isEndDocument && bufOp.opcode == '=' && ! bufOp.attribs) {
- // final merged keep, leave it implicit
- }
- else {
- assem.append(bufOp);
- if (bufOpAdditionalCharsAfterNewline) {
- bufOp.chars = bufOpAdditionalCharsAfterNewline;
- bufOp.lines = 0;
- assem.append(bufOp);
- bufOpAdditionalCharsAfterNewline = 0;
- }
- }
- bufOp.opcode = '';
- }
- }
- function append(op) {
- if (op.chars > 0) {
- if (bufOp.opcode == op.opcode && bufOp.attribs == op.attribs) {
- if (op.lines > 0) {
- // bufOp and additional chars are all mergeable into a multi-line op
- bufOp.chars += bufOpAdditionalCharsAfterNewline + op.chars;
- bufOp.lines += op.lines;
- bufOpAdditionalCharsAfterNewline = 0;
- }
- else if (bufOp.lines == 0) {
- // both bufOp and op are in-line
- bufOp.chars += op.chars;
- }
- else {
- // append in-line text to multi-line bufOp
- bufOpAdditionalCharsAfterNewline += op.chars;
- }
- }
- else {
- flush();
- Changeset.copyOp(op, bufOp);
- }
- }
- }
- function endDocument() {
- flush(true);
- }
- function toString() {
- flush();
- return assem.toString();
- }
- function clear() {
- assem.clear();
- Changeset.clearOp(bufOp);
- }
- return {append: append, toString: toString, clear: clear, endDocument: endDocument};
- };
-}
-
-if (_opt) {
- Changeset.opAssembler = function() {
- var assem = _opt.opAssembler();
- // this function allows op to be mutated later (doesn't keep a ref)
- function append(op) {
- assem.append(op.opcode, op.chars, op.lines, op.attribs);
- }
- function toString() {
- return assem.toString();
- }
- function clear() {
- assem.clear();
- }
- return {append: append, toString: toString, clear: clear};
- };
-}
-else {
- Changeset.opAssembler = function() {
- var pieces = [];
- // this function allows op to be mutated later (doesn't keep a ref)
- function append(op) {
- pieces.push(op.attribs);
- if (op.lines) {
- pieces.push('|', Changeset.numToString(op.lines));
- }
- pieces.push(op.opcode);
- pieces.push(Changeset.numToString(op.chars));
- }
- function toString() {
- return pieces.join('');
- }
- function clear() {
- pieces.length = 0;
- }
- return {append: append, toString: toString, clear: clear};
- };
-}
-
-Changeset.stringIterator = function(str) {
- var curIndex = 0;
- function assertRemaining(n) {
- Changeset.assert(n <= remaining(), "!(",n," <= ",remaining(),")");
- }
- function take(n) {
- assertRemaining(n);
- var s = str.substr(curIndex, n);
- curIndex += n;
- return s;
- }
- function peek(n) {
- assertRemaining(n);
- var s = str.substr(curIndex, n);
- return s;
- }
- function skip(n) {
- assertRemaining(n);
- curIndex += n;
- }
- function remaining() {
- return str.length - curIndex;
- }
- return {take:take, skip:skip, remaining:remaining, peek:peek};
-};
-
-Changeset.stringAssembler = function() {
- var pieces = [];
- function append(x) {
- pieces.push(String(x));
- }
- function toString() {
- return pieces.join('');
- }
- return {append: append, toString: toString};
-};
-
-// "lines" need not be an array as long as it supports certain calls (lines_foo inside).
-Changeset.textLinesMutator = function(lines) {
- // Mutates lines, an array of strings, in place.
- // Mutation operations have the same constraints as changeset operations
- // with respect to newlines, but not the other additional constraints
- // (i.e. ins/del ordering, forbidden no-ops, non-mergeability, final newline).
- // Can be used to mutate lists of strings where the last char of each string
- // is not actually a newline, but for the purposes of N and L values,
- // the caller should pretend it is, and for things to work right in that case, the input
- // to insert() should be a single line with no newlines.
-
- var curSplice = [0,0];
- var inSplice = false;
- // position in document after curSplice is applied:
- var curLine = 0, curCol = 0;
- // invariant: if (inSplice) then (curLine is in curSplice[0] + curSplice.length - {2,3}) &&
- // curLine >= curSplice[0]
- // invariant: if (inSplice && (curLine >= curSplice[0] + curSplice.length - 2)) then
- // curCol == 0
-
- function lines_applySplice(s) {
- lines.splice.apply(lines, s);
- }
- function lines_toSource() {
- return lines.toSource();
- }
- function lines_get(idx) {
- if (lines.get) {
- return lines.get(idx);
- }
- else {
- return lines[idx];
- }
- }
- // can be unimplemented if removeLines's return value not needed
- function lines_slice(start, end) {
- if (lines.slice) {
- return lines.slice(start, end);
- }
- else {
- return [];
- }
- }
- function lines_length() {
- if ((typeof lines.length) == "number") {
- return lines.length;
- }
- else {
- return lines.length();
- }
- }
-
- function enterSplice() {
- curSplice[0] = curLine;
- curSplice[1] = 0;
- if (curCol > 0) {
- putCurLineInSplice();
- }
- inSplice = true;
- }
- function leaveSplice() {
- lines_applySplice(curSplice);
- curSplice.length = 2;
- curSplice[0] = curSplice[1] = 0;
- inSplice = false;
- }
- function isCurLineInSplice() {
- return (curLine - curSplice[0] < (curSplice.length - 2));
- }
- function debugPrint(typ) {
- print(typ+": "+curSplice.toSource()+" / "+curLine+","+curCol+" / "+lines_toSource());
- }
- function putCurLineInSplice() {
- if (! isCurLineInSplice()) {
- curSplice.push(lines_get(curSplice[0] + curSplice[1]));
- curSplice[1]++;
- }
- return 2 + curLine - curSplice[0];
- }
-
- function skipLines(L, includeInSplice) {
- if (L) {
- if (includeInSplice) {
- if (! inSplice) {
- enterSplice();
- }
- for(var i=0;i<L;i++) {
- curCol = 0;
- putCurLineInSplice();
- curLine++;
- }
- }
- else {
- if (inSplice) {
- if (L > 1) {
- leaveSplice();
- }
- else {
- putCurLineInSplice();
- }
- }
- curLine += L;
- curCol = 0;
- }
- //print(inSplice+" / "+isCurLineInSplice()+" / "+curSplice[0]+" / "+curSplice[1]+" / "+lines.length);
- /*if (inSplice && (! isCurLineInSplice()) && (curSplice[0] + curSplice[1] < lines.length)) {
- print("BLAH");
- putCurLineInSplice();
- }*/ // tests case foo in remove(), which isn't otherwise covered in current impl
- }
- //debugPrint("skip");
- }
-
- function skip(N, L, includeInSplice) {
- if (N) {
- if (L) {
- skipLines(L, includeInSplice);
- }
- else {
- if (includeInSplice && ! inSplice) {
- enterSplice();
- }
- if (inSplice) {
- putCurLineInSplice();
- }
- curCol += N;
- //debugPrint("skip");
- }
- }
- }
-
- function removeLines(L) {
- var removed = '';
- if (L) {
- if (! inSplice) {
- enterSplice();
- }
- function nextKLinesText(k) {
- var m = curSplice[0] + curSplice[1];
- return lines_slice(m, m+k).join('');
- }
- if (isCurLineInSplice()) {
- //print(curCol);
- if (curCol == 0) {
- removed = curSplice[curSplice.length-1];
- // print("FOO"); // case foo
- curSplice.length--;
- removed += nextKLinesText(L-1);
- curSplice[1] += L-1;
- }
- else {
- removed = nextKLinesText(L-1);
- curSplice[1] += L-1;
- var sline = curSplice.length - 1;
- removed = curSplice[sline].substring(curCol) + removed;
- curSplice[sline] = curSplice[sline].substring(0, curCol) +
- lines_get(curSplice[0] + curSplice[1]);
- curSplice[1] += 1;
- }
- }
- else {
- removed = nextKLinesText(L);
- curSplice[1] += L;
- }
- //debugPrint("remove");
- }
- return removed;
- }
-
- function remove(N, L) {
- var removed = '';
- if (N) {
- if (L) {
- return removeLines(L);
- }
- else {
- if (! inSplice) {
- enterSplice();
- }
- var sline = putCurLineInSplice();
- removed = curSplice[sline].substring(curCol, curCol+N);
- curSplice[sline] = curSplice[sline].substring(0, curCol) +
- curSplice[sline].substring(curCol+N);
- //debugPrint("remove");
- }
- }
- return removed;
- }
-
- function insert(text, L) {
- if (text) {
- if (! inSplice) {
- enterSplice();
- }
- if (L) {
- var newLines = Changeset.splitTextLines(text);
- if (isCurLineInSplice()) {
- //if (curCol == 0) {
- //curSplice.length--;
- //curSplice[1]--;
- //Array.prototype.push.apply(curSplice, newLines);
- //curLine += newLines.length;
- //}
- //else {
- var sline = curSplice.length - 1;
- var theLine = curSplice[sline];
- var lineCol = curCol;
- curSplice[sline] = theLine.substring(0, lineCol) + newLines[0];
- curLine++;
- newLines.splice(0, 1);
- Array.prototype.push.apply(curSplice, newLines);
- curLine += newLines.length;
- curSplice.push(theLine.substring(lineCol));
- curCol = 0;
- //}
- }
- else {
- Array.prototype.push.apply(curSplice, newLines);
- curLine += newLines.length;
- }
- }
- else {
- var sline = putCurLineInSplice();
- curSplice[sline] = curSplice[sline].substring(0, curCol) +
- text + curSplice[sline].substring(curCol);
- curCol += text.length;
- }
- //debugPrint("insert");
- }
- }
-
- function hasMore() {
- //print(lines.length+" / "+inSplice+" / "+(curSplice.length - 2)+" / "+curSplice[1]);
- var docLines = lines_length();
- if (inSplice) {
- docLines += curSplice.length - 2 - curSplice[1];
- }
- return curLine < docLines;
- }
-
- function close() {
- if (inSplice) {
- leaveSplice();
- }
- //debugPrint("close");
- }
-
- var self = {skip:skip, remove:remove, insert:insert, close:close, hasMore:hasMore,
- removeLines:removeLines, skipLines: skipLines};
- return self;
-};
-
-Changeset.applyZip = function(in1, idx1, in2, idx2, func) {
- var iter1 = Changeset.opIterator(in1, idx1);
- var iter2 = Changeset.opIterator(in2, idx2);
- var assem = Changeset.smartOpAssembler();
- var op1 = Changeset.newOp();
- var op2 = Changeset.newOp();
- var opOut = Changeset.newOp();
- while (op1.opcode || iter1.hasNext() || op2.opcode || iter2.hasNext()) {
- if ((! op1.opcode) && iter1.hasNext()) iter1.next(op1);
- if ((! op2.opcode) && iter2.hasNext()) iter2.next(op2);
- func(op1, op2, opOut);
- if (opOut.opcode) {
- //print(opOut.toSource());
- assem.append(opOut);
- opOut.opcode = '';
- }
- }
- assem.endDocument();
- return assem.toString();
-};
-
-Changeset.unpack = function(cs) {
- var headerRegex = /Z:([0-9a-z]+)([><])([0-9a-z]+)|/;
- var headerMatch = headerRegex.exec(cs);
- if ((! headerMatch) || (! headerMatch[0])) {
- Changeset.error("Not a changeset: "+cs);
- }
- var oldLen = Changeset.parseNum(headerMatch[1]);
- var changeSign = (headerMatch[2] == '>') ? 1 : -1;
- var changeMag = Changeset.parseNum(headerMatch[3]);
- var newLen = oldLen + changeSign*changeMag;
- var opsStart = headerMatch[0].length;
- var opsEnd = cs.indexOf("$");
- if (opsEnd < 0) opsEnd = cs.length;
- return {oldLen: oldLen, newLen: newLen, ops: cs.substring(opsStart, opsEnd),
- charBank: cs.substring(opsEnd+1)};
-};
-
-Changeset.pack = function(oldLen, newLen, opsStr, bank) {
- var lenDiff = newLen - oldLen;
- var lenDiffStr = (lenDiff >= 0 ?
- '>'+Changeset.numToString(lenDiff) :
- '<'+Changeset.numToString(-lenDiff));
- var a = [];
- a.push('Z:', Changeset.numToString(oldLen), lenDiffStr, opsStr, '$', bank);
- return a.join('');
-};
-
-Changeset.applyToText = function(cs, str) {
- var unpacked = Changeset.unpack(cs);
- Changeset.assert(str.length == unpacked.oldLen,
- "mismatched apply: ",str.length," / ",unpacked.oldLen);
- var csIter = Changeset.opIterator(unpacked.ops);
- var bankIter = Changeset.stringIterator(unpacked.charBank);
- var strIter = Changeset.stringIterator(str);
- var assem = Changeset.stringAssembler();
- while (csIter.hasNext()) {
- var op = csIter.next();
- switch(op.opcode) {
- case '+': assem.append(bankIter.take(op.chars)); break;
- case '-': strIter.skip(op.chars); break;
- case '=': assem.append(strIter.take(op.chars)); break;
- }
- }
- assem.append(strIter.take(strIter.remaining()));
- return assem.toString();
-};
-
-Changeset.mutateTextLines = function(cs, lines) {
- var unpacked = Changeset.unpack(cs);
- var csIter = Changeset.opIterator(unpacked.ops);
- var bankIter = Changeset.stringIterator(unpacked.charBank);
- var mut = Changeset.textLinesMutator(lines);
- while (csIter.hasNext()) {
- var op = csIter.next();
- switch(op.opcode) {
- case '+': mut.insert(bankIter.take(op.chars), op.lines); break;
- case '-': mut.remove(op.chars, op.lines); break;
- case '=': mut.skip(op.chars, op.lines, (!! op.attribs)); break;
- }
- }
- mut.close();
-};
-
-Changeset.composeAttributes = function(att1, att2, resultIsMutation, pool) {
- // att1 and att2 are strings like "*3*f*1c", asMutation is a boolean.
-
- // Sometimes attribute (key,value) pairs are treated as attribute presence
- // information, while other times they are treated as operations that
- // mutate a set of attributes, and this affects whether an empty value
- // is a deletion or a change.
- // Examples, of the form (att1Items, att2Items, resultIsMutation) -> result
- // ([], [(bold, )], true) -> [(bold, )]
- // ([], [(bold, )], false) -> []
- // ([], [(bold, true)], true) -> [(bold, true)]
- // ([], [(bold, true)], false) -> [(bold, true)]
- // ([(bold, true)], [(bold, )], true) -> [(bold, )]
- // ([(bold, true)], [(bold, )], false) -> []
-
- // pool can be null if att2 has no attributes.
-
- if ((! att1) && resultIsMutation) {
- // In the case of a mutation (i.e. composing two changesets),
- // an att2 composed with an empy att1 is just att2. If att1
- // is part of an attribution string, then att2 may remove
- // attributes that are already gone, so don't do this optimization.
- return att2;
- }
- if (! att2) return att1;
- var atts = [];
- att1.replace(/\*([0-9a-z]+)/g, function(_, a) {
- atts.push(pool.getAttrib(Changeset.parseNum(a)));
- return '';
- });
- att2.replace(/\*([0-9a-z]+)/g, function(_, a) {
- var pair = pool.getAttrib(Changeset.parseNum(a));
- var found = false;
- for(var i=0;i<atts.length;i++) {
- var oldPair = atts[i];
- if (oldPair[0] == pair[0]) {
- if (pair[1] || resultIsMutation) {
- oldPair[1] = pair[1];
- }
- else {
- atts.splice(i, 1);
- }
- found = true;
- break;
- }
- }
- if ((! found) && (pair[1] || resultIsMutation)) {
- atts.push(pair);
- }
- return '';
- });
- atts.sort();
- var buf = Changeset.stringAssembler();
- for(var i=0;i<atts.length;i++) {
- buf.append('*');
- buf.append(Changeset.numToString(pool.putAttrib(atts[i])));
- }
- //print(att1+" / "+att2+" / "+buf.toString());
- return buf.toString();
-};
-
-Changeset._slicerZipperFunc = function(attOp, csOp, opOut, pool) {
- // attOp is the op from the sequence that is being operated on, either an
- // attribution string or the earlier of two changesets being composed.
- // pool can be null if definitely not needed.
-
- //print(csOp.toSource()+" "+attOp.toSource()+" "+opOut.toSource());
- if (attOp.opcode == '-') {
- Changeset.copyOp(attOp, opOut);
- attOp.opcode = '';
- }
- else if (! attOp.opcode) {
- Changeset.copyOp(csOp, opOut);
- csOp.opcode = '';
- }
- else {
- switch (csOp.opcode) {
- case '-': {
- if (csOp.chars <= attOp.chars) {
- // delete or delete part
- if (attOp.opcode == '=') {
- opOut.opcode = '-';
- opOut.chars = csOp.chars;
- opOut.lines = csOp.lines;
- opOut.attribs = '';
- }
- attOp.chars -= csOp.chars;
- attOp.lines -= csOp.lines;
- csOp.opcode = '';
- if (! attOp.chars) {
- attOp.opcode = '';
- }
- }
- else {
- // delete and keep going
- if (attOp.opcode == '=') {
- opOut.opcode = '-';
- opOut.chars = attOp.chars;
- opOut.lines = attOp.lines;
- opOut.attribs = '';
- }
- csOp.chars -= attOp.chars;
- csOp.lines -= attOp.lines;
- attOp.opcode = '';
- }
- break;
- }
- case '+': {
- // insert
- Changeset.copyOp(csOp, opOut);
- csOp.opcode = '';
- break;
- }
- case '=': {
- if (csOp.chars <= attOp.chars) {
- // keep or keep part
- opOut.opcode = attOp.opcode;
- opOut.chars = csOp.chars;
- opOut.lines = csOp.lines;
- opOut.attribs = Changeset.composeAttributes(attOp.attribs, csOp.attribs,
- attOp.opcode == '=', pool);
- csOp.opcode = '';
- attOp.chars -= csOp.chars;
- attOp.lines -= csOp.lines;
- if (! attOp.chars) {
- attOp.opcode = '';
- }
- }
- else {
- // keep and keep going
- opOut.opcode = attOp.opcode;
- opOut.chars = attOp.chars;
- opOut.lines = attOp.lines;
- opOut.attribs = Changeset.composeAttributes(attOp.attribs, csOp.attribs,
- attOp.opcode == '=', pool);
- attOp.opcode = '';
- csOp.chars -= attOp.chars;
- csOp.lines -= attOp.lines;
- }
- break;
- }
- case '': {
- Changeset.copyOp(attOp, opOut);
- attOp.opcode = '';
- break;
- }
- }
- }
-};
-
-Changeset.applyToAttribution = function(cs, astr, pool) {
- var unpacked = Changeset.unpack(cs);
-
- return Changeset.applyZip(astr, 0, unpacked.ops, 0, function(op1, op2, opOut) {
- return Changeset._slicerZipperFunc(op1, op2, opOut, pool);
- });
-};
-
-/*Changeset.oneInsertedLineAtATimeOpIterator = function(opsStr, optStartIndex, charBank) {
- var iter = Changeset.opIterator(opsStr, optStartIndex);
- var bankIndex = 0;
-
-};*/
-
-Changeset.mutateAttributionLines = function(cs, lines, pool) {
- //dmesg(cs);
- //dmesg(lines.toSource()+" ->");
-
- var unpacked = Changeset.unpack(cs);
- var csIter = Changeset.opIterator(unpacked.ops);
- var csBank = unpacked.charBank;
- var csBankIndex = 0;
- // treat the attribution lines as text lines, mutating a line at a time
- var mut = Changeset.textLinesMutator(lines);
-
- var lineIter = null;
- function isNextMutOp() {
- return (lineIter && lineIter.hasNext()) || mut.hasMore();
- }
- function nextMutOp(destOp) {
- if ((!(lineIter && lineIter.hasNext())) && mut.hasMore()) {
- var line = mut.removeLines(1);
- lineIter = Changeset.opIterator(line);
- }
- if (lineIter && lineIter.hasNext()) {
- lineIter.next(destOp);
- }
- else {
- destOp.opcode = '';
- }
- }
- var lineAssem = null;
- function outputMutOp(op) {
- //print("outputMutOp: "+op.toSource());
- if (! lineAssem) {
- lineAssem = Changeset.mergingOpAssembler();
- }
- lineAssem.append(op);
- if (op.lines > 0) {
- Changeset.assert(op.lines == 1, "Can't have op.lines of ",op.lines," in attribution lines");
- // ship it to the mut
- mut.insert(lineAssem.toString(), 1);
- lineAssem = null;
- }
- }
-
- var csOp = Changeset.newOp();
- var attOp = Changeset.newOp();
- var opOut = Changeset.newOp();
- while (csOp.opcode || csIter.hasNext() || attOp.opcode || isNextMutOp()) {
- if ((! csOp.opcode) && csIter.hasNext()) {
- csIter.next(csOp);
- }
- //print(csOp.toSource()+" "+attOp.toSource()+" "+opOut.toSource());
- //print(csOp.opcode+"/"+csOp.lines+"/"+csOp.attribs+"/"+lineAssem+"/"+lineIter+"/"+(lineIter?lineIter.hasNext():null));
- //print("csOp: "+csOp.toSource());
- if ((! csOp.opcode) && (! attOp.opcode) &&
- (! lineAssem) && (! (lineIter && lineIter.hasNext()))) {
- break; // done
- }
- else if (csOp.opcode == '=' && csOp.lines > 0 && (! csOp.attribs) && (! attOp.opcode) &&
- (! lineAssem) && (! (lineIter && lineIter.hasNext()))) {
- // skip multiple lines; this is what makes small changes not order of the document size
- mut.skipLines(csOp.lines);
- //print("skipped: "+csOp.lines);
- csOp.opcode = '';
- }
- else if (csOp.opcode == '+') {
- if (csOp.lines > 1) {
- var firstLineLen = csBank.indexOf('\n', csBankIndex) + 1 - csBankIndex;
- Changeset.copyOp(csOp, opOut);
- csOp.chars -= firstLineLen;
- csOp.lines--;
- opOut.lines = 1;
- opOut.chars = firstLineLen;
- }
- else {
- Changeset.copyOp(csOp, opOut);
- csOp.opcode = '';
- }
- outputMutOp(opOut);
- csBankIndex += opOut.chars;
- opOut.opcode = '';
- }
- else {
- if ((! attOp.opcode) && isNextMutOp()) {
- nextMutOp(attOp);
- }
- //print("attOp: "+attOp.toSource());
- Changeset._slicerZipperFunc(attOp, csOp, opOut, pool);
- if (opOut.opcode) {
- outputMutOp(opOut);
- opOut.opcode = '';
- }
- }
- }
-
- Changeset.assert(! lineAssem, "line assembler not finished");
- mut.close();
-
- //dmesg("-> "+lines.toSource());
-};
-
-Changeset.joinAttributionLines = function(theAlines) {
- var assem = Changeset.mergingOpAssembler();
- for(var i=0;i<theAlines.length;i++) {
- var aline = theAlines[i];
- var iter = Changeset.opIterator(aline);
- while (iter.hasNext()) {
- assem.append(iter.next());
- }
- }
- return assem.toString();
-};
-
-Changeset.splitAttributionLines = function(attrOps, text) {
- var iter = Changeset.opIterator(attrOps);
- var assem = Changeset.mergingOpAssembler();
- var lines = [];
- var pos = 0;
-
- function appendOp(op) {
- assem.append(op);
- if (op.lines > 0) {
- lines.push(assem.toString());
- assem.clear();
- }
- pos += op.chars;
- }
-
- while (iter.hasNext()) {
- var op = iter.next();
- var numChars = op.chars;
- var numLines = op.lines;
- while (numLines > 1) {
- var newlineEnd = text.indexOf('\n', pos)+1;
- Changeset.assert(newlineEnd > 0, "newlineEnd <= 0 in splitAttributionLines");
- op.chars = newlineEnd - pos;
- op.lines = 1;
- appendOp(op);
- numChars -= op.chars;
- numLines -= op.lines;
- }
- if (numLines == 1) {
- op.chars = numChars;
- op.lines = 1;
- }
- appendOp(op);
- }
-
- return lines;
-};
-
-Changeset.splitTextLines = function(text) {
- return text.match(/[^\n]*(?:\n|[^\n]$)/g);
-};
-
-Changeset.compose = function(cs1, cs2, pool) {
- var unpacked1 = Changeset.unpack(cs1);
- var unpacked2 = Changeset.unpack(cs2);
- var len1 = unpacked1.oldLen;
- var len2 = unpacked1.newLen;
- Changeset.assert(len2 == unpacked2.oldLen, "mismatched composition");
- var len3 = unpacked2.newLen;
- var bankIter1 = Changeset.stringIterator(unpacked1.charBank);
- var bankIter2 = Changeset.stringIterator(unpacked2.charBank);
- var bankAssem = Changeset.stringAssembler();
-
- var newOps = Changeset.applyZip(unpacked1.ops, 0, unpacked2.ops, 0, function(op1, op2, opOut) {
- //var debugBuilder = Changeset.stringAssembler();
- //debugBuilder.append(Changeset.opString(op1));
- //debugBuilder.append(',');
- //debugBuilder.append(Changeset.opString(op2));
- //debugBuilder.append(' / ');
-
- var op1code = op1.opcode;
- var op2code = op2.opcode;
- if (op1code == '+' && op2code == '-') {
- bankIter1.skip(Math.min(op1.chars, op2.chars));
- }
- Changeset._slicerZipperFunc(op1, op2, opOut, pool);
- if (opOut.opcode == '+') {
- if (op2code == '+') {
- bankAssem.append(bankIter2.take(opOut.chars));
- }
- else {
- bankAssem.append(bankIter1.take(opOut.chars));
- }
- }
-
- //debugBuilder.append(Changeset.opString(op1));
- //debugBuilder.append(',');
- //debugBuilder.append(Changeset.opString(op2));
- //debugBuilder.append(' -> ');
- //debugBuilder.append(Changeset.opString(opOut));
- //print(debugBuilder.toString());
- });
-
- return Changeset.pack(len1, len3, newOps, bankAssem.toString());
-};
-
-Changeset.attributeTester = function(attribPair, pool) {
- // returns a function that tests if a string of attributes
- // (e.g. *3*4) contains a given attribute key,value that
- // is already present in the pool.
- if (! pool) {
- return never;
- }
- var attribNum = pool.putAttrib(attribPair, true);
- if (attribNum < 0) {
- return never;
- }
- else {
- var re = new RegExp('\\*'+Changeset.numToString(attribNum)+
- '(?!\\w)');
- return function(attribs) {
- return re.test(attribs);
- };
- }
- function never(attribs) { return false; }
-};
-
-Changeset.identity = function(N) {
- return Changeset.pack(N, N, "", "");
-};
-
-Changeset.makeSplice = function(oldFullText, spliceStart, numRemoved, newText, optNewTextAPairs, pool) {
- var oldLen = oldFullText.length;
-
- if (spliceStart >= oldLen) {
- spliceStart = oldLen - 1;
- }
- if (numRemoved > oldFullText.length - spliceStart - 1) {
- numRemoved = oldFullText.length - spliceStart - 1;
- }
- var oldText = oldFullText.substring(spliceStart, spliceStart+numRemoved);
- var newLen = oldLen + newText.length - oldText.length;
-
- var assem = Changeset.smartOpAssembler();
- assem.appendOpWithText('=', oldFullText.substring(0, spliceStart));
- assem.appendOpWithText('-', oldText);
- assem.appendOpWithText('+', newText, optNewTextAPairs, pool);
- assem.endDocument();
- return Changeset.pack(oldLen, newLen, assem.toString(), newText);
-};
-
-Changeset.toSplices = function(cs) {
- // get a list of splices, [startChar, endChar, newText]
-
- var unpacked = Changeset.unpack(cs);
- var splices = [];
-
- var oldPos = 0;
- var iter = Changeset.opIterator(unpacked.ops);
- var charIter = Changeset.stringIterator(unpacked.charBank);
- var inSplice = false;
- while (iter.hasNext()) {
- var op = iter.next();
- if (op.opcode == '=') {
- oldPos += op.chars;
- inSplice = false;
- }
- else {
- if (! inSplice) {
- splices.push([oldPos, oldPos, ""]);
- inSplice = true;
- }
- if (op.opcode == '-') {
- oldPos += op.chars;
- splices[splices.length-1][1] += op.chars;
- }
- else if (op.opcode == '+') {
- splices[splices.length-1][2] += charIter.take(op.chars);
- }
- }
- }
-
- return splices;
-};
-
-Changeset.characterRangeFollow = function(cs, startChar, endChar, insertionsAfter) {
- var newStartChar = startChar;
- var newEndChar = endChar;
- var splices = Changeset.toSplices(cs);
- var lengthChangeSoFar = 0;
- for(var i=0;i<splices.length;i++) {
- var splice = splices[i];
- var spliceStart = splice[0] + lengthChangeSoFar;
- var spliceEnd = splice[1] + lengthChangeSoFar;
- var newTextLength = splice[2].length;
- var thisLengthChange = newTextLength - (spliceEnd - spliceStart);
-
- if (spliceStart <= newStartChar && spliceEnd >= newEndChar) {
- // splice fully replaces/deletes range
- // (also case that handles insertion at a collapsed selection)
- if (insertionsAfter) {
- newStartChar = newEndChar = spliceStart;
- }
- else {
- newStartChar = newEndChar = spliceStart + newTextLength;
- }
- }
- else if (spliceEnd <= newStartChar) {
- // splice is before range
- newStartChar += thisLengthChange;
- newEndChar += thisLengthChange;
- }
- else if (spliceStart >= newEndChar) {
- // splice is after range
- }
- else if (spliceStart >= newStartChar && spliceEnd <= newEndChar) {
- // splice is inside range
- newEndChar += thisLengthChange;
- }
- else if (spliceEnd < newEndChar) {
- // splice overlaps beginning of range
- newStartChar = spliceStart + newTextLength;
- newEndChar += thisLengthChange;
- }
- else {
- // splice overlaps end of range
- newEndChar = spliceStart;
- }
-
- lengthChangeSoFar += thisLengthChange;
- }
-
- return [newStartChar, newEndChar];
-};
-
-Changeset.moveOpsToNewPool = function(cs, oldPool, newPool) {
- // works on changeset or attribution string
- var dollarPos = cs.indexOf('$');
- if (dollarPos < 0) {
- dollarPos = cs.length;
- }
- var upToDollar = cs.substring(0, dollarPos);
- var fromDollar = cs.substring(dollarPos);
- // order of attribs stays the same
- return upToDollar.replace(/\*([0-9a-z]+)/g, function(_, a) {
- var oldNum = Changeset.parseNum(a);
- var pair = oldPool.getAttrib(oldNum);
- var newNum = newPool.putAttrib(pair);
- return '*'+Changeset.numToString(newNum);
- }) + fromDollar;
-};
-
-Changeset.makeAttribution = function(text) {
- var assem = Changeset.smartOpAssembler();
- assem.appendOpWithText('+', text);
- return assem.toString();
-};
-
-// callable on a changeset, attribution string, or attribs property of an op
-Changeset.eachAttribNumber = function(cs, func) {
- var dollarPos = cs.indexOf('$');
- if (dollarPos < 0) {
- dollarPos = cs.length;
- }
- var upToDollar = cs.substring(0, dollarPos);
-
- upToDollar.replace(/\*([0-9a-z]+)/g, function(_, a) {
- func(Changeset.parseNum(a));
- return '';
- });
-};
-
-// callable on a changeset, attribution string, or attribs property of an op,
-// though it may easily create adjacent ops that can be merged.
-Changeset.filterAttribNumbers = function(cs, filter) {
- return Changeset.mapAttribNumbers(cs, filter);
-};
-
-Changeset.mapAttribNumbers = function(cs, func) {
- var dollarPos = cs.indexOf('$');
- if (dollarPos < 0) {
- dollarPos = cs.length;
- }
- var upToDollar = cs.substring(0, dollarPos);
-
- var newUpToDollar = upToDollar.replace(/\*([0-9a-z]+)/g, function(s, a) {
- var n = func(Changeset.parseNum(a));
- if (n === true) {
- return s;
- }
- else if ((typeof n) === "number") {
- return '*'+Changeset.numToString(n);
- }
- else {
- return '';
- }
- });
-
- return newUpToDollar + cs.substring(dollarPos);
-};
-
-Changeset.makeAText = function(text, attribs) {
- return { text: text, attribs: (attribs || Changeset.makeAttribution(text)) };
-};
-
-Changeset.applyToAText = function(cs, atext, pool) {
- return { text: Changeset.applyToText(cs, atext.text),
- attribs: Changeset.applyToAttribution(cs, atext.attribs, pool) };
-};
-
-Changeset.cloneAText = function(atext) {
- return { text: atext.text, attribs: atext.attribs };
-};
-
-Changeset.copyAText = function(atext1, atext2) {
- atext2.text = atext1.text;
- atext2.attribs = atext1.attribs;
-};
-
-Changeset.appendATextToAssembler = function(atext, assem) {
- // intentionally skips last newline char of atext
- var iter = Changeset.opIterator(atext.attribs);
- var op = Changeset.newOp();
- while (iter.hasNext()) {
- iter.next(op);
- if (! iter.hasNext()) {
- // last op, exclude final newline
- if (op.lines <= 1) {
- op.lines = 0;
- op.chars--;
- if (op.chars) {
- assem.append(op);
- }
- }
- else {
- var nextToLastNewlineEnd =
- atext.text.lastIndexOf('\n', atext.text.length-2) + 1;
- var lastLineLength = atext.text.length - nextToLastNewlineEnd - 1;
- op.lines--;
- op.chars -= (lastLineLength + 1);
- assem.append(op);
- op.lines = 0;
- op.chars = lastLineLength;
- if (op.chars) {
- assem.append(op);
- }
- }
- }
- else {
- assem.append(op);
- }
- }
-};
-
-Changeset.prepareForWire = function(cs, pool) {
- var newPool = new AttribPool();
- var newCs = Changeset.moveOpsToNewPool(cs, pool, newPool);
- return {translated: newCs, pool: newPool};
-};
-
-Changeset.isIdentity = function(cs) {
- var unpacked = Changeset.unpack(cs);
- return unpacked.ops == "" && unpacked.oldLen == unpacked.newLen;
-};
-
-Changeset.opAttributeValue = function(op, key, pool) {
- return Changeset.attribsAttributeValue(op.attribs, key, pool);
-};
-
-Changeset.attribsAttributeValue = function(attribs, key, pool) {
- var value = '';
- if (attribs) {
- Changeset.eachAttribNumber(attribs, function(n) {
- if (pool.getAttribKey(n) == key) {
- value = pool.getAttribValue(n);
- }
- });
- }
- return value;
-};
-
-Changeset.builder = function(oldLen) {
- var assem = Changeset.smartOpAssembler();
- var o = Changeset.newOp();
- var charBank = Changeset.stringAssembler();
-
- var self = {
- // attribs are [[key1,value1],[key2,value2],...] or '*0*1...' (no pool needed in latter case)
- keep: function(N, L, attribs, pool) {
- o.opcode = '=';
- o.attribs = (attribs &&
- Changeset.makeAttribsString('=', attribs, pool)) || '';
- o.chars = N;
- o.lines = (L || 0);
- assem.append(o);
- return self;
- },
- keepText: function(text, attribs, pool) {
- assem.appendOpWithText('=', text, attribs, pool);
- return self;
- },
- insert: function(text, attribs, pool) {
- assem.appendOpWithText('+', text, attribs, pool);
- charBank.append(text);
- return self;
- },
- remove: function(N, L) {
- o.opcode = '-';
- o.attribs = '';
- o.chars = N;
- o.lines = (L || 0);
- assem.append(o);
- return self;
- },
- toString: function() {
- assem.endDocument();
- var newLen = oldLen + assem.getLengthChange();
- return Changeset.pack(oldLen, newLen, assem.toString(),
- charBank.toString());
- }
- };
-
- return self;
-};
-
-Changeset.makeAttribsString = function(opcode, attribs, pool) {
- // makeAttribsString(opcode, '*3') or makeAttribsString(opcode, [['foo','bar']], myPool) work
- if (! attribs) {
- return '';
- }
- else if ((typeof attribs) == "string") {
- return attribs;
- }
- else if (pool && attribs && attribs.length) {
- if (attribs.length > 1) {
- attribs = attribs.slice();
- attribs.sort();
- }
- var result = [];
- for(var i=0;i<attribs.length;i++) {
- var pair = attribs[i];
- if (opcode == '=' || (opcode == '+' && pair[1])) {
- result.push('*'+Changeset.numToString(pool.putAttrib(pair)));
- }
- }
- return result.join('');
- }
-};
-
-// like "substring" but on a single-line attribution string
-Changeset.subattribution = function(astr, start, optEnd) {
- var iter = Changeset.opIterator(astr, 0);
- var assem = Changeset.smartOpAssembler();
- var attOp = Changeset.newOp();
- var csOp = Changeset.newOp();
- var opOut = Changeset.newOp();
-
- function doCsOp() {
- if (csOp.chars) {
- while (csOp.opcode && (attOp.opcode || iter.hasNext())) {
- if (! attOp.opcode) iter.next(attOp);
-
- if (csOp.opcode && attOp.opcode && csOp.chars >= attOp.chars &&
- attOp.lines > 0 && csOp.lines <= 0) {
- csOp.lines++;
- }
-
- Changeset._slicerZipperFunc(attOp, csOp, opOut, null);
- if (opOut.opcode) {
- assem.append(opOut);
- opOut.opcode = '';
- }
- }
- }
- }
-
- csOp.opcode = '-';
- csOp.chars = start;
-
- doCsOp();
-
- if (optEnd === undefined) {
- if (attOp.opcode) {
- assem.append(attOp);
- }
- while (iter.hasNext()) {
- iter.next(attOp);
- assem.append(attOp);
- }
- }
- else {
- csOp.opcode = '=';
- csOp.chars = optEnd - start;
- doCsOp();
- }
-
- return assem.toString();
-};
-
-Changeset.inverse = function(cs, lines, alines, pool) {
- // lines and alines are what the changeset is meant to apply to.
- // They may be arrays or objects with .get(i) and .length methods.
- // They include final newlines on lines.
- function lines_get(idx) {
- if (lines.get) {
- return lines.get(idx);
- }
- else {
- return lines[idx];
- }
- }
- function lines_length() {
- if ((typeof lines.length) == "number") {
- return lines.length;
- }
- else {
- return lines.length();
- }
- }
- function alines_get(idx) {
- if (alines.get) {
- return alines.get(idx);
- }
- else {
- return alines[idx];
- }
- }
- function alines_length() {
- if ((typeof alines.length) == "number") {
- return alines.length;
- }
- else {
- return alines.length();
- }
- }
-
- var curLine = 0;
- var curChar = 0;
- var curLineOpIter = null;
- var curLineOpIterLine;
- var curLineNextOp = Changeset.newOp('+');
-
- var unpacked = Changeset.unpack(cs);
- var csIter = Changeset.opIterator(unpacked.ops);
- var builder = Changeset.builder(unpacked.newLen);
-
- function consumeAttribRuns(numChars, func/*(len, attribs, endsLine)*/) {
-
- if ((! curLineOpIter) || (curLineOpIterLine != curLine)) {
- // create curLineOpIter and advance it to curChar
- curLineOpIter = Changeset.opIterator(alines_get(curLine));
- curLineOpIterLine = curLine;
- var indexIntoLine = 0;
- var done = false;
- while (! done) {
- curLineOpIter.next(curLineNextOp);
- if (indexIntoLine + curLineNextOp.chars >= curChar) {
- curLineNextOp.chars -= (curChar - indexIntoLine);
- done = true;
- }
- else {
- indexIntoLine += curLineNextOp.chars;
- }
- }
- }
-
- while (numChars > 0) {
- if ((! curLineNextOp.chars) && (! curLineOpIter.hasNext())) {
- curLine++;
- curChar = 0;
- curLineOpIterLine = curLine;
- curLineNextOp.chars = 0;
- curLineOpIter = Changeset.opIterator(alines_get(curLine));
- }
- if (! curLineNextOp.chars) {
- curLineOpIter.next(curLineNextOp);
- }
- var charsToUse = Math.min(numChars, curLineNextOp.chars);
- func(charsToUse, curLineNextOp.attribs,
- charsToUse == curLineNextOp.chars && curLineNextOp.lines > 0);
- numChars -= charsToUse;
- curLineNextOp.chars -= charsToUse;
- curChar += charsToUse;
- }
-
- if ((! curLineNextOp.chars) && (! curLineOpIter.hasNext())) {
- curLine++;
- curChar = 0;
- }
- }
-
- function skip(N, L) {
- if (L) {
- curLine += L;
- curChar = 0;
- }
- else {
- if (curLineOpIter && curLineOpIterLine == curLine) {
- consumeAttribRuns(N, function() {});
- }
- else {
- curChar += N;
- }
- }
- }
-
- function nextText(numChars) {
- var len = 0;
- var assem = Changeset.stringAssembler();
- var firstString = lines_get(curLine).substring(curChar);
- len += firstString.length;
- assem.append(firstString);
-
- var lineNum = curLine+1;
- while (len < numChars) {
- var nextString = lines_get(lineNum);
- len += nextString.length;
- assem.append(nextString);
- lineNum++;
- }
-
- return assem.toString().substring(0, numChars);
- }
-
- function cachedStrFunc(func) {
- var cache = {};
- return function(s) {
- if (! cache[s]) {
- cache[s] = func(s);
- }
- return cache[s];
- };
- }
-
- var attribKeys = [];
- var attribValues = [];
- while (csIter.hasNext()) {
- var csOp = csIter.next();
- if (csOp.opcode == '=') {
- if (csOp.attribs) {
- attribKeys.length = 0;
- attribValues.length = 0;
- Changeset.eachAttribNumber(csOp.attribs, function(n) {
- attribKeys.push(pool.getAttribKey(n));
- attribValues.push(pool.getAttribValue(n));
- });
- var undoBackToAttribs = cachedStrFunc(function(attribs) {
- var backAttribs = [];
- for(var i=0;i<attribKeys.length;i++) {
- var appliedKey = attribKeys[i];
- var appliedValue = attribValues[i];
- var oldValue = Changeset.attribsAttributeValue(attribs, appliedKey, pool);
- if (appliedValue != oldValue) {
- backAttribs.push([appliedKey, oldValue]);
- }
- }
- return Changeset.makeAttribsString('=', backAttribs, pool);
- });
- consumeAttribRuns(csOp.chars, function(len, attribs, endsLine) {
- builder.keep(len, endsLine ? 1 : 0, undoBackToAttribs(attribs));
- });
- }
- else {
- skip(csOp.chars, csOp.lines);
- builder.keep(csOp.chars, csOp.lines);
- }
- }
- else if (csOp.opcode == '+') {
- builder.remove(csOp.chars, csOp.lines);
- }
- else if (csOp.opcode == '-') {
- var textBank = nextText(csOp.chars);
- var textBankIndex = 0;
- consumeAttribRuns(csOp.chars, function(len, attribs, endsLine) {
- builder.insert(textBank.substr(textBankIndex, len), attribs);
- textBankIndex += len;
- });
- }
- }
-
- return Changeset.checkRep(builder.toString());
-};
-
-// %CLIENT FILE ENDS HERE%
-
-Changeset.follow = function(cs1, cs2, reverseInsertOrder, pool) {
- var unpacked1 = Changeset.unpack(cs1);
- var unpacked2 = Changeset.unpack(cs2);
- var len1 = unpacked1.oldLen;
- var len2 = unpacked2.oldLen;
- Changeset.assert(len1 == len2, "mismatched follow");
- var chars1 = Changeset.stringIterator(unpacked1.charBank);
- var chars2 = Changeset.stringIterator(unpacked2.charBank);
-
- var oldLen = unpacked1.newLen;
- var oldPos = 0;
- var newLen = 0;
-
- var hasInsertFirst = Changeset.attributeTester(['insertorder','first'],
- pool);
-
- var newOps = Changeset.applyZip(unpacked1.ops, 0, unpacked2.ops, 0, function(op1, op2, opOut) {
- if (op1.opcode == '+' || op2.opcode == '+') {
- var whichToDo;
- if (op2.opcode != '+') {
- whichToDo = 1;
- }
- else if (op1.opcode != '+') {
- whichToDo = 2;
- }
- else {
- // both +
- var firstChar1 = chars1.peek(1);
- var firstChar2 = chars2.peek(1);
- var insertFirst1 = hasInsertFirst(op1.attribs);
- var insertFirst2 = hasInsertFirst(op2.attribs);
- if (insertFirst1 && ! insertFirst2) {
- whichToDo = 1;
- }
- else if (insertFirst2 && ! insertFirst1) {
- whichToDo = 2;
- }
- // insert string that doesn't start with a newline first so as not to break up lines
- else if (firstChar1 == '\n' && firstChar2 != '\n') {
- whichToDo = 2;
- }
- else if (firstChar1 != '\n' && firstChar2 == '\n') {
- whichToDo = 1;
- }
- // break symmetry:
- else if (reverseInsertOrder) {
- whichToDo = 2;
- }
- else {
- whichToDo = 1;
- }
- }
- if (whichToDo == 1) {
- chars1.skip(op1.chars);
- opOut.opcode = '=';
- opOut.lines = op1.lines;
- opOut.chars = op1.chars;
- opOut.attribs = '';
- op1.opcode = '';
- }
- else {
- // whichToDo == 2
- chars2.skip(op2.chars);
- Changeset.copyOp(op2, opOut);
- op2.opcode = '';
- }
- }
- else if (op1.opcode == '-') {
- if (! op2.opcode) {
- op1.opcode = '';
- }
- else {
- if (op1.chars <= op2.chars) {
- op2.chars -= op1.chars;
- op2.lines -= op1.lines;
- op1.opcode = '';
- if (! op2.chars) {
- op2.opcode = '';
- }
- }
- else {
- op1.chars -= op2.chars;
- op1.lines -= op2.lines;
- op2.opcode = '';
- }
- }
- }
- else if (op2.opcode == '-') {
- Changeset.copyOp(op2, opOut);
- if (! op1.opcode) {
- op2.opcode = '';
- }
- else if (op2.chars <= op1.chars) {
- // delete part or all of a keep
- op1.chars -= op2.chars;
- op1.lines -= op2.lines;
- op2.opcode = '';
- if (! op1.chars) {
- op1.opcode = '';
- }
- }
- else {
- // delete all of a keep, and keep going
- opOut.lines = op1.lines;
- opOut.chars = op1.chars;
- op2.lines -= op1.lines;
- op2.chars -= op1.chars;
- op1.opcode = '';
- }
- }
- else if (! op1.opcode) {
- Changeset.copyOp(op2, opOut);
- op2.opcode = '';
- }
- else if (! op2.opcode) {
- Changeset.copyOp(op1, opOut);
- op1.opcode = '';
- }
- else {
- // both keeps
- opOut.opcode = '=';
- opOut.attribs = Changeset.followAttributes(op1.attribs, op2.attribs, pool);
- if (op1.chars <= op2.chars) {
- opOut.chars = op1.chars;
- opOut.lines = op1.lines;
- op2.chars -= op1.chars;
- op2.lines -= op1.lines;
- op1.opcode = '';
- if (! op2.chars) {
- op2.opcode = '';
- }
- }
- else {
- opOut.chars = op2.chars;
- opOut.lines = op2.lines;
- op1.chars -= op2.chars;
- op1.lines -= op2.lines;
- op2.opcode = '';
- }
- }
- switch (opOut.opcode) {
- case '=': oldPos += opOut.chars; newLen += opOut.chars; break;
- case '-': oldPos += opOut.chars; break;
- case '+': newLen += opOut.chars; break;
- }
- });
- newLen += oldLen - oldPos;
-
- return Changeset.pack(oldLen, newLen, newOps, unpacked2.charBank);
-};
-
-Changeset.followAttributes = function(att1, att2, pool) {
- // The merge of two sets of attribute changes to the same text
- // takes the lexically-earlier value if there are two values
- // for the same key. Otherwise, all key/value changes from
- // both attribute sets are taken. This operation is the "follow",
- // so a set of changes is produced that can be applied to att1
- // to produce the merged set.
- if ((! att2) || (! pool)) return '';
- if (! att1) return att2;
- var atts = [];
- att2.replace(/\*([0-9a-z]+)/g, function(_, a) {
- atts.push(pool.getAttrib(Changeset.parseNum(a)));
- return '';
- });
- att1.replace(/\*([0-9a-z]+)/g, function(_, a) {
- var pair1 = pool.getAttrib(Changeset.parseNum(a));
- for(var i=0;i<atts.length;i++) {
- var pair2 = atts[i];
- if (pair1[0] == pair2[0]) {
- if (pair1[1] <= pair2[1]) {
- // winner of merge is pair1, delete this attribute
- atts.splice(i, 1);
- }
- break;
- }
- }
- return '';
- });
- // we've only removed attributes, so they're already sorted
- var buf = Changeset.stringAssembler();
- for(var i=0;i<atts.length;i++) {
- buf.append('*');
- buf.append(Changeset.numToString(pool.putAttrib(atts[i])));
- }
- return buf.toString();
-};
diff --git a/trunk/infrastructure/ace/www/easysync2_tests.js b/trunk/infrastructure/ace/www/easysync2_tests.js
deleted file mode 100644
index 2fcf202..0000000
--- a/trunk/infrastructure/ace/www/easysync2_tests.js
+++ /dev/null
@@ -1,877 +0,0 @@
-// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.easysync2_tests
-// %APPJET%: import("etherpad.collab.ace.easysync2.*")
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function runTests() {
-
- function print(str) {
- java.lang.System.out.println(str);
- }
-
- function assert(code, optMsg) {
- if (! eval(code)) throw new Error("FALSE: "+(optMsg || code));
- }
- function literal(v) {
- if ((typeof v) == "string") {
- return '"'+v.replace(/[\\\"]/g, '\\$1').replace(/\n/g, '\\n')+'"';
- }
- else return v.toSource();
- }
- function assertEqualArrays(a, b) {
- assert(literal(a)+".toSource() == "+literal(b)+".toSource()");
- }
- function assertEqualStrings(a, b) {
- assert(literal(a)+" == "+literal(b));
- }
-
- function throughIterator(opsStr) {
- var iter = Changeset.opIterator(opsStr);
- var assem = Changeset.opAssembler();
- while (iter.hasNext()) {
- assem.append(iter.next());
- }
- return assem.toString();
- }
-
- function throughSmartAssembler(opsStr) {
- var iter = Changeset.opIterator(opsStr);
- var assem = Changeset.smartOpAssembler();
- while (iter.hasNext()) {
- assem.append(iter.next());
- }
- assem.endDocument();
- return assem.toString();
- }
-
- (function() {
- print("> throughIterator");
- var x = '-c*3*4+6|3=az*asdf0*1*2*3+1=1-1+1*0+1=1-1+1|c=c-1';
- assert("throughIterator("+literal(x)+") == "+literal(x));
- })();
-
- (function() {
- print("> throughSmartAssembler");
- var x = '-c*3*4+6|3=az*asdf0*1*2*3+1=1-1+1*0+1=1-1+1|c=c-1';
- assert("throughSmartAssembler("+literal(x)+") == "+literal(x));
- })();
-
- function applyMutations(mu, arrayOfArrays) {
- arrayOfArrays.forEach(function (a) {
- var result = mu[a[0]].apply(mu, a.slice(1));
- if (a[0] == 'remove' && a[3]) {
- assertEqualStrings(a[3], result);
- }
- });
- }
-
- function mutationsToChangeset(oldLen, arrayOfArrays) {
- var assem = Changeset.smartOpAssembler();
- var op = Changeset.newOp();
- var bank = Changeset.stringAssembler();
- var oldPos = 0;
- var newLen = 0;
- arrayOfArrays.forEach(function (a) {
- if (a[0] == 'skip') {
- op.opcode = '=';
- op.chars = a[1];
- op.lines = (a[2] || 0);
- assem.append(op);
- oldPos += op.chars;
- newLen += op.chars;
- }
- else if (a[0] == 'remove') {
- op.opcode = '-';
- op.chars = a[1];
- op.lines = (a[2] || 0);
- assem.append(op);
- oldPos += op.chars;
- }
- else if (a[0] == 'insert') {
- op.opcode = '+';
- bank.append(a[1]);
- op.chars = a[1].length;
- op.lines = (a[2] || 0);
- assem.append(op);
- newLen += op.chars;
- }
- });
- newLen += oldLen - oldPos;
- assem.endDocument();
- return Changeset.pack(oldLen, newLen, assem.toString(),
- bank.toString());
- }
-
- function runMutationTest(testId, origLines, muts, correct) {
- print("> runMutationTest#"+testId);
- var lines = origLines.slice();
- var mu = Changeset.textLinesMutator(lines);
- applyMutations(mu, muts);
- mu.close();
- assertEqualArrays(correct, lines);
-
- var inText = origLines.join('');
- var cs = mutationsToChangeset(inText.length, muts);
- lines = origLines.slice();
- Changeset.mutateTextLines(cs, lines);
- assertEqualArrays(correct, lines);
-
- var correctText = correct.join('');
- //print(literal(cs));
- var outText = Changeset.applyToText(cs, inText);
- assertEqualStrings(correctText, outText);
- }
-
- runMutationTest(1, ["apple\n", "banana\n", "cabbage\n", "duffle\n", "eggplant\n"],
- [['remove',1,0,"a"],['insert',"tu"],['remove',1,0,"p"],['skip',4,1],['skip',7,1],
- ['insert',"cream\npie\n",2],['skip',2],['insert',"bot"],['insert',"\n",1],
- ['insert',"bu"],['skip',3],['remove',3,1,"ge\n"],['remove',6,0,"duffle"]],
- ["tuple\n","banana\n","cream\n","pie\n", "cabot\n","bubba\n","eggplant\n"]);
-
- runMutationTest(2, ["apple\n", "banana\n", "cabbage\n", "duffle\n", "eggplant\n"],
- [['remove',1,0,"a"],['remove',1,0,"p"],['insert',"tu"],['skip',11,2],
- ['insert',"cream\npie\n",2],['skip',2],['insert',"bot"],['insert',"\n",1],
- ['insert',"bu"],['skip',3],['remove',3,1,"ge\n"],['remove',6,0,"duffle"]],
- ["tuple\n","banana\n","cream\n","pie\n", "cabot\n","bubba\n","eggplant\n"]);
-
- runMutationTest(3, ["apple\n", "banana\n", "cabbage\n", "duffle\n", "eggplant\n"],
- [['remove',6,1,"apple\n"],['skip',15,2],['skip',6],['remove',1,1,"\n"],
- ['remove',8,0,"eggplant"],['skip',1,1]],
- ["banana\n","cabbage\n","duffle\n"]);
-
- runMutationTest(4, ["15\n"],
- [['skip',1],['insert',"\n2\n3\n4\n",4],['skip',2,1]],
- ["1\n","2\n","3\n","4\n","5\n"]);
-
- runMutationTest(5, ["1\n","2\n","3\n","4\n","5\n"],
- [['skip',1],['remove',7,4,"\n2\n3\n4\n"],['skip',2,1]],
- ["15\n"]);
-
- runMutationTest(6, ["123\n","abc\n","def\n","ghi\n","xyz\n"],
- [['insert',"0"],['skip',4,1],['skip',4,1],['remove',8,2,"def\nghi\n"],['skip',4,1]],
- ["0123\n", "abc\n", "xyz\n"]);
-
- runMutationTest(7, ["apple\n", "banana\n", "cabbage\n", "duffle\n", "eggplant\n"],
- [['remove',6,1,"apple\n"],['skip',15,2,true],['skip',6,0,true],['remove',1,1,"\n"],
- ['remove',8,0,"eggplant"],['skip',1,1,true]],
- ["banana\n","cabbage\n","duffle\n"]);
-
- function poolOrArray(attribs) {
- if (attribs.getAttrib) {
- return attribs; // it's already an attrib pool
- }
- else {
- // assume it's an array of attrib strings to be split and added
- var p = new AttribPool();
- attribs.forEach(function (kv) { p.putAttrib(kv.split(',')); });
- return p;
- }
- }
-
- function runApplyToAttributionTest(testId, attribs, cs, inAttr, outCorrect) {
- print("> applyToAttribution#"+testId);
- var p = poolOrArray(attribs);
- var result = Changeset.applyToAttribution(
- Changeset.checkRep(cs), inAttr, p);
- assertEqualStrings(outCorrect, result);
- }
-
- // turn c<b>a</b>ctus\n into a<b>c</b>tusabcd\n
- runApplyToAttributionTest(1, ['bold,', 'bold,true'],
- "Z:7>3-1*0=1*1=1=3+4$abcd",
- "+1*1+1|1+5", "+1*1+1|1+8");
-
- // turn "david\ngreenspan\n" into "<b>david\ngreen</b>\n"
- runApplyToAttributionTest(2, ['bold,', 'bold,true'],
- "Z:g<4*1|1=6*1=5-4$",
- "|2+g", "*1|1+6*1+5|1+1");
-
- (function() {
- print("> mutatorHasMore");
- var lines = ["1\n", "2\n", "3\n", "4\n"];
- var mu;
-
- mu = Changeset.textLinesMutator(lines);
- assert(mu.hasMore()+' == true');
- mu.skip(8,4);
- assert(mu.hasMore()+' == false');
- mu.close();
- assert(mu.hasMore()+' == false');
-
- // still 1,2,3,4
- mu = Changeset.textLinesMutator(lines);
- assert(mu.hasMore()+' == true');
- mu.remove(2,1);
- assert(mu.hasMore()+' == true');
- mu.skip(2,1);
- assert(mu.hasMore()+' == true');
- mu.skip(2,1);
- assert(mu.hasMore()+' == true');
- mu.skip(2,1);
- assert(mu.hasMore()+' == false');
- mu.insert("5\n", 1);
- assert(mu.hasMore()+' == false');
- mu.close();
- assert(mu.hasMore()+' == false');
-
- // 2,3,4,5 now
- mu = Changeset.textLinesMutator(lines);
- assert(mu.hasMore()+' == true');
- mu.remove(6,3);
- assert(mu.hasMore()+' == true');
- mu.remove(2,1);
- assert(mu.hasMore()+' == false');
- mu.insert("hello\n", 1);
- assert(mu.hasMore()+' == false');
- mu.close();
- assert(mu.hasMore()+' == false');
-
- })();
-
- function runMutateAttributionTest(testId, attribs, cs, alines, outCorrect) {
- print("> runMutateAttributionTest#"+testId);
- var p = poolOrArray(attribs);
- var alines2 = Array.prototype.slice.call(alines);
- var result = Changeset.mutateAttributionLines(
- Changeset.checkRep(cs), alines2, p);
- assertEqualArrays(outCorrect, alines2);
-
- print("> runMutateAttributionTest#"+testId+".applyToAttribution");
- function removeQuestionMarks(a) { return a.replace(/\?/g, ''); }
- var inMerged = Changeset.joinAttributionLines(alines.map(removeQuestionMarks));
- var correctMerged = Changeset.joinAttributionLines(outCorrect.map(removeQuestionMarks));
- var mergedResult = Changeset.applyToAttribution(cs, inMerged, p);
- assertEqualStrings(correctMerged, mergedResult);
- }
-
- // turn 123\n 456\n 789\n into 123\n 4<b>5</b>6\n 789\n
- runMutateAttributionTest(1, ["bold,true"], "Z:c>0|1=4=1*0=1$", ["|1+4", "|1+4", "|1+4"],
- ["|1+4", "+1*0+1|1+2", "|1+4"]);
-
- // make a document bold
- runMutateAttributionTest(2, ["bold,true"], "Z:c>0*0|3=c$", ["|1+4", "|1+4", "|1+4"],
- ["*0|1+4", "*0|1+4", "*0|1+4"]);
-
- // clear bold on document
- runMutateAttributionTest(3, ["bold,","bold,true"], "Z:c>0*0|3=c$",
- ["*1+1+1*1+1|1+1", "+1*1+1|1+2", "*1+1+1*1+1|1+1"],
- ["|1+4", "|1+4", "|1+4"]);
-
- // add a character on line 3 of a document with 5 blank lines, and make sure
- // the optimization that skips purely-kept lines is working; if any attribution string
- // with a '?' is parsed it will cause an error.
- runMutateAttributionTest(4, ['foo,bar','line,1','line,2','line,3','line,4','line,5'],
- "Z:5>1|2=2+1$x",
- ["?*1|1+1", "?*2|1+1", "*3|1+1", "?*4|1+1", "?*5|1+1"],
- ["?*1|1+1", "?*2|1+1", "+1*3|1+1", "?*4|1+1", "?*5|1+1"]);
-
- var testPoolWithChars = (function() {
- var p = new AttribPool();
- p.putAttrib(['char','newline']);
- for(var i=1;i<36;i++) {
- p.putAttrib(['char',Changeset.numToString(i)]);
- }
- p.putAttrib(['char','']);
- return p;
- })();
-
- // based on runMutationTest#1
- runMutateAttributionTest(5, testPoolWithChars,
- "Z:11>7-2*t+1*u+1|2=b|2+a=2*b+1*o+1*t+1*0|1+1*b+1*u+1=3|1-3-6$"+
- "tucream\npie\nbot\nbu",
- ["*a+1*p+2*l+1*e+1*0|1+1",
- "*b+1*a+1*n+1*a+1*n+1*a+1*0|1+1",
- "*c+1*a+1*b+2*a+1*g+1*e+1*0|1+1",
- "*d+1*u+1*f+2*l+1*e+1*0|1+1",
- "*e+1*g+2*p+1*l+1*a+1*n+1*t+1*0|1+1"],
- ["*t+1*u+1*p+1*l+1*e+1*0|1+1",
- "*b+1*a+1*n+1*a+1*n+1*a+1*0|1+1",
- "|1+6",
- "|1+4",
- "*c+1*a+1*b+1*o+1*t+1*0|1+1",
- "*b+1*u+1*b+2*a+1*0|1+1",
- "*e+1*g+2*p+1*l+1*a+1*n+1*t+1*0|1+1"]);
-
- // based on runMutationTest#3
- runMutateAttributionTest(6, testPoolWithChars,
- "Z:11<f|1-6|2=f=6|1-1-8$",
- ["*a|1+6", "*b|1+7", "*c|1+8", "*d|1+7", "*e|1+9"],
- ["*b|1+7", "*c|1+8", "*d+6*e|1+1"]);
-
- // based on runMutationTest#4
- runMutateAttributionTest(7, testPoolWithChars,
- "Z:3>7=1|4+7$\n2\n3\n4\n",
- ["*1+1*5|1+2"],
- ["*1+1|1+1","|1+2","|1+2","|1+2","*5|1+2"]);
-
- // based on runMutationTest#5
- runMutateAttributionTest(8, testPoolWithChars,
- "Z:a<7=1|4-7$",
- ["*1|1+2","*2|1+2","*3|1+2","*4|1+2","*5|1+2"],
- ["*1+1*5|1+2"]);
-
- // based on runMutationTest#6
- runMutateAttributionTest(9, testPoolWithChars,
- "Z:k<7*0+1*10|2=8|2-8$0",
- ["*1+1*2+1*3+1|1+1","*a+1*b+1*c+1|1+1",
- "*d+1*e+1*f+1|1+1","*g+1*h+1*i+1|1+1","?*x+1*y+1*z+1|1+1"],
- ["*0+1|1+4", "|1+4", "?*x+1*y+1*z+1|1+1"]);
-
- runMutateAttributionTest(10, testPoolWithChars,
- "Z:6>4=1+1=1+1|1=1+1=1*0+1$abcd",
- ["|1+3", "|1+3"],
- ["|1+5", "+2*0+1|1+2"]);
-
-
- runMutateAttributionTest(11, testPoolWithChars,
- "Z:s>1|1=4=6|1+1$\n",
- ["*0|1+4", "*0|1+8", "*0+5|1+1", "*0|1+1", "*0|1+5", "*0|1+1", "*0|1+1", "*0|1+1", "|1+1"],
- ["*0|1+4", "*0+6|1+1", "*0|1+2", "*0+5|1+1", "*0|1+1", "*0|1+5", "*0|1+1", "*0|1+1", "*0|1+1", "|1+1"]);
-
- function randomInlineString(len, rand) {
- var assem = Changeset.stringAssembler();
- for(var i=0;i<len;i++) {
- assem.append(String.fromCharCode(rand.nextInt(26) + 97));
- }
- return assem.toString();
- }
-
- function randomMultiline(approxMaxLines, approxMaxCols, rand) {
- var numParts = rand.nextInt(approxMaxLines*2)+1;
- var txt = Changeset.stringAssembler();
- txt.append(rand.nextInt(2) ? '\n' : '');
- for(var i=0;i<numParts;i++) {
- if ((i % 2) == 0) {
- if (rand.nextInt(10)) {
- txt.append(randomInlineString(rand.nextInt(approxMaxCols)+1, rand));
- }
- else {
- txt.append('\n');
- }
- }
- else {
- txt.append('\n');
- }
- }
- return txt.toString();
- }
-
- function randomStringOperation(numCharsLeft, rand) {
- var result;
- switch(rand.nextInt(9)) {
- case 0: {
- // insert char
- result = {insert: randomInlineString(1, rand)};
- break;
- }
- case 1: {
- // delete char
- result = {remove: 1};
- break;
- }
- case 2: {
- // skip char
- result = {skip: 1};
- break;
- }
- case 3: {
- // insert small
- result = {insert: randomInlineString(rand.nextInt(4)+1, rand)};
- break;
- }
- case 4: {
- // delete small
- result = {remove: rand.nextInt(4)+1};
- break;
- }
- case 5: {
- // skip small
- result = {skip: rand.nextInt(4)+1};
- break;
- }
- case 6: {
- // insert multiline;
- result = {insert: randomMultiline(5, 20, rand)};
- break;
- }
- case 7: {
- // delete multiline
- result = {remove: Math.round(numCharsLeft * rand.nextDouble() * rand.nextDouble()) };
- break;
- }
- case 8: {
- // skip multiline
- result = {skip: Math.round(numCharsLeft * rand.nextDouble() * rand.nextDouble()) };
- break;
- }
- case 9: {
- // delete to end
- result = {remove: numCharsLeft};
- break;
- }
- case 10: {
- // skip to end
- result = {skip: numCharsLeft};
- break;
- }
- }
- var maxOrig = numCharsLeft - 1;
- if ('remove' in result) {
- result.remove = Math.min(result.remove, maxOrig);
- }
- else if ('skip' in result) {
- result.skip = Math.min(result.skip, maxOrig);
- }
- return result;
- }
-
- function randomTwoPropAttribs(opcode, rand) {
- // assumes attrib pool like ['apple,','apple,true','banana,','banana,true']
- if (opcode == '-' || rand.nextInt(3)) {
- return '';
- }
- else if (rand.nextInt(3)) {
- if (opcode == '+' || rand.nextInt(2)) {
- return '*'+Changeset.numToString(rand.nextInt(2)*2+1);
- }
- else {
- return '*'+Changeset.numToString(rand.nextInt(2)*2);
- }
- }
- else {
- if (opcode == '+' || rand.nextInt(4) == 0) {
- return '*1*3';
- }
- else {
- return ['*0*2', '*0*3', '*1*2'][rand.nextInt(3)];
- }
- }
- }
-
- function randomTestChangeset(origText, rand, withAttribs) {
- var charBank = Changeset.stringAssembler();
- var textLeft = origText; // always keep final newline
- var outTextAssem = Changeset.stringAssembler();
- var opAssem = Changeset.smartOpAssembler();
- var oldLen = origText.length;
-
- var nextOp = Changeset.newOp();
- function appendMultilineOp(opcode, txt) {
- nextOp.opcode = opcode;
- if (withAttribs) {
- nextOp.attribs = randomTwoPropAttribs(opcode, rand);
- }
- txt.replace(/\n|[^\n]+/g, function (t) {
- if (t == '\n') {
- nextOp.chars = 1;
- nextOp.lines = 1;
- opAssem.append(nextOp);
- }
- else {
- nextOp.chars = t.length;
- nextOp.lines = 0;
- opAssem.append(nextOp);
- }
- return '';
- });
- }
-
- function doOp() {
- var o = randomStringOperation(textLeft.length, rand);
- if (o.insert) {
- var txt = o.insert;
- charBank.append(txt);
- outTextAssem.append(txt);
- appendMultilineOp('+', txt);
- }
- else if (o.skip) {
- var txt = textLeft.substring(0, o.skip);
- textLeft = textLeft.substring(o.skip);
- outTextAssem.append(txt);
- appendMultilineOp('=', txt);
- }
- else if (o.remove) {
- var txt = textLeft.substring(0, o.remove);
- textLeft = textLeft.substring(o.remove);
- appendMultilineOp('-', txt);
- }
- }
-
- while (textLeft.length > 1) doOp();
- for(var i=0;i<5;i++) doOp(); // do some more (only insertions will happen)
-
- var outText = outTextAssem.toString()+'\n';
- opAssem.endDocument();
- var cs = Changeset.pack(oldLen, outText.length, opAssem.toString(), charBank.toString());
- Changeset.checkRep(cs);
- return [cs, outText];
- }
-
- function testCompose(randomSeed) {
- var rand = new java.util.Random(randomSeed);
- print("> testCompose#"+randomSeed);
-
- var p = new AttribPool();
-
- var startText = randomMultiline(10, 20, rand)+'\n';
-
- var x1 = randomTestChangeset(startText, rand);
- var change1 = x1[0];
- var text1 = x1[1];
-
- var x2 = randomTestChangeset(text1, rand);
- var change2 = x2[0];
- var text2 = x2[1];
-
- var x3 = randomTestChangeset(text2, rand);
- var change3 = x3[0];
- var text3 = x3[1];
-
- //print(literal(Changeset.toBaseTen(startText)));
- //print(literal(Changeset.toBaseTen(change1)));
- //print(literal(Changeset.toBaseTen(change2)));
- var change12 = Changeset.checkRep(Changeset.compose(change1, change2, p));
- var change23 = Changeset.checkRep(Changeset.compose(change2, change3, p));
- var change123 = Changeset.checkRep(Changeset.compose(change12, change3, p));
- var change123a = Changeset.checkRep(Changeset.compose(change1, change23, p));
- assertEqualStrings(change123, change123a);
-
- assertEqualStrings(text2, Changeset.applyToText(change12, startText));
- assertEqualStrings(text3, Changeset.applyToText(change23, text1));
- assertEqualStrings(text3, Changeset.applyToText(change123, startText));
- }
-
- for(var i=0;i<30;i++) testCompose(i);
-
- (function simpleComposeAttributesTest() {
- print("> simpleComposeAttributesTest");
- var p = new AttribPool();
- p.putAttrib(['bold','']);
- p.putAttrib(['bold','true']);
- var cs1 = Changeset.checkRep("Z:2>1*1+1*1=1$x");
- var cs2 = Changeset.checkRep("Z:3>0*0|1=3$");
- var cs12 = Changeset.checkRep(Changeset.compose(cs1, cs2, p));
- assertEqualStrings("Z:2>1+1*0|1=2$x", cs12);
- })();
-
- (function followAttributesTest() {
- var p = new AttribPool();
- p.putAttrib(['x','']);
- p.putAttrib(['x','abc']);
- p.putAttrib(['x','def']);
- p.putAttrib(['y','']);
- p.putAttrib(['y','abc']);
- p.putAttrib(['y','def']);
-
- function testFollow(a, b, afb, bfa, merge) {
- assertEqualStrings(afb, Changeset.followAttributes(a, b, p));
- assertEqualStrings(bfa, Changeset.followAttributes(b, a, p));
- assertEqualStrings(merge, Changeset.composeAttributes(a, afb, true, p));
- assertEqualStrings(merge, Changeset.composeAttributes(b, bfa, true, p));
- }
-
- testFollow('', '', '', '', '');
- testFollow('*0', '', '', '*0', '*0');
- testFollow('*0', '*0', '', '', '*0');
- testFollow('*0', '*1', '', '*0', '*0');
- testFollow('*1', '*2', '', '*1', '*1');
- testFollow('*0*1', '', '', '*0*1', '*0*1');
- testFollow('*0*4', '*2*3', '*3', '*0', '*0*3');
- testFollow('*0*4', '*2', '', '*0*4', '*0*4');
- })();
-
- function testFollow(randomSeed) {
- var rand = new java.util.Random(randomSeed + 1000);
- print("> testFollow#"+randomSeed);
-
- var p = new AttribPool();
-
- var startText = randomMultiline(10, 20, rand)+'\n';
-
- var cs1 = randomTestChangeset(startText, rand)[0];
- var cs2 = randomTestChangeset(startText, rand)[0];
-
- var afb = Changeset.checkRep(Changeset.follow(cs1, cs2, false, p));
- var bfa = Changeset.checkRep(Changeset.follow(cs2, cs1, true, p));
-
- var merge1 = Changeset.checkRep(Changeset.compose(cs1, afb));
- var merge2 = Changeset.checkRep(Changeset.compose(cs2, bfa));
-
- assertEqualStrings(merge1, merge2);
- }
-
- for(var i=0;i<30;i++) testFollow(i);
-
- function testSplitJoinAttributionLines(randomSeed) {
- var rand = new java.util.Random(randomSeed + 2000);
- print("> testSplitJoinAttributionLines#"+randomSeed);
-
- var doc = randomMultiline(10, 20, rand)+'\n';
-
- function stringToOps(str) {
- var assem = Changeset.mergingOpAssembler();
- var o = Changeset.newOp('+');
- o.chars = 1;
- for(var i=0;i<str.length;i++) {
- var c = str.charAt(i);
- o.lines = (c == '\n' ? 1 : 0);
- o.attribs = (c == 'a' || c == 'b' ? '*'+c : '');
- assem.append(o);
- }
- return assem.toString();
- }
-
- var theJoined = stringToOps(doc);
- var theSplit = doc.match(/[^\n]*\n/g).map(stringToOps);
-
- assertEqualArrays(theSplit, Changeset.splitAttributionLines(theJoined, doc));
- assertEqualStrings(theJoined, Changeset.joinAttributionLines(theSplit));
- }
-
- for(var i=0;i<10;i++) testSplitJoinAttributionLines(i);
-
- (function testMoveOpsToNewPool() {
- print("> testMoveOpsToNewPool");
-
- var pool1 = new AttribPool();
- var pool2 = new AttribPool();
-
- pool1.putAttrib(['baz','qux']);
- pool1.putAttrib(['foo','bar']);
-
- pool2.putAttrib(['foo','bar']);
-
- assertEqualStrings(Changeset.moveOpsToNewPool('Z:1>2*1+1*0+1$ab', pool1, pool2), 'Z:1>2*0+1*1+1$ab');
- assertEqualStrings(Changeset.moveOpsToNewPool('*1+1*0+1', pool1, pool2), '*0+1*1+1');
- })();
-
-
- (function testMakeSplice() {
- print("> testMakeSplice");
-
- var t = "a\nb\nc\n";
- var t2 = Changeset.applyToText(Changeset.makeSplice(t, 5, 0, "def"), t);
- assertEqualStrings("a\nb\ncdef\n", t2);
-
- })();
-
- (function testToSplices() {
- print("> testToSplices");
-
- var cs = Changeset.checkRep('Z:z>9*0=1=4-3+9=1|1-4-4+1*0+a$123456789abcdefghijk');
- var correctSplices = [[5, 8, "123456789"], [9, 17, "abcdefghijk"]];
- assertEqualArrays(correctSplices, Changeset.toSplices(cs));
- })();
-
- function testCharacterRangeFollow(testId, cs, oldRange, insertionsAfter, correctNewRange) {
- print("> testCharacterRangeFollow#"+testId);
-
- var cs = Changeset.checkRep(cs);
- assertEqualArrays(correctNewRange, Changeset.characterRangeFollow(cs, oldRange[0], oldRange[1],
- insertionsAfter));
-
- }
-
- testCharacterRangeFollow(1, 'Z:z>9*0=1=4-3+9=1|1-4-4+1*0+a$123456789abcdefghijk',
- [7, 10], false, [14, 15]);
- testCharacterRangeFollow(2, "Z:bc<6|x=b4|2-6$", [400, 407], false, [400, 401]);
- testCharacterRangeFollow(3, "Z:4>0-3+3$abc", [0,3], false, [3,3]);
- testCharacterRangeFollow(4, "Z:4>0-3+3$abc", [0,3], true, [0,0]);
- testCharacterRangeFollow(5, "Z:5>1+1=1-3+3$abcd", [1,4], false, [5,5]);
- testCharacterRangeFollow(6, "Z:5>1+1=1-3+3$abcd", [1,4], true, [2,2]);
- testCharacterRangeFollow(7, "Z:5>1+1=1-3+3$abcd", [0,6], false, [1,7]);
- testCharacterRangeFollow(8, "Z:5>1+1=1-3+3$abcd", [0,3], false, [1,2]);
- testCharacterRangeFollow(9, "Z:5>1+1=1-3+3$abcd", [2,5], false, [5,6]);
- testCharacterRangeFollow(10, "Z:2>1+1$a", [0,0], false, [1,1]);
- testCharacterRangeFollow(11, "Z:2>1+1$a", [0,0], true, [0,0]);
-
- (function testOpAttributeValue() {
- print("> testOpAttributeValue");
-
- var p = new AttribPool();
- p.putAttrib(['name','david']);
- p.putAttrib(['color','green']);
-
- assertEqualStrings("david", Changeset.opAttributeValue(Changeset.stringOp('*0*1+1'), 'name', p));
- assertEqualStrings("david", Changeset.opAttributeValue(Changeset.stringOp('*0+1'), 'name', p));
- assertEqualStrings("", Changeset.opAttributeValue(Changeset.stringOp('*1+1'), 'name', p));
- assertEqualStrings("", Changeset.opAttributeValue(Changeset.stringOp('+1'), 'name', p));
- assertEqualStrings("green", Changeset.opAttributeValue(Changeset.stringOp('*0*1+1'), 'color', p));
- assertEqualStrings("green", Changeset.opAttributeValue(Changeset.stringOp('*1+1'), 'color', p));
- assertEqualStrings("", Changeset.opAttributeValue(Changeset.stringOp('*0+1'), 'color', p));
- assertEqualStrings("", Changeset.opAttributeValue(Changeset.stringOp('+1'), 'color', p));
- })();
-
- function testAppendATextToAssembler(testId, atext, correctOps) {
- print("> testAppendATextToAssembler#"+testId);
-
- var assem = Changeset.smartOpAssembler();
- Changeset.appendATextToAssembler(atext, assem);
- assertEqualStrings(correctOps, assem.toString());
- }
-
- testAppendATextToAssembler(1, {text:"\n", attribs:"|1+1"}, "");
- testAppendATextToAssembler(2, {text:"\n\n", attribs:"|2+2"}, "|1+1");
- testAppendATextToAssembler(3, {text:"\n\n", attribs:"*x|2+2"}, "*x|1+1");
- testAppendATextToAssembler(4, {text:"\n\n", attribs:"*x|1+1|1+1"}, "*x|1+1");
- testAppendATextToAssembler(5, {text:"foo\n", attribs:"|1+4"}, "+3");
- testAppendATextToAssembler(6, {text:"\nfoo\n", attribs:"|2+5"}, "|1+1+3");
- testAppendATextToAssembler(7, {text:"\nfoo\n", attribs:"*x|2+5"}, "*x|1+1*x+3");
- testAppendATextToAssembler(8, {text:"\n\n\nfoo\n", attribs:"|2+2*x|2+5"}, "|2+2*x|1+1*x+3");
-
- function testMakeAttribsString(testId, pool, opcode, attribs, correctString) {
- print("> testMakeAttribsString#"+testId);
-
- var p = poolOrArray(pool);
- var str = Changeset.makeAttribsString(opcode, attribs, p);
- assertEqualStrings(correctString, str);
- }
-
- testMakeAttribsString(1, ['bold,'], '+', [['bold','']], '');
- testMakeAttribsString(2, ['abc,def','bold,'], '=', [['bold','']], '*1');
- testMakeAttribsString(3, ['abc,def','bold,true'], '+', [['abc','def'],['bold','true']], '*0*1');
- testMakeAttribsString(4, ['abc,def','bold,true'], '+', [['bold','true'],['abc','def']], '*0*1');
-
- function testSubattribution(testId, astr, start, end, correctOutput) {
- print("> testSubattribution#"+testId);
-
- var str = Changeset.subattribution(astr, start, end);
- assertEqualStrings(correctOutput, str);
- }
-
- testSubattribution(1, "+1", 0, 0, "");
- testSubattribution(2, "+1", 0, 1, "+1");
- testSubattribution(3, "+1", 0, undefined, "+1");
- testSubattribution(4, "|1+1", 0, 0, "");
- testSubattribution(5, "|1+1", 0, 1, "|1+1");
- testSubattribution(6, "|1+1", 0, undefined, "|1+1");
- testSubattribution(7, "*0+1", 0, 0, "");
- testSubattribution(8, "*0+1", 0, 1, "*0+1");
- testSubattribution(9, "*0+1", 0, undefined, "*0+1");
- testSubattribution(10, "*0|1+1", 0, 0, "");
- testSubattribution(11, "*0|1+1", 0, 1, "*0|1+1");
- testSubattribution(12, "*0|1+1", 0, undefined, "*0|1+1");
- testSubattribution(13, "*0+2+1*1+3", 0, 1, "*0+1");
- testSubattribution(14, "*0+2+1*1+3", 0, 2, "*0+2");
- testSubattribution(15, "*0+2+1*1+3", 0, 3, "*0+2+1");
- testSubattribution(16, "*0+2+1*1+3", 0, 4, "*0+2+1*1+1");
- testSubattribution(17, "*0+2+1*1+3", 0, 5, "*0+2+1*1+2");
- testSubattribution(18, "*0+2+1*1+3", 0, 6, "*0+2+1*1+3");
- testSubattribution(19, "*0+2+1*1+3", 0, 7, "*0+2+1*1+3");
- testSubattribution(20, "*0+2+1*1+3", 0, undefined, "*0+2+1*1+3");
- testSubattribution(21, "*0+2+1*1+3", 1, undefined, "*0+1+1*1+3");
- testSubattribution(22, "*0+2+1*1+3", 2, undefined, "+1*1+3");
- testSubattribution(23, "*0+2+1*1+3", 3, undefined, "*1+3");
- testSubattribution(24, "*0+2+1*1+3", 4, undefined, "*1+2");
- testSubattribution(25, "*0+2+1*1+3", 5, undefined, "*1+1");
- testSubattribution(26, "*0+2+1*1+3", 6, undefined, "");
- testSubattribution(27, "*0+2+1*1|1+3", 0, 1, "*0+1");
- testSubattribution(28, "*0+2+1*1|1+3", 0, 2, "*0+2");
- testSubattribution(29, "*0+2+1*1|1+3", 0, 3, "*0+2+1");
- testSubattribution(30, "*0+2+1*1|1+3", 0, 4, "*0+2+1*1+1");
- testSubattribution(31, "*0+2+1*1|1+3", 0, 5, "*0+2+1*1+2");
- testSubattribution(32, "*0+2+1*1|1+3", 0, 6, "*0+2+1*1|1+3");
- testSubattribution(33, "*0+2+1*1|1+3", 0, 7, "*0+2+1*1|1+3");
- testSubattribution(34, "*0+2+1*1|1+3", 0, undefined, "*0+2+1*1|1+3");
- testSubattribution(35, "*0+2+1*1|1+3", 1, undefined, "*0+1+1*1|1+3");
- testSubattribution(36, "*0+2+1*1|1+3", 2, undefined, "+1*1|1+3");
- testSubattribution(37, "*0+2+1*1|1+3", 3, undefined, "*1|1+3");
- testSubattribution(38, "*0+2+1*1|1+3", 4, undefined, "*1|1+2");
- testSubattribution(39, "*0+2+1*1|1+3", 5, undefined, "*1|1+1");
- testSubattribution(40, "*0+2+1*1|1+3", 1, 5, "*0+1+1*1+2");
- testSubattribution(41, "*0+2+1*1|1+3", 2, 6, "+1*1|1+3");
- testSubattribution(42, "*0+2+1*1+3", 2, 6, "+1*1+3");
-
- function testFilterAttribNumbers(testId, cs, filter, correctOutput) {
- print("> testFilterAttribNumbers#"+testId);
-
- var str = Changeset.filterAttribNumbers(cs, filter);
- assertEqualStrings(correctOutput, str);
- }
-
- testFilterAttribNumbers(1, "*0*1+1+2+3*1+4*2+5*0*2*1*b*c+6",
- function(n) { return (n%2) == 0; },
- "*0+1+2+3+4*2+5*0*2*c+6");
- testFilterAttribNumbers(2, "*0*1+1+2+3*1+4*2+5*0*2*1*b*c+6",
- function(n) { return (n%2) == 1; },
- "*1+1+2+3*1+4+5*1*b+6");
-
- function testInverse(testId, cs, lines, alines, pool, correctOutput) {
- print("> testInverse#"+testId);
-
- pool = poolOrArray(pool);
- var str = Changeset.inverse(Changeset.checkRep(cs), lines, alines, pool);
- assertEqualStrings(correctOutput, str);
- }
-
- // take "FFFFTTTTT" and apply "-FT--FFTT", the inverse of which is "--F--TT--"
- testInverse(1, "Z:9>0=1*0=1*1=1=2*0=2*1|1=2$", null, ["+4*1+5"], ['bold,','bold,true'],
- "Z:9>0=2*0=1=2*1=2$");
-
- function testMutateTextLines(testId, cs, lines, correctLines) {
- print("> testMutateTextLines#"+testId);
-
- var a = lines.slice();
- Changeset.mutateTextLines(cs, a);
- assertEqualArrays(correctLines, a);
- }
-
- testMutateTextLines(1, "Z:4<1|1-2-1|1+1+1$\nc", ["a\n", "b\n"], ["\n", "c\n"]);
- testMutateTextLines(2, "Z:4>0|1-2-1|2+3$\nc\n", ["a\n", "b\n"], ["\n", "c\n", "\n"]);
-
- function testInverseRandom(randomSeed) {
- var rand = new java.util.Random(randomSeed + 3000);
- print("> testInverseRandom#"+randomSeed);
-
- var p = poolOrArray(['apple,','apple,true','banana,','banana,true']);
-
- var startText = randomMultiline(10, 20, rand)+'\n';
- var alines = Changeset.splitAttributionLines(Changeset.makeAttribution(startText), startText);
- var lines = startText.slice(0,-1).split('\n').map(function(s) { return s+'\n'; });
-
- var stylifier = randomTestChangeset(startText, rand, true)[0];
-
- //print(alines.join('\n'));
- Changeset.mutateAttributionLines(stylifier, alines, p);
- //print(stylifier);
- //print(alines.join('\n'));
- Changeset.mutateTextLines(stylifier, lines);
-
- var changeset = randomTestChangeset(lines.join(''), rand, true)[0];
- var inverseChangeset = Changeset.inverse(changeset, lines, alines, p);
-
- var origLines = lines.slice();
- var origALines = alines.slice();
-
- Changeset.mutateTextLines(changeset, lines);
- Changeset.mutateAttributionLines(changeset, alines, p);
- //print(origALines.join('\n'));
- //print(changeset);
- //print(inverseChangeset);
- //print(origLines.map(function(s) { return '1: '+s.slice(0,-1); }).join('\n'));
- //print(lines.map(function(s) { return '2: '+s.slice(0,-1); }).join('\n'));
- //print(alines.join('\n'));
- Changeset.mutateTextLines(inverseChangeset, lines);
- Changeset.mutateAttributionLines(inverseChangeset, alines, p);
- //print(lines.map(function(s) { return '3: '+s.slice(0,-1); }).join('\n'));
-
- assertEqualArrays(origLines, lines);
- assertEqualArrays(origALines, alines);
- }
-
- for(var i=0;i<30;i++) testInverseRandom(i);
-} \ No newline at end of file
diff --git a/trunk/infrastructure/ace/www/editor.css b/trunk/infrastructure/ace/www/editor.css
deleted file mode 100644
index 0a43478..0000000
--- a/trunk/infrastructure/ace/www/editor.css
+++ /dev/null
@@ -1,109 +0,0 @@
-
-/* These CSS rules are included in both the outer and inner ACE iframe.
- Also see inner.css, included only in the inner one.
-*/
-
-body {
- margin: 0;
- white-space: nowrap;
-}
-
-#outerdocbody {
- background-color: #fff;
-}
-body.grayedout { background-color: #eee !important }
-
-#innerdocbody {
- font-size: 12px; /* overridden by body.style */
- font-family: monospace; /* overridden by body.style */
- line-height: 16px; /* overridden by body.style */
-}
-
-body.doesWrap {
- white-space: normal;
-}
-
-#innerdocbody {
- padding-top: 1px; /* important for some reason? */
- padding-right: 10px;
- padding-bottom: 8px;
- padding-left: 1px /* prevents characters from looking chopped off in FF3 */;
- overflow: hidden;
- /* blank 1x1 gif, so that IE8 doesn't consider the body transparent */
- background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==);
-}
-
-#sidediv {
- font-size: 11px;
- font-family: monospace;
- line-height: 16px; /* overridden by sideDiv.style */
- padding-top: 8px; /* EDIT_BODY_PADDING_TOP */
- padding-right: 3px; /* LINE_NUMBER_PADDING_RIGHT - 1 */
- position: absolute;
- width: 20px; /* MIN_LINEDIV_WIDTH */
- top: 0;
- left: 0;
- cursor: default;
- color: white;
-}
-
-#sidedivinner {
- text-align: right;
-}
-
-.sidedivdelayed { /* class set after sizes are set */
- background-color: #eee;
- color: #888 !important;
- border-right: 1px solid #999;
-}
-.sidedivhidden {
- display: none;
-}
-
-#outerdocbody iframe {
- display: block; /* codemirror says it suppresses bugs */
- position: relative;
- left: 32px; /* MIN_LINEDIV_WIDTH + LINE_NUMBER_PADDING_RIGHT + EDIT_BODY_PADDING_LEFT */
- top: 7px; /* EDIT_BODY_PADDING_TOP - 1*/
- border: 0;
- width: 1px; /* changed programmatically */
- height: 1px; /* changed programmatically */
-}
-
-#outerdocbody .hotrect {
- border: 1px solid #999;
- position: absolute;
-}
-
-/* cause "body" area (e.g. where clicks are heard) to grow horizontally with text */
-body.mozilla, body.safari {
- display: table-cell;
-}
-
-body.doesWrap {
- display: block !important;
-}
-
-.safari div {
- /* prevents the caret from disappearing on the longest line of the doc */
- padding-right: 1px;
-}
-
-p {
- margin: 0;
-}
-
-/*b, strong, .Apple-style-span { font-weight: normal !important; font-style: normal !important;
- color: red !important; }*/
-
-#linemetricsdiv {
- position: absolute;
- left: -1000px;
- top: -1000px;
- color: white;
- z-index: -1;
- font-size: 12px; /* overridden by lineMetricsDiv.style */
- font-family: monospace; /* overridden by lineMetricsDiv.style */
-}
-
-#overlaysdiv { position: absolute; left: -1000px; top: -1000px; } \ No newline at end of file
diff --git a/trunk/infrastructure/ace/www/firebug/errorIcon.png b/trunk/infrastructure/ace/www/firebug/errorIcon.png
deleted file mode 100644
index 2d75261..0000000
--- a/trunk/infrastructure/ace/www/firebug/errorIcon.png
+++ /dev/null
Binary files differ
diff --git a/trunk/infrastructure/ace/www/firebug/firebug.css b/trunk/infrastructure/ace/www/firebug/firebug.css
deleted file mode 100644
index 1f041c4..0000000
--- a/trunk/infrastructure/ace/www/firebug/firebug.css
+++ /dev/null
@@ -1,209 +0,0 @@
-
-html, body {
- margin: 0;
- background: #FFFFFF;
- font-family: Lucida Grande, Tahoma, sans-serif;
- font-size: 11px;
- overflow: hidden;
-}
-
-a {
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-.toolbar {
- height: 14px;
- border-top: 1px solid ThreeDHighlight;
- border-bottom: 1px solid ThreeDShadow;
- padding: 2px 6px;
- background: ThreeDFace;
-}
-
-.toolbarRight {
- position: absolute;
- top: 4px;
- right: 6px;
-}
-
-#log {
- overflow: auto;
- position: absolute;
- left: 0;
- width: 100%;
-}
-
-#commandLine {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 18px;
- border: none;
- border-top: 1px solid ThreeDShadow;
-}
-
-/************************************************************************************************/
-
-.logRow {
- position: relative;
- border-bottom: 1px solid #D7D7D7;
- padding: 2px 4px 1px 6px;
- background-color: #FFFFFF;
-}
-
-.logRow-command {
- font-family: Monaco, monospace;
- color: blue;
-}
-
-.objectBox-null {
- padding: 0 2px;
- border: 1px solid #666666;
- background-color: #888888;
- color: #FFFFFF;
-}
-
-.objectBox-string {
- font-family: Monaco, monospace;
- color: red;
- white-space: pre;
-}
-
-.objectBox-number {
- color: #000088;
-}
-
-.objectBox-function {
- font-family: Monaco, monospace;
- color: DarkGreen;
-}
-
-.objectBox-object {
- color: DarkGreen;
- font-weight: bold;
-}
-
-/************************************************************************************************/
-
-.logRow-info,
-.logRow-error,
-.logRow-warning {
- background: #FFFFFF no-repeat 2px 2px;
- padding-left: 20px;
- padding-bottom: 3px;
-}
-
-.logRow-info {
- background-image: url(infoIcon.png);
-}
-
-.logRow-warning {
- background-color: cyan;
- background-image: url(warningIcon.png);
-}
-
-.logRow-error {
- background-color: LightYellow;
- background-image: url(errorIcon.png);
-}
-
-.errorMessage {
- vertical-align: top;
- color: #FF0000;
-}
-
-.objectBox-sourceLink {
- position: absolute;
- right: 4px;
- top: 2px;
- padding-left: 8px;
- font-family: Lucida Grande, sans-serif;
- font-weight: bold;
- color: #0000FF;
-}
-
-/************************************************************************************************/
-
-.logRow-group {
- background: #EEEEEE;
- border-bottom: none;
-}
-
-.logGroup {
- background: #EEEEEE;
-}
-
-.logGroupBox {
- margin-left: 24px;
- border-top: 1px solid #D7D7D7;
- border-left: 1px solid #D7D7D7;
-}
-
-/************************************************************************************************/
-
-.selectorTag,
-.selectorId,
-.selectorClass {
- font-family: Monaco, monospace;
- font-weight: normal;
-}
-
-.selectorTag {
- color: #0000FF;
-}
-
-.selectorId {
- color: DarkBlue;
-}
-
-.selectorClass {
- color: red;
-}
-
-/************************************************************************************************/
-
-.objectBox-element {
- font-family: Monaco, monospace;
- color: #000088;
-}
-
-.nodeChildren {
- margin-left: 16px;
-}
-
-.nodeTag {
- color: blue;
-}
-
-.nodeValue {
- color: #FF0000;
- font-weight: normal;
-}
-
-.nodeText,
-.nodeComment {
- margin: 0 2px;
- vertical-align: top;
-}
-
-.nodeText {
- color: #333333;
-}
-
-.nodeComment {
- color: DarkGreen;
-}
-
-/************************************************************************************************/
-
-.propertyNameCell {
- vertical-align: top;
-}
-
-.propertyName {
- font-weight: bold;
-}
diff --git a/trunk/infrastructure/ace/www/firebug/firebug.html b/trunk/infrastructure/ace/www/firebug/firebug.html
deleted file mode 100644
index 861e639..0000000
--- a/trunk/infrastructure/ace/www/firebug/firebug.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
- <title>Firebug</title>
- <link rel="stylesheet" type="text/css" href="firebug.css">
-</head>
-
-<body>
- <div id="toolbar" class="toolbar">
- <a href="#" onclick="parent.console.clear()">Clear</a>
- <span class="toolbarRight">
- <a href="#" onclick="parent.console.close()">Close</a>
- </span>
- </div>
- <div id="log"></div>
- <input type="text" id="commandLine">
-
- <script>parent.onFirebugReady(document);</script>
-</body>
-</html>
diff --git a/trunk/infrastructure/ace/www/firebug/firebug.js b/trunk/infrastructure/ace/www/firebug/firebug.js
deleted file mode 100644
index d3c1978..0000000
--- a/trunk/infrastructure/ace/www/firebug/firebug.js
+++ /dev/null
@@ -1,688 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-if (!("console" in window) || !("firebug" in console)) {
-(function()
-{
- window.console =
- {
- log: function()
- {
- logFormatted(arguments, "");
- },
-
- debug: function()
- {
- logFormatted(arguments, "debug");
- },
-
- info: function()
- {
- logFormatted(arguments, "info");
- },
-
- warn: function()
- {
- logFormatted(arguments, "warning");
- },
-
- error: function()
- {
- logFormatted(arguments, "error");
- },
-
- assert: function(truth, message)
- {
- if (!truth)
- {
- var args = [];
- for (var i = 1; i < arguments.length; ++i)
- args.push(arguments[i]);
-
- logFormatted(args.length ? args : ["Assertion Failure"], "error");
- throw message ? message : "Assertion Failure";
- }
- },
-
- dir: function(object)
- {
- var html = [];
-
- var pairs = [];
- for (var name in object)
- {
- try
- {
- pairs.push([name, object[name]]);
- }
- catch (exc)
- {
- }
- }
-
- pairs.sort(function(a, b) { return a[0] < b[0] ? -1 : 1; });
-
- html.push('<table>');
- for (var i = 0; i < pairs.length; ++i)
- {
- var name = pairs[i][0], value = pairs[i][1];
-
- html.push('<tr>',
- '<td class="propertyNameCell"><span class="propertyName">',
- escapeHTML(name), '</span></td>', '<td><span class="propertyValue">');
- appendObject(value, html);
- html.push('</span></td></tr>');
- }
- html.push('</table>');
-
- logRow(html, "dir");
- },
-
- dirxml: function(node)
- {
- var html = [];
-
- appendNode(node, html);
- logRow(html, "dirxml");
- },
-
- group: function()
- {
- logRow(arguments, "group", pushGroup);
- },
-
- groupEnd: function()
- {
- logRow(arguments, "", popGroup);
- },
-
- time: function(name)
- {
- timeMap[name] = (new Date()).getTime();
- },
-
- timeEnd: function(name)
- {
- if (name in timeMap)
- {
- var delta = (new Date()).getTime() - timeMap[name];
- logFormatted([name+ ":", delta+"ms"]);
- delete timeMap[name];
- }
- },
-
- count: function()
- {
- this.warn(["count() not supported."]);
- },
-
- trace: function()
- {
- this.warn(["trace() not supported."]);
- },
-
- profile: function()
- {
- this.warn(["profile() not supported."]);
- },
-
- profileEnd: function()
- {
- },
-
- clear: function()
- {
- consoleBody.innerHTML = "";
- },
-
- open: function()
- {
- toggleConsole(true);
- },
-
- close: function()
- {
- if (frameVisible)
- toggleConsole();
- }
- };
-
- // ********************************************************************************************
-
- var consoleFrame = null;
- var consoleBody = null;
- var commandLine = null;
-
- var frameVisible = false;
- var messageQueue = [];
- var groupStack = [];
- var timeMap = {};
-
- var clPrefix = ">>> ";
-
- var isFirefox = navigator.userAgent.indexOf("Firefox") != -1;
- var isIE = navigator.userAgent.indexOf("MSIE") != -1;
- var isOpera = navigator.userAgent.indexOf("Opera") != -1;
- var isSafari = navigator.userAgent.indexOf("AppleWebKit") != -1;
-
- // ********************************************************************************************
-
- function toggleConsole(forceOpen)
- {
- frameVisible = forceOpen || !frameVisible;
- if (consoleFrame)
- consoleFrame.style.visibility = frameVisible ? "visible" : "hidden";
- else
- waitForBody();
- }
-
- function focusCommandLine()
- {
- toggleConsole(true);
- if (commandLine)
- commandLine.focus();
- }
-
- function waitForBody()
- {
- if (document.body)
- createFrame();
- else
- setTimeout(waitForBody, 200);
- }
-
- function createFrame()
- {
- if (consoleFrame)
- return;
-
- window.onFirebugReady = function(doc)
- {
- window.onFirebugReady = null;
-
- var toolbar = doc.getElementById("toolbar");
- toolbar.onmousedown = onSplitterMouseDown;
-
- commandLine = doc.getElementById("commandLine");
- addEvent(commandLine, "keydown", onCommandLineKeyDown);
-
- addEvent(doc, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
-
- consoleBody = doc.getElementById("log");
- layout();
- flush();
- }
-
- var baseURL = getFirebugURL();
-
- consoleFrame = document.createElement("iframe");
- consoleFrame.setAttribute("src", baseURL+"/firebug.html");
- consoleFrame.setAttribute("frameBorder", "0");
- consoleFrame.style.visibility = (frameVisible ? "visible" : "hidden");
- consoleFrame.style.zIndex = "2147483647";
- consoleFrame.style.position = "fixed";
- consoleFrame.style.width = "100%";
- consoleFrame.style.left = "0";
- consoleFrame.style.bottom = "0";
- consoleFrame.style.height = "200px";
- document.body.appendChild(consoleFrame);
- }
-
- function getFirebugURL()
- {
- var scripts = document.getElementsByTagName("script");
- for (var i = 0; i < scripts.length; ++i)
- {
- if (scripts[i].src.indexOf("firebug.js") != -1)
- {
- var lastSlash = scripts[i].src.lastIndexOf("/");
- return scripts[i].src.substr(0, lastSlash);
- }
- }
- }
-
- function evalCommandLine()
- {
- var text = commandLine.value;
- commandLine.value = "";
-
- logRow([clPrefix, text], "command");
-
- var value;
- try
- {
- value = eval(text);
- }
- catch (exc)
- {
- }
-
- console.log(value);
- }
-
- function layout()
- {
- var toolbar = consoleBody.ownerDocument.getElementById("toolbar");
- var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight);
- consoleBody.style.top = toolbar.offsetHeight + "px";
- consoleBody.style.height = height + "px";
-
- commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px";
- }
-
- function logRow(message, className, handler)
- {
- if (consoleBody)
- writeMessage(message, className, handler);
- else
- {
- messageQueue.push([message, className, handler]);
- waitForBody();
- }
- }
-
- function flush()
- {
- var queue = messageQueue;
- messageQueue = [];
-
- for (var i = 0; i < queue.length; ++i)
- writeMessage(queue[i][0], queue[i][1], queue[i][2]);
- }
-
- function writeMessage(message, className, handler)
- {
- var isScrolledToBottom =
- consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight;
-
- if (!handler)
- handler = writeRow;
-
- handler(message, className);
-
- if (isScrolledToBottom)
- consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight;
- }
-
- function appendRow(row)
- {
- var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody;
- container.appendChild(row);
- }
-
- function writeRow(message, className)
- {
- var row = consoleBody.ownerDocument.createElement("div");
- row.className = "logRow" + (className ? " logRow-"+className : "");
- row.innerHTML = message.join("");
- appendRow(row);
- }
-
- function pushGroup(message, className)
- {
- logFormatted(message, className);
-
- var groupRow = consoleBody.ownerDocument.createElement("div");
- groupRow.className = "logGroup";
- var groupRowBox = consoleBody.ownerDocument.createElement("div");
- groupRowBox.className = "logGroupBox";
- groupRow.appendChild(groupRowBox);
- appendRow(groupRowBox);
- groupStack.push(groupRowBox);
- }
-
- function popGroup()
- {
- groupStack.pop();
- }
-
- // ********************************************************************************************
-
- function logFormatted(objects, className)
- {
- var html = [];
-
- var format = objects[0];
- var objIndex = 0;
-
- if (typeof(format) != "string")
- {
- format = "";
- objIndex = -1;
- }
-
- var parts = parseFormat(format);
- for (var i = 0; i < parts.length; ++i)
- {
- var part = parts[i];
- if (part && typeof(part) == "object")
- {
- var object = objects[++objIndex];
- part.appender(object, html);
- }
- else
- appendText(part, html);
- }
-
- for (var i = objIndex+1; i < objects.length; ++i)
- {
- appendText(" ", html);
-
- var object = objects[i];
- if (typeof(object) == "string")
- appendText(object, html);
- else
- appendObject(object, html);
- }
-
- logRow(html, className);
- }
-
- function parseFormat(format)
- {
- var parts = [];
-
- var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
- var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
-
- for (var m = reg.exec(format); m; m = reg.exec(format))
- {
- var type = m[8] ? m[8] : m[5];
- var appender = type in appenderMap ? appenderMap[type] : appendObject;
- var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
-
- parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
- parts.push({appender: appender, precision: precision});
-
- format = format.substr(m.index+m[0].length);
- }
-
- parts.push(format);
-
- return parts;
- }
-
- function escapeHTML(value)
- {
- function replaceChars(ch)
- {
- switch (ch)
- {
- case "<":
- return "&lt;";
- case ">":
- return "&gt;";
- case "&":
- return "&amp;";
- case "'":
- return "&#39;";
- case '"':
- return "&quot;";
- }
- return "?";
- };
- return String(value).replace(/[<>&"']/g, replaceChars);
- }
-
- function objectToString(object)
- {
- try
- {
- return object+"";
- }
- catch (exc)
- {
- return null;
- }
- }
-
- // ********************************************************************************************
-
- function appendText(object, html)
- {
- html.push(escapeHTML(objectToString(object)));
- }
-
- function appendNull(object, html)
- {
- html.push('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendString(object, html)
- {
- html.push('<span class="objectBox-string">&quot;', escapeHTML(objectToString(object)),
- '&quot;</span>');
- }
-
- function appendInteger(object, html)
- {
- html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendFloat(object, html)
- {
- html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
- }
-
- function appendFunction(object, html)
- {
- var reName = /function ?(.*?)\(/;
- var m = reName.exec(objectToString(object));
- var name = m ? m[1] : "function";
- html.push('<span class="objectBox-function">', escapeHTML(name), '()</span>');
- }
-
- function appendObject(object, html)
- {
- try
- {
- if (object == undefined)
- appendNull("undefined", html);
- else if (object == null)
- appendNull("null", html);
- else if (typeof object == "string")
- appendString(object, html);
- else if (typeof object == "number")
- appendInteger(object, html);
- else if (typeof object == "function")
- appendFunction(object, html);
- else if (object.nodeType == 1)
- appendSelector(object, html);
- else if (typeof object == "object")
- appendObjectFormatted(object, html);
- else
- appendText(object, html);
- }
- catch (exc)
- {
- }
- }
-
- function appendObjectFormatted(object, html)
- {
- var text = objectToString(object);
- var reObject = /\[object (.*?)\]/;
-
- var m = reObject.exec(text);
- html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>')
- }
-
- function appendSelector(object, html)
- {
- html.push('<span class="objectBox-selector">');
-
- html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
- if (object.id)
- html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
- if (object.className)
- html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
-
- html.push('</span>');
- }
-
- function appendNode(node, html)
- {
- if (node.nodeType == 1)
- {
- html.push(
- '<div class="objectBox-element">',
- '&lt;<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
-
- for (var i = 0; i < node.attributes.length; ++i)
- {
- var attr = node.attributes[i];
- if (!attr.specified)
- continue;
-
- html.push('&nbsp;<span class="nodeName">', attr.nodeName.toLowerCase(),
- '</span>=&quot;<span class="nodeValue">', escapeHTML(attr.nodeValue),
- '</span>&quot;')
- }
-
- if (node.firstChild)
- {
- html.push('&gt;</div><div class="nodeChildren">');
-
- for (var child = node.firstChild; child; child = child.nextSibling)
- appendNode(child, html);
-
- html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">',
- node.nodeName.toLowerCase(), '&gt;</span></div>');
- }
- else
- html.push('/&gt;</div>');
- }
- else if (node.nodeType == 3)
- {
- html.push('<div class="nodeText">', escapeHTML(node.nodeValue),
- '</div>');
- }
- }
-
- // ********************************************************************************************
-
- function addEvent(object, name, handler)
- {
- if (document.all)
- object.attachEvent("on"+name, handler);
- else
- object.addEventListener(name, handler, false);
- }
-
- function removeEvent(object, name, handler)
- {
- if (document.all)
- object.detachEvent("on"+name, handler);
- else
- object.removeEventListener(name, handler, false);
- }
-
- function cancelEvent(event)
- {
- if (document.all)
- event.cancelBubble = true;
- else
- event.stopPropagation();
- }
-
- function onError(msg, href, lineNo)
- {
- var html = [];
-
- var lastSlash = href.lastIndexOf("/");
- var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
-
- html.push(
- '<span class="errorMessage">', msg, '</span>',
- '<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
- );
-
- logRow(html, "error");
- };
-
- function onKeyDown(event)
- {
- if (event.keyCode == 123)
- toggleConsole();
- else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey
- && (event.metaKey || event.ctrlKey))
- focusCommandLine();
- else
- return;
-
- cancelEvent(event);
- }
-
- function onSplitterMouseDown(event)
- {
- if (isSafari || isOpera)
- return;
-
- addEvent(document, "mousemove", onSplitterMouseMove);
- addEvent(document, "mouseup", onSplitterMouseUp);
-
- for (var i = 0; i < frames.length; ++i)
- {
- addEvent(frames[i].document, "mousemove", onSplitterMouseMove);
- addEvent(frames[i].document, "mouseup", onSplitterMouseUp);
- }
- }
-
- function onSplitterMouseMove(event)
- {
- var win = document.all
- ? event.srcElement.ownerDocument.parentWindow
- : event.target.ownerDocument.defaultView;
-
- var clientY = event.clientY;
- if (win != win.parent)
- clientY += win.frameElement ? win.frameElement.offsetTop : 0;
-
- var height = consoleFrame.offsetTop + consoleFrame.clientHeight;
- var y = height - clientY;
-
- consoleFrame.style.height = y + "px";
- layout();
- }
-
- function onSplitterMouseUp(event)
- {
- removeEvent(document, "mousemove", onSplitterMouseMove);
- removeEvent(document, "mouseup", onSplitterMouseUp);
-
- for (var i = 0; i < frames.length; ++i)
- {
- removeEvent(frames[i].document, "mousemove", onSplitterMouseMove);
- removeEvent(frames[i].document, "mouseup", onSplitterMouseUp);
- }
- }
-
- function onCommandLineKeyDown(event)
- {
- if (event.keyCode == 13)
- evalCommandLine();
- else if (event.keyCode == 27)
- commandLine.value = "";
- }
-
- window.onerror = onError;
- addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
-
- if (document.documentElement.getAttribute("debug") == "true")
- toggleConsole(true);
-})();
-}
diff --git a/trunk/infrastructure/ace/www/firebug/firebugx.js b/trunk/infrastructure/ace/www/firebug/firebugx.js
deleted file mode 100644
index b2cc49c..0000000
--- a/trunk/infrastructure/ace/www/firebug/firebugx.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-if (!("console" in window) || !("firebug" in console))
-{
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
- "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-
- window.console = {};
- for (var i = 0; i < names.length; ++i)
- window.console[names[i]] = function() {}
-} \ No newline at end of file
diff --git a/trunk/infrastructure/ace/www/firebug/infoIcon.png b/trunk/infrastructure/ace/www/firebug/infoIcon.png
deleted file mode 100644
index da1e533..0000000
--- a/trunk/infrastructure/ace/www/firebug/infoIcon.png
+++ /dev/null
Binary files differ
diff --git a/trunk/infrastructure/ace/www/firebug/warningIcon.png b/trunk/infrastructure/ace/www/firebug/warningIcon.png
deleted file mode 100644
index de51084..0000000
--- a/trunk/infrastructure/ace/www/firebug/warningIcon.png
+++ /dev/null
Binary files differ
diff --git a/trunk/infrastructure/ace/www/index.html b/trunk/infrastructure/ace/www/index.html
deleted file mode 100644
index a1e6e96..0000000
--- a/trunk/infrastructure/ace/www/index.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
- <head>
- <title>A Code Editor</title>
- <script src="jquery-1.2.1.js"></script>
- <!-- DEBUG -->
- <script src="ace2_outer.js"></script>
- <script src="firebug/firebugx.js"></script>
- <!-- /DEBUG -->
- <script src="testcode.js"></script>
- <!-- PROD: <script src="ace2.js"></script> -->
- <script>
- $(document).ready(function() {
- var editor = new Ace2Editor();
- editor.init("editorcontainer", getTestCode(), editorReady);
-
- editor.setOnKeyPress(function (evt) {
- if (evt.ctrlKey && evt.which == "s".charCodeAt(0)) {
- alert("You tried to save.");
- return false;
- }
- return true;
- });
-
- function editorReady() {
- resizeEditor();
- $(window).bind("resize", resizeEditor);
- setTimeout(function() {editor.focus();}, 0);
- }
-
- function resizeEditor() {
- $("#editorcontainer").get(0).style.height = "100%";
- editor.getFrame().style.height = ((document.documentElement.clientHeight)-1)+"px";
- editor.adjustSize();
- }
- });
- </script>
- <style>
- html { overflow: hidden } /* for Win IE 6 */
- body { margin:0; padding:0; border:0; overflow: hidden; }
- #editorcontainer { height: 1000px; /* changed programmatically */ }
- #editorcontainer iframe { width: 100%; height: 100%; border:0; padding:0; margin:0; }
- </style>
- </head>
- <body>
- <div id="editorcontainer"><!-- --></div>
- </body>
-</html>
diff --git a/trunk/infrastructure/ace/www/inner.css b/trunk/infrastructure/ace/www/inner.css
deleted file mode 100644
index 7479cfe..0000000
--- a/trunk/infrastructure/ace/www/inner.css
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* Firefox (3) is bad about keeping the text cursor in design mode;
- various actions (clicking, dragging, scroll-wheel) lose it and it
- doesn't come back easily, presumably because of optimizations.
- These rules try to maximize the chance Firefox will think the cursor
- needs changing again.
-*/
-html { cursor: text; } /* in Safari, produces text cursor for whole doc (inc. below body) */
-span { cursor: auto; }
-
-a { cursor: pointer !important; }
-
-/*span { padding-bottom: 1px; }/* padding-top: 1px; }*/
-
-/*.inspoint_atstart_generic { background: transparent url(/genimg/solid/2x10/000000.gif) repeat-y left top }
-.inspoint_atend_generic { background: transparent url(/genimg/solid/2x10/000000.gif) repeat-y right top }*/
-
-/*div { background: transparent url(/static/img/acecarets/default.gif) repeat-y left top }*/
-
-/*tt { padding-left: 3px; padding-right: 3px; margin-right: -3px; margin-left: -3px; }*/
-
-/*div { display: list-item; list-style: disc outside; margin-left: 20px; }*/
-/*div:before { content:"foo" }*/
-
-ul, ol, li {
- padding: 0;
- margin: 0;
-}
-ul { margin-left: 1.5em; }
-ul ul { margin-left: 0 !important; }
-ul.list-bullet1 { margin-left: 1.5em; }
-ul.list-bullet2 { margin-left: 3em; }
-ul.list-bullet3 { margin-left: 4.5em; }
-ul.list-bullet4 { margin-left: 6em; }
-ul.list-bullet5 { margin-left: 7.5em; }
-ul.list-bullet6 { margin-left: 9em; }
-ul.list-bullet7 { margin-left: 10.5em; }
-ul.list-bullet8 { margin-left: 12em; }
-
-ul { list-style-type: disc; }
-ul.list-bullet1 { list-style-type: disc; }
-ul.list-bullet2 { list-style-type: circle; }
-ul.list-bullet3 { list-style-type: square; }
-ul.list-bullet4 { list-style-type: disc; }
-ul.list-bullet5 { list-style-type: circle; }
-ul.list-bullet6 { list-style-type: square; }
-ul.list-bullet7 { list-style-type: disc; }
-ul.list-bullet8 { list-style-type: circle; }
diff --git a/trunk/infrastructure/ace/www/jquery-1.2.1.js b/trunk/infrastructure/ace/www/jquery-1.2.1.js
deleted file mode 100644
index b4eb132..0000000
--- a/trunk/infrastructure/ace/www/jquery-1.2.1.js
+++ /dev/null
@@ -1,2992 +0,0 @@
-(function(){
-/*
- * jQuery 1.2.1 - New Wave Javascript
- *
- * Copyright (c) 2007 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
- * $Rev: 3353 $
- */
-
-// Map over jQuery in case of overwrite
-if ( typeof jQuery != "undefined" )
- var _jQuery = jQuery;
-
-var jQuery = window.jQuery = function(selector, context) {
- // If the context is a namespace object, return a new object
- return this instanceof jQuery ?
- this.init(selector, context) :
- new jQuery(selector, context);
-};
-
-// Map over the $ in case of overwrite
-if ( typeof $ != "undefined" )
- var _$ = $;
-
-// Map the jQuery namespace to the '$' one
-window.$ = jQuery;
-
-var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
-
-jQuery.fn = jQuery.prototype = {
- init: function(selector, context) {
- // Make sure that a selection was provided
- selector = selector || document;
-
- // Handle HTML strings
- if ( typeof selector == "string" ) {
- var m = quickExpr.exec(selector);
- if ( m && (m[1] || !context) ) {
- // HANDLE: $(html) -> $(array)
- if ( m[1] )
- selector = jQuery.clean( [ m[1] ], context );
-
- // HANDLE: $("#id")
- else {
- var tmp = document.getElementById( m[3] );
- if ( tmp )
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( tmp.id != m[3] )
- return jQuery().find( selector );
- else {
- this[0] = tmp;
- this.length = 1;
- return this;
- }
- else
- selector = [];
- }
-
- // HANDLE: $(expr)
- } else
- return new jQuery( context ).find( selector );
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction(selector) )
- return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector );
-
- return this.setArray(
- // HANDLE: $(array)
- selector.constructor == Array && selector ||
-
- // HANDLE: $(arraylike)
- // Watch for when an array-like object is passed as the selector
- (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
-
- // HANDLE: $(*)
- [ selector ] );
- },
-
- jquery: "1.2.1",
-
- size: function() {
- return this.length;
- },
-
- length: 0,
-
- get: function( num ) {
- return num == undefined ?
-
- // Return a 'clean' array
- jQuery.makeArray( this ) :
-
- // Return just the object
- this[num];
- },
-
- pushStack: function( a ) {
- var ret = jQuery(a);
- ret.prevObject = this;
- return ret;
- },
-
- setArray: function( a ) {
- this.length = 0;
- Array.prototype.push.apply( this, a );
- return this;
- },
-
- each: function( fn, args ) {
- return jQuery.each( this, fn, args );
- },
-
- index: function( obj ) {
- var pos = -1;
- this.each(function(i){
- if ( this == obj ) pos = i;
- });
- return pos;
- },
-
- attr: function( key, value, type ) {
- var obj = key;
-
- // Look for the case where we're accessing a style value
- if ( key.constructor == String )
- if ( value == undefined )
- return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
- else {
- obj = {};
- obj[ key ] = value;
- }
-
- // Check to see if we're setting style values
- return this.each(function(index){
- // Set all the styles
- for ( var prop in obj )
- jQuery.attr(
- type ? this.style : this,
- prop, jQuery.prop(this, obj[prop], type, index, prop)
- );
- });
- },
-
- css: function( key, value ) {
- return this.attr( key, value, "curCSS" );
- },
-
- text: function(e) {
- if ( typeof e != "object" && e != null )
- return this.empty().append( document.createTextNode( e ) );
-
- var t = "";
- jQuery.each( e || this, function(){
- jQuery.each( this.childNodes, function(){
- if ( this.nodeType != 8 )
- t += this.nodeType != 1 ?
- this.nodeValue : jQuery.fn.text([ this ]);
- });
- });
- return t;
- },
-
- wrapAll: function(html) {
- if ( this[0] )
- // The elements to wrap the target around
- jQuery(html, this[0].ownerDocument)
- .clone()
- .insertBefore(this[0])
- .map(function(){
- var elem = this;
- while ( elem.firstChild )
- elem = elem.firstChild;
- return elem;
- })
- .append(this);
-
- return this;
- },
-
- wrapInner: function(html) {
- return this.each(function(){
- jQuery(this).contents().wrapAll(html);
- });
- },
-
- wrap: function(html) {
- return this.each(function(){
- jQuery(this).wrapAll(html);
- });
- },
-
- append: function() {
- return this.domManip(arguments, true, 1, function(a){
- this.appendChild( a );
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, -1, function(a){
- this.insertBefore( a, this.firstChild );
- });
- },
-
- before: function() {
- return this.domManip(arguments, false, 1, function(a){
- this.parentNode.insertBefore( a, this );
- });
- },
-
- after: function() {
- return this.domManip(arguments, false, -1, function(a){
- this.parentNode.insertBefore( a, this.nextSibling );
- });
- },
-
- end: function() {
- return this.prevObject || jQuery([]);
- },
-
- find: function(t) {
- var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
- return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
- jQuery.unique( data ) : data );
- },
-
- clone: function(events) {
- // Do the clone
- var ret = this.map(function(){
- return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
- });
-
- // Need to set the expando to null on the cloned set if it exists
- // removeData doesn't work here, IE removes it from the original as well
- // this is primarily for IE but the data expando shouldn't be copied over in any browser
- var clone = ret.find("*").andSelf().each(function(){
- if ( this[ expando ] != undefined )
- this[ expando ] = null;
- });
-
- // Copy the events from the original to the clone
- if (events === true)
- this.find("*").andSelf().each(function(i) {
- var events = jQuery.data(this, "events");
- for ( var type in events )
- for ( var handler in events[type] )
- jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data);
- });
-
- // Return the cloned set
- return ret;
- },
-
- filter: function(t) {
- return this.pushStack(
- jQuery.isFunction( t ) &&
- jQuery.grep(this, function(el, index){
- return t.apply(el, [index]);
- }) ||
-
- jQuery.multiFilter(t,this) );
- },
-
- not: function(t) {
- return this.pushStack(
- t.constructor == String &&
- jQuery.multiFilter(t, this, true) ||
-
- jQuery.grep(this, function(a) {
- return ( t.constructor == Array || t.jquery )
- ? jQuery.inArray( a, t ) < 0
- : a != t;
- })
- );
- },
-
- add: function(t) {
- return this.pushStack( jQuery.merge(
- this.get(),
- t.constructor == String ?
- jQuery(t).get() :
- t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
- t : [t] )
- );
- },
-
- is: function(expr) {
- return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
- },
-
- hasClass: function(expr) {
- return this.is("." + expr);
- },
-
- val: function( val ) {
- if ( val == undefined ) {
- if ( this.length ) {
- var elem = this[0];
-
- // We need to handle select boxes special
- if ( jQuery.nodeName(elem, "select") ) {
- var index = elem.selectedIndex,
- a = [],
- options = elem.options,
- one = elem.type == "select-one";
-
- // Nothing was selected
- if ( index < 0 )
- return null;
-
- // Loop through all the selected options
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
- var option = options[i];
- if ( option.selected ) {
- // Get the specifc value for the option
- var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value;
-
- // We don't need an array for one selects
- if ( one )
- return val;
-
- // Multi-Selects return an array
- a.push(val);
- }
- }
-
- return a;
-
- // Everything else, we just grab the value
- } else
- return this[0].value.replace(/\r/g, "");
- }
- } else
- return this.each(function(){
- if ( val.constructor == Array && /radio|checkbox/.test(this.type) )
- this.checked = (jQuery.inArray(this.value, val) >= 0 ||
- jQuery.inArray(this.name, val) >= 0);
- else if ( jQuery.nodeName(this, "select") ) {
- var tmp = val.constructor == Array ? val : [val];
-
- jQuery("option", this).each(function(){
- this.selected = (jQuery.inArray(this.value, tmp) >= 0 ||
- jQuery.inArray(this.text, tmp) >= 0);
- });
-
- if ( !tmp.length )
- this.selectedIndex = -1;
- } else
- this.value = val;
- });
- },
-
- html: function( val ) {
- return val == undefined ?
- ( this.length ? this[0].innerHTML : null ) :
- this.empty().append( val );
- },
-
- replaceWith: function( val ) {
- return this.after( val ).remove();
- },
-
- eq: function(i){
- return this.slice(i, i+1);
- },
-
- slice: function() {
- return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
- },
-
- map: function(fn) {
- return this.pushStack(jQuery.map( this, function(elem,i){
- return fn.call( elem, i, elem );
- }));
- },
-
- andSelf: function() {
- return this.add( this.prevObject );
- },
-
- domManip: function(args, table, dir, fn) {
- var clone = this.length > 1, a;
-
- return this.each(function(){
- if ( !a ) {
- a = jQuery.clean(args, this.ownerDocument);
- if ( dir < 0 )
- a.reverse();
- }
-
- var obj = this;
-
- if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
- obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
-
- jQuery.each( a, function(){
- var elem = clone ? this.cloneNode(true) : this;
- if ( !evalScript(0, elem) )
- fn.call( obj, elem );
- });
- });
- }
-};
-
-function evalScript(i, elem){
- var script = jQuery.nodeName(elem, "script");
-
- if ( script ) {
- if ( elem.src )
- jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
- else
- jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-
- if ( elem.parentNode )
- elem.parentNode.removeChild(elem);
-
- } else if ( elem.nodeType == 1 )
- jQuery("script", elem).each(evalScript);
-
- return script;
-}
-
-jQuery.extend = jQuery.fn.extend = function() {
- // copy reference to target object
- var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
-
- // Handle a deep copy situation
- if ( target.constructor == Boolean ) {
- deep = target;
- target = arguments[1] || {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( al == 1 ) {
- target = this;
- a = 0;
- }
-
- var prop;
-
- for ( ; a < al; a++ )
- // Only deal with non-null/undefined values
- if ( (prop = arguments[a]) != null )
- // Extend the base object
- for ( var i in prop ) {
- // Prevent never-ending loop
- if ( target == prop[i] )
- continue;
-
- // Recurse if we're merging object values
- if ( deep && typeof prop[i] == 'object' && target[i] )
- jQuery.extend( target[i], prop[i] );
-
- // Don't bring in undefined values
- else if ( prop[i] != undefined )
- target[i] = prop[i];
- }
-
- // Return the modified object
- return target;
-};
-
-var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {};
-
-jQuery.extend({
- noConflict: function(deep) {
- window.$ = _$;
- if ( deep )
- window.jQuery = _jQuery;
- return jQuery;
- },
-
- // This may seem like some crazy code, but trust me when I say that this
- // is the only cross-browser way to do this. --John
- isFunction: function( fn ) {
- return !!fn && typeof fn != "string" && !fn.nodeName &&
- fn.constructor != Array && /function/i.test( fn + "" );
- },
-
- // check if an element is in a XML document
- isXMLDoc: function(elem) {
- return elem.documentElement && !elem.body ||
- elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
- },
-
- // Evalulates a script in a global context
- // Evaluates Async. in Safari 2 :-(
- globalEval: function( data ) {
- data = jQuery.trim( data );
- if ( data ) {
- if ( window.execScript )
- window.execScript( data );
- else if ( jQuery.browser.safari )
- // safari doesn't provide a synchronous global eval
- window.setTimeout( data, 0 );
- else
- eval.call( window, data );
- }
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
- },
-
- cache: {},
-
- data: function( elem, name, data ) {
- elem = elem == window ? win : elem;
-
- var id = elem[ expando ];
-
- // Compute a unique ID for the element
- if ( !id )
- id = elem[ expando ] = ++uuid;
-
- // Only generate the data cache if we're
- // trying to access or manipulate it
- if ( name && !jQuery.cache[ id ] )
- jQuery.cache[ id ] = {};
-
- // Prevent overriding the named cache with undefined values
- if ( data != undefined )
- jQuery.cache[ id ][ name ] = data;
-
- // Return the named cache data, or the ID for the element
- return name ? jQuery.cache[ id ][ name ] : id;
- },
-
- removeData: function( elem, name ) {
- elem = elem == window ? win : elem;
-
- var id = elem[ expando ];
-
- // If we want to remove a specific section of the element's data
- if ( name ) {
- if ( jQuery.cache[ id ] ) {
- // Remove the section of cache data
- delete jQuery.cache[ id ][ name ];
-
- // If we've removed all the data, remove the element's cache
- name = "";
- for ( name in jQuery.cache[ id ] ) break;
- if ( !name )
- jQuery.removeData( elem );
- }
-
- // Otherwise, we want to remove all of the element's data
- } else {
- // Clean up the element expando
- try {
- delete elem[ expando ];
- } catch(e){
- // IE has trouble directly removing the expando
- // but it's ok with using removeAttribute
- if ( elem.removeAttribute )
- elem.removeAttribute( expando );
- }
-
- // Completely remove the data cache
- delete jQuery.cache[ id ];
- }
- },
-
- // args is for internal usage only
- each: function( obj, fn, args ) {
- if ( args ) {
- if ( obj.length == undefined )
- for ( var i in obj )
- fn.apply( obj[i], args );
- else
- for ( var i = 0, ol = obj.length; i < ol; i++ )
- if ( fn.apply( obj[i], args ) === false ) break;
-
- // A special, fast, case for the most common use of each
- } else {
- if ( obj.length == undefined )
- for ( var i in obj )
- fn.call( obj[i], i, obj[i] );
- else
- for ( var i = 0, ol = obj.length, val = obj[0];
- i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){}
- }
-
- return obj;
- },
-
- prop: function(elem, value, type, index, prop){
- // Handle executable functions
- if ( jQuery.isFunction( value ) )
- value = value.call( elem, [index] );
-
- // exclude the following css properties to add px
- var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
-
- // Handle passing in a number to a CSS property
- return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
- value + "px" :
- value;
- },
-
- className: {
- // internal only, use addClass("class")
- add: function( elem, c ){
- jQuery.each( (c || "").split(/\s+/), function(i, cur){
- if ( !jQuery.className.has( elem.className, cur ) )
- elem.className += ( elem.className ? " " : "" ) + cur;
- });
- },
-
- // internal only, use removeClass("class")
- remove: function( elem, c ){
- elem.className = c != undefined ?
- jQuery.grep( elem.className.split(/\s+/), function(cur){
- return !jQuery.className.has( c, cur );
- }).join(" ") : "";
- },
-
- // internal only, use is(".class")
- has: function( t, c ) {
- return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
- }
- },
-
- swap: function(e,o,f) {
- for ( var i in o ) {
- e.style["old"+i] = e.style[i];
- e.style[i] = o[i];
- }
- f.apply( e, [] );
- for ( var i in o )
- e.style[i] = e.style["old"+i];
- },
-
- css: function(e,p) {
- if ( p == "height" || p == "width" ) {
- var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
-
- jQuery.each( d, function(){
- old["padding" + this] = 0;
- old["border" + this + "Width"] = 0;
- });
-
- jQuery.swap( e, old, function() {
- if ( jQuery(e).is(':visible') ) {
- oHeight = e.offsetHeight;
- oWidth = e.offsetWidth;
- } else {
- e = jQuery(e.cloneNode(true))
- .find(":radio").removeAttr("checked").end()
- .css({
- visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
- }).appendTo(e.parentNode)[0];
-
- var parPos = jQuery.css(e.parentNode,"position") || "static";
- if ( parPos == "static" )
- e.parentNode.style.position = "relative";
-
- oHeight = e.clientHeight;
- oWidth = e.clientWidth;
-
- if ( parPos == "static" )
- e.parentNode.style.position = "static";
-
- e.parentNode.removeChild(e);
- }
- });
-
- return p == "height" ? oHeight : oWidth;
- }
-
- return jQuery.curCSS( e, p );
- },
-
- curCSS: function(elem, prop, force) {
- var ret, stack = [], swap = [];
-
- // A helper method for determining if an element's values are broken
- function color(a){
- if ( !jQuery.browser.safari )
- return false;
-
- var ret = document.defaultView.getComputedStyle(a,null);
- return !ret || ret.getPropertyValue("color") == "";
- }
-
- if (prop == "opacity" && jQuery.browser.msie) {
- ret = jQuery.attr(elem.style, "opacity");
- return ret == "" ? "1" : ret;
- }
-
- if (prop.match(/float/i))
- prop = styleFloat;
-
- if (!force && elem.style[prop])
- ret = elem.style[prop];
-
- else if (document.defaultView && document.defaultView.getComputedStyle) {
-
- if (prop.match(/float/i))
- prop = "float";
-
- prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
- var cur = document.defaultView.getComputedStyle(elem, null);
-
- if ( cur && !color(elem) )
- ret = cur.getPropertyValue(prop);
-
- // If the element isn't reporting its values properly in Safari
- // then some display: none elements are involved
- else {
- // Locate all of the parent display: none elements
- for ( var a = elem; a && color(a); a = a.parentNode )
- stack.unshift(a);
-
- // Go through and make them visible, but in reverse
- // (It would be better if we knew the exact display type that they had)
- for ( a = 0; a < stack.length; a++ )
- if ( color(stack[a]) ) {
- swap[a] = stack[a].style.display;
- stack[a].style.display = "block";
- }
-
- // Since we flip the display style, we have to handle that
- // one special, otherwise get the value
- ret = prop == "display" && swap[stack.length-1] != null ?
- "none" :
- document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || "";
-
- // Finally, revert the display styles back
- for ( a = 0; a < swap.length; a++ )
- if ( swap[a] != null )
- stack[a].style.display = swap[a];
- }
-
- if ( prop == "opacity" && ret == "" )
- ret = "1";
-
- } else if (elem.currentStyle) {
- var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
- ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) {
- var style = elem.style.left;
- var runtimeStyle = elem.runtimeStyle.left;
- elem.runtimeStyle.left = elem.currentStyle.left;
- elem.style.left = ret || 0;
- ret = elem.style.pixelLeft + "px";
- elem.style.left = style;
- elem.runtimeStyle.left = runtimeStyle;
- }
- }
-
- return ret;
- },
-
- clean: function(a, doc) {
- var r = [];
- doc = doc || document;
-
- jQuery.each( a, function(i,arg){
- if ( !arg ) return;
-
- if ( arg.constructor == Number )
- arg = arg.toString();
-
- // Convert html string into DOM nodes
- if ( typeof arg == "string" ) {
- // Fix "XHTML"-style tags in all browsers
- arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){
- return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">";
- });
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
-
- var wrap =
- // option or optgroup
- !s.indexOf("<opt") &&
- [1, "<select>", "</select>"] ||
-
- !s.indexOf("<leg") &&
- [1, "<fieldset>", "</fieldset>"] ||
-
- s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
- [1, "<table>", "</table>"] ||
-
- !s.indexOf("<tr") &&
- [2, "<table><tbody>", "</tbody></table>"] ||
-
- // <thead> matched above
- (!s.indexOf("<td") || !s.indexOf("<th")) &&
- [3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
-
- !s.indexOf("<col") &&
- [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
-
- // IE can't serialize <link> and <script> tags normally
- jQuery.browser.msie &&
- [1, "div<div>", "</div>"] ||
-
- [0,"",""];
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + arg + wrap[2];
-
- // Move to the right depth
- while ( wrap[0]-- )
- div = div.lastChild;
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( jQuery.browser.msie ) {
-
- // String was a <table>, *may* have spurious <tbody>
- if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 )
- tb = div.firstChild && div.firstChild.childNodes;
-
- // String was a bare <thead> or <tfoot>
- else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
- tb = div.childNodes;
-
- for ( var n = tb.length-1; n >= 0 ; --n )
- if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
- tb[n].parentNode.removeChild(tb[n]);
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( /^\s/.test(arg) )
- div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
-
- }
-
- arg = jQuery.makeArray( div.childNodes );
- }
-
- if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) )
- return;
-
- if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options )
- r.push( arg );
- else
- r = jQuery.merge( r, arg );
-
- });
-
- return r;
- },
-
- attr: function(elem, name, value){
- var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
-
- // Safari mis-reports the default selected property of a hidden option
- // Accessing the parent's selectedIndex property fixes it
- if ( name == "selected" && jQuery.browser.safari )
- elem.parentNode.selectedIndex;
-
- // Certain attributes only work when accessed via the old DOM 0 way
- if ( fix[name] ) {
- if ( value != undefined ) elem[fix[name]] = value;
- return elem[fix[name]];
- } else if ( jQuery.browser.msie && name == "style" )
- return jQuery.attr( elem.style, "cssText", value );
-
- else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
- return elem.getAttributeNode(name).nodeValue;
-
- // IE elem.getAttribute passes even for style
- else if ( elem.tagName ) {
-
- if ( value != undefined ) {
- if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode )
- throw "type property can't be changed";
- elem.setAttribute( name, value );
- }
-
- if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) )
- return elem.getAttribute( name, 2 );
-
- return elem.getAttribute( name );
-
- // elem is actually elem.style ... set the style
- } else {
- // IE actually uses filters for opacity
- if ( name == "opacity" && jQuery.browser.msie ) {
- if ( value != undefined ) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- elem.zoom = 1;
-
- // Set the alpha filter to set the opacity
- elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
- (parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
- }
-
- return elem.filter ?
- (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
- }
- name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
- if ( value != undefined ) elem[name] = value;
- return elem[name];
- }
- },
-
- trim: function(t){
- return (t||"").replace(/^\s+|\s+$/g, "");
- },
-
- makeArray: function( a ) {
- var r = [];
-
- // Need to use typeof to fight Safari childNodes crashes
- if ( typeof a != "array" )
- for ( var i = 0, al = a.length; i < al; i++ )
- r.push( a[i] );
- else
- r = a.slice( 0 );
-
- return r;
- },
-
- inArray: function( b, a ) {
- for ( var i = 0, al = a.length; i < al; i++ )
- if ( a[i] == b )
- return i;
- return -1;
- },
-
- merge: function(first, second) {
- // We have to loop this way because IE & Opera overwrite the length
- // expando of getElementsByTagName
-
- // Also, we need to make sure that the correct elements are being returned
- // (IE returns comment nodes in a '*' query)
- if ( jQuery.browser.msie ) {
- for ( var i = 0; second[i]; i++ )
- if ( second[i].nodeType != 8 )
- first.push(second[i]);
- } else
- for ( var i = 0; second[i]; i++ )
- first.push(second[i]);
-
- return first;
- },
-
- unique: function(first) {
- var r = [], done = {};
-
- try {
- for ( var i = 0, fl = first.length; i < fl; i++ ) {
- var id = jQuery.data(first[i]);
- if ( !done[id] ) {
- done[id] = true;
- r.push(first[i]);
- }
- }
- } catch(e) {
- r = first;
- }
-
- return r;
- },
-
- grep: function(elems, fn, inv) {
- // If a string is passed in for the function, make a function
- // for it (a handy shortcut)
- if ( typeof fn == "string" )
- fn = eval("false||function(a,i){return " + fn + "}");
-
- var result = [];
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, el = elems.length; i < el; i++ )
- if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
- result.push( elems[i] );
-
- return result;
- },
-
- map: function(elems, fn) {
- // If a string is passed in for the function, make a function
- // for it (a handy shortcut)
- if ( typeof fn == "string" )
- fn = eval("false||function(a){return " + fn + "}");
-
- var result = [];
-
- // Go through the array, translating each of the items to their
- // new value (or values).
- for ( var i = 0, el = elems.length; i < el; i++ ) {
- var val = fn(elems[i],i);
-
- if ( val !== null && val != undefined ) {
- if ( val.constructor != Array ) val = [val];
- result = result.concat( val );
- }
- }
-
- return result;
- }
-});
-
-var userAgent = navigator.userAgent.toLowerCase();
-
-// Figure out what browser is being used
-jQuery.browser = {
- version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
- safari: /webkit/.test(userAgent),
- opera: /opera/.test(userAgent),
- msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
- mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
-};
-
-var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
-
-jQuery.extend({
- // Check to see if the W3C box model is being used
- boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
-
- styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
-
- props: {
- "for": "htmlFor",
- "class": "className",
- "float": styleFloat,
- cssFloat: styleFloat,
- styleFloat: styleFloat,
- innerHTML: "innerHTML",
- className: "className",
- value: "value",
- disabled: "disabled",
- checked: "checked",
- readonly: "readOnly",
- selected: "selected",
- maxlength: "maxLength"
- }
-});
-
-jQuery.each({
- parent: "a.parentNode",
- parents: "jQuery.dir(a,'parentNode')",
- next: "jQuery.nth(a,2,'nextSibling')",
- prev: "jQuery.nth(a,2,'previousSibling')",
- nextAll: "jQuery.dir(a,'nextSibling')",
- prevAll: "jQuery.dir(a,'previousSibling')",
- siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
- children: "jQuery.sibling(a.firstChild)",
- contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
-}, function(i,n){
- jQuery.fn[ i ] = function(a) {
- var ret = jQuery.map(this,n);
- if ( a && typeof a == "string" )
- ret = jQuery.multiFilter(a,ret);
- return this.pushStack( jQuery.unique(ret) );
- };
-});
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function(i,n){
- jQuery.fn[ i ] = function(){
- var a = arguments;
- return this.each(function(){
- for ( var j = 0, al = a.length; j < al; j++ )
- jQuery(a[j])[n]( this );
- });
- };
-});
-
-jQuery.each( {
- removeAttr: function( key ) {
- jQuery.attr( this, key, "" );
- this.removeAttribute( key );
- },
- addClass: function(c){
- jQuery.className.add(this,c);
- },
- removeClass: function(c){
- jQuery.className.remove(this,c);
- },
- toggleClass: function( c ){
- jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
- },
- remove: function(a){
- if ( !a || jQuery.filter( a, [this] ).r.length ) {
- jQuery.removeData( this );
- this.parentNode.removeChild( this );
- }
- },
- empty: function() {
- // Clean up the cache
- jQuery("*", this).each(function(){ jQuery.removeData(this); });
-
- while ( this.firstChild )
- this.removeChild( this.firstChild );
- }
-}, function(i,n){
- jQuery.fn[ i ] = function() {
- return this.each( n, arguments );
- };
-});
-
-jQuery.each( [ "Height", "Width" ], function(i,name){
- var n = name.toLowerCase();
-
- jQuery.fn[ n ] = function(h) {
- return this[0] == window ?
- jQuery.browser.safari && self["inner" + name] ||
- jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
- document.body["client" + name] :
-
- this[0] == document ?
- Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
-
- h == undefined ?
- ( this.length ? jQuery.css( this[0], n ) : null ) :
- this.css( n, h.constructor == String ? h : h + "px" );
- };
-});
-
-var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
- "(?:[\\w*_-]|\\\\.)" :
- "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
- quickChild = new RegExp("^>\\s*(" + chars + "+)"),
- quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
- quickClass = new RegExp("^([#.]?)(" + chars + "*)");
-
-jQuery.extend({
- expr: {
- "": "m[2]=='*'||jQuery.nodeName(a,m[2])",
- "#": "a.getAttribute('id')==m[2]",
- ":": {
- // Position Checks
- lt: "i<m[3]-0",
- gt: "i>m[3]-0",
- nth: "m[3]-0==i",
- eq: "m[3]-0==i",
- first: "i==0",
- last: "i==r.length-1",
- even: "i%2==0",
- odd: "i%2",
-
- // Child Checks
- "first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
- "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
- "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
-
- // Parent Checks
- parent: "a.firstChild",
- empty: "!a.firstChild",
-
- // Text Check
- contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
-
- // Visibility
- visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
- hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
-
- // Form attributes
- enabled: "!a.disabled",
- disabled: "a.disabled",
- checked: "a.checked",
- selected: "a.selected||jQuery.attr(a,'selected')",
-
- // Form elements
- text: "'text'==a.type",
- radio: "'radio'==a.type",
- checkbox: "'checkbox'==a.type",
- file: "'file'==a.type",
- password: "'password'==a.type",
- submit: "'submit'==a.type",
- image: "'image'==a.type",
- reset: "'reset'==a.type",
- button: '"button"==a.type||jQuery.nodeName(a,"button")',
- input: "/input|select|textarea|button/i.test(a.nodeName)",
-
- // :has()
- has: "jQuery.find(m[3],a).length",
-
- // :header
- header: "/h\\d/i.test(a.nodeName)",
-
- // :animated
- animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
- }
- },
-
- // The regular expressions that power the parsing engine
- parse: [
- // Match: [@value='test'], [@foo]
- /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
-
- // Match: :contains('foo')
- /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
-
- // Match: :even, :last-chlid, #id, .class
- new RegExp("^([:.#]*)(" + chars + "+)")
- ],
-
- multiFilter: function( expr, elems, not ) {
- var old, cur = [];
-
- while ( expr && expr != old ) {
- old = expr;
- var f = jQuery.filter( expr, elems, not );
- expr = f.t.replace(/^\s*,\s*/, "" );
- cur = not ? elems = f.r : jQuery.merge( cur, f.r );
- }
-
- return cur;
- },
-
- find: function( t, context ) {
- // Quickly handle non-string expressions
- if ( typeof t != "string" )
- return [ t ];
-
- // Make sure that the context is a DOM Element
- if ( context && !context.nodeType )
- context = null;
-
- // Set the correct context (if none is provided)
- context = context || document;
-
- // Initialize the search
- var ret = [context], done = [], last;
-
- // Continue while a selector expression exists, and while
- // we're no longer looping upon ourselves
- while ( t && last != t ) {
- var r = [];
- last = t;
-
- t = jQuery.trim(t);
-
- var foundToken = false;
-
- // An attempt at speeding up child selectors that
- // point to a specific element tag
- var re = quickChild;
- var m = re.exec(t);
-
- if ( m ) {
- var nodeName = m[1].toUpperCase();
-
- // Perform our own iteration and filter
- for ( var i = 0; ret[i]; i++ )
- for ( var c = ret[i].firstChild; c; c = c.nextSibling )
- if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) )
- r.push( c );
-
- ret = r;
- t = t.replace( re, "" );
- if ( t.indexOf(" ") == 0 ) continue;
- foundToken = true;
- } else {
- re = /^([>+~])\s*(\w*)/i;
-
- if ( (m = re.exec(t)) != null ) {
- r = [];
-
- var nodeName = m[2], merge = {};
- m = m[1];
-
- for ( var j = 0, rl = ret.length; j < rl; j++ ) {
- var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
- for ( ; n; n = n.nextSibling )
- if ( n.nodeType == 1 ) {
- var id = jQuery.data(n);
-
- if ( m == "~" && merge[id] ) break;
-
- if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
- if ( m == "~" ) merge[id] = true;
- r.push( n );
- }
-
- if ( m == "+" ) break;
- }
- }
-
- ret = r;
-
- // And remove the token
- t = jQuery.trim( t.replace( re, "" ) );
- foundToken = true;
- }
- }
-
- // See if there's still an expression, and that we haven't already
- // matched a token
- if ( t && !foundToken ) {
- // Handle multiple expressions
- if ( !t.indexOf(",") ) {
- // Clean the result set
- if ( context == ret[0] ) ret.shift();
-
- // Merge the result sets
- done = jQuery.merge( done, ret );
-
- // Reset the context
- r = ret = [context];
-
- // Touch up the selector string
- t = " " + t.substr(1,t.length);
-
- } else {
- // Optimize for the case nodeName#idName
- var re2 = quickID;
- var m = re2.exec(t);
-
- // Re-organize the results, so that they're consistent
- if ( m ) {
- m = [ 0, m[2], m[3], m[1] ];
-
- } else {
- // Otherwise, do a traditional filter check for
- // ID, class, and element selectors
- re2 = quickClass;
- m = re2.exec(t);
- }
-
- m[2] = m[2].replace(/\\/g, "");
-
- var elem = ret[ret.length-1];
-
- // Try to do a global search by ID, where we can
- if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
- // Optimization for HTML document case
- var oid = elem.getElementById(m[2]);
-
- // Do a quick check for the existence of the actual ID attribute
- // to avoid selecting by the name attribute in IE
- // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
- if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
- oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
-
- // Do a quick check for node name (where applicable) so
- // that div#foo searches will be really fast
- ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
- } else {
- // We need to find all descendant elements
- for ( var i = 0; ret[i]; i++ ) {
- // Grab the tag name being searched for
- var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
-
- // Handle IE7 being really dumb about <object>s
- if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
- tag = "param";
-
- r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
- }
-
- // It's faster to filter by class and be done with it
- if ( m[1] == "." )
- r = jQuery.classFilter( r, m[2] );
-
- // Same with ID filtering
- if ( m[1] == "#" ) {
- var tmp = [];
-
- // Try to find the element with the ID
- for ( var i = 0; r[i]; i++ )
- if ( r[i].getAttribute("id") == m[2] ) {
- tmp = [ r[i] ];
- break;
- }
-
- r = tmp;
- }
-
- ret = r;
- }
-
- t = t.replace( re2, "" );
- }
-
- }
-
- // If a selector string still exists
- if ( t ) {
- // Attempt to filter it
- var val = jQuery.filter(t,r);
- ret = r = val.r;
- t = jQuery.trim(val.t);
- }
- }
-
- // An error occurred with the selector;
- // just return an empty set instead
- if ( t )
- ret = [];
-
- // Remove the root context
- if ( ret && context == ret[0] )
- ret.shift();
-
- // And combine the results
- done = jQuery.merge( done, ret );
-
- return done;
- },
-
- classFilter: function(r,m,not){
- m = " " + m + " ";
- var tmp = [];
- for ( var i = 0; r[i]; i++ ) {
- var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
- if ( !not && pass || not && !pass )
- tmp.push( r[i] );
- }
- return tmp;
- },
-
- filter: function(t,r,not) {
- var last;
-
- // Look for common filter expressions
- while ( t && t != last ) {
- last = t;
-
- var p = jQuery.parse, m;
-
- for ( var i = 0; p[i]; i++ ) {
- m = p[i].exec( t );
-
- if ( m ) {
- // Remove what we just matched
- t = t.substring( m[0].length );
-
- m[2] = m[2].replace(/\\/g, "");
- break;
- }
- }
-
- if ( !m )
- break;
-
- // :not() is a special case that can be optimized by
- // keeping it out of the expression list
- if ( m[1] == ":" && m[2] == "not" )
- r = jQuery.filter(m[3], r, true).r;
-
- // We can get a big speed boost by filtering by class here
- else if ( m[1] == "." )
- r = jQuery.classFilter(r, m[2], not);
-
- else if ( m[1] == "[" ) {
- var tmp = [], type = m[3];
-
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
- var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
-
- if ( z == null || /href|src|selected/.test(m[2]) )
- z = jQuery.attr(a,m[2]) || '';
-
- if ( (type == "" && !!z ||
- type == "=" && z == m[5] ||
- type == "!=" && z != m[5] ||
- type == "^=" && z && !z.indexOf(m[5]) ||
- type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
- (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
- tmp.push( a );
- }
-
- r = tmp;
-
- // We can get a speed boost by handling nth-child here
- } else if ( m[1] == ":" && m[2] == "nth-child" ) {
- var merge = {}, tmp = [],
- test = /(\d*)n\+?(\d*)/.exec(
- m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
- !/\D/.test(m[3]) && "n+" + m[3] || m[3]),
- first = (test[1] || 1) - 0, last = test[2] - 0;
-
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
- var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
-
- if ( !merge[id] ) {
- var c = 1;
-
- for ( var n = parentNode.firstChild; n; n = n.nextSibling )
- if ( n.nodeType == 1 )
- n.nodeIndex = c++;
-
- merge[id] = true;
- }
-
- var add = false;
-
- if ( first == 1 ) {
- if ( last == 0 || node.nodeIndex == last )
- add = true;
- } else if ( (node.nodeIndex + last) % first == 0 )
- add = true;
-
- if ( add ^ not )
- tmp.push( node );
- }
-
- r = tmp;
-
- // Otherwise, find the expression to execute
- } else {
- var f = jQuery.expr[m[1]];
- if ( typeof f != "string" )
- f = jQuery.expr[m[1]][m[2]];
-
- // Build a custom macro to enclose it
- f = eval("false||function(a,i){return " + f + "}");
-
- // Execute it against the current filter
- r = jQuery.grep( r, f, not );
- }
- }
-
- // Return an array of filtered elements (r)
- // and the modified expression string (t)
- return { r: r, t: t };
- },
-
- dir: function( elem, dir ){
- var matched = [];
- var cur = elem[dir];
- while ( cur && cur != document ) {
- if ( cur.nodeType == 1 )
- matched.push( cur );
- cur = cur[dir];
- }
- return matched;
- },
-
- nth: function(cur,result,dir,elem){
- result = result || 1;
- var num = 0;
-
- for ( ; cur; cur = cur[dir] )
- if ( cur.nodeType == 1 && ++num == result )
- break;
-
- return cur;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType == 1 && (!elem || n != elem) )
- r.push( n );
- }
-
- return r;
- }
-});
-/*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code orignated from
- * Dean Edwards' addEvent library.
- */
-jQuery.event = {
-
- // Bind an event to an element
- // Original by Dean Edwards
- add: function(element, type, handler, data) {
- // For whatever reason, IE has trouble passing the window object
- // around, causing it to be cloned in the process
- if ( jQuery.browser.msie && element.setInterval != undefined )
- element = window;
-
- // Make sure that the function being executed has a unique ID
- if ( !handler.guid )
- handler.guid = this.guid++;
-
- // if data is passed, bind to handler
- if( data != undefined ) {
- // Create temporary function pointer to original handler
- var fn = handler;
-
- // Create unique handler function, wrapped around original handler
- handler = function() {
- // Pass arguments and context to original handler
- return fn.apply(this, arguments);
- };
-
- // Store data in unique handler
- handler.data = data;
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- handler.guid = fn.guid;
- }
-
- // Namespaced event handlers
- var parts = type.split(".");
- type = parts[0];
- handler.type = parts[1];
-
- // Init the element's event structure
- var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
-
- var handle = jQuery.data(element, "handle", function(){
- // returned undefined or false
- var val;
-
- // Handle the second event of a trigger and when
- // an event is called after a page has unloaded
- if ( typeof jQuery == "undefined" || jQuery.event.triggered )
- return val;
-
- val = jQuery.event.handle.apply(element, arguments);
-
- return val;
- });
-
- // Get the current list of functions bound to this event
- var handlers = events[type];
-
- // Init the event handler queue
- if (!handlers) {
- handlers = events[type] = {};
-
- // And bind the global event handler to the element
- if (element.addEventListener)
- element.addEventListener(type, handle, false);
- else
- element.attachEvent("on" + type, handle);
- }
-
- // Add the function to the element's handler list
- handlers[handler.guid] = handler;
-
- // Keep track of which events have been used, for global triggering
- this.global[type] = true;
- },
-
- guid: 1,
- global: {},
-
- // Detach an event or set of events from an element
- remove: function(element, type, handler) {
- var events = jQuery.data(element, "events"), ret, index;
-
- // Namespaced event handlers
- if ( typeof type == "string" ) {
- var parts = type.split(".");
- type = parts[0];
- }
-
- if ( events ) {
- // type is actually an event object here
- if ( type && type.type ) {
- handler = type.handler;
- type = type.type;
- }
-
- if ( !type ) {
- for ( type in events )
- this.remove( element, type );
-
- } else if ( events[type] ) {
- // remove the given handler for the given type
- if ( handler )
- delete events[type][handler.guid];
-
- // remove all handlers for the given type
- else
- for ( handler in events[type] )
- // Handle the removal of namespaced events
- if ( !parts[1] || events[type][handler].type == parts[1] )
- delete events[type][handler];
-
- // remove generic event handler if no more handlers exist
- for ( ret in events[type] ) break;
- if ( !ret ) {
- if (element.removeEventListener)
- element.removeEventListener(type, jQuery.data(element, "handle"), false);
- else
- element.detachEvent("on" + type, jQuery.data(element, "handle"));
- ret = null;
- delete events[type];
- }
- }
-
- // Remove the expando if it's no longer used
- for ( ret in events ) break;
- if ( !ret ) {
- jQuery.removeData( element, "events" );
- jQuery.removeData( element, "handle" );
- }
- }
- },
-
- trigger: function(type, data, element, donative, extra) {
- // Clone the incoming data, if any
- data = jQuery.makeArray(data || []);
-
- // Handle a global trigger
- if ( !element ) {
- // Only trigger if we've ever bound an event for it
- if ( this.global[type] )
- jQuery("*").add([window, document]).trigger(type, data);
-
- // Handle triggering a single element
- } else {
- var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
- // Check to see if we need to provide a fake event, or not
- evt = !data[0] || !data[0].preventDefault;
-
- // Pass along a fake event
- if ( evt )
- data.unshift( this.fix({ type: type, target: element }) );
-
- // Enforce the right trigger type
- data[0].type = type;
-
- // Trigger the event
- if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
- val = jQuery.data(element, "handle").apply( element, data );
-
- // Handle triggering native .onfoo handlers
- if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
- val = false;
-
- // Extra functions don't get the custom event object
- if ( evt )
- data.shift();
-
- // Handle triggering of extra function
- if ( extra && extra.apply( element, data ) === false )
- val = false;
-
- // Trigger the native events (except for clicks on links)
- if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
- this.triggered = true;
- element[ type ]();
- }
-
- this.triggered = false;
- }
-
- return val;
- },
-
- handle: function(event) {
- // returned undefined or false
- var val;
-
- // Empty object is for triggered events with no data
- event = jQuery.event.fix( event || window.event || {} );
-
- // Namespaced event handlers
- var parts = event.type.split(".");
- event.type = parts[0];
-
- var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
- args.unshift( event );
-
- for ( var j in c ) {
- // Pass in a reference to the handler function itself
- // So that we can later remove it
- args[0].handler = c[j];
- args[0].data = c[j].data;
-
- // Filter the functions by class
- if ( !parts[1] || c[j].type == parts[1] ) {
- var tmp = c[j].apply( this, args );
-
- if ( val !== false )
- val = tmp;
-
- if ( tmp === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
-
- // Clean up added properties in IE to prevent memory leak
- if (jQuery.browser.msie)
- event.target = event.preventDefault = event.stopPropagation =
- event.handler = event.data = null;
-
- return val;
- },
-
- fix: function(event) {
- // store a copy of the original event object
- // and clone to set read-only properties
- var originalEvent = event;
- event = jQuery.extend({}, originalEvent);
-
- // add preventDefault and stopPropagation since
- // they will not work on the clone
- event.preventDefault = function() {
- // if preventDefault exists run it on the original event
- if (originalEvent.preventDefault)
- originalEvent.preventDefault();
- // otherwise set the returnValue property of the original event to false (IE)
- originalEvent.returnValue = false;
- };
- event.stopPropagation = function() {
- // if stopPropagation exists run it on the original event
- if (originalEvent.stopPropagation)
- originalEvent.stopPropagation();
- // otherwise set the cancelBubble property of the original event to true (IE)
- originalEvent.cancelBubble = true;
- };
-
- // Fix target property, if necessary
- if ( !event.target && event.srcElement )
- event.target = event.srcElement;
-
- // check if target is a textnode (safari)
- if (jQuery.browser.safari && event.target.nodeType == 3)
- event.target = originalEvent.target.parentNode;
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && event.fromElement )
- event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && event.clientX != null ) {
- var e = document.documentElement, b = document.body;
- event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
- event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
- }
-
- // Add which for key events
- if ( !event.which && (event.charCode || event.keyCode) )
- event.which = event.charCode || event.keyCode;
-
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
- if ( !event.metaKey && event.ctrlKey )
- event.metaKey = event.ctrlKey;
-
- // Add which for click: 1 == left; 2 == middle; 3 == right
- // Note: button is not normalized, so don't use it
- if ( !event.which && event.button )
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
-
- return event;
- }
-};
-
-jQuery.fn.extend({
- bind: function( type, data, fn ) {
- return type == "unload" ? this.one(type, data, fn) : this.each(function(){
- jQuery.event.add( this, type, fn || data, fn && data );
- });
- },
-
- one: function( type, data, fn ) {
- return this.each(function(){
- jQuery.event.add( this, type, function(event) {
- jQuery(this).unbind(event);
- return (fn || data).apply( this, arguments);
- }, fn && data);
- });
- },
-
- unbind: function( type, fn ) {
- return this.each(function(){
- jQuery.event.remove( this, type, fn );
- });
- },
-
- trigger: function( type, data, fn ) {
- return this.each(function(){
- jQuery.event.trigger( type, data, this, true, fn );
- });
- },
-
- triggerHandler: function( type, data, fn ) {
- if ( this[0] )
- return jQuery.event.trigger( type, data, this[0], false, fn );
- },
-
- toggle: function() {
- // Save reference to arguments for access in closure
- var a = arguments;
-
- return this.click(function(e) {
- // Figure out which function to execute
- this.lastToggle = 0 == this.lastToggle ? 1 : 0;
-
- // Make sure that clicks stop
- e.preventDefault();
-
- // and execute the function
- return a[this.lastToggle].apply( this, [e] ) || false;
- });
- },
-
- hover: function(f,g) {
-
- // A private function for handling mouse 'hovering'
- function handleHover(e) {
- // Check if mouse(over|out) are still within the same parent element
- var p = e.relatedTarget;
-
- // Traverse up the tree
- while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
-
- // If we actually just moused on to a sub-element, ignore it
- if ( p == this ) return false;
-
- // Execute the right function
- return (e.type == "mouseover" ? f : g).apply(this, [e]);
- }
-
- // Bind the function to the two event listeners
- return this.mouseover(handleHover).mouseout(handleHover);
- },
-
- ready: function(f) {
- // Attach the listeners
- bindReady();
-
- // If the DOM is already ready
- if ( jQuery.isReady )
- // Execute the function immediately
- f.apply( document, [jQuery] );
-
- // Otherwise, remember the function for later
- else
- // Add the function to the wait list
- jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
-
- return this;
- }
-});
-
-jQuery.extend({
- /*
- * All the code that makes DOM Ready work nicely.
- */
- isReady: false,
- readyList: [],
-
- // Handle when the DOM is ready
- ready: function() {
- // Make sure that the DOM is not already loaded
- if ( !jQuery.isReady ) {
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If there are functions bound, to execute
- if ( jQuery.readyList ) {
- // Execute all of them
- jQuery.each( jQuery.readyList, function(){
- this.apply( document );
- });
-
- // Reset the list of functions
- jQuery.readyList = null;
- }
- // Remove event listener to avoid memory leak
- if ( jQuery.browser.mozilla || jQuery.browser.opera )
- document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
-
- // Remove script element used by IE hack
- if( !window.frames.length ) // don't remove if frames are present (#1187)
- jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
- }
- }
-});
-
-jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
- "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
- "submit,keydown,keypress,keyup,error").split(","), function(i,o){
-
- // Handle event binding
- jQuery.fn[o] = function(f){
- return f ? this.bind(o, f) : this.trigger(o);
- };
-});
-
-var readyBound = false;
-
-function bindReady(){
- if ( readyBound ) return;
- readyBound = true;
-
- // If Mozilla is used
- if ( jQuery.browser.mozilla || jQuery.browser.opera )
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
-
- // If IE is used, use the excellent hack by Matthias Miller
- // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
- else if ( jQuery.browser.msie ) {
-
- // Only works if you document.write() it
- document.write("<scr" + "ipt id=__ie_init defer=true " +
- "src=//:><\/script>");
-
- // Use the defer script hack
- var script = document.getElementById("__ie_init");
-
- // script does not exist if jQuery is loaded dynamically
- if ( script )
- script.onreadystatechange = function() {
- if ( this.readyState != "complete" ) return;
- jQuery.ready();
- };
-
- // Clear from memory
- script = null;
-
- // If Safari is used
- } else if ( jQuery.browser.safari )
- // Continually check to see if the document.readyState is valid
- jQuery.safariTimer = setInterval(function(){
- // loaded and complete are both valid states
- if ( document.readyState == "loaded" ||
- document.readyState == "complete" ) {
-
- // If either one are found, remove the timer
- clearInterval( jQuery.safariTimer );
- jQuery.safariTimer = null;
-
- // and execute any waiting functions
- jQuery.ready();
- }
- }, 10);
-
- // A fallback to window.onload, that will always work
- jQuery.event.add( window, "load", jQuery.ready );
-}
-jQuery.fn.extend({
- load: function( url, params, callback ) {
- if ( jQuery.isFunction( url ) )
- return this.bind("load", url);
-
- var off = url.indexOf(" ");
- if ( off >= 0 ) {
- var selector = url.slice(off, url.length);
- url = url.slice(0, off);
- }
-
- callback = callback || function(){};
-
- // Default to a GET request
- var type = "GET";
-
- // If the second parameter was provided
- if ( params )
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
- // We assume that it's the callback
- callback = params;
- params = null;
-
- // Otherwise, build a param string
- } else {
- params = jQuery.param( params );
- type = "POST";
- }
-
- var self = this;
-
- // Request the remote document
- jQuery.ajax({
- url: url,
- type: type,
- data: params,
- complete: function(res, status){
- // If successful, inject the HTML into all the matched elements
- if ( status == "success" || status == "notmodified" )
- // See if a selector was specified
- self.html( selector ?
- // Create a dummy div to hold the results
- jQuery("<div/>")
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
-
- // Locate the specified elements
- .find(selector) :
-
- // If not, just inject the full result
- res.responseText );
-
- // Add delay to account for Safari's delay in globalEval
- setTimeout(function(){
- self.each( callback, [res.responseText, status, res] );
- }, 13);
- }
- });
- return this;
- },
-
- serialize: function() {
- return jQuery.param(this.serializeArray());
- },
- serializeArray: function() {
- return this.map(function(){
- return jQuery.nodeName(this, "form") ?
- jQuery.makeArray(this.elements) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- (this.checked || /select|textarea/i.test(this.nodeName) ||
- /text|hidden|password/i.test(this.type));
- })
- .map(function(i, elem){
- var val = jQuery(this).val();
- return val == null ? null :
- val.constructor == Array ?
- jQuery.map( val, function(val, i){
- return {name: elem.name, value: val};
- }) :
- {name: elem.name, value: val};
- }).get();
- }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
- jQuery.fn[o] = function(f){
- return this.bind(o, f);
- };
-});
-
-var jsc = (new Date).getTime();
-
-jQuery.extend({
- get: function( url, data, callback, type ) {
- // shift arguments if data argument was ommited
- if ( jQuery.isFunction( data ) ) {
- callback = data;
- data = null;
- }
-
- return jQuery.ajax({
- type: "GET",
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- },
-
- getScript: function( url, callback ) {
- return jQuery.get(url, null, callback, "script");
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get(url, data, callback, "json");
- },
-
- post: function( url, data, callback, type ) {
- if ( jQuery.isFunction( data ) ) {
- callback = data;
- data = {};
- }
-
- return jQuery.ajax({
- type: "POST",
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- },
-
- ajaxSetup: function( settings ) {
- jQuery.extend( jQuery.ajaxSettings, settings );
- },
-
- ajaxSettings: {
- global: true,
- type: "GET",
- timeout: 0,
- contentType: "application/x-www-form-urlencoded",
- processData: true,
- async: true,
- data: null
- },
-
- // Last-Modified header cache for next request
- lastModified: {},
-
- ajax: function( s ) {
- var jsonp, jsre = /=(\?|%3F)/g, status, data;
-
- // Extend the settings, but re-extend 's' so that it can be
- // checked again later (in the test suite, specifically)
- s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
-
- // convert data if not already a string
- if ( s.data && s.processData && typeof s.data != "string" )
- s.data = jQuery.param(s.data);
-
- // Handle JSONP Parameter Callbacks
- if ( s.dataType == "jsonp" ) {
- if ( s.type.toLowerCase() == "get" ) {
- if ( !s.url.match(jsre) )
- s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
- } else if ( !s.data || !s.data.match(jsre) )
- s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
- s.dataType = "json";
- }
-
- // Build temporary JSONP function
- if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
- jsonp = "jsonp" + jsc++;
-
- // Replace the =? sequence both in the query string and the data
- if ( s.data )
- s.data = s.data.replace(jsre, "=" + jsonp);
- s.url = s.url.replace(jsre, "=" + jsonp);
-
- // We need to make sure
- // that a JSONP style response is executed properly
- s.dataType = "script";
-
- // Handle JSONP-style loading
- window[ jsonp ] = function(tmp){
- data = tmp;
- success();
- complete();
- // Garbage collect
- window[ jsonp ] = undefined;
- try{ delete window[ jsonp ]; } catch(e){}
- };
- }
-
- if ( s.dataType == "script" && s.cache == null )
- s.cache = false;
-
- if ( s.cache === false && s.type.toLowerCase() == "get" )
- s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime();
-
- // If data is available, append data to url for get requests
- if ( s.data && s.type.toLowerCase() == "get" ) {
- s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
-
- // IE likes to send both get and post data, prevent this
- s.data = null;
- }
-
- // Watch for a new set of requests
- if ( s.global && ! jQuery.active++ )
- jQuery.event.trigger( "ajaxStart" );
-
- // If we're requesting a remote document
- // and trying to load JSON or Script
- if ( !s.url.indexOf("http") && s.dataType == "script" ) {
- var head = document.getElementsByTagName("head")[0];
- var script = document.createElement("script");
- script.src = s.url;
-
- // Handle Script loading
- if ( !jsonp && (s.success || s.complete) ) {
- var done = false;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function(){
- if ( !done && (!this.readyState ||
- this.readyState == "loaded" || this.readyState == "complete") ) {
- done = true;
- success();
- complete();
- head.removeChild( script );
- }
- };
- }
-
- head.appendChild(script);
-
- // We handle everything using the script element injection
- return;
- }
-
- var requestDone = false;
-
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
- var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
-
- // Open the socket
- xml.open(s.type, s.url, s.async);
-
- // Set the correct header, if data is being sent
- if ( s.data )
- xml.setRequestHeader("Content-Type", s.contentType);
-
- // Set the If-Modified-Since header, if ifModified mode.
- if ( s.ifModified )
- xml.setRequestHeader("If-Modified-Since",
- jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
-
- // Set header so the called script knows that it's an XMLHttpRequest
- xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-
- // Allow custom headers/mimetypes
- if ( s.beforeSend )
- s.beforeSend(xml);
-
- if ( s.global )
- jQuery.event.trigger("ajaxSend", [xml, s]);
-
- // Wait for a response to come back
- var onreadystatechange = function(isTimeout){
- // The transfer is complete and the data is available, or the request timed out
- if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
- requestDone = true;
-
- // clear poll interval
- if (ival) {
- clearInterval(ival);
- ival = null;
- }
-
- status = isTimeout == "timeout" && "timeout" ||
- !jQuery.httpSuccess( xml ) && "error" ||
- s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
- "success";
-
- if ( status == "success" ) {
- // Watch for, and catch, XML document parse errors
- try {
- // process the data (runs the xml through httpData regardless of callback)
- data = jQuery.httpData( xml, s.dataType );
- } catch(e) {
- status = "parsererror";
- }
- }
-
- // Make sure that the request was successful or notmodified
- if ( status == "success" ) {
- // Cache Last-Modified header, if ifModified mode.
- var modRes;
- try {
- modRes = xml.getResponseHeader("Last-Modified");
- } catch(e) {} // swallow exception thrown by FF if header is not available
-
- if ( s.ifModified && modRes )
- jQuery.lastModified[s.url] = modRes;
-
- // JSONP handles its own success callback
- if ( !jsonp )
- success();
- } else
- jQuery.handleError(s, xml, status);
-
- // Fire the complete handlers
- complete();
-
- // Stop memory leaks
- if ( s.async )
- xml = null;
- }
- };
-
- if ( s.async ) {
- // don't attach the handler to the request, just poll it instead
- var ival = setInterval(onreadystatechange, 13);
-
- // Timeout checker
- if ( s.timeout > 0 )
- setTimeout(function(){
- // Check to see if the request is still happening
- if ( xml ) {
- // Cancel the request
- xml.abort();
-
- if( !requestDone )
- onreadystatechange( "timeout" );
- }
- }, s.timeout);
- }
-
- // Send the data
- try {
- xml.send(s.data);
- } catch(e) {
- jQuery.handleError(s, xml, null, e);
- }
-
- // firefox 1.5 doesn't fire statechange for sync requests
- if ( !s.async )
- onreadystatechange();
-
- // return XMLHttpRequest to allow aborting the request etc.
- return xml;
-
- function success(){
- // If a local callback was specified, fire it and pass it the data
- if ( s.success )
- s.success( data, status );
-
- // Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxSuccess", [xml, s] );
- }
-
- function complete(){
- // Process result
- if ( s.complete )
- s.complete(xml, status);
-
- // The request was completed
- if ( s.global )
- jQuery.event.trigger( "ajaxComplete", [xml, s] );
-
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active )
- jQuery.event.trigger( "ajaxStop" );
- }
- },
-
- handleError: function( s, xml, status, e ) {
- // If a local callback was specified, fire it
- if ( s.error ) s.error( xml, status, e );
-
- // Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxError", [xml, s, e] );
- },
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Determines if an XMLHttpRequest was successful or not
- httpSuccess: function( r ) {
- try {
- return !r.status && location.protocol == "file:" ||
- ( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
- jQuery.browser.safari && r.status == undefined;
- } catch(e){}
- return false;
- },
-
- // Determines if an XMLHttpRequest returns NotModified
- httpNotModified: function( xml, url ) {
- try {
- var xmlRes = xml.getResponseHeader("Last-Modified");
-
- // Firefox always returns 200. check Last-Modified date
- return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
- jQuery.browser.safari && xml.status == undefined;
- } catch(e){}
- return false;
- },
-
- httpData: function( r, type ) {
- var ct = r.getResponseHeader("content-type");
- var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
- var data = xml ? r.responseXML : r.responseText;
-
- if ( xml && data.documentElement.tagName == "parsererror" )
- throw "parsererror";
-
- // If the type is "script", eval it in global context
- if ( type == "script" )
- jQuery.globalEval( data );
-
- // Get the JavaScript object, if JSON is used.
- if ( type == "json" )
- data = eval("(" + data + ")");
-
- return data;
- },
-
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a ) {
- var s = [];
-
- // If an array was passed in, assume that it is an array
- // of form elements
- if ( a.constructor == Array || a.jquery )
- // Serialize the form elements
- jQuery.each( a, function(){
- s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
- });
-
- // Otherwise, assume that it's an object of key/value pairs
- else
- // Serialize the key/values
- for ( var j in a )
- // If the value is an array then the key names need to be repeated
- if ( a[j] && a[j].constructor == Array )
- jQuery.each( a[j], function(){
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
- });
- else
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
-
- // Return the resulting serialization
- return s.join("&").replace(/%20/g, "+");
- }
-
-});
-jQuery.fn.extend({
- show: function(speed,callback){
- return speed ?
- this.animate({
- height: "show", width: "show", opacity: "show"
- }, speed, callback) :
-
- this.filter(":hidden").each(function(){
- this.style.display = this.oldblock ? this.oldblock : "";
- if ( jQuery.css(this,"display") == "none" )
- this.style.display = "block";
- }).end();
- },
-
- hide: function(speed,callback){
- return speed ?
- this.animate({
- height: "hide", width: "hide", opacity: "hide"
- }, speed, callback) :
-
- this.filter(":visible").each(function(){
- this.oldblock = this.oldblock || jQuery.css(this,"display");
- if ( this.oldblock == "none" )
- this.oldblock = "block";
- this.style.display = "none";
- }).end();
- },
-
- // Save the old toggle function
- _toggle: jQuery.fn.toggle,
-
- toggle: function( fn, fn2 ){
- return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
- this._toggle( fn, fn2 ) :
- fn ?
- this.animate({
- height: "toggle", width: "toggle", opacity: "toggle"
- }, fn, fn2) :
- this.each(function(){
- jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
- });
- },
-
- slideDown: function(speed,callback){
- return this.animate({height: "show"}, speed, callback);
- },
-
- slideUp: function(speed,callback){
- return this.animate({height: "hide"}, speed, callback);
- },
-
- slideToggle: function(speed, callback){
- return this.animate({height: "toggle"}, speed, callback);
- },
-
- fadeIn: function(speed, callback){
- return this.animate({opacity: "show"}, speed, callback);
- },
-
- fadeOut: function(speed, callback){
- return this.animate({opacity: "hide"}, speed, callback);
- },
-
- fadeTo: function(speed,to,callback){
- return this.animate({opacity: to}, speed, callback);
- },
-
- animate: function( prop, speed, easing, callback ) {
- var opt = jQuery.speed(speed, easing, callback);
-
- return this[ opt.queue === false ? "each" : "queue" ](function(){
- opt = jQuery.extend({}, opt);
- var hidden = jQuery(this).is(":hidden"), self = this;
-
- for ( var p in prop ) {
- if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
- return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
-
- if ( p == "height" || p == "width" ) {
- // Store display property
- opt.display = jQuery.css(this, "display");
-
- // Make sure that nothing sneaks out
- opt.overflow = this.style.overflow;
- }
- }
-
- if ( opt.overflow != null )
- this.style.overflow = "hidden";
-
- opt.curAnim = jQuery.extend({}, prop);
-
- jQuery.each( prop, function(name, val){
- var e = new jQuery.fx( self, opt, name );
-
- if ( /toggle|show|hide/.test(val) )
- e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
- else {
- var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
- start = e.cur(true) || 0;
-
- if ( parts ) {
- var end = parseFloat(parts[2]),
- unit = parts[3] || "px";
-
- // We need to compute starting value
- if ( unit != "px" ) {
- self.style[ name ] = (end || 1) + unit;
- start = ((end || 1) / e.cur(true)) * start;
- self.style[ name ] = start + unit;
- }
-
- // If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] )
- end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
-
- e.custom( start, end, unit );
- } else
- e.custom( start, val, "" );
- }
- });
-
- // For JS strict compliance
- return true;
- });
- },
-
- queue: function(type, fn){
- if ( jQuery.isFunction(type) ) {
- fn = type;
- type = "fx";
- }
-
- if ( !type || (typeof type == "string" && !fn) )
- return queue( this[0], type );
-
- return this.each(function(){
- if ( fn.constructor == Array )
- queue(this, type, fn);
- else {
- queue(this, type).push( fn );
-
- if ( queue(this, type).length == 1 )
- fn.apply(this);
- }
- });
- },
-
- stop: function(){
- var timers = jQuery.timers;
-
- return this.each(function(){
- for ( var i = 0; i < timers.length; i++ )
- if ( timers[i].elem == this )
- timers.splice(i--, 1);
- }).dequeue();
- }
-
-});
-
-var queue = function( elem, type, array ) {
- if ( !elem )
- return;
-
- var q = jQuery.data( elem, type + "queue" );
-
- if ( !q || array )
- q = jQuery.data( elem, type + "queue",
- array ? jQuery.makeArray(array) : [] );
-
- return q;
-};
-
-jQuery.fn.dequeue = function(type){
- type = type || "fx";
-
- return this.each(function(){
- var q = queue(this, type);
-
- q.shift();
-
- if ( q.length )
- q[0].apply( this );
- });
-};
-
-jQuery.extend({
-
- speed: function(speed, easing, fn) {
- var opt = speed && speed.constructor == Object ? speed : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && easing.constructor != Function && easing
- };
-
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
- opt.duration :
- { slow: 600, fast: 200 }[opt.duration]) || 400;
-
- // Queueing
- opt.old = opt.complete;
- opt.complete = function(){
- jQuery(this).dequeue();
- if ( jQuery.isFunction( opt.old ) )
- opt.old.apply( this );
- };
-
- return opt;
- },
-
- easing: {
- linear: function( p, n, firstNum, diff ) {
- return firstNum + diff * p;
- },
- swing: function( p, n, firstNum, diff ) {
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
- }
- },
-
- timers: [],
-
- fx: function( elem, options, prop ){
- this.options = options;
- this.elem = elem;
- this.prop = prop;
-
- if ( !options.orig )
- options.orig = {};
- }
-
-});
-
-jQuery.fx.prototype = {
-
- // Simple function for setting a style value
- update: function(){
- if ( this.options.step )
- this.options.step.apply( this.elem, [ this.now, this ] );
-
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
- // Set display property to block for height/width animations
- if ( this.prop == "height" || this.prop == "width" )
- this.elem.style.display = "block";
- },
-
- // Get the current size
- cur: function(force){
- if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
- return this.elem[ this.prop ];
-
- var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
- return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
- },
-
- // Start an animation from one number to another
- custom: function(from, to, unit){
- this.startTime = (new Date()).getTime();
- this.start = from;
- this.end = to;
- this.unit = unit || this.unit || "px";
- this.now = this.start;
- this.pos = this.state = 0;
- this.update();
-
- var self = this;
- function t(){
- return self.step();
- }
-
- t.elem = this.elem;
-
- jQuery.timers.push(t);
-
- if ( jQuery.timers.length == 1 ) {
- var timer = setInterval(function(){
- var timers = jQuery.timers;
-
- for ( var i = 0; i < timers.length; i++ )
- if ( !timers[i]() )
- timers.splice(i--, 1);
-
- if ( !timers.length )
- clearInterval( timer );
- }, 13);
- }
- },
-
- // Simple 'show' function
- show: function(){
- // Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
- this.options.show = true;
-
- // Begin the animation
- this.custom(0, this.cur());
-
- // Make sure that we start at a small width/height to avoid any
- // flash of content
- if ( this.prop == "width" || this.prop == "height" )
- this.elem.style[this.prop] = "1px";
-
- // Start by showing the element
- jQuery(this.elem).show();
- },
-
- // Simple 'hide' function
- hide: function(){
- // Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
- this.options.hide = true;
-
- // Begin the animation
- this.custom(this.cur(), 0);
- },
-
- // Each step of an animation
- step: function(){
- var t = (new Date()).getTime();
-
- if ( t > this.options.duration + this.startTime ) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- this.options.curAnim[ this.prop ] = true;
-
- var done = true;
- for ( var i in this.options.curAnim )
- if ( this.options.curAnim[i] !== true )
- done = false;
-
- if ( done ) {
- if ( this.options.display != null ) {
- // Reset the overflow
- this.elem.style.overflow = this.options.overflow;
-
- // Reset the display
- this.elem.style.display = this.options.display;
- if ( jQuery.css(this.elem, "display") == "none" )
- this.elem.style.display = "block";
- }
-
- // Hide the element if the "hide" operation was done
- if ( this.options.hide )
- this.elem.style.display = "none";
-
- // Reset the properties, if the item has been hidden or shown
- if ( this.options.hide || this.options.show )
- for ( var p in this.options.curAnim )
- jQuery.attr(this.elem.style, p, this.options.orig[p]);
- }
-
- // If a callback was provided, execute it
- if ( done && jQuery.isFunction( this.options.complete ) )
- // Execute the complete function
- this.options.complete.apply( this.elem );
-
- return false;
- } else {
- var n = t - this.startTime;
- this.state = n / this.options.duration;
-
- // Perform the easing function, defaults to swing
- this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
- this.now = this.start + ((this.end - this.start) * this.pos);
-
- // Perform the next step of the animation
- this.update();
- }
-
- return true;
- }
-
-};
-
-jQuery.fx.step = {
- scrollLeft: function(fx){
- fx.elem.scrollLeft = fx.now;
- },
-
- scrollTop: function(fx){
- fx.elem.scrollTop = fx.now;
- },
-
- opacity: function(fx){
- jQuery.attr(fx.elem.style, "opacity", fx.now);
- },
-
- _default: function(fx){
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
- }
-};
-// The Offset Method
-// Originally By Brandon Aaron, part of the Dimension Plugin
-// http://jquery.com/plugins/project/dimensions
-jQuery.fn.offset = function() {
- var left = 0, top = 0, elem = this[0], results;
-
- if ( elem ) with ( jQuery.browser ) {
- var absolute = jQuery.css(elem, "position") == "absolute",
- parent = elem.parentNode,
- offsetParent = elem.offsetParent,
- doc = elem.ownerDocument,
- safari2 = safari && parseInt(version) < 522;
-
- // Use getBoundingClientRect if available
- if ( elem.getBoundingClientRect ) {
- box = elem.getBoundingClientRect();
-
- // Add the document scroll offsets
- add(
- box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
- box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)
- );
-
- // IE adds the HTML element's border, by default it is medium which is 2px
- // IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
- // IE 7 standards mode, the border is always 2px
- if ( msie ) {
- var border = jQuery("html").css("borderWidth");
- border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
- add( -border, -border );
- }
-
- // Otherwise loop through the offsetParents and parentNodes
- } else {
-
- // Initial element offsets
- add( elem.offsetLeft, elem.offsetTop );
-
- // Get parent offsets
- while ( offsetParent ) {
- // Add offsetParent offsets
- add( offsetParent.offsetLeft, offsetParent.offsetTop );
-
- // Mozilla and Safari > 2 does not include the border on offset parents
- // However Mozilla adds the border for table cells
- if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
- border( offsetParent );
-
- // Safari <= 2 doubles body offsets with an absolutely positioned element or parent
- if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
- absolute = true;
-
- // Get next offsetParent
- offsetParent = offsetParent.offsetParent;
- }
-
- // Get parent scroll offsets
- while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
- // Work around opera inline/table scrollLeft/Top bug
- if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
- // Subtract parent scroll offsets
- add( -parent.scrollLeft, -parent.scrollTop );
-
- // Mozilla does not add the border for a parent that has overflow != visible
- if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
- border( parent );
-
- // Get next parent
- parent = parent.parentNode;
- }
-
- // Safari doubles body offsets with an absolutely positioned element or parent
- if ( safari2 && absolute )
- add( -doc.body.offsetLeft, -doc.body.offsetTop );
- }
-
- // Return an object with top and left properties
- results = { top: top, left: left };
- }
-
- return results;
-
- function border(elem) {
- add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
- }
-
- function add(l, t) {
- left += parseInt(l) || 0;
- top += parseInt(t) || 0;
- }
-};
-})();
diff --git a/trunk/infrastructure/ace/www/lang_html.js b/trunk/infrastructure/ace/www/lang_html.js
deleted file mode 100644
index f9eff8e..0000000
--- a/trunk/infrastructure/ace/www/lang_html.js
+++ /dev/null
@@ -1,1685 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-grammars=(window.grammars||{});grammars["text.html.basic"]=(function(){var G=function(M,K,L){K.lastIndex=L;
-var J=K.exec(M);return !!(J&&J[0]);};var C=function(V,L,O,R,K,U,N,b,S){S=(S&&" "+S);var W=new Array(R.length+1);
-var P=L;var T=O[0].length;for(var X=0;X<N.length;X++){var a=N[X];var Z=K[a];if(Z<0){continue;}var Q=(W[a]===undefined);
-var J=L+T;var M=U[a];for(var Y=0;Y<M.length;Y++){J-=(O[M[Y]]||"").length;}if(Q){J-=(O[Z]||"").length;
-}if(J>P){b(V.substring(P,J),(S+W.join("")).substring(1));}P=J;if(Q){W[a]=" "+R[a];}else{delete W[a];}}if(P<L+T){b(V.substring(P,L+T),(S+W.join("")).substring(1));
-}};var F=function(R,U,L,Q,S,N,K,J,P,M,O){L.lastIndex=U;var T=L.exec(R);if(!T){return false;}if(T[Q]){return false;
-}O&&O();C(R,U,T,S,N,K,J,P,M);return[T[0].length];};var E=function(O,N,M,J,Q,L,K,P){return(M?F(O,N,M[0],M[1],J,M[2],M[3],Q,L,K,P):false);
-};var A=[/\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient)(\b)|([\s\S])/g,/(>)|([\s\S])/g,/(?=\n)|(\/)([igm]*)|([\s\S])/g,/\\.|([\s\S])/g,/(?=^\s*#\s*endif\b.*(?=\n))|([\s\S])/g,/(<\?)(\s*([\-_a-zA-Z0-9]+))|([\s\S])/g,/(<!)(DOCTYPE)|([\s\S])/g,/<[!%]\-\-|([\s\S])/g,/(<)(((?:([\-_a-zA-Z0-9]+)((:)))?([\-_a-zA-Z0-9:]+))((?=(\s[^>]*)?><\/\3>)))|([\s\S])/g,/(<\/?)((?:([\-_a-zA-Z0-9]+)((:)))?([\-_a-zA-Z0-9:]+))|([\s\S])/g,/(&)(([a-zA-Z0-9_\-]+|#[0-9]+|#x[0-9a-fA-F]+)(;))|([\s\S])/g,/&|([\s\S])/g,/<%@|([\s\S])/g,/<%[!=]?(?!\-\-)|([\s\S])/g,/<!\[CDATA\[|([\s\S])/g,/<|([\s\S])/g,/"|([\s\S])/g,/#(\\"|[^"])*(?="|(?=\n)\n?)|([\s\S])/g,/\-\-(\\"|[^"])*(?="|(?=\n)\n?)|([\s\S])/g,/'(?=[^']*?")|([\s\S])/g,/`(?=[^`]*?")|([\s\S])/g,/\\"(?!([^\\"]|\\[^"])*\\")(?=(\\[^"]|.)*?")|([\s\S])/g,/\\"|([\s\S])/g,/`|([\s\S])/g,/'|([\s\S])/g,/^\t*(TEXTILE)((?=\n))|([\s\S])/g,/(?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)|([\s\S])/g,/^\s*(#\s*(endif)(\b))|([\s\S])/g,/^\s*(#\s*(else)(\b))|([\s\S])/g,/|([\s\S])/g,/"""|/g,/\1|([\s\S])/g,/^\s*(end tell)|([\s\S])/g,/(?:^\s*([cC][rR][eE][aA][tT][eE])(\s+([aA][gG][gG][rR][eE][gG][aA][tT][eE]|[cC][oO][nN][vV][eE][rR][sS][iI][oO][nN]|[dD][aA][tT][aA][bB][aA][sS][eE]|[dD][oO][mM][aA][iI][nN]|[fF][uU][nN][cC][tT][iI][oO][nN]|[gG][rR][oO][uU][pP]|([uU][nN][iI][qQ][uU][eE]\s+)?[iI][nN][dD][eE][xX]|[lL][aA][nN][gG][uU][aA][gG][eE]|[oO][pP][eE][rR][aA][tT][oO][rR] [cC][lL][aA][sS][sS]|[oO][pP][eE][rR][aA][tT][oO][rR]|[rR][uU][lL][eE]|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE]|[tT][aA][bB][lL][eE]|[tT][aA][bB][lL][eE][sS][pP][aA][cC][eE]|[tT][rR][iI][gG][gG][eE][rR]|[tT][yY][pP][eE]|[uU][sS][eE][rR]|[vV][iI][eE][wW])(\s+)))((['"`]?)(\w+)(\7))|([\s\S])/g,/(?:^\s*([dD][rR][oO][pP])(\s+([aA][gG][gG][rR][eE][gG][aA][tT][eE]|[cC][oO][nN][vV][eE][rR][sS][iI][oO][nN]|[dD][aA][tT][aA][bB][aA][sS][eE]|[dD][oO][mM][aA][iI][nN]|[fF][uU][nN][cC][tT][iI][oO][nN]|[gG][rR][oO][uU][pP]|[iI][nN][dD][eE][xX]|[lL][aA][nN][gG][uU][aA][gG][eE]|[oO][pP][eE][rR][aA][tT][oO][rR] [cC][lL][aA][sS][sS]|[oO][pP][eE][rR][aA][tT][oO][rR]|[rR][uU][lL][eE]|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE]|[tT][aA][bB][lL][eE]|[tT][aA][bB][lL][eE][sS][pP][aA][cC][eE]|[tT][rR][iI][gG][gG][eE][rR]|[tT][yY][pP][eE]|[uU][sS][eE][rR]|[vV][iI][eE][wW])))|([\s\S])/g,/(?:\s*([dD][rR][oO][pP])(\s+([tT][aA][bB][lL][eE])(\s+(\w+)((\s+[cC][aA][sS][cC][aA][dD][eE])?(\b)))))|([\s\S])/g,/(?:^\s*([aA][lL][tT][eE][rR])(\s+([aA][gG][gG][rR][eE][gG][aA][tT][eE]|[cC][oO][nN][vV][eE][rR][sS][iI][oO][nN]|[dD][aA][tT][aA][bB][aA][sS][eE]|[dD][oO][mM][aA][iI][nN]|[fF][uU][nN][cC][tT][iI][oO][nN]|[gG][rR][oO][uU][pP]|[iI][nN][dD][eE][xX]|[lL][aA][nN][gG][uU][aA][gG][eE]|[oO][pP][eE][rR][aA][tT][oO][rR] [cC][lL][aA][sS][sS]|[oO][pP][eE][rR][aA][tT][oO][rR]|[rR][uU][lL][eE]|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE]|[tT][aA][bB][lL][eE]|[tT][aA][bB][lL][eE][sS][pP][aA][cC][eE]|[tT][rR][iI][gG][gG][eE][rR]|[tT][yY][pP][eE]|[uU][sS][eE][rR]|[vV][iI][eE][wW])(\s+)))|([\s\S])/g,/(?:\n\n\t\t\t\t# [nN][oO][rR][mM][aA][lL] [sS][tT][uU][fF][fF], [cC][aA][pP][tT][uU][rR][eE] 1\n\t\t\t\t \b([bB][iI][gG][iI][nN][tT]|[bB][iI][gG][sS][eE][rR][iI][aA][lL]|[bB][iI][tT]|[bB][oO][oO][lL][eE][aA][nN]|[bB][oO][xX]|[bB][yY][tT][eE][aA]|[cC][iI][dD][rR]|[cC][iI][rR][cC][lL][eE]|[dD][aA][tT][eE]|[dD][oO][uU][bB][lL][eE]\s[pP][rR][eE][cC][iI][sS][iI][oO][nN]|[iI][nN][eE][tT]|[iI][nN][tT]|[iI][nN][tT][eE][gG][eE][rR]|[lL][iI][nN][eE]|[lL][sS][eE][gG]|[mM][aA][cC][aA][dD][dD][rR]|[mM][oO][nN][eE][yY]|[oO][iI][dD]|[pP][aA][tT][hH]|[pP][oO][iI][nN][tT]|[pP][oO][lL][yY][gG][oO][nN]|[rR][eE][aA][lL]|[sS][eE][rR][iI][aA][lL]|[sS][mM][aA][lL][lL][iI][nN][tT]|[sS][yY][sS][dD][aA][tT][eE]|[tT][eE][xX][tT])(\b\n\n\t\t\t\t# [nN][uU][mM][eE][rR][iI][cC] [sS][uU][fF][fF][iI][xX], [cC][aA][pP][tT][uU][rR][eE] 2 + 3[iI]\n\t\t\t\t)|\b([bB][iI][tT]\s[vV][aA][rR][yY][iI][nN][gG]|[cC][hH][aA][rR][aA][cC][tT][eE][rR]\s(?:[vV][aA][rR][yY][iI][nN][gG])?|[tT][iI][nN][yY][iI][nN][tT]|[vV][aA][rR]\s[cC][hH][aA][rR]|[fF][lL][oO][aA][tT]|[iI][nN][tT][eE][rR][vV][aA][lL])(\((\d+)(\)\n\n\t\t\t\t# [oO][pP][tT][iI][oO][nN][aA][lL] [nN][uU][mM][eE][rR][iI][cC] [sS][uU][fF][fF][iI][xX], [cC][aA][pP][tT][uU][rR][eE] 4 + 5[iI]\n\t\t\t\t))|\b([cC][hH][aA][rR]|[nN][uU][mM][bB][eE][rR]|[vV][aA][rR][cC][hH][aA][rR]\d?)(\b(?:\((\d+)(\)))?(\n\n\t\t\t\t# [sS][pP][eE][cC][iI][aA][lL] [cC][aA][sS][eE], [cC][aA][pP][tT][uU][rR][eE] 6 + 7[iI] + 8[iI]\n\t\t\t\t))|\b([nN][uU][mM][eE][rR][iI][cC])(\b(?:\((\d+)(,(\d+)(\))))?(\n\n\t\t\t\t# [sS][pP][eE][cC][iI][aA][lL] [cC][aA][sS][eE], [cC][aA][pP][tT][uU][rR][eE][sS] 9, 10[iI], 11\n\t\t\t\t))|\b([tT][iI][mM][eE][sS])((?:\((\d+)(\)))((\s[wW][iI][tT][hH][oO][uU][tT][sS][tT][iI][mM][eE][sS][zZ][oO][nN][eE]\b)?(\n\n\t\t\t\t# [sS][pP][eE][cC][iI][aA][lL] [cC][aA][sS][eE], [cC][aA][pP][tT][uU][rR][eE][sS] 12, 13, 14[iI], 15\n\t\t\t\t)))|\b([tT][iI][mM][eE][sS][tT][aA][mM][pP])((?:([sS])(\((\d+)(\)(\s[wW][iI][tT][hH][oO][uU][tT][sS][tT][iI][mM][eE][sS][zZ][oO][nN][eE]\b)?)))?(\n\n\t\t\t)))|([\s\S])/g,/(?:\b((?:[pP][rR][iI][mM][aA][rR][yY]|[fF][oO][rR][eE][iI][gG][nN])\s+[kK][eE][yY]|[rR][eE][fF][eE][rR][eE][nN][cC][eE][sS]|[oO][nN]\s[dD][eE][lL][eE][tT][eE](\s+[cC][aA][sS][cC][aA][dD][eE])?|[cC][hH][eE][cC][kK]|[cC][oO][nN][sS][tT][rR][aA][iI][nN][tT])\b)|([\s\S])/g,/\b\d+\b|([\s\S])/g,/(?:\b([sS][eE][lL][eE][cC][tT](\s+[dD][iI][sS][tT][iI][nN][cC][tT])?|[iI][nN][sS][eE][rR][tT]\s+([iI][gG][nN][oO][rR][eE]\s+)?[iI][nN][tT][oO]|[uU][pP][dD][aA][tT][eE]|[dD][eE][lL][eE][tT][eE]|[fF][rR][oO][mM]|[sS][eE][tT]|[wW][hH][eE][rR][eE]|[gG][rR][oO][uU][pP]\s[bB][yY]|[oO][rR]|[lL][iI][kK][eE]|[aA][nN][dD]|[uU][nN][iI][oO][nN](\s+[aA][lL][lL])?|[hH][aA][vV][iI][nN][gG]|[oO][rR][dD][eE][rR]\s[bB][yY]|[lL][iI][mM][iI][tT]|([iI][nN][nN][eE][rR]|[cC][rR][oO][sS][sS])\s+[jJ][oO][iI][nN]|[jJ][oO][iI][nN]|[sS][tT][rR][aA][iI][gG][hH][tT]_[jJ][oO][iI][nN]|([lL][eE][fF][tT]|[rR][iI][gG][hH][tT])(\s+[oO][uU][tT][eE][rR])?\s+[jJ][oO][iI][nN]|[nN][aA][tT][uU][rR][aA][lL](\s+([lL][eE][fF][tT]|[rR][iI][gG][hH][tT])(\s+[oO][uU][tT][eE][rR])?)?\s+[jJ][oO][iI][nN])\b)|([\s\S])/g,/(?:\b([oO][nN]|(([iI][sS]\s+)?[nN][oO][tT]\s+)?[nN][uU][lL][lL])\b)|([\s\S])/g,/(?:\b[vV][aA][lL][uU][eE][sS]\b)|([\s\S])/g,/(?:\b([bB][eE][gG][iI][nN](\s+[wW][oO][rR][kK])?|[sS][tT][aA][rR][tT]\s+[tT][rR][aA][nN][sS][aA][cC][tT][iI][oO][nN]|[cC][oO][mM][mM][iI][tT](\s+[wW][oO][rR][kK])?|[rR][oO][lL][lL][bB][aA][cC][kK](\s+[wW][oO][rR][kK])?)\b)|([\s\S])/g,/(?:\b([gG][rR][aA][nN][tT](\s[wW][iI][tT][hH]\s[gG][rR][aA][nN][tT]\s[oO][pP][tT][iI][oO][nN])?|[rR][eE][vV][oO][kK][eE])\b)|([\s\S])/g,/(?:\b[iI][nN]\b)|([\s\S])/g,/(?:^\s*([cC][oO][mM][mM][eE][nN][tT]\s+[oO][nN]\s+([tT][aA][bB][lL][eE]|[cC][oO][lL][uU][mM][nN]|[aA][gG][gG][rR][eE][gG][aA][tT][eE]|[cC][oO][nN][sS][tT][rR][aA][iI][nN][tT]|[dD][aA][tT][aA][bB][aA][sS][eE]|[dD][oO][mM][aA][iI][nN]|[fF][uU][nN][cC][tT][iI][oO][nN]|[iI][nN][dD][eE][xX]|[oO][pP][eE][rR][aA][tT][oO][rR]|[rR][uU][lL][eE]|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE]|[tT][rR][iI][gG][gG][eE][rR]|[tT][yY][pP][eE]|[vV][iI][eE][wW]))\s+.*?\s+([iI][sS])\s+)|([\s\S])/g,/(?:\b[aA][sS]\b)|([\s\S])/g,/(?:\b([dD][eE][sS][cC]|[aA][sS][cC])\b)|([\s\S])/g,/\*|([\s\S])/g,/[!<>]?=|<>|<|>|([\s\S])/g,/\-|\+|\/|([\s\S])/g,/\|\||([\s\S])/g,/(?:\b([cC][uU][rR][rR][eE][nN][tT]_([dD][aA][tT][eE]|[tT][iI][mM][eE]([sS][tT][aA][mM][pP])?|[uU][sS][eE][rR])|([sS][eE][sS][sS][iI][oO][nN]|[sS][yY][sS][tT][eE][mM])_[uU][sS][eE][rR])\b)|([\s\S])/g,/(?:\b([aA][vV][gG]|[cC][oO][uU][nN][tT]|[mM][iI][nN]|[mM][aA][xX]|[sS][uU][mM])(?=\s*\())|([\s\S])/g,/(?:\b([cC][oO][nN][cC][aA][tT][eE][nN][aA][tT][eE]|[cC][oO][nN][vV][eE][rR][tT]|[lL][oO][wW][eE][rR]|[sS][uU][bB][sS][tT][rR][iI][nN][gG]|[tT][rR][aA][nN][sS][lL][aA][tT][eE]|[tT][rR][iI][mM]|[uU][pP][pP][eE][rR])\b)|([\s\S])/g,/(\w+?)(\.(\w+))|([\s\S])/g,/\b(for)(\s+(?=\({2}))|([\s\S])/g,/\b(for)(\s+((?:[^\s\\]|\\.)+)(\b))|([\s\S])/g,/\b(while|until)(\b)|([\s\S])/g,/\b(select)(\s+((?:[^\s\\]|\\.)+)(\b))|([\s\S])/g,/\b(case)(\b)|([\s\S])/g,/\b(if)(\b)|([\s\S])/g,/\-?\?>|([\s\S])/g,/(#)(.*?(?=\-?\?>))|([\s\S])/g,/\)|([\s\S])/g,/\(|([\s\S])/g,/(?![A-Za-z0-9_])|([\s\S])/g,/(&)(([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;))|([\s\S])/g,/(?=")|([\s\S])/g,/\\[\\']|([\s\S])/g,/(?:^\s*)((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*)(\s*(\())|([\s\S])/g,/(:)((?=\s*[A-Za-z_][A-Za-z0-9_:]*\s*(\()))|([\s\S])/g,/^\s*(?=[uU]?[rR]?""")|([\s\S])/g,/^\s*(?=[uU]?[rR]?''')|([\s\S])/g,/\]|([\s\S])/g,/(\\)((.*)((?=\n)\n?))|([\s\S])/g,/>|([\s\S])/g,/\\>|\\\\|([\s\S])/g,/^\s*(#\s*(endif)(\b))(.*(?=\n))|([\s\S])/g,/((")("")|""")|([\s\S])/g,/(""")|([\s\S])/g,/\}|([\s\S])/g,/((?!while|for|do|if|else|switch|catch|enumerate|return|r?iterate)(?=((?:\b[A-Za-z_](?=([A-Za-z0-9_]*))\3\b|::)*))\2)(\s*(\())|([\s\S])/g,/\*\/|([\s\S])/g,/(?=')|([\s\S])/g,/(?=\s*\()|([\s\S])/g,/^\t*(MARKDOWN)((?=\n))|([\s\S])/g,/\b((Arithmetic|Assertion|Attribute|EOF|Environment|FloatingPoint|IO|Import|Indentation|Index|Key|Lookup|Memory|Name|OS|Overflow|NotImplemented|Reference|Runtime|Standard|Syntax|System|Tab|Type|UnboundLocal|Unicode(Translate|Encode|Decode)?|Value|ZeroDivision)Error|(Deprecation|Future|Overflow|PendingDeprecation|Runtime|Syntax|User)?Warning|KeyboardInterrupt|NotImplemented|StopIteration|SystemExit|(Base)?Exception)\b|([\s\S])/g,/(?=\n)\n?|([\s\S])/g,/(?=(\\\s*\n))\1|([\s\S])/g,/\s*(?:(?=\})|(,))|([\s\S])/g,/^\s*(#\s*(else)(\b))(.*)|([\s\S])/g,/=[=~]?|!=?|<|>|&&|\|\||([\s\S])/g,/\-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])|([\s\S])/g,/(?=\n)|([\s\S])/g,/[a-zA-Z0-9_]+|([\s\S])/g,/(')|(\n)|([\s\S])/g,/\b(done)(\b)|([\s\S])/g,/\1[eimnosux]*|([\s\S])/g,/(?=\s|(?=\n)\n?|#)|([\s\S])/g,/(?=(@)(\s*[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*))|([\s\S])/g,/\b(item|container|(computer|disk|trash)\-object|disk|folder|((alias|application|document|internet location) )?file|clipping|package)s?\b|([\s\S])/g,/\b((Finder|desktop|information|preferences|clipping) )windows?\b|([\s\S])/g,/\b(preferences|(icon|column|list) view options|(label|column|alias list)s?)\b|([\s\S])/g,/\b(copy|find|sort|clean up|eject|empty( trash)|erase|reveal|update)\b|([\s\S])/g,/\b(insertion location|product version|startup disk|desktop|trash|home|computer container|finder preferences)\b|([\s\S])/g,/\b(visible)\b|([\s\S])/g,/^(?!\s*\*).*(?=\n)\n?|([\s\S])/g,/^\s*\*\s*(@access)(\s+((public|private|protected)|(.+))(\s*(?=\n)))|([\s\S])/g,/((https?|s?ftp|ftps|file|smb|afp|nfs|(x\-)?man|gopher|txmt):\/\/|mailto:)[\-:@a-zA-Z0-9_\.~%\+\/\?=&#]*[\-@a-zA-Z0-9_~%\+\/=&#]|([\s\S])/g,/(@xlink)(\s+(.+)(\s*(?=\n)))|([\s\S])/g,/@(a(bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final)\b|([\s\S])/g,/\{(@(link))(.+?\})|([\s\S])/g,/(\})|([\s\S])/g,/([A-Za-z]+|((\|)([^\|\n]*(\|))))(\s*(:))|([\s\S])/g,/:|([\s\S])/g,/,|([\s\S])/g,/^\t*(HTML)((?=\n))|([\s\S])/g,/(@[^ \(]+)(\()|([\s\S])/g,/@\w*|([\s\S])/g,/final|([\s\S])/g,/\w+|([\s\S])/g,/(?=(^\s*)?<\?)|([\s\S])/g,/\b([a-zA-Z_][a-zA-Z_0-9]*)(\s*(=)((?!=)))|([\s\S])/g,/\}|/g,/|(?=#)|(;)|([\s\S])/g,/(?=#)|(;)|([\s\S])/g,/\bconst\b|([\s\S])/g,/(?=(?:\/\/|\/\*))|(?=\n)|([\s\S])/g,/(\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*?\b)|([\s\S])/g,/^=end|([\s\S])/g,/\b(esac)(\b)|([\s\S])/g,/\b(?:in)\b|([\s\S])/g,/^\s*(script)(\s+(\w+))|([\s\S])/g,/^\s*(to|on)(\s+([A-Za-z][A-Za-z0-9_]*)((\()((?:(\w+(?:\s*,\s*\w+)*))?(\)))))|([\s\S])/g,/^\s*(on)(\s+(\w+)((?=\s+(above|against|apart from|around|aside from|at|below|beneath|beside|between|by|for|from|instead of|into|on|onto|out of|over|thru|under)\s+)))|([\s\S])/g,/(?:([eE][xX][tT][eE][nN][dD][sS]))(\s+([a-zA-Z0-9_]+)(\s*))|([\s\S])/g,/(?:([iI][mM][pP][lL][eE][mM][eE][nN][tT][sS]))(\s+([a-zA-Z0-9_]+)(\s*))|([\s\S])/g,/\*\)|([\s\S])/g,/(>(<)(\/))((\2)(>))|([\s\S])/g,/(?=\})|([\s\S])/g,/(')([^'\\]*('))|([\s\S])/g,/(`)([^`\\]*(`))|([\s\S])/g,/(")([^"#]*("))|([\s\S])/g,/%\{|([\s\S])/g,/(\))|([\s\S])/g,/^\s*(end script)|([\s\S])/g,/"|/g,/((")|")|(\n)|([\s\S])/g,/(")|(\n)|([\s\S])/g,/(?!<?<<\s*(HTML|XML|SQL|JAVASCRIPT)\s*(?=\n))|([\s\S])/g,/(<<<)(\s*(HTML)(\s*(?=\n)\n?))|([\s\S])/g,/(<<<)(\s*(XML)(\s*(?=\n)\n?))|([\s\S])/g,/(<<<)(\s*(SQL)(\s*(?=\n)\n?))|([\s\S])/g,/(<<<)(\s*(JAVASCRIPT)(\s*(?=\n)\n?))|([\s\S])/g,/\\[\$`"\\\n]|([\s\S])/g,/\s*SQL(?=\n)|([\s\S])/g,/(\/?>)|([\s\S])/g,/^(XML)((;?)((?=\n)\n?))|([\s\S])/g,/;;|([\s\S])/g,/(\(|(?=\S))|([\s\S])/g,/\)|/g,/\]\](?=>)|([\s\S])/g,/\}[eimnosux]*|([\s\S])/g,/\\[0-7]{1,3}|([\s\S])/g,/\\x[0-9A-Fa-f]{1,2}|([\s\S])/g,/\\[nrt\\\$"]|([\s\S])/g,/((\$\{)(([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*)(\})))|([\s\S])/g,/((\$)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))((?:(\->)((?:(([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))|(\$([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))))|(\[)((?:(\d+)|((\$)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))|(\w+)|(.*?))(\])))?)|([\s\S])/g,/(?=(\$([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*)(?:\[([a-zA-Z0-9_\u007f-\u00ff]+|\$([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))\]|\->([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*)(\(.*?\))?)?|\$\{(?:([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*)(\[(?:([a-zA-Z0-9_\u007f-\u00ff]+|\$([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*")\])?)\}))\{|([\s\S])/g,/\||([\s\S])/g,/\-\-\s*>|([\s\S])/g,/\-\-|([\s\S])/g,/\)[eimnosux]*|([\s\S])/g,/((\$)(GLOBALS|_(ENV|SERVER|SESSION)))|\b(global)\b|([\s\S])/g,/\b__(all|bases|class|debug|dict|doc|file|members|metaclass|methods|name|slots|weakref)__\b|([\s\S])/g,/\*\/|(?=<\/script)|([\s\S])/g,/(?=\)|:)|([\s\S])/g,/\(|,|/g,/\s*|([\s\S])/g,/(?=(@)(\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\())|([\s\S])/g,/(\()|([\s\S])/g,/\b((?:[a-z]\w*\.)*[A-Z]+\w*)<|([\s\S])/g,/\b((?:[a-z]\w*\.)*[A-Z]+\w*)(?=\[)|([\s\S])/g,/\b(?:[a-z]\w*(\.))*([A-Z]+\w*\b)|([\s\S])/g,/^\s*(tell)(\s+(?=app(lication)?\s+"(?:[tT][eE][xX][tT][mM][aA][tT][eE])")(?!.*\bto\b))|([\s\S])/g,/^\s*(tell)(\s+(?=app(lication)?\s+"(?:[fF][iI][nN][dD][eE][rR])")(?!.*\bto\b))|([\s\S])/g,/^\s*(tell)(\s+(?=app(lication)?\s+"(?:[sS][yY][sS][tT][eE][mM] [eE][vV][eE][nN][tT][sS])")(?!.*\bto\b))|([\s\S])/g,/^\s*(tell)(\s+(?=app(lication)?\s+"(?:[iI][tT][uU][nN][eE][sS])")(?!.*\bto\b))|([\s\S])/g,/^\s*(tell)(\s+(?=app(lication)?\b)(?!.*\bto\b))|([\s\S])/g,/^\s*(tell)(\s+(?=app(lication)?\b)(?=.*?to tell\s*(?!.*\bto\b)))|([\s\S])/g,/^\s*(tell)(\s+.*?(to tell)(\s*(?!.*\bto\b)))|([\s\S])/g,/^\s*(tell)(\s+(?!.*\bto\b))|([\s\S])/g,/(?=\n)|(?=#)|([\s\S])/g,/(\){2})|([\s\S])/g,/^\t*(\3)((?=\n))|([\s\S])/g,/\b(namespace)(\b\s*(?=(([_A-Za-z][_A-Za-z0-9]*\b)?))\3)|([\s\S])/g,/\b(class|struct)(\b\s*(?=(([_A-Za-z][_A-Za-z0-9]*\b)?))\3)|([\s\S])/g,/\b(extern)((?=\s*"))|([\s\S])/g,/(\()|\s*((?=\n)\n?|#.*(?=\n)\n?)|([\s\S])/g,/(?=[A-Za-z_][A-Za-z0-9_]*)|([\s\S])/g,/(\]{2})|([\s\S])/g,/^\1(?=\n)|([\s\S])/g,/(^\s*)?((((?:<)\?(?:[pP][hH][pP]|=)?)((\s*)((\?)(>))))(\1|(\s*(?=\n)\n)?))|([\s\S])/g,/^\s*(?=<\?)|([\s\S])/g,/\?>|/g,/((<)|<)(\?(?:[pP][hH][pP]|=)?)|([\s\S])/g,/(<)(\?(?:[pP][hH][pP]|=)?)|([\s\S])/g,/^(?=\s*[A-Z0-9_]+\s*(\{|\(|,))|([\s\S])/g,/(:)|([\s\S])/g,/\s+|([\s\S])/g,/\s*(array)(\s*(&)?(\s*((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))(\s*(=)(\s*(array)(\s*(\())))))|([\s\S])/g,/\s*(array)(\s*(&)?(\s*((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))((?:\s*(=)(\s*(?:([nN][uU][lL][lL])|(\S.*?))?))?(\s*(?=,|\))))))|([\s\S])/g,/\s*([A-Za-z_][A-Za-z_0-9]*)(\s*(&)?(\s*((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))((?:\s*(=)(\s*(?:([nN][uU][lL][lL])|(\S.*?))?))?(\s*(?=,|\))))))|([\s\S])/g,/(\s*&)?(\s*((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))(\s*(?=,|\))))|([\s\S])/g,/(\s*&)?(\s*((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))((?:\s*(=)(\s*))(\s*)))|([\s\S])/g,/\/\*|([\s\S])/g,/^<<\-?\w+|([\s\S])/g,/(?=\n)|"|([\s\S])/g,/\\(x[0-9a-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)|([\s\S])/g,/\s*(?:(,)|(?=\)))|([\s\S])/g,/(\))(\s*(?:(:)|(.*(?=\n)\n?)))|([\s\S])/g,/(class|(?:@)?interface|enum)(\s+(\w+))|([\s\S])/g,/extends|([\s\S])/g,/(implements)(\s)|([\s\S])/g,/\{|([\s\S])/g,/\/(?=\S.*\/)|([\s\S])/g,/%r\{|([\s\S])/g,/(\})((\s*\n)?)|([\s\S])/g,/(\s*(?=\n)\n)?|([\s\S])/g,/<\?(?:[pP][hH][pP]|=)?|([\s\S])/g,/>|[^\w\s,<]|([\s\S])/g,/'|"|/g,/(\$)([\-\*@#\?\$!0_])|([\s\S])/g,/(\$)([1-9])|([\s\S])/g,/(\$)([a-zA-Z_][a-zA-Z0-9_]*)|([\s\S])/g,/\$\{|([\s\S])/g,/^[\s\S]|/g,/\s|/g,/(?::|\.)(?=\s|;|&|(?=\n))|([\s\S])/g,/\b(?:alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|dirs|disown|echo|enable|eval|exec|exit|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|times|trap|true|type|ulimit|umask|unalias|unset|wait)\b|([\s\S])/g,/(?=\n)|(?![\-a-z])|([\s\S])/g,/\b(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|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|\-moz\-border\-radius|opacity|orphans|outline\-color|outline\-style|outline\-width|outline|overflow(\-[xy])?|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)\b|([\s\S])/g,/\b(?:void|boolean|byte|char|short|int|float|long|double)(\[\])*\b|([\s\S])/g,/(?=not)impossible|([\s\S])/g,/^(PYTHON)((?=\n))|([\s\S])/g,/(?=,|;|\})|([\s\S])/g,/(?=<<<\s*(HTML|XML|SQL|JAVASCRIPT)\s*(?=\n))|([\s\S])/g,/\/\*\*(?:#@\+)?\s*(?=\n)|([\s\S])/g,/(\/\/)(.*?((?=\n)\n?|(?=\?>)))|([\s\S])/g,/(#)(.*?((?=\n)\n?|(?=\?>)))|([\s\S])/g,/^(?:\s*([iI][nN][tT][eE][rR][fF][aA][cC][eE])(\s+([a-zA-Z0-9_]+)(\s*([eE][xX][tT][eE][nN][dD][sS])?(\s*))))|([\s\S])/g,/(?:^\s*([aA][bB][sS][tT][rR][aA][cC][tT]|[fF][iI][nN][aA][lL])?(\s*([cC][lL][aA][sS][sS])(\s+([a-zA-Z0-9_]+)(\s*))))|([\s\S])/g,/\b(break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|return|switch|use|while)\b|([\s\S])/g,/(?:\b((?:[rR][eE][qQ][uU][iI][rR][eE]|[iI][nN][cC][lL][uU][dD][eE])(?:_[oO][nN][cC][eE])?)(\b\s*))|([\s\S])/g,/\b(catch)(\b\s*\(\s*([A-Za-z_][A-Za-z_0-9]*)(\s*((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))(\s*\))))|([\s\S])/g,/\b(catch|try|throw|exception)\b|([\s\S])/g,/(?:^\s*)((?:(?:final|abstract|public|private|protected|static)\s+)*)((function)((?:\s+|(\s*&\s*))((?:(__(?:call|(?:con|de)struct|get|(?:is|un)?set|tostring|clone|set_state|sleep|wakeup|autoload))|([a-zA-Z0-9_]+))(\s*(\()))))|([\s\S])/g,/(?:\b([rR][eE][aA][lL]|[dD][oO][uU][bB][lL][eE]|[fF][lL][oO][aA][tT]|[iI][nN][tT]([eE][gG][eE][rR])?|[bB][oO][oO][lL]([eE][aA][nN])?|[sS][tT][rR][iI][nN][gG]|[cC][lL][aA][sS][sS]|[cC][lL][oO][nN][eE]|[vV][aA][rR]|[fF][uU][nN][cC][tT][iI][oO][nN]|[iI][nN][tT][eE][rR][fF][aA][cC][eE]|[pP][aA][rR][eE][nN][tT]|[sS][eE][lL][fF]|[oO][bB][jJ][eE][cC][tT])\b)|([\s\S])/g,/(?:\b([gG][lL][oO][bB][aA][lL]|[aA][bB][sS][tT][rR][aA][cC][tT]|[cC][oO][nN][sS][tT]|[eE][xX][tT][eE][nN][dD][sS]|[iI][mM][pP][lL][eE][mM][eE][nN][tT][sS]|[fF][iI][nN][aA][lL]|[pP]([rR]([iI][vV][aA][tT][eE]|[oO][tT][eE][cC][tT][eE][dD])|[uU][bB][lL][iI][cC])|[sS][tT][aA][tT][iI][cC])\b)|([\s\S])/g,/(::)((?:([A-Za-z_][A-Za-z_0-9]*)(\s*\()|((\$+)([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))|([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*))?)|([\s\S])/g,/(<<<)(\s*([a-zA-Z_]+[a-zA-Z0-9_]*))|([\s\S])/g,/=>|([\s\S])/g,/&(?=\s*(\$|new|[A-Za-z_][A-Za-z_0-9]+(?=\s*\()))|([\s\S])/g,/;|([\s\S])/g,/(@)|([\s\S])/g,/(\-\-|\+\+)|([\s\S])/g,/(\-|\+|\*|\/|%)|([\s\S])/g,/(?:(!|&&|\|\|)|\b([aA][nN][dD]|[oO][rR]|[xX][oO][rR]|[aA][sS])\b)|([\s\S])/g,/<<|>>|~|\^|&|\||([\s\S])/g,/(===|==|!==|!=|<=|>=|<>|<|>)|([\s\S])/g,/(\.=|\.)|([\s\S])/g,/=|([\s\S])/g,/(?:\b([iI][nN][sS][tT][aA][nN][cC][eE][oO][fF])(\b(?:\s+(\w+))?))|([\s\S])/g,/[a-zA-Z0-9_\u007f-\u00ff]|/g,/(\->)(([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*?)(\b))|([\s\S])/g,/^(RUBY)((?=\n))|([\s\S])/g,/\b(audio (data|file))\b|([\s\S])/g,/\b(alias(es)?|(Classic|local|network|system|user) domain objects?|disk( item)?s?|domains?|file( package)?s?|folders?|items?)\b|([\s\S])/g,/\b(delete|open|move)\b|([\s\S])/g,/\b(folder actions?|scripts?)\b|([\s\S])/g,/\b(attach action to|attached scripts|edit action of|remove action from)\b|([\s\S])/g,/\b(movie data|movie file)\b|([\s\S])/g,/\b(log out|restart|shut down|sleep)\b|([\s\S])/g,/\b(((application |desk accessory )?process|(check|combo )?box)(es)?|(action|attribute|browser|(busy|progress|relevance) indicator|color well|column|drawer|group|grow area|image|incrementor|list|menu( bar)?( item)?|(menu |pop up |radio )?button|outline|(radio|tab|splitter) group|row|scroll (area|bar)|sheet|slider|splitter|static text|table|text (area|field)|tool bar|UI element|window)s?)\b|([\s\S])/g,/\b(click|key code|keystroke|perform|select)\b|([\s\S])/g,/\b(property list (file|item))\b|([\s\S])/g,/\b(annotation|QuickTime (data|file)|track)s?\b|([\s\S])/g,/\b((abort|begin|end) transaction)\b|([\s\S])/g,/\b(XML (attribute|data|element|file)s?)\b|([\s\S])/g,/\b(print settings|users?|login items?)\b|([\s\S])/g,/\[|([\s\S])/g,/\b(colors?|documents?|items?|windows?)\b|([\s\S])/g,/\b(close|count|delete|duplicate|exists|make|move|open|print|quit|save|activate|select|data size)\b|([\s\S])/g,/\b(name|frontmost|version)\b|([\s\S])/g,/\b(selection)\b|([\s\S])/g,/\b(attachments?|attribute runs?|characters?|paragraphs?|texts?|words?)\b|([\s\S])/g,/\s*(?:(,)|(?=(?=\n)\n?|[\):]))|([\s\S])/g,/<%+#|([\s\S])/g,/<%+(?!>)=?|([\s\S])/g,/<\?r(?!>)=?|([\s\S])/g,/\b(function)(\s+((?:[^\s\\]|\\.)+)((?:\s*(\(\)))?))|([\s\S])/g,/\b((?:[^\s\\]|\\.)+)(\s*(\(\)))|([\s\S])/g,/'''|/g,/((')('')|''')|([\s\S])/g,/(''')|([\s\S])/g,/<\/(?:script|SCRIPT)|/g,/(>)((?:\s*\n)?)|([\s\S])/g,/(?!\-\-)%>|([\s\S])/g,/"\/(?=(?=((\\.|[^"\/])+))\1\/[imsxeADSUXu]*")|([\s\S])/g,/^(APPLESCRIPT)((?=\n))|([\s\S])/g,/\b(true|false|null)\b|([\s\S])/g,/\b(this|super)\b|([\s\S])/g,/\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|\-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\b|([\s\S])/g,/(\.)?(\b([A-Z][A-Z0-9_]+)(?!<|\.class|\s*\w+\s*=)\b)|([\s\S])/g,/([uU]r)(""")|([\s\S])/g,/([uU]R)(""")|([\s\S])/g,/(r)(""")|([\s\S])/g,/(R)(""")|([\s\S])/g,/([uU])(""")|([\s\S])/g,/([uU]r)(")|([\s\S])/g,/([uU]R)(")|([\s\S])/g,/(r)(")|([\s\S])/g,/(R)(")|([\s\S])/g,/([uU])(")|([\s\S])/g,/(""")((?=\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)))|([\s\S])/g,/(")((?=\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)))|([\s\S])/g,/(")|([\s\S])/g,/\\['\\]|([\s\S])/g,/;|/g,/\s*(\})|([\s\S])/g,/(?=\{|implements)|([\s\S])/g,/(?=\{)|([\s\S])/g,/\b(a|abbr|acronym|address|area|b|base|big|blockquote|body|br|button|caption|cite|code|col|colgroup|dd|del|dfn|div|dl|dt|em|fieldset|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|meta|noframes|noscript|object|ol|optgroup|option|p|param|pre|q|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|ul|var)\b|([\s\S])/g,/(\.)([a-zA-Z0-9_\-]+)|([\s\S])/g,/(#)([a-zA-Z][a-zA-Z0-9_\-]*)|([\s\S])/g,/(:+)(\b(after|before|first\-child|first\-letter|first\-line|selection)\b)|([\s\S])/g,/(:)(\b(active|hover|link|visited|focus)\b)|([\s\S])/g,/(\[)(\s*(\-?[_a-zA-Z\\\u0080-\uffff][_a-zA-Z0-9\-\\\u0080-\uffff]*)((?:\s*([~\|\^\$\*]?=)(\s*(?:(\-?[_a-zA-Z\\\u0080-\uffff][_a-zA-Z0-9\-\\\u0080-\uffff]*)|((?=((['"])((?:[^\\]|\\.)*?(\10))))\9))))?(\s*(\]))))|([\s\S])/g,/^\s*#\s*endif\b.*(?=\n)|([\s\S])/g,/(?=\s*\[)|([\s\S])/g,/[A-Za-z_][A-Za-z0-9_]*|([\s\S])/g,/#\{(\})|([\s\S])/g,/#\{|([\s\S])/g,/(#@)([a-zA-Z_]\w*)|([\s\S])/g,/(#@@)([a-zA-Z_]\w*)|([\s\S])/g,/(#\$)([a-zA-Z_]\w*)|([\s\S])/g,/\s*(;|(?=\}))|([\s\S])/g,/\b(absolute|all\-scroll|always|armenian|auto|baseline|below|bidi\-override|block|bold|bolder|both|bottom|break\-all|break\-word|capitalize|center|char|circle|cjk\-ideographic|col\-resize|collapse|crosshair|dashed|decimal\-leading\-zero|decimal|default|disabled|disc|distribute\-all\-lines|distribute\-letter|distribute\-space|distribute|dotted|double|e\-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana\-iroha|hiragana|horizontal|ideograph\-alpha|ideograph\-numeric|ideograph\-parenthesis|ideograph\-space|inactive|inherit|inline\-block|inline|inset|inside|inter\-ideograph|inter\-word|italic|justify|katakana\-iroha|katakana|keep\-all|left|lighter|line\-edge|line\-through|line|list\-item|loose|lower\-alpha|lower\-greek|lower\-latin|lower\-roman|lowercase|lr\-tb|ltr|medium|middle|move|n\-resize|ne\-resize|newspaper|no\-drop|no\-repeat|nw\-resize|none|normal|not\-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat\-x|repeat\-y|repeat|right|ridge|row\-resize|rtl|s\-resize|scroll|se\-resize|separate|small\-caps|solid|square|static|strict|super|sw\-resize|table\-footer\-group|table\-header\-group|tb\-rl|text\-bottom|text\-top|text|thick|thin|top|transparent|underline|upper\-alpha|upper\-latin|upper\-roman|uppercase|vertical\-ideographic|vertical\-text|visible|w\-resize|wait|whitespace|zero)\b|([\s\S])/g,/(\b(?:[aA][rR][iI][aA][lL]|[cC][eE][nN][tT][uU][rR][yY]|[cC][oO][mM][iI][cC]|[cC][oO][uU][rR][iI][eE][rR]|[gG][aA][rR][aA][mM][oO][nN][dD]|[gG][eE][oO][rR][gG][iI][aA]|[hH][eE][lL][vV][eE][tT][iI][cC][aA]|[iI][mM][pP][aA][cC][tT]|[lL][uU][cC][iI][dD][aA]|[sS][yY][mM][bB][oO][lL]|[sS][yY][sS][tT][eE][mM]|[tT][aA][hH][oO][mM][aA]|[tT][iI][mM][eE][sS]|[tT][rR][eE][bB][uU][cC][hH][eE][tT]|[uU][tT][oO][pP][iI][aA]|[vV][eE][rR][dD][aA][nN][aA]|[wW][eE][bB][dD][iI][nN][gG][sS]|[sS][aA][nN][sS]\-[sS][eE][rR][iI][fF]|[sS][eE][rR][iI][fF]|[mM][oO][nN][oO][sS][pP][aA][cC][eE])\b)|([\s\S])/g,/\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b|([\s\S])/g,/\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\b|([\s\S])/g,/(\-|\+)?\s*[0-9]+(\.[0-9]+)?|([\s\S])/g,/\d|/g,/(px|pt|cm|mm|in|em|ex|pc)\b|%|([\s\S])/g,/%|([\s\S])/g,/(#)(([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b)|([\s\S])/g,/(rgb|url|attr|counter|counters)(\s*(\())|([\s\S])/g,/!\s*important|([\s\S])/g,/%>|([\s\S])/g,/(\])|([\s\S])/g,/\[|,|/g,/\s*(?![\],])|([\s\S])/g,/\b(sizeof)\b|([\s\S])/g,/(<<)(\-("|'|)(RUBY)(\3))|([\s\S])/g,/(<<)(("|'|)(RUBY)(\3))|([\s\S])/g,/(<<)(\-("|'|)(PYTHON)(\3))|([\s\S])/g,/(<<)(("|'|)(PYTHON)(\3))|([\s\S])/g,/(<<)(\-("|'|)(APPLESCRIPT)(\3))|([\s\S])/g,/(<<)(("|'|)(APPLESCRIPT)(\3))|([\s\S])/g,/(<<)(\-("|'|)(HTML)(\3))|([\s\S])/g,/(<<)(("|'|)(HTML)(\3))|([\s\S])/g,/(<<)(\-("|'|)(MARKDOWN)(\3))|([\s\S])/g,/(<<)(("|'|)(MARKDOWN)(\3))|([\s\S])/g,/(<<)(\-("|'|)(TEXTILE)(\3))|([\s\S])/g,/(<<)(("|'|)(TEXTILE)(\3))|([\s\S])/g,/(<<)(\-("|'|)\\?(\w+)(\3))|([\s\S])/g,/(<<)(("|'|)\\?(\w+)(\3))|([\s\S])/g,/;|&|(?=\n)|([\s\S])/g,/\s*((?=;|\}))|([\s\S])/g,/(url)(\s*(\()(\s*))|([\s\S])/g,/(?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\[)|([\s\S])/g,/(\[)|([\s\S])/g,/\s*\2(?=\n)|([\s\S])/g,/%(\d+\$)?[#0\- \+']*[,;:_]?((\-?\d+)|\*(\-?\d+\$)?)?(\.((\-?\d+)|\*(\-?\d+\$)?)?)?(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?[diouxXDOUeEfFgGaACcSspn%]|([\s\S])/g,/(\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})|(\\N\{[a-zA-Z ]+\})|([\s\S])/g,/(<\/)(((?:[sS][tT][yY][lL][eE]))((>)((?:\s*\n)?)))|([\s\S])/g,/(\/)([imsxeADSUXu]*)(')|([\s\S])/g,/(\{)(\d+(,\d+)?(\}))|([\s\S])/g,/(\\){1,2}[\.\$\^\[\]\{\}]|([\s\S])/g,/\\{1,2}[\\']|([\s\S])/g,/\[(?:\^?\])?|([\s\S])/g,/[\$\^\+\*]|([\s\S])/g,/\b(?:if|then|else|elif|fi|for|in|do|done|select|case|continue|esac|while|until|return)\b|([\s\S])/g,/\b(?:export|declare|typeset|local|readonly)\b|([\s\S])/g,/(?=\w+\s*\()|([\s\S])/g,/(?:\b([nN][eE][wW])(\s+(?:(\$[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*)|(\w+)))|(\w+)((?=::)))|([\s\S])/g,/\b(basestring|bool|buffer|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|object|open|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\b|([\s\S])/g,/\-\-%?>|([\s\S])/g,/\){2}|([\s\S])/g,/^\s*(#\s*(pragma\s+mark)(\s+(.*)))|([\s\S])/g,/\\(?:[0-7]{1,3}|x[\da-fA-F]{1,2}|.)|([\s\S])/g,/\}|(?=;)|([\s\S])/g,/(\w+)(\s*\()|([\s\S])/g,/(?=\w.*\s+\w+\s*\()|([\s\S])/g,/#(\\'|[^'])*(?='|(?=\n)\n?)|([\s\S])/g,/\-\-(\\'|[^'])*(?='|(?=\n)\n?)|([\s\S])/g,/\\'(?!([^\\']|\\[^'])*\\')(?=(\\[^']|.)*?')|([\s\S])/g,/`(?=[^`]*?')|([\s\S])/g,/"(?=[^"]*?')|([\s\S])/g,/\\'|([\s\S])/g,/(?:\b([tT][rR][uU][eE]|[fF][aA][lL][sS][eE]|[nN][uU][lL][lL]|__([fF][iI][lL][eE]|[fF][uU][nN][cC][tT][iI][oO][nN]|[cC][lL][aA][sS][sS]|[mM][eE][tT][hH][oO][dD]|[lL][iI][nN][eE])__|[oO][nN]|[oO][fF][fF]|[yY][eE][sS]|[nN][oO]|[nN][lL]|[bB][rR]|[tT][aA][bB])\b)|([\s\S])/g,/\b(DEFAULT_INCLUDE_PATH|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|(RECOVERABLE_)?ERROR|NOTICE|PARSE|STRICT|USER_(ERROR|NOTICE|WARNING)|WARNING)|PEAR_(EXTENSION_DIR|INSTALL_DIR)|PHP_(BINDIR|CONFIG_FILE_PATH|DATADIR|E(OL|XTENSION_DIR)|L(IBDIR|OCALSTATEDIR)|O(S|UTPUT_HANDLER_CONT|UTPUT_HANDLER_END|UTPUT_HANDLER_START)|SYSCONFDIR|VERSION))\b|([\s\S])/g,/\b(A(B(DAY_([1-7])|MON_([0-9]{1,2}))|LT_DIGITS|M_STR|SSERT_(ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(ASE_(LOWER|UPPER)|HAR_MAX|O(DESET|NNECTION_(ABORTED|NORMAL|TIMEOUT)|UNT_(NORMAL|RECURSIVE))|REDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)|RNCYSTR|RYPT_(BLOWFISH|EXT_DES|MD5|SALT_LENGTH|STD_DES)|URRENCY_SYMBOL)|D(AY_([1-7])|ECIMAL_POINT|IRECTORY_SEPARATOR|_(FMT|T_FMT))|E(NT_(COMPAT|NOQUOTES|QUOTES)|RA(|_D_FMT|_D_T_FMT|_T_FMT|_YEAR)|XTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(ENTITIES|SPECIALCHARS)|IN(FO_(ALL|CONFIGURATION|CREDITS|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(ALL|PERDIR|SYSTEM|USER)|T_(CURR_SYMBOL|FRAC_DIGITS))|L(C_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|O(CK_(EX|NB|SH|UN)|G_(ALERT|AUTH(|PRIV)|CONS|CRIT|CRON|DAEMON|DEBUG|EMERG|ERR|INFO|KERN|LOCAL([0-7])|LPR|MAIL|NDELAY|NEWS|NOTICE|NOWAIT|ODELAY|PERROR|PID|SYSLOG|USER|UUCP|WARNING)))|M(ON_([0-9]{1,2}|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|YSQL_(ASSOC|BOTH|NUM)|_(1_PI|2_(PI|SQRTPI)|E|L(N10|N2|OG(10E|2E))|PI(|_2|_4)|SQRT1_2|SQRT2))|N(EGATIVE_SIGN|O(EXPR|STR)|_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN))|P(ATH(INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN))|RADIXCHAR|S(EEK_(CUR|END|SET)|ORT_(ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(BOTH|LEFT|RIGHT))|T(HOUS(ANDS_SEP|EP)|_(FMT(|_AMPM)))|YES(EXPR|STR))\b|([\s\S])/g,/[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*|([\s\S])/g,/^\s*(#(if)(\s+(0*1)(\b)))|([\s\S])/g,/\b(__import__|all|abs|any|apply|callable|chr|cmp|coerce|compile|delattr|dir|divmod|eval|execfile|filter|getattr|globals|hasattr|hash|hex|id|input|intern|isinstance|issubclass|iter|len|locals|map|max|min|oct|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|sorted|sum|unichr|vars|zip)\b|([\s\S])/g,/(?:%(\([a-zA-Z_]+\))?#?0?\-? ?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hHlL]?[a-zA-Z%])|([\s\S])/g,/\)|\]|/g,/(?!\s*\{)||(?=;)|([\s\S])/g,/(?!\s*\{)|(?=;)|([\s\S])/g,/|(?=;)|([\s\S])/g,/(?=;)|([\s\S])/g,/(\w+)(\s*(?=\[))|([\s\S])/g,/(?=\w.*\()|([\s\S])/g,/\b(print settings)\b|([\s\S])/g,/\b(get url|insert|reload bundles)\b|([\s\S])/g,/(#)(\s[a-zA-Z0-9,\. \t\?!-\u0080\-\uffff]*(?=\n))|([\s\S])/g,/\+{1,2}|\-{1,2}|!|~|\*{1,2}|\/|%|<[<=]?|>[>=]?|==|!=|^|\|{1,2}|&{1,2}|\?|:|,|=|[\*\/%\+\-&\^\|]=|<<=|>>=|([\s\S])/g,/0[xX][0-9a-fA-F]+|([\s\S])/g,/0\d+|([\s\S])/g,/\d{1,2}#[0-9a-zA-Z@_]+|([\s\S])/g,/\d+|([\s\S])/g,/\-?%>|([\s\S])/g,/(#)(.*?(?=\-?%>))|([\s\S])/g,/(\?>)|([\s\S])/g,/ ([a-zA-Z\-]+)|([\s\S])/g,/(DOCTYPE)|([\s\S])/g,/\[CDATA\[|([\s\S])/g,/(\s*)(?!\-\-|>)\S(\s*)|([\s\S])/g,/^\s*(#(if)(\s+(0)(\b)))(.*)|([\s\S])/g,/\{|,|/g,/\s*(?![\},])|([\s\S])/g,/:|/g,/(?!(^\s*)?<\?)|([\s\S])/g,/(?=^\s*#\s*(else|endif)\b.*(?=\n))|([\s\S])/g,/^(?=\s*[:\.\*#a-zA-Z])|([\s\S])/g,/^\s*((@)(import\b))|([\s\S])/g,/^\s*((@)(media))(\s+(((all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)\s*,?\s*)+)(\s*\{))|([\s\S])/g,/^\s*(package)(\b(?:\s*([^ ;\$]+)(\s*(;)?))?)|([\s\S])/g,/^\s*(import)(\b(?:\s*([^ ;\$]+)(\s*(;)?))?)|([\s\S])/g,/(?![A-Za-z0-9_\.])|([\s\S])/g,/(\.)(?=[A-Za-z_][A-Za-z0-9_]*)|([\s\S])/g,/\.|/g,/(?=\s|;|(?=\n))|([\s\S])/g,/"\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)|([\s\S])/g,/(?=\))|([\s\S])/g,/^(HTML)((?=\n))|([\s\S])/g,/\b(fi)(\b)|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.(prototype)(\s*(=)(\s*)))|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.(prototype)(\.([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*(=)(\s*(function)?(\s*(\()((.*?)(\))))))))|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.(prototype)(\.([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*(=)(\s*))))|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*(=)(\s*(function)(\s*(\()((.*?)(\)))))))|([\s\S])/g,/([a-zA-Z_\?\$][\w\?\$]*)(\s*(=)(\s*(function)(\s*(\()((.*?)(\))))))|([\s\S])/g,/\b(function)(\s+([a-zA-Z_\$]\w*)?(\s*(\()((.*?)(\)))))|([\s\S])/g,/\b([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*:\s*\b(function)?(\s*(\()((.*?)(\)))))|([\s\S])/g,/(?:((')((.*?)(')))|((")((.*?)("))))(\s*:\s*\b(function)?(\s*(\()((.*?)(\)))))|([\s\S])/g,/(new)(\s+(\w+(?:\.\w*)?))|([\s\S])/g,/\b(console)\b|([\s\S])/g,/\.(warn|info|log|error|time|timeEnd|assert)\b|([\s\S])/g,/\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))\b|([\s\S])/g,/\/\*\*(?!\/)|([\s\S])/g,/(\/\/)(.*(?=\n)\n?)|([\s\S])/g,/(<!\-\-|\-\->)|([\s\S])/g,/\b(boolean|byte|char|class|double|enum|float|function|int|interface|long|short|var|void)\b|([\s\S])/g,/\b(const|export|extends|final|implements|native|private|protected|public|static|synchronized|throws|transient|volatile)\b|([\s\S])/g,/\b(break|case|catch|continue|default|do|else|finally|for|goto|if|import|package|return|switch|throw|try|while)\b|([\s\S])/g,/\b(delete|in|instanceof|new|typeof|with)\b|([\s\S])/g,/\btrue\b|([\s\S])/g,/\bfalse\b|([\s\S])/g,/\bnull\b|([\s\S])/g,/\b(super|this)\b|([\s\S])/g,/\b(debugger)\b|([\s\S])/g,/\b(Anchor|Applet|Area|Array|Boolean|Button|Checkbox|Date|document|event|FileUpload|Form|Frame|Function|Hidden|History|Image|JavaArray|JavaClass|JavaObject|JavaPackage|java|Layer|Link|Location|Math|MimeType|Number|navigator|netscape|Object|Option|Packages|Password|Plugin|Radio|RegExp|Reset|Select|String|Style|Submit|screen|sun|Text|Textarea|window|XMLHttpRequest)\b|([\s\S])/g,/\b(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(?=\()|([\s\S])/g,/\b(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)|ById)|Attribute(Node)?)|blur)\b(?=\()|([\s\S])/g,/(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(RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(Color|Image)))\b|([\s\S])/g,/(s(hape|ystemId|c(heme|ope|rolling)|ta(ndby|rt)|ize|ummary|pecified|e(ctionRowIndex|lected(Index)?)|rc)|h(space|t(tpEquiv|mlFor)|e(ight|aders)|ref(lang)?)|n(o(Resize|tation(s|Name)|Shade|Href|de(Name|Type|Value)|Wrap)|extSibling|ame)|c(h(ildNodes|Off|ecked|arset)?|ite|o(ntent|o(kie|rds)|de(Base|Type)?|l(s|Span|or)|mpact)|ell(s|Spacing|Padding)|l(ear|assName)|aption)|t(ype|Bodies|itle|Head|ext|a(rget|gName)|Foot)|i(sMap|ndex|d|m(plementation|ages))|o(ptions|wnerDocument|bject)|d(i(sabled|r)|o(c(type|umentElement)|main)|e(clare|f(er|ault(Selected|Checked|Value)))|at(eTime|a))|useMap|p(ublicId|arentNode|r(o(file|mpt)|eviousSibling))|e(n(ctype|tities)|vent|lements)|v(space|ersion|alue(Type)?|Link|Align)|URL|f(irstChild|orm(s)?|ace|rame(Border)?)|width|l(ink(s)?|o(ngDesc|wSrc)|a(stChild|ng|bel))|a(nchors|c(ce(ssKey|pt(Charset)?)|tion)|ttributes|pplets|l(t|ign)|r(chive|eas)|xis|Link|bbr)|r(ow(s|Span|Index)|ules|e(v|ferrer|l|adOnly))|m(ultiple|e(thod|dia)|a(rgin(Height|Width)|xLength))|b(o(dy|rder)|ackground|gColor))\b|([\s\S])/g,/\b(ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR|WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR)\b|([\s\S])/g,/\bon(R(ow(s(inserted|delete)|e(nter|xit))|e(s(ize(start|end)?|et)|adystatechange))|Mouse(o(ut|ver)|down|up|move)|B(efore(cut|deactivate|u(nload|pdate)|p(aste|rint)|editfocus|activate)|lur)|S(croll|top|ubmit|elect(start|ionchange)?)|H(over|elp)|C(hange|ont(extmenu|rolselect)|ut|ellchange|l(ick|ose))|D(eactivate|ata(setc(hanged|omplete)|available)|r(op|ag(start|over|drop|en(ter|d)|leave)?)|blclick)|Unload|P(aste|ropertychange)|Error(update)?|Key(down|up|press)|Focus|Load|A(ctivate|fter(update|print)|bort))\b|([\s\S])/g,/\(|/g,/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|\*=|\/=|%=|\+=|\-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b|([\s\S])/g,/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|\*=|%=|\+=|\-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b|([\s\S])/g,/\b(Infinity|NaN|undefined)\b|([\s\S])/g,/[=\(:]|/g,/return|/g,/\s*(\/)((?![\/\*\+\{\}\?]))|([\s\S])/g,/,[ \|\t]*|([\s\S])/g,/\.|([\s\S])/g,/\{|\}|([\s\S])/g,/\(|\)|([\s\S])/g,/\[|\]|([\s\S])/g,/\\\)|\\\\|([\s\S])/g,/(?=,|\))|([\s\S])/g,/throws|([\s\S])/g,/\u00ac|([\s\S])/g,/\b((a )?(ref( to)|reference to)|(does not|doesn't) (come (before|after)|contain|equal)|(start|begin)s? with|comes (before|after)|is(n't| not)?( (in|contained by|(less than|greater than)( or equal( to)?)?|equal( to)?))?|ends? with|contains?|equals?|than|and|div|mod|not|or|as)\b|(\u2260|\u2265|\u2264|>=|<=|\u00f7|&|=|>|<|\*|\+|\-|\/|\^)|([\s\S])/g,/to|/g,/then|/g,/\s*\b(return|prop(erty)?)(\b)|([\s\S])/g,/[\(\)]|([\s\S])/g,/\b(on error|try|to|on|tell|if|then|else if|else|repeat( (while|until|with))?|using terms from|from|through|thru|with timeout|times|end (tell|repeat|if|timeout|using terms from|error|try)|end|my|where|whose|considering|ignoring|global|local|exit|continue|returning|set|copy|put)\b|([\s\S])/g,/\b(every|some|index|named|from|to|through|thru|before|(in )?front of|after receiving|after|(in )?back of|beginning of|end of|in|of|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|\d+(st|nd|rd|th)|last|front|back|middle)\b|([\s\S])/g,/\b(all (caps|lowercase)|bold|condensed|expanded|hidden|italic|outline|plain|shadow|small caps|strikethrough|(sub|super)script|underline)\b|([\s\S])/g,/\b(?:[tT][rR][uU][eE]|[fF][aA][lL][sS][eE]|[yY][eE][sS]|[nN][oO])\b|([\s\S])/g,/\b(null)\b|([\s\S])/g,/\b(Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?|weekdays?|Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\b|([\s\S])/g,/ignoring|/g,/considering|/g,/\b (application responses|current application|case|diacriticals|expansion|hyphens|punctuation|white space)\b|([\s\S])/g,/\b(space|return|tab)\b|([\s\S])/g,/\b(current application|it|me|version|result|pi|AppleScript)\b|([\s\S])/g,/\b(text item delimiters|print length|print depth)\b|([\s\S])/g,/\b(count (each|every)|number of|error|get|run)\b|([\s\S])/g,/\b(booleans?|integers?|reals?|numbers?|(linked )?lists?|vectors?|records?|items?|scripts?|events?|propert(y|ies)|constants?|prepositions?|reference forms?|handlers?|data|characters?|writing code( infos?)?|missing values?|references?|anything|missing value|upper case|app(lications?)?|text items?|((international|styled( Clipboard|Unicode)?|Unicode) )?text|(C | encoded| Pascal )?strings?|(type )?class(es)?|RGB colors?|pictures?|sounds?|versions?|file specifications?|alias(es)?|machines?|zones?|keystrokes?|seconds|dates?|months?|(cubic |square |cubic centi|square kilo|centi|kilo)met(er|re)s|(square |cubic )?(yards|feet)|(square )?miles|(cubic )?inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin))\b|([\s\S])/g,/\b\d+((\.(\d+\b)?)?(?:[eE]\+?\d*\b)?|\b)|([\s\S])/g,/set[ \t]|/g,/\s*([_a-zA-Z][_a-zA-Z0-9]*)(\s*(?=[ \t]+to))|([\s\S])/g,/\\\]|\\\\|([\s\S])/g,/(#\{)(([^\}]*)(\}))|([\s\S])/g,/&(?=\s*\$)|([\s\S])/g,/(array)(\s*(\())|([\s\S])/g,/\s*(:)|([\s\S])/g,/\b(self|cls)\b|([\s\S])/g,/^\s*(end)((?: (\3))?(\s*(?=\n)))|([\s\S])/g,/\b(above|against|apart from|around|aside from|at|below|beneath|beside|between|by|for|from|instead of|into|on|onto|out of|over|thru|under)(\s+(\w+)(\b))|([\s\S])/g,/\?>(?:\s*(?=\n)\n)?|([\s\S])/g,/\/|([\s\S])/g,/\\\/|([\s\S])/g,/(\{)|([\s\S])/g,/application |/g,/app |/g,/("|")|([\s\S])/g,/(\|)([^\|\n]*(\|))|([\s\S])/g,/(\u00ab)((data)( (utxt|utf8)(([0-9A-Fa-f]*)((\u00bb)((?: (as)( (Unicode text)))?)))))|([\s\S])/g,/(\->)((?:([A-Za-z_][A-Za-z_0-9]*)(\s*\()|((\$+)?([a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*)))?)|([\s\S])/g,/\b(__(?:abs|add|and|call|cmp|coerce|complex|contains|del|delattr|delete|delitem|delslice|div|divmod|enter|eq|exit|float|floordiv|ge|get|getattr|getattribute|getitem|getslice|gt|hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|long|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|setslice|str|sub|truediv|unicode|xor)__)\b|([\s\S])/g,/>[eimnosux]*|([\s\S])/g,/\.[a-zA-Z_][a-zA-Z_0-9]*\b(?!\s*\()|([\s\S])/g,/ (?:([\-_a-zA-Z0-9]+)((:)))?(([_a-zA-Z\-]+)(=))|([\s\S])/g,/^(MARKDOWN)((?=\n))|([\s\S])/g,/(<)(((?=([a-zA-Z0-9:]+))\4)((?=[^>]*><\/\3>)))|([\s\S])/g,/(<\?)(xml)|([\s\S])/g,/<!\-\-|([\s\S])/g,/<!|([\s\S])/g,/(?:^\s+)?(<)(((?:[sS][tT][yY][lL][eE]))(\b(?![^>]*\/>)))|([\s\S])/g,/(?:^\s+)?(<)(((?:[sS][cC][rR][iI][pP][tT]))(\b(?![^>]*\/>)))|([\s\S])/g,/(<\/?)((?:[bB][oO][dD][yY]|[hH][eE][aA][dD]|[hH][tT][mM][lL])\b)|([\s\S])/g,/(<\/?)((?:[aA][dD][dD][rR][eE][sS][sS]|[bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE]|[dD][dD]|[dD][iI][vV]|[dD][lL]|[dD][tT]|[fF][iI][eE][lL][dD][sS][eE][tT]|[fF][oO][rR][mM]|[fF][rR][aA][mM][eE]|[fF][rR][aA][mM][eE][sS][eE][tT]|[hH]1|[hH]2|[hH]3|[hH]4|[hH]5|[hH]6|[iI][fF][rR][aA][mM][eE]|[nN][oO][fF][rR][aA][mM][eE][sS]|[oO][bB][jJ][eE][cC][tT]|[oO][lL]|[pP]|[uU][lL]|[aA][pP][pP][lL][eE][tT]|[cC][eE][nN][tT][eE][rR]|[dD][iI][rR]|[hH][rR]|[mM][eE][nN][uU]|[pP][rR][eE])\b)|([\s\S])/g,/(<\/?)((?:[aA]|[aA][bB][bB][rR]|[aA][cC][rR][oO][nN][yY][mM]|[aA][rR][eE][aA]|[bB]|[bB][aA][sS][eE]|[bB][aA][sS][eE][fF][oO][nN][tT]|[bB][dD][oO]|[bB][iI][gG]|[bB][rR]|[bB][uU][tT][tT][oO][nN]|[cC][aA][pP][tT][iI][oO][nN]|[cC][iI][tT][eE]|[cC][oO][dD][eE]|[cC][oO][lL]|[cC][oO][lL][gG][rR][oO][uU][pP]|[dD][eE][lL]|[dD][fF][nN]|[eE][mM]|[fF][oO][nN][tT]|[hH][eE][aA][dD]|[hH][tT][mM][lL]|[iI]|[iI][mM][gG]|[iI][nN][pP][uU][tT]|[iI][nN][sS]|[iI][sS][iI][nN][dD][eE][xX]|[kK][bB][dD]|[lL][aA][bB][eE][lL]|[lL][eE][gG][eE][nN][dD]|[lL][iI]|[lL][iI][nN][kK]|[mM][aA][pP]|[mM][eE][tT][aA]|[nN][oO][sS][cC][rR][iI][pP][tT]|[oO][pP][tT][gG][rR][oO][uU][pP]|[oO][pP][tT][iI][oO][nN]|[pP][aA][rR][aA][mM]|[qQ]|[sS]|[sS][aA][mM][pP]|[sS][cC][rR][iI][pP][tT]|[sS][eE][lL][eE][cC][tT]|[sS][mM][aA][lL][lL]|[sS][pP][aA][nN]|[sS][tT][rR][iI][kK][eE]|[sS][tT][rR][oO][nN][gG]|[sS][tT][yY][lL][eE]|[sS][uU][bB]|[sS][uU][pP]|[tT][aA][bB][lL][eE]|[tT][bB][oO][dD][yY]|[tT][dD]|[tT][eE][xX][tT][aA][rR][eE][aA]|[tT][fF][oO][oO][tT]|[tT][hH]|[tT][hH][eE][aA][dD]|[tT][iI][tT][lL][eE]|[tT][rR]|[tT][tT]|[uU]|[vV][aA][rR])\b)|([\s\S])/g,/(<\/?)([a-zA-Z0-9:]+)|([\s\S])/g,/<>|([\s\S])/g,/\\'|\\\\|([\s\S])/g,/(?=;;)|([\s\S])/g,/\\[\\'\[\]]|([\s\S])/g,/(?=\s*extends|(?=\n)|\{)|([\s\S])/g,/(?=\s*\b(?:([eE][xX][tT][eE][nN][dD][sS])))|(?=\n)|([\s\S])/g,/,\s*([a-zA-Z0-9_]+)(\s*)|([\s\S])/g,/(?=\)\s*:)|([\s\S])/g,/\b([a-zA-Z_][a-zA-Z_0-9]*)(\s*(?:(,)|(?=[\n\)])))|([\s\S])/g,/(?=\b(?:esac)\b)|([\s\S])/g,/^(JAVASCRIPT)((;?)((?=\n)\n?))|([\s\S])/g,/(\$)((_(COOKIE|FILES|GET|POST|REQUEST))\b)|([\s\S])/g,/\$|/g,/(#)((?!\{).*(?=\n)\n?)|([\s\S])/g,/((?: ?\/)?>)|([\s\S])/g,/(?=>)|([\s\S])/g,/"[^">]*"|([\s\S])/g,/(\-\-)(.*(?=\n)\n?)|([\s\S])/g,/\(\*|([\s\S])/g,/(\w*)(\s*(=))|([\s\S])/g,/\][eimnosux]*|([\s\S])/g,/(array)(\()|([\s\S])/g,/(?:\b([sS]([hH][uU][fF][fF][lL][eE]|[oO][rR][tT])|[nN]([eE][xX][tT]|[aA][tT]([sS][oO][rR][tT]|[cC][aA][sS][eE][sS][oO][rR][tT]))|[cC]([oO]([uU][nN][tT]|[mM][pP][aA][cC][tT])|[uU][rR][rR][eE][nN][tT])|[iI][nN]_[aA][rR][rR][aA][yY]|[uU]([sS][oO][rR][tT]|[kK][sS][oO][rR][tT]|[aA][sS][oO][rR][tT])|[pP][rR][eE][vV]|[eE]([nN][dD]|[xX][tT][rR][aA][cC][tT])|[kK]([sS][oO][rR][tT]|[eE][yY]|[rR][sS][oO][rR][tT])|[aA]([sS][oO][rR][tT]|[rR]([sS][oO][rR][tT]|[rR][aA][yY]_([sS]([hH][iI][fF][tT]|[uU][mM]|[pP][lL][iI][cC][eE]|[eE][aA][rR][cC][hH]|[lL][iI][cC][eE])|[cC]([hH]([uU][nN][kK]|[aA][nN][gG][eE]_[kK][eE][yY]_[cC][aA][sS][eE])|[oO]([uU][nN][tT]_[vV][aA][lL][uU][eE][sS]|[mM][bB][iI][nN][eE]))|[iI][nN][tT][eE][rR][sS][eE][cC][tT](_([uU]([kK][eE][yY]|[aA][sS][sS][oO][cC])|[kK][eE][yY]|[aA][sS][sS][oO][cC]))?|[dD][iI][fF][fF](_([uU]([kK][eE][yY]|[aA][sS][sS][oO][cC])|[kK][eE][yY]|[aA][sS][sS][oO][cC]))?|[uU]([nN]([sS][hH][iI][fF][tT]|[iI][qQ][uU][eE])|[iI][nN][tT][eE][rR][sS][eE][cC][tT](_([uU][aA][sS][sS][oO][cC]|[aA][sS][sS][oO][cC]))?|[dD][iI][fF][fF](_([uU][aA][sS][sS][oO][cC]|[aA][sS][sS][oO][cC]))?)|[pP]([oO][pP]|[uU][sS][hH]|[aA][dD]|[rR][oO][dD][uU][cC][tT])|[vV][aA][lL][uU][eE][sS]|[kK][eE][yY]([sS]|_[eE][xX][iI][sS][tT][sS])|[fF]([iI][lL]([tT][eE][rR]|[lL](_[kK][eE][yY][sS])?)|[lL][iI][pP])|[wW][aA][lL][kK](_[rR][eE][cC][uU][rR][sS][iI][vV][eE])?|[rR]([eE]([dD][uU][cC][eE]|[vV][eE][rR][sS][eE])|[aA][nN][dD])|[mM]([uU][lL][tT][iI][sS][oO][rR][tT]|[eE][rR][gG][eE](_[rR][eE][cC][uU][rR][sS][iI][vV][eE])?|[aA][pP]))))|[rR]([sS][oO][rR][tT]|[eE][sS][eE][tT]|[aA][nN][gG][eE])|[mM]([iI][nN]|[aA][xX]))(?=\s*\())|([\s\S])/g,/(?:\b[aA][sS][sS][eE][rR][tT](_[oO][pP][tT][iI][oO][nN][sS])?(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[aA][tT][tT][rR]_[iI][sS]_[iI][dD](?=\s*\())|([\s\S])/g,/(?:\b[bB][aA][sS][eE]64_([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE])(?=\s*\())|([\s\S])/g,/(?:\b([hH][iI][gG][hH][lL][iI][gG][hH][tT]_([sS][tT][rR][iI][nN][gG]|[fF][iI][lL][eE])|[sS]([yY][sS]_[gG][eE][tT][lL][oO][aA][dD][aA][vV][gG]|[eE][tT]_([iI][nN][cC][lL][uU][dD][eE]_[pP][aA][tT][hH]|[mM][aA][gG][iI][cC]_[qQ][uU][oO][tT][eE][sS]_[rR][uU][nN][tT][iI][mM][eE])|[lL][eE][eE][pP])|[cC]([oO][nN]([sS][tT][aA][nN][tT]|[nN][eE][cC][tT][iI][oO][nN]_([sS][tT][aA][tT][uU][sS]|[aA][bB][oO][rR][tT][eE][dD]))|[aA][lL][lL]_[uU][sS][eE][rR]_([fF][uU][nN][cC](_[aA][rR][rR][aA][yY])?|[mM][eE][tT][hH][oO][dD](_[aA][rR][rR][aA][yY])?))|[tT][iI][mM][eE]_([sS][lL][eE][eE][pP]_[uU][nN][tT][iI][lL]|[nN][aA][nN][oO][sS][lL][eE][eE][pP])|[iI]([sS]_[uU][pP][lL][oO][aA][dD][eE][dD]_[fF][iI][lL][eE]|[nN]([iI]_([sS][eE][tT]|[rR][eE][sS][tT][oO][rR][eE]|[gG][eE][tT](_[aA][lL][lL])?)|[eE][tT]_([nN][tT][oO][pP]|[pP][tT][oO][nN]))|[pP]2[lL][oO][nN][gG]|[gG][nN][oO][rR][eE]_[uU][sS][eE][rR]_[aA][bB][oO][rR][tT]|[mM][pP][oO][rR][tT]_[rR][eE][qQ][uU][eE][sS][tT]_[vV][aA][rR][iI][aA][bB][lL][eE][sS])|[uU]([sS][lL][eE][eE][pP]|[nN][rR][eE][gG][iI][sS][tT][eE][rR]_[tT][iI][cC][kK]_[fF][uU][nN][cC][tT][iI][oO][nN])|[eE][rR][rR][oO][rR]_([lL][oO][gG]|[gG][eE][tT]_[lL][aA][sS][tT])|[pP]([hH][pP]_[sS][tT][rR][iI][pP]_[wW][hH][iI][tT][eE][sS][pP][aA][cC][eE]|[uU][tT][eE][nN][vV]|[aA][rR][sS][eE]_[iI][nN][iI]_[fF][iI][lL][eE]|[rR][iI][nN][tT]_[rR])|[fF][lL][uU][sS][hH]|[lL][oO][nN][gG]2[iI][pP]|[rR][eE]([sS][tT][oO][rR][eE]_[iI][nN][cC][lL][uU][dD][eE]_[pP][aA][tT][hH]|[gG][iI][sS][tT][eE][rR]_([sS][hH][uU][tT][dD][oO][wW][nN]_[fF][uU][nN][cC][tT][iI][oO][nN]|[tT][iI][cC][kK]_[fF][uU][nN][cC][tT][iI][oO][nN]))|[gG][eE][tT]([sS][eE][rR][vV][bB][yY]([nN][aA][mM][eE]|[pP][oO][rR][tT])|[oO][pP][tT]|_([cC]([uU][rR][rR][eE][nN][tT]_[uU][sS][eE][rR]|[fF][gG]_[vV][aA][rR])|[iI][nN][cC][lL][uU][dD][eE]_[pP][aA][tT][hH]|[mM][aA][gG][iI][cC]_[qQ][uU][oO][tT][eE][sS]_([gG][pP][cC]|[rR][uU][nN][tT][iI][mM][eE]))|[pP][rR][oO][tT][oO][bB][yY][nN]([uU][mM][bB][eE][rR]|[aA][mM][eE])|[eE][nN][vV])|[mM][oO][vV][eE]_[uU][pP][lL][oO][aA][dD][eE][dD]_[fF][iI][lL][eE])(?=\s*\())|([\s\S])/g,/(?:\b[bB][cC]([sS]([cC][aA][lL][eE]|[uU][bB]|[qQ][rR][tT])|[cC][oO][mM][pP]|[dD][iI][vV]|[pP][oO][wW]([mM][oO][dD])?|[aA][dD][dD]|[mM]([oO][dD]|[uU][lL]))(?=\s*\())|([\s\S])/g,/(?:\b[bB][iI][rR][dD][sS][tT][eE][pP]_([cC]([oO]([nN][nN][eE][cC][tT]|[mM][mM][iI][tT])|[lL][oO][sS][eE])|[oO][fF][fF]_[aA][uU][tT][oO][cC][oO][mM][mM][iI][tT]|[eE][xX][eE][cC]|[fF]([iI][eE][lL][dD][nN]([uU][mM]|[aA][mM][eE])|[eE][tT][cC][hH]|[rR][eE][eE][rR][eE][sS][uU][lL][tT])|[aA][uU][tT][oO][cC][oO][mM][mM][iI][tT]|[rR]([oO][lL][lL][bB][aA][cC][kK]|[eE][sS][uU][lL][tT]))(?=\s*\())|([\s\S])/g,/(?:\b[gG][eE][tT]_[bB][rR][oO][wW][sS][eE][rR](?=\s*\())|([\s\S])/g,/(?:\b([sS]([tT][rR]([nN][cC]([aA][sS][eE][cC][mM][pP]|[mM][pP])|[cC]([aA][sS][eE][cC][mM][pP]|[mM][pP])|[lL][eE][nN])|[eE][tT]_[eE]([rR][rR][oO][rR]_[hH][aA][nN][dD][lL][eE][rR]|[xX][cC][eE][pP][tT][iI][oO][nN]_[hH][aA][nN][dD][lL][eE][rR]))|[cC]([lL][aA][sS][sS]_[eE][xX][iI][sS][tT][sS]|[rR][eE][aA][tT][eE]_[fF][uU][nN][cC][tT][iI][oO][nN])|[tT][rR][iI][gG][gG][eE][rR]_[eE][rR][rR][oO][rR]|[iI]([sS]_([sS][uU][bB][cC][lL][aA][sS][sS]_[oO][fF]|[aA])|[nN][tT][eE][rR][fF][aA][cC][eE]_[eE][xX][iI][sS][tT][sS])|[dD][eE]([fF][iI][nN][eE]([dD])?|[bB][uU][gG]_([pP][rR][iI][nN][tT]_[bB][aA][cC][kK][tT][rR][aA][cC][eE]|[bB][aA][cC][kK][tT][rR][aA][cC][eE]))|[zZ][eE][nN][dD]_[vV][eE][rR][sS][iI][oO][nN]|[pP][rR][oO][pP][eE][rR][tT][yY]_[eE][xX][iI][sS][tT][sS]|[eE]([aA][cC][hH]|[rR][rR][oO][rR]_[rR][eE][pP][oO][rR][tT][iI][nN][gG]|[xX][tT][eE][nN][sS][iI][oO][nN]_[lL][oO][aA][dD][eE][dD])|[fF][uU][nN][cC]([tT][iI][oO][nN]_[eE][xX][iI][sS][tT][sS]|_([nN][uU][mM]_[aA][rR][gG][sS]|[gG][eE][tT]_[aA][rR][gG]([sS])?))|[lL][eE][aA][kK]|[rR][eE][sS][tT][oO][rR][eE]_[eE]([rR][rR][oO][rR]_[hH][aA][nN][dD][lL][eE][rR]|[xX][cC][eE][pP][tT][iI][oO][nN]_[hH][aA][nN][dD][lL][eE][rR])|[gG][eE][tT]_([cC][lL][aA][sS][sS](_([vV][aA][rR][sS]|[mM][eE][tT][hH][oO][dD][sS]))?|[iI][nN][cC][lL][uU][dD][eE][dD]_[fF][iI][lL][eE][sS]|[dD][eE]([cC][lL][aA][rR][eE][dD]_([cC][lL][aA][sS][sS][eE][sS]|[iI][nN][tT][eE][rR][fF][aA][cC][eE][sS])|[fF][iI][nN][eE][dD]_([cC][oO][nN][sS][tT][aA][nN][tT][sS]|[vV][aA][rR][sS]|[fF][uU][nN][cC][tT][iI][oO][nN][sS]))|[oO][bB][jJ][eE][cC][tT]_[vV][aA][rR][sS]|[eE][xX][tT][eE][nN][sS][iI][oO][nN]_[fF][uU][nN][cC][sS]|[pP][aA][rR][eE][nN][tT]_[cC][lL][aA][sS][sS]|[lL][oO][aA][dD][eE][dD]_[eE][xX][tT][eE][nN][sS][iI][oO][nN][sS]|[rR][eE][sS][oO][uU][rR][cC][eE]_[tT][yY][pP][eE])|[mM][eE][tT][hH][oO][dD]_[eE][xX][iI][sS][tT][sS])(?=\s*\())|([\s\S])/g,/(?:\b[bB][zZ]([cC][oO][mM][pP][rR][eE][sS][sS]|[dD][eE][cC][oO][mM][pP][rR][eE][sS][sS]|[oO][pP][eE][nN]|[eE][rR][rR]([sS][tT][rR]|[nN][oO]|[oO][rR])|[rR][eE][aA][dD])(?=\s*\())|([\s\S])/g,/(?:\b([jJ][dD][tT][oO][uU][nN][iI][xX]|[uU][nN][iI][xX][tT][oO][jJ][dD])(?=\s*\())|([\s\S])/g,/(?:\b([cC][aA][lL]_([tT][oO]_[jJ][dD]|[iI][nN][fF][oO]|[dD][aA][yY][sS]_[iI][nN]_[mM][oO][nN][tT][hH]|[fF][rR][oO][mM]_[jJ][dD])|[jJ]([dD]([tT][oO]([jJ]([uU][lL][iI][aA][nN]|[eE][wW][iI][sS][hH])|[fF][rR][eE][nN][cC][hH]|[gG][rR][eE][gG][oO][rR][iI][aA][nN])|[dD][aA][yY][oO][fF][wW][eE][eE][kK]|[mM][oO][nN][tT][hH][nN][aA][mM][eE])|[uU][lL][iI][aA][nN][tT][oO][jJ][dD]|[eE][wW][iI][sS][hH][tT][oO][jJ][dD])|[fF][rR][eE][nN][cC][hH][tT][oO][jJ][dD]|[gG][rR][eE][gG][oO][rR][iI][aA][nN][tT][oO][jJ][dD])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[cC][hH][aA][rR][aA][cC][tT][eE][rR][dD][aA][tT][aA]_([sS][uU][bB][sS][tT][rR][iI][nN][gG]_[dD][aA][tT][aA]|[iI][nN][sS][eE][rR][tT]_[dD][aA][tT][aA]|[dD][eE][lL][eE][tT][eE]_[dD][aA][tT][aA]|[aA][pP][pP][eE][nN][dD]_[dD][aA][tT][aA]|[rR][eE][pP][lL][aA][cC][eE]_[dD][aA][tT][aA])(?=\s*\())|([\s\S])/g,/(?:\b[cC][oO][mM]_([cC][rR][eE][aA][tT][eE]_[gG][uU][iI][dD]|[pP][rR][iI][nN][tT]_[tT][yY][pP][eE][iI][nN][fF][oO]|[eE][vV][eE][nN][tT]_[sS][iI][nN][kK]|[lL][oO][aA][dD]_[tT][yY][pP][eE][lL][iI][bB]|[gG][eE][tT]_[aA][cC][tT][iI][vV][eE]_[oO][bB][jJ][eE][cC][tT]|[mM][eE][sS][sS][aA][gG][eE]_[pP][uU][mM][pP])(?=\s*\())|([\s\S])/g,/(?:\b[vV][aA][rR][iI][aA][nN][tT]_([sS]([uU][bB]|[eE][tT](_[tT][yY][pP][eE])?)|[nN]([oO][tT]|[eE][gG])|[cC]([aA]([sS][tT]|[tT])|[mM][pP])|[iI]([nN][tT]|[dD][iI][vV]|[mM][pP])|[oO][rR]|[dD]([iI][vV]|[aA][tT][eE]_([tT][oO]_[tT][iI][mM][eE][sS][tT][aA][mM][pP]|[fF][rR][oO][mM]_[tT][iI][mM][eE][sS][tT][aA][mM][pP]))|[pP][oO][wW]|[eE][qQ][vV]|[fF][iI][xX]|[aA]([nN][dD]|[dD][dD]|[bB][sS])|[gG][eE][tT]_[tT][yY][pP][eE]|[rR][oO][uU][nN][dD]|[xX][oO][rR]|[mM]([oO][dD]|[uU][lL]))(?=\s*\())|([\s\S])/g,/(?:\b[cC][rR][cC]32(?=\s*\())|([\s\S])/g,/(?:\b[cC][rR][yY][pP][tT](?=\s*\())|([\s\S])/g,/(?:\b[cC][tT][yY][pP][eE]_([sS][pP][aA][cC][eE]|[cC][nN][tT][rR][lL]|[dD][iI][gG][iI][tT]|[uU][pP][pP][eE][rR]|[pP]([uU][nN][cC][tT]|[rR][iI][nN][tT])|[lL][oO][wW][eE][rR]|[aA][lL]([nN][uU][mM]|[pP][hH][aA])|[gG][rR][aA][pP][hH]|[xX][dD][iI][gG][iI][tT])(?=\s*\())|([\s\S])/g,/(?:\b[cC][oO][nN][vV][eE][rR][tT]_[cC][yY][rR]_[sS][tT][rR][iI][nN][gG](?=\s*\())|([\s\S])/g,/(?:\b[sS][tT][rR][pP][tT][iI][mM][eE](?=\s*\())|([\s\S])/g,/(?:\b[dD][bB][aA]_([hH][aA][nN][dD][lL][eE][rR][sS]|[sS][yY][nN][cC]|[nN][eE][xX][tT][kK][eE][yY]|[cC][lL][oO][sS][eE]|[iI][nN][sS][eE][rR][tT]|[dD][eE][lL][eE][tT][eE]|[oO][pP]([tT][iI][mM][iI][zZ][eE]|[eE][nN])|[eE][xX][iI][sS][tT][sS]|[pP][oO][pP][eE][nN]|[kK][eE][yY]_[sS][pP][lL][iI][tT]|[fF]([iI][rR][sS][tT][kK][eE][yY]|[eE][tT][cC][hH])|[lL][iI][sS][tT]|[rR][eE][pP][lL][aA][cC][eE])(?=\s*\())|([\s\S])/g,/(?:\b[dD][bB][aA][sS][eE]_([nN][uU][mM]([fF][iI][eE][lL][dD][sS]|[rR][eE][cC][oO][rR][dD][sS])|[cC]([lL][oO][sS][eE]|[rR][eE][aA][tT][eE])|[dD][eE][lL][eE][tT][eE]_[rR][eE][cC][oO][rR][dD]|[oO][pP][eE][nN]|[pP][aA][cC][kK]|[aA][dD][dD]_[rR][eE][cC][oO][rR][dD]|[gG][eE][tT]_([hH][eE][aA][dD][eE][rR]_[iI][nN][fF][oO]|[rR][eE][cC][oO][rR][dD](_[wW][iI][tT][hH]_[nN][aA][mM][eE][sS])?)|[rR][eE][pP][lL][aA][cC][eE]_[rR][eE][cC][oO][rR][dD])(?=\s*\())|([\s\S])/g,/(?:\b([sS][cC][aA][nN][dD][iI][rR]|[cC]([hH]([dD][iI][rR]|[rR][oO][oO][tT])|[lL][oO][sS][eE][dD][iI][rR])|[dD][iI][rR]|[oO][pP][eE][nN][dD][iI][rR]|[rR][eE]([aA][dD][dD][iI][rR]|[wW][iI][nN][dD][dD][iI][rR])|[gG]([eE][tT][cC][wW][dD]|[lL][oO][bB]))(?=\s*\())|([\s\S])/g,/(?:\b[dD][lL](?=\s*\())|([\s\S])/g,/(?:\b([dD][nN][sS]_([cC][hH][eE][cC][kK]_[rR][eE][cC][oO][rR][dD]|[gG][eE][tT]_([rR][eE][cC][oO][rR][dD]|[mM][xX]))|[gG][eE][tT][hH][oO][sS][tT][bB][yY]([nN][aA][mM][eE]([lL])?|[aA][dD][dD][rR]))(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][cC][uU][mM][eE][nN][tT]_([sS]([cC][hH][eE][mM][aA]_[vV][aA][lL][iI][dD][aA][tT][eE](_[fF][iI][lL][eE])?|[aA][vV][eE](_[hH][tT][mM][lL](_[fF][iI][lL][eE])?|[xX][mM][lL])?)|[nN][oO][rR][mM][aA][lL][iI][zZ][eE]_[dD][oO][cC][uU][mM][eE][nN][tT]|[cC][rR][eE][aA][tT][eE]_([cC]([dD][aA][tT][aA][sS][eE][cC][tT][iI][oO][nN]|[oO][mM][mM][eE][nN][tT])|[tT][eE][xX][tT]_[nN][oO][dD][eE]|[dD][oO][cC][uU][mM][eE][nN][tT]_[fF][rR][aA][gG][mM][eE][nN][tT]|[pP][rR][oO][cC][eE][sS][sS][iI][nN][gG]_[iI][nN][sS][tT][rR][uU][cC][tT][iI][oO][nN]|[eE]([nN][tT][iI][tT][yY]_[rR][eE][fF][eE][rR][eE][nN][cC][eE]|[lL][eE][mM][eE][nN][tT](_[nN][sS])?)|[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN][sS])?)|[iI][mM][pP][oO][rR][tT]_[nN][oO][dD][eE]|[vV][aA][lL][iI][dD][aA][tT][eE]|[lL][oO][aA][dD](_[hH][tT][mM][lL](_[fF][iI][lL][eE])?|[xX][mM][lL])?|[aA][dD][oO][pP][tT]_[nN][oO][dD][eE]|[rR][eE]([nN][aA][mM][eE]_[nN][oO][dD][eE]|[lL][aA][xX][nN][gG]_[vV][aA][lL][iI][dD][aA][tT][eE]_([fF][iI][lL][eE]|[xX][mM][lL]))|[gG][eE][tT]_[eE][lL][eE][mM][eE][nN][tT]([sS]_[bB][yY]_[tT][aA][gG]_[nN][aA][mM][eE](_[nN][sS])?|_[bB][yY]_[iI][dD])|[xX][iI][nN][cC][lL][uU][dD][eE])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][mM][cC][oO][nN][fF][iI][gG][uU][rR][aA][tT][iI][oO][nN]_([sS][eE][tT]_[pP][aA][rR][aA][mM][eE][tT][eE][rR]|[cC][aA][nN]_[sS][eE][tT]_[pP][aA][rR][aA][mM][eE][tT][eE][rR]|[gG][eE][tT]_[pP][aA][rR][aA][mM][eE][tT][eE][rR])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][mM][eE][rR][rR][oO][rR][hH][aA][nN][dD][lL][eE][rR]_[hH][aA][nN][dD][lL][eE]_[eE][rR][rR][oO][rR](?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][mM][iI][mM][pP][lL][eE][mM][eE][nN][tT][aA][tT][iI][oO][nN]_([hH][aA][sS]_[fF][eE][aA][tT][uU][rR][eE]|[cC][rR][eE][aA][tT][eE]_[dD][oO][cC][uU][mM][eE][nN][tT](_[tT][yY][pP][eE])?|[gG][eE][tT]_[fF][eE][aA][tT][uU][rR][eE])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][mM][iI][mM][pP][lL][eE][mM][eE][nN][tT][aA][tT][iI][oO][nN][lL][iI][sS][tT]_[iI][tT][eE][mM](?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][mM][iI][mM][pP][lL][eE][mM][eE][nN][tT][aA][tT][iI][oO][nN][sS][oO][uU][rR][cC][eE]_[gG][eE][tT]_[dD][oO][mM][iI][mM][pP][lL][eE][mM][eE][nN][tT][aA][tT][iI][oO][nN]([sS])?(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[dD][oO][mM][sS][tT][rR][iI][nN][gG][lL][iI][sS][tT]_[iI][tT][eE][mM](?=\s*\())|([\s\S])/g,/(?:\b[eE][aA][sS][tT][eE][rR]_[dD][aA]([yY][sS]|[tT][eE])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[eE][lL][eE][mM][eE][nN][tT]_([hH][aA][sS]_[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN][sS])?|[sS][eE][tT]_([iI][dD]_[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN]([sS]|[oO][dD][eE]))?|[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN]([sS]|[oO][dD][eE](_[nN][sS])?))?)|[rR][eE][mM][oO][vV][eE]_[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN]([sS]|[oO][dD][eE]))?|[gG][eE][tT]_([eE][lL][eE][mM][eE][nN][tT][sS]_[bB][yY]_[tT][aA][gG]_[nN][aA][mM][eE](_[nN][sS])?|[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN]([sS]|[oO][dD][eE](_[nN][sS])?))?))(?=\s*\())|([\s\S])/g,/(?:\b([sS]([hH][eE][lL][lL]_[eE][xX][eE][cC]|[yY][sS][tT][eE][mM])|[pP]([aA][sS][sS][tT][hH][rR][uU]|[rR][oO][cC]_[nN][iI][cC][eE])|[eE]([sS][cC][aA][pP][eE][sS][hH][eE][lL][lL]([cC][mM][dD]|[aA][rR][gG])|[xX][eE][cC]))(?=\s*\())|([\s\S])/g,/(?:\b[eE][xX][iI][fF]_([iI][mM][aA][gG][eE][tT][yY][pP][eE]|[tT]([hH][uU][mM][bB][nN][aA][iI][lL]|[aA][gG][nN][aA][mM][eE])|[rR][eE][aA][dD]_[dD][aA][tT][aA])(?=\s*\())|([\s\S])/g,/(?:\b[fF][dD][fF]_([hH][eE][aA][dD][eE][rR]|[sS]([eE][tT]_([sS]([tT][aA][tT][uU][sS]|[uU][bB][mM][iI][tT]_[fF][oO][rR][mM]_[aA][cC][tT][iI][oO][nN])|[tT][aA][rR][gG][eE][tT]_[fF][rR][aA][mM][eE]|[oO]([nN]_[iI][mM][pP][oO][rR][tT]_[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]|[pP][tT])|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]_[aA][cC][tT][iI][oO][nN]|[eE][nN][cC][oO][dD][iI][nN][gG]|[vV]([eE][rR][sS][iI][oO][nN]|[aA][lL][uU][eE])|[fF]([iI][lL][eE]|[lL][aA][gG][sS])|[aA][pP])|[aA][vV][eE](_[sS][tT][rR][iI][nN][gG])?)|[nN][eE][xX][tT]_[fF][iI][eE][lL][dD]_[nN][aA][mM][eE]|[cC]([lL][oO][sS][eE]|[rR][eE][aA][tT][eE])|[oO][pP][eE][nN](_[sS][tT][rR][iI][nN][gG])?|[eE]([nN][uU][mM]_[vV][aA][lL][uU][eE][sS]|[rR][rR]([nN][oO]|[oO][rR]))|[aA][dD][dD]_([tT][eE][mM][pP][lL][aA][tT][eE]|[dD][oO][cC]_[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT])|[rR][eE][mM][oO][vV][eE]_[iI][tT][eE][mM]|[gG][eE][tT]_([sS][tT][aA][tT][uU][sS]|[oO][pP][tT]|[eE][nN][cC][oO][dD][iI][nN][gG]|[vV]([eE][rR][sS][iI][oO][nN]|[aA][lL][uU][eE])|[fF]([iI][lL][eE]|[lL][aA][gG][sS])|[aA]([tT][tT][aA][cC][hH][mM][eE][nN][tT]|[pP])))(?=\s*\())|([\s\S])/g,/(?:\b([sS][yY][sS]_[gG][eE][tT]_[tT][eE][mM][pP]_[dD][iI][rR]|[cC][oO][pP][yY]|[tT]([eE][mM][pP][nN][aA][mM]|[mM][pP][fF][iI][lL][eE])|[uU]([nN][lL][iI][nN][kK]|[mM][aA][sS][kK])|[pP]([cC][lL][oO][sS][eE]|[oO][pP][eE][nN])|[fF]([sS]([cC][aA][nN][fF]|[tT][aA][tT]|[eE][eE][kK])|[nN][mM][aA][tT][cC][hH]|[cC][lL][oO][sS][eE]|[tT]([eE][lL][lL]|[rR][uU][nN][cC][aA][tT][eE])|[iI][lL][eE](_([pP][uU][tT]_[cC][oO][nN][tT][eE][nN][tT][sS]|[gG][eE][tT]_[cC][oO][nN][tT][eE][nN][tT][sS]))?|[oO][pP][eE][nN]|[pP]([uU][tT][cC][sS][vV]|[aA][sS][sS][tT][hH][rR][uU])|[eE][oO][fF]|[fF][lL][uU][sS][hH]|[wW][rR][iI][tT][eE]|[lL][oO][cC][kK]|[rR][eE][aA][dD]|[gG][eE][tT]([sS]([sS])?|[cC]([sS][vV])?))|[rR]([eE]([nN][aA][mM][eE]|[aA]([dD][fF][iI][lL][eE]|[lL][pP][aA][tT][hH])|[wW][iI][nN][dD])|[mM][dD][iI][rR])|[gG][eE][tT]_[mM][eE][tT][aA]_[tT][aA][gG][sS]|[mM][kK][dD][iI][rR])(?=\s*\())|([\s\S])/g,/(?:\b([sS][tT][aA][tT]|[cC]([hH]([oO][wW][nN]|[gG][rR][pP]|[mM][oO][dD])|[lL][eE][aA][rR][sS][tT][aA][tT][cC][aA][cC][hH][eE])|[iI][sS]_([dD][iI][rR]|[eE][xX][eE][cC][uU][tT][aA][bB][lL][eE]|[fF][iI][lL][eE]|[lL][iI][nN][kK]|[wW][rR][iI][tT][aA][bB][lL][eE]|[rR][eE][aA][dD][aA][bB][lL][eE])|[tT][oO][uU][cC][hH]|[dD][iI][sS][kK]_([tT][oO][tT][aA][lL]_[sS][pP][aA][cC][eE]|[fF][rR][eE][eE]_[sS][pP][aA][cC][eE])|[fF][iI][lL][eE]([sS][iI][zZ][eE]|[cC][tT][iI][mM][eE]|[tT][yY][pP][eE]|[iI][nN][oO][dD][eE]|[oO][wW][nN][eE][rR]|_[eE][xX][iI][sS][tT][sS]|[pP][eE][rR][mM][sS]|[aA][tT][iI][mM][eE]|[gG][rR][oO][uU][pP]|[mM][tT][iI][mM][eE])|[lL]([sS][tT][aA][tT]|[cC][hH][gG][rR][pP]))(?=\s*\())|([\s\S])/g,/(?:\b[fF][iI][lL][tT][eE][rR]_([hH][aA][sS]_[vV][aA][rR]|[iI][nN][pP][uU][tT](_[aA][rR][rR][aA][yY])?|[vV][aA][rR](_[aA][rR][rR][aA][yY])?)(?=\s*\())|([\s\S])/g,/(?:\b([sS][pP][rR][iI][nN][tT][fF]|[pP][rR][iI][nN][tT][fF]|[vV]([sS][pP][rR][iI][nN][tT][fF]|[pP][rR][iI][nN][tT][fF]|[fF][pP][rR][iI][nN][tT][fF])|[fF][pP][rR][iI][nN][tT][fF])(?=\s*\())|([\s\S])/g,/(?:\b([pP][fF][sS][oO][cC][kK][oO][pP][eE][nN]|[fF][sS][oO][cC][kK][oO][pP][eE][nN])(?=\s*\())|([\s\S])/g,/(?:\b[fF][tT][oO][kK](?=\s*\())|([\s\S])/g,/(?:\b([iI][mM][aA][gG][eE]([sS]([yY]|[tT][rR][iI][nN][gG]([uU][pP])?|[eE][tT]([sS][tT][yY][lL][eE]|[tT]([hH][iI][cC][kK][nN][eE][sS][sS]|[iI][lL][eE])|[pP][iI][xX][eE][lL]|[bB][rR][uU][sS][hH])|[aA][vV][eE][aA][lL][pP][hH][aA]|[xX])|[cC]([hH][aA][rR]([uU][pP])?|[oO]([nN][vV][oO][lL][uU][tT][iI][oO][nN]|[pP][yY]([rR][eE][sS]([iI][zZ][eE][dD]|[aA][mM][pP][lL][eE][dD])|[mM][eE][rR][gG][eE]([gG][rR][aA][yY])?)?|[lL][oO][rR]([sS]([tT][oO][tT][aA][lL]|[eE][tT]|[fF][oO][rR][iI][nN][dD][eE][xX])|[cC][lL][oO][sS][eE][sS][tT]([hH][wW][bB]|[aA][lL][pP][hH][aA])?|[tT][rR][aA][nN][sS][pP][aA][rR][eE][nN][tT]|[dD][eE][aA][lL][lL][oO][cC][aA][tT][eE]|[eE][xX][aA][cC][tT]([aA][lL][pP][hH][aA])?|[aA]([tT]|[lL][lL][oO][cC][aA][tT][eE]([aA][lL][pP][hH][aA])?)|[rR][eE][sS][oO][lL][vV][eE]([aA][lL][pP][hH][aA])?|[mM][aA][tT][cC][hH]))|[rR][eE][aA][tT][eE]([tT][rR][uU][eE][cC][oO][lL][oO][rR]|[fF][rR][oO][mM]([sS][tT][rR][iI][nN][gG]|[jJ][pP][eE][gG]|[pP][nN][gG]|[wW][bB][mM][pP]|[gG]([iI][fF]|[dD](2([pP][aA][rR][tT])?)?)|[xX]([pP][mM]|[bB][mM])))?)|2[wW][bB][mM][pP]|[tT]([yY][pP][eE][sS]|[tT][fF]([tT][eE][xX][tT]|[bB][bB][oO][xX])|[rR][uU][eE][cC][oO][lL][oO][rR][tT][oO][pP][aA][lL][eE][tT][tT][eE])|[iI]([sS][tT][rR][uU][eE][cC][oO][lL][oO][rR]|[nN][tT][eE][rR][lL][aA][cC][eE])|[dD]([eE][sS][tT][rR][oO][yY]|[aA][sS][hH][eE][dD][lL][iI][nN][eE])|[jJ][pP][eE][gG]|[eE][lL][lL][iI][pP][sS][eE]|[pP]([sS]([sS][lL][aA][nN][tT][fF][oO][nN][tT]|[cC][oO][pP][yY][fF][oO][nN][tT]|[tT][eE][xX][tT]|[eE]([nN][cC][oO][dD][eE][fF][oO][nN][tT]|[xX][tT][eE][nN][dD][fF][oO][nN][tT])|[fF][rR][eE][eE][fF][oO][nN][tT]|[lL][oO][aA][dD][fF][oO][nN][tT]|[bB][bB][oO][xX])|[nN][gG]|[oO][lL][yY][gG][oO][nN]|[aA][lL][eE][tT][tT][eE][cC][oO][pP][yY])|[fF]([tT]([tT][eE][xX][tT]|[bB][bB][oO][xX])|[iI][lL]([tT][eE][rR]|[lL]([tT][oO][bB][oO][rR][dD][eE][rR]|[eE][dD]([pP][oO][lL][yY][gG][oO][nN]|[eE][lL][lL][iI][pP][sS][eE]|[aA][rR][cC]|[rR][eE][cC][tT][aA][nN][gG][lL][eE]))?)|[oO][nN][tT]([hH][eE][iI][gG][hH][tT]|[wW][iI][dD][tT][hH]))|[wW][bB][mM][pP]|[aA]([nN][tT][iI][aA][lL][iI][aA][sS]|[lL][pP][hH][aA][bB][lL][eE][nN][dD][iI][nN][gG]|[rR][cC])|[lL]([iI][nN][eE]|[oO][aA][dD][fF][oO][nN][tT]|[aA][yY][eE][rR][eE][fF][fF][eE][cC][tT])|[rR]([oO][tT][aA][tT][eE]|[eE][cC][tT][aA][nN][gG][lL][eE])|[gG]([iI][fF]|[dD](2)?|[aA][mM][mM][aA][cC][oO][rR][rR][eE][cC][tT]|[rR][aA][bB]([sS][cC][rR][eE][eE][nN]|[wW][iI][nN][dD][oO][wW]))|[xX][bB][mM])|[jJ][pP][eE][gG]2[wW][bB][mM][pP]|[pP][nN][gG]2[wW][bB][mM][pP]|[gG][dD]_[iI][nN][fF][oO])(?=\s*\())|([\s\S])/g,/(?:\b([nN][gG][eE][tT][tT][eE][xX][tT]|[tT][eE][xX][tT][dD][oO][mM][aA][iI][nN]|[dD]([nN][gG][eE][tT][tT][eE][xX][tT]|[cC]([nN][gG][eE][tT][tT][eE][xX][tT]|[gG][eE][tT][tT][eE][xX][tT])|[gG][eE][tT][tT][eE][xX][tT])|[gG][eE][tT][tT][eE][xX][tT]|[bB][iI][nN][dD]([tT][eE][xX][tT][dD][oO][mM][aA][iI][nN]|_[tT][eE][xX][tT][dD][oO][mM][aA][iI][nN]_[cC][oO][dD][eE][sS][eE][tT]))(?=\s*\())|([\s\S])/g,/(?:\b[gG][mM][pP]_([hH][aA][mM][dD][iI][sS][tT]|[sS]([cC][aA][nN](1|0)|[iI][gG][nN]|[tT][rR][vV][aA][lL]|[uU][bB]|[eE][tT][bB][iI][tT]|[qQ][rR][tT]([rR][eE][mM])?)|[cC]([oO][mM]|[lL][rR][bB][iI][tT]|[mM][pP])|[nN][eE]([gG]|[xX][tT][pP][rR][iI][mM][eE])|[iI][nN]([tT][vV][aA][lL]|[iI][tT]|[vV][eE][rR][tT])|[oO][rR]|[dD][iI][vV](_([qQ]([rR])?|[rR])|[eE][xX][aA][cC][tT])|[jJ][aA][cC][oO][bB][iI]|[pP]([oO]([pP][cC][oO][uU][nN][tT]|[wW]([mM])?)|[eE][rR][fF][eE][cC][tT]_[sS][qQ][uU][aA][rR][eE]|[rR][oO][bB]_[pP][rR][iI][mM][eE])|[fF][aA][cC][tT]|[lL][eE][gG][eE][nN][dD][rR][eE]|[aA]([nN][dD]|[dD][dD]|[bB][sS])|[rR][aA][nN][dD][oO][mM]|[gG][cC][dD]([eE][xX][tT])?|[xX][oO][rR]|[mM]([oO][dD]|[uU][lL]))(?=\s*\())|([\s\S])/g,/(?:\b[hH][aA][sS][hH](_([hH][mM][aA][cC](_[fF][iI][lL][eE])?|[iI][nN][iI][tT]|[uU][pP][dD][aA][tT][eE](_([sS][tT][rR][eE][aA][mM]|[fF][iI][lL][eE]))?|[fF][iI]([nN][aA][lL]|[lL][eE])|[aA][lL][gG][oO][sS]))?(?=\s*\())|([\s\S])/g,/(?:\b[mM][dD]5(_[fF][iI][lL][eE])?(?=\s*\())|([\s\S])/g,/(?:\b[sS][hH][aA]1(_[fF][iI][lL][eE])?(?=\s*\())|([\s\S])/g,/(?:\b([sS][eE][tT]([cC][oO][oO][kK][iI][eE]|[rR][aA][wW][cC][oO][oO][kK][iI][eE])|[hH][eE][aA][dD][eE][rR]([sS]_([sS][eE][nN][tT]|[lL][iI][sS][tT]))?)(?=\s*\())|([\s\S])/g,/(?:\b([hH][tT][mM][lL]([sS][pP][eE][cC][iI][aA][lL][cC][hH][aA][rR][sS](_[dD][eE][cC][oO][dD][eE])?|_[eE][nN][tT][iI][tT][yY]_[dD][eE][cC][oO][dD][eE]|[eE][nN][tT][iI][tT][iI][eE][sS])|[gG][eE][tT]_[hH][tT][mM][lL]_[tT][rR][aA][nN][sS][lL][aA][tT][iI][oO][nN]_[tT][aA][bB][lL][eE])(?=\s*\())|([\s\S])/g,/(?:\b[hH][tT][tT][pP]_[bB][uU][iI][lL][dD]_[qQ][uU][eE][rR][yY](?=\s*\())|([\s\S])/g,/(?:\b[iI][bB][aA][sS][eE]_[bB][lL][oO][bB]_([cC]([aA][nN][cC][eE][lL]|[lL][oO][sS][eE]|[rR][eE][aA][tT][eE])|[iI]([nN][fF][oO]|[mM][pP][oO][rR][tT])|[oO][pP][eE][nN]|[eE][cC][hH][oO]|[aA][dD][dD]|[gG][eE][tT])(?=\s*\())|([\s\S])/g,/(?:\b[iI][bB][aA][sS][eE]_([sS][eE][tT]_[eE][vV][eE][nN][tT]_[hH][aA][nN][dD][lL][eE][rR]|[fF][rR][eE][eE]_[eE][vV][eE][nN][tT]_[hH][aA][nN][dD][lL][eE][rR]|[wW][aA][iI][tT]_[eE][vV][eE][nN][tT])(?=\s*\())|([\s\S])/g,/(?:\b[iI][bB][aA][sS][eE]_([nN]([uU][mM]_([pP][aA][rR][aA][mM][sS]|[fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[aA][mM][eE]_[rR][eE][sS][uU][lL][tT])|[eE][xX][eE][cC][uU][tT][eE]|[pP]([aA][rR][aA][mM]_[iI][nN][fF][oO]|[rR][eE][pP][aA][rR][eE])|[fF]([iI][eE][lL][dD]_[iI][nN][fF][oO]|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[aA][sS][sS][oO][cC]|[rR][oO][wW])|[rR][eE][eE]_([qQ][uU][eE][rR][yY]|[rR][eE][sS][uU][lL][tT]))|[qQ][uU][eE][rR][yY]|[aA][fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS])(?=\s*\())|([\s\S])/g,/(?:\b[iI][bB][aA][sS][eE]_([sS][eE][rR][vV]([iI][cC][eE]_([dD][eE][tT][aA][cC][hH]|[aA][tT][tT][aA][cC][hH])|[eE][rR]_[iI][nN][fF][oO])|[dD]([eE][lL][eE][tT][eE]_[uU][sS][eE][rR]|[bB]_[iI][nN][fF][oO])|[aA][dD][dD]_[uU][sS][eE][rR]|[rR][eE][sS][tT][oO][rR][eE]|[bB][aA][cC][kK][uU][pP]|[mM]([oO][dD][iI][fF][yY]_[uU][sS][eE][rR]|[aA][iI][nN][tT][aA][iI][nN]_[dD][bB]))(?=\s*\())|([\s\S])/g,/(?:\b([iI][cC][oO][nN][vV](_([sS]([tT][rR]([pP][oO][sS]|[lL][eE][nN]|[rR][pP][oO][sS])|[uU][bB][sS][tT][rR]|[eE][tT]_[eE][nN][cC][oO][dD][iI][nN][gG])|[gG][eE][tT]_[eE][nN][cC][oO][dD][iI][nN][gG]|[mM][iI][mM][eE]_([dD][eE][cC][oO][dD][eE](_[hH][eE][aA][dD][eE][rR][sS])?|[eE][nN][cC][oO][dD][eE])))?|[oO][bB]_[iI][cC][oO][nN][vV]_[hH][aA][nN][dD][lL][eE][rR])(?=\s*\())|([\s\S])/g,/(?:\b([iI][mM][aA][gG][eE]_[tT][yY][pP][eE]_[tT][oO]_([eE][xX][tT][eE][nN][sS][iI][oO][nN]|[mM][iI][mM][eE]_[tT][yY][pP][eE])|[gG][eE][tT][iI][mM][aA][gG][eE][sS][iI][zZ][eE])(?=\s*\())|([\s\S])/g,/(?:\b([zZ][eE][nN][dD]_[lL][oO][gG][oO]_[gG][uU][iI][dD]|[pP][hH][pP]([cC][rR][eE][dD][iI][tT][sS]|[iI][nN][fF][oO]|_([sS][aA][pP][iI]_[nN][aA][mM][eE]|[iI][nN][iI]_[sS][cC][aA][nN][nN][eE][dD]_[fF][iI][lL][eE][sS]|[uU][nN][aA][mM][eE]|[eE][gG][gG]_[lL][oO][gG][oO]_[gG][uU][iI][dD]|[lL][oO][gG][oO]_[gG][uU][iI][dD]|[rR][eE][aA][lL]_[lL][oO][gG][oO]_[gG][uU][iI][dD])|[vV][eE][rR][sS][iI][oO][nN]))(?=\s*\())|([\s\S])/g,/(?:\b[iI][bB][aA][sS][eE]_([cC]([oO]([nN][nN][eE][cC][tT]|[mM][mM][iI][tT](_[rR][eE][tT])?)|[lL][oO][sS][eE])|[tT][rR][aA][nN][sS]|[dD][rR][oO][pP]_[dD][bB]|[pP][cC][oO][nN][nN][eE][cC][tT]|[eE][rR][rR]([cC][oO][dD][eE]|[mM][sS][gG])|[gG][eE][nN]_[iI][dD]|[rR][oO][lL][lL][bB][aA][cC][kK](_[rR][eE][tT])?)(?=\s*\())|([\s\S])/g,/(?:\b[cC][uU][rR][lL]_([sS][eE][tT][oO][pP][tT](_[aA][rR][rR][aA][yY])?|[cC]([oO][pP][yY]_[hH][aA][nN][dD][lL][eE]|[lL][oO][sS][eE])|[iI][nN][iI][tT]|[eE]([rR][rR]([nN][oO]|[oO][rR])|[xX][eE][cC])|[vV][eE][rR][sS][iI][oO][nN]|[gG][eE][tT][iI][nN][fF][oO])(?=\s*\())|([\s\S])/g,/(?:\b[iI][pP][tT][cC]([pP][aA][rR][sS][eE]|[eE][mM][bB][eE][dD])(?=\s*\())|([\s\S])/g,/(?:\b[jJ][sS][oO][nN]_([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE])(?=\s*\())|([\s\S])/g,/(?:\b[lL][cC][gG]_[vV][aA][lL][uU][eE](?=\s*\())|([\s\S])/g,/(?:\b[lL][dD][aA][pP]_([sS]([tT][aA][rR][tT]_[tT][lL][sS]|[oO][rR][tT]|[eE]([tT]_([oO][pP][tT][iI][oO][nN]|[rR][eE][bB][iI][nN][dD]_[pP][rR][oO][cC])|[aA][rR][cC][hH])|[aA][sS][lL]_[bB][iI][nN][dD])|[nN][eE][xX][tT]_([eE][nN][tT][rR][yY]|[aA][tT][tT][rR][iI][bB][uU][tT][eE]|[rR][eE][fF][eE][rR][eE][nN][cC][eE])|[cC][oO]([nN][nN][eE][cC][tT]|[uU][nN][tT]_[eE][nN][tT][rR][iI][eE][sS]|[mM][pP][aA][rR][eE])|[tT]61_[tT][oO]_8859|8859_[tT][oO]_[tT]61|[dD]([nN]2[uU][fF][nN]|[eE][lL][eE][tT][eE])|[uU][nN][bB][iI][nN][dD]|[pP][aA][rR][sS][eE]_[rR][eE]([sS][uU][lL][tT]|[fF][eE][rR][eE][nN][cC][eE])|[eE]([rR][rR]([nN][oO]|2[sS][tT][rR]|[oO][rR])|[xX][pP][lL][oO][dD][eE]_[dD][nN])|[fF]([iI][rR][sS][tT]_([eE][nN][tT][rR][yY]|[aA][tT][tT][rR][iI][bB][uU][tT][eE]|[rR][eE][fF][eE][rR][eE][nN][cC][eE])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[aA][dD][dD]|[lL][iI][sS][tT]|[gG][eE][tT]_([oO][pP][tT][iI][oO][nN]|[dD][nN]|[eE][nN][tT][rR][iI][eE][sS]|[vV][aA][lL][uU][eE][sS]_[lL][eE][nN]|[aA][tT][tT][rR][iI][bB][uU][tT][eE][sS])|[rR][eE]([nN][aA][mM][eE]|[aA][dD])|[mM][oO][dD]_([dD][eE][lL]|[aA][dD][dD]|[rR][eE][pP][lL][aA][cC][eE])|[bB][iI][nN][dD])(?=\s*\())|([\s\S])/g,/(?:\b[lL][eE][vV][eE][nN][sS][hH][tT][eE][iI][nN](?=\s*\())|([\s\S])/g,/(?:\b[lL][iI][bB][xX][mM][lL]_([sS][eE][tT]_[sS][tT][rR][eE][aA][mM][sS]_[cC][oO][nN][tT][eE][xX][tT]|[cC][lL][eE][aA][rR]_[eE][rR][rR][oO][rR][sS]|[uU][sS][eE]_[iI][nN][tT][eE][rR][nN][aA][lL]_[eE][rR][rR][oO][rR][sS]|[gG][eE][tT]_([eE][rR][rR][oO][rR][sS]|[lL][aA][sS][tT]_[eE][rR][rR][oO][rR]))(?=\s*\())|([\s\S])/g,/(?:\b([sS][yY][mM][lL][iI][nN][kK]|[lL][iI][nN][kK]([iI][nN][fF][oO])?|[rR][eE][aA][dD][lL][iI][nN][kK])(?=\s*\())|([\s\S])/g,/(?:\b([eE][zZ][mM][lL][mM]_[hH][aA][sS][hH]|[mM][aA][iI][lL])(?=\s*\())|([\s\S])/g,/(?:\b[sS][eE][tT]_[tT][iI][mM][eE]_[lL][iI][mM][iI][tT](?=\s*\())|([\s\S])/g,/(?:\b([hH]([yY][pP][oO][tT]|[eE][xX][dD][eE][cC])|[sS]([iI][nN]([hH])?|[qQ][rR][tT])|[nN][uU][mM][bB][eE][rR]_[fF][oO][rR][mM][aA][tT]|[cC]([oO][sS]([hH])?|[eE][iI][lL])|[iI][sS]_([nN][aA][nN]|[iI][nN][fF][iI][nN][iI][tT][eE]|[fF][iI][nN][iI][tT][eE])|[tT][aA][nN]([hH])?|[oO][cC][tT][dD][eE][cC]|[dD][eE]([cC]([hH][eE][xX]|[oO][cC][tT]|[bB][iI][nN])|[gG]2[rR][aA][dD])|[eE][xX][pP]([mM]1)?|[pP]([iI]|[oO][wW])|[fF]([lL][oO][oO][rR]|[mM][oO][dD])|[lL][oO][gG](1([pP]|0))?|[aA]([sS][iI][nN]([hH])?|[cC][oO][sS]([hH])?|[tT][aA][nN]([hH]|2)?|[bB][sS])|[rR]([oO][uU][nN][dD]|[aA][dD]2[dD][eE][gG])|[bB]([iI][nN][dD][eE][cC]|[aA][sS][eE]_[cC][oO][nN][vV][eE][rR][tT]))(?=\s*\())|([\s\S])/g,/(?:\b[mM][bB]_([sS]([tT][rR]([sS][tT][rR]|[cC][uU][tT]|[tT][oO]([uU][pP][pP][eE][rR]|[lL][oO][wW][eE][rR])|[iI]([sS][tT][rR]|[pP][oO][sS]|[mM][wW][iI][dD][tT][hH])|[pP][oO][sS]|[wW][iI][dD][tT][hH]|[lL][eE][nN]|[rR]([cC][hH][rR]|[iI]([cC][hH][rR]|[pP][oO][sS])|[pP][oO][sS]))|[uU][bB][sS][tT]([iI][tT][uU][tT][eE]_[cC][hH][aA][rR][aA][cC][tT][eE][rR]|[rR](_[cC][oO][uU][nN][tT])?)|[eE][nN][dD]_[mM][aA][iI][lL])|[hH][tT][tT][pP]_([iI][nN][pP][uU][tT]|[oO][uU][tT][pP][uU][tT])|[cC]([hH][eE][cC][kK]_[eE][nN][cC][oO][dD][iI][nN][gG]|[oO][nN][vV][eE][rR][tT]_([cC][aA][sS][eE]|[eE][nN][cC][oO][dD][iI][nN][gG]|[vV][aA][rR][iI][aA][bB][lL][eE][sS]|[kK][aA][nN][aA]))|[iI][nN][tT][eE][rR][nN][aA][lL]_[eE][nN][cC][oO][dD][iI][nN][gG]|[oO][uU][tT][pP][uU][tT]_[hH][aA][nN][dD][lL][eE][rR]|[dD][eE]([cC][oO][dD][eE]_([nN][uU][mM][eE][rR][iI][cC][eE][nN][tT][iI][tT][yY]|[mM][iI][mM][eE][hH][eE][aA][dD][eE][rR])|[tT][eE][cC][tT]_([oO][rR][dD][eE][rR]|[eE][nN][cC][oO][dD][iI][nN][gG]))|[eE][nN][cC][oO][dD][eE]_([nN][uU][mM][eE][rR][iI][cC][eE][nN][tT][iI][tT][yY]|[mM][iI][mM][eE][hH][eE][aA][dD][eE][rR])|[pP]([aA][rR][sS][eE]_[sS][tT][rR]|[rR][eE][fF][eE][rR][rR][eE][dD]_[mM][iI][mM][eE]_[nN][aA][mM][eE])|[lL]([iI][sS][tT]_([eE][nN][cC][oO][dD][iI][nN][gG][sS](_[aA][lL][iI][aA][sS]_[nN][aA][mM][eE][sS])?|[mM][iI][mM][eE]_[nN][aA][mM][eE][sS])|[aA][nN][gG][uU][aA][gG][eE])|[gG][eE][tT]_[iI][nN][fF][oO])(?=\s*\())|([\s\S])/g,/(?:\b[mM]([cC][rR][yY][pP][tT]_([cC]([fF][bB]|[rR][eE][aA][tT][eE]_[iI][vV]|[bB][cC])|[oO][fF][bB]|[dD][eE][cC][rR][yY][pP][tT]|[eE]([cC][bB]|[nN][cC](_([sS][eE][lL][fF]_[tT][eE][sS][tT]|[iI][sS]_[bB][lL][oO][cC][kK]_([aA][lL][gG][oO][rR][iI][tT][hH][mM](_[mM][oO][dD][eE])?|[mM][oO][dD][eE])|[gG][eE][tT]_([sS][uU][pP][pP][oO][rR][tT][eE][dD]_[kK][eE][yY]_[sS][iI][zZ][eE][sS]|[iI][vV]_[sS][iI][zZ][eE]|[kK][eE][yY]_[sS][iI][zZ][eE]|[aA][lL][gG][oO][rR][iI][tT][hH][mM][sS]_[nN][aA][mM][eE]|[mM][oO][dD][eE][sS]_[nN][aA][mM][eE]|[bB][lL][oO][cC][kK]_[sS][iI][zZ][eE]))|[rR][yY][pP][tT]))|[lL][iI][sS][tT]_([aA][lL][gG][oO][rR][iI][tT][hH][mM][sS]|[mM][oO][dD][eE][sS])|[gG][eE]([nN][eE][rR][iI][cC](_([iI][nN][iI][tT]|[dD][eE][iI][nN][iI][tT]))?|[tT]_([cC][iI][pP][hH][eE][rR]_[nN][aA][mM][eE]|[iI][vV]_[sS][iI][zZ][eE]|[kK][eE][yY]_[sS][iI][zZ][eE]|[bB][lL][oO][cC][kK]_[sS][iI][zZ][eE]))|[mM][oO][dD][uU][lL][eE]_([sS][eE][lL][fF]_[tT][eE][sS][tT]|[cC][lL][oO][sS][eE]|[iI][sS]_[bB][lL][oO][cC][kK]_([aA][lL][gG][oO][rR][iI][tT][hH][mM](_[mM][oO][dD][eE])?|[mM][oO][dD][eE])|[oO][pP][eE][nN]|[gG][eE][tT]_([sS][uU][pP][pP][oO][rR][tT][eE][dD]_[kK][eE][yY]_[sS][iI][zZ][eE][sS]|[aA][lL][gG][oO]_([kK][eE][yY]_[sS][iI][zZ][eE]|[bB][lL][oO][cC][kK]_[sS][iI][zZ][eE]))))|[dD][eE][cC][rR][yY][pP][tT]_[gG][eE][nN][eE][rR][iI][cC])(?=\s*\())|([\s\S])/g,/(?:\b[mM][eE][tT][aA][pP][hH][oO][nN][eE](?=\s*\())|([\s\S])/g,/(?:\b[mM][hH][aA][sS][hH](_([cC][oO][uU][nN][tT]|[kK][eE][yY][gG][eE][nN]_[sS]2[kK]|[gG][eE][tT]_([hH][aA][sS][hH]_[nN][aA][mM][eE]|[bB][lL][oO][cC][kK]_[sS][iI][zZ][eE])))?(?=\s*\())|([\s\S])/g,/(?:\b([gG][eE][tT]([tT][iI][mM][eE][oO][fF][dD][aA][yY]|[rR][uU][sS][aA][gG][eE])|[mM][iI][cC][rR][oO][tT][iI][mM][eE])(?=\s*\())|([\s\S])/g,/(?:\b[mM][iI][mM][eE]_[cC][oO][nN][tT][eE][nN][tT]_[tT][yY][pP][eE](?=\s*\())|([\s\S])/g,/(?:\b([sS][wW][fF]([pP][rR][eE][bB][uU][iI][lL][tT][cC][lL][iI][pP]_[iI][nN][iI][tT]|[vV][iI][dD][eE][oO][sS][tT][rR][eE][aA][mM]_[iI][nN][iI][tT])|[mM][iI][nN][gG]_([sS][eE][tT]([sS][cC][aA][lL][eE]|[cC][uU][bB][iI][cC][tT][hH][rR][eE][sS][hH][oO][lL][dD])|[uU][sS][eE]([sS][wW][fF][vV][eE][rR][sS][iI][oO][nN]|[cC][oO][nN][sS][tT][aA][nN][tT][sS])|[kK][eE][yY][pP][rR][eE][sS][sS]))(?=\s*\())|([\s\S])/g,/(?:\b[cC][uU][rR][lL]_[mM][uU][lL][tT][iI]_([sS][eE][lL][eE][cC][tT]|[cC][lL][oO][sS][eE]|[iI][nN]([iI][tT]|[fF][oO]_[rR][eE][aA][dD])|[eE][xX][eE][cC]|[aA][dD][dD]_[hH][aA][nN][dD][lL][eE]|[gG][eE][tT][cC][oO][nN][tT][eE][nN][tT]|[rR][eE][mM][oO][vV][eE]_[hH][aA][nN][dD][lL][eE])(?=\s*\())|([\s\S])/g,/(?:\b[mM][yY][sS][qQ][lL][iI]_([sS]([sS][lL]_[sS][eE][tT]|[tT]([oO][rR][eE]_[rR][eE][sS][uU][lL][tT]|[aA][tT]|[mM][tT]_([sS]([tT][oO][rR][eE]_[rR][eE][sS][uU][lL][tT]|[eE][nN][dD]_[lL][oO][nN][gG]_[dD][aA][tT][aA]|[qQ][lL][sS][tT][aA][tT][eE])|[nN][uU][mM]_[rR][oO][wW][sS]|[cC][lL][oO][sS][eE]|[iI][nN]([sS][eE][rR][tT]_[iI][dD]|[iI][tT])|[dD][aA][tT][aA]_[sS][eE][eE][kK]|[pP]([aA][rR][aA][mM]_[cC][oO][uU][nN][tT]|[rR][eE][pP][aA][rR][eE])|[eE]([rR][rR]([nN][oO]|[oO][rR])|[xX][eE][cC][uU][tT][eE])|[fF]([iI][eE][lL][dD]_[cC][oO][uU][nN][tT]|[eE][tT][cC][hH]|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[aA]([tT][tT][rR]_([sS][eE][tT]|[gG][eE][tT])|[fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS])|[rR][eE][sS]([uU][lL][tT]_[mM][eE][tT][aA][dD][aA][tT][aA]|[eE][tT])|[bB][iI][nN][dD]_([pP][aA][rR][aA][mM]|[rR][eE][sS][uU][lL][tT])))|[eE]([tT]_[lL][oO][cC][aA][lL]_[iI][nN][fF][iI][lL][eE]_([hH][aA][nN][dD][lL][eE][rR]|[dD][eE][fF][aA][uU][lL][tT])|[lL][eE][cC][tT]_[dD][bB])|[qQ][lL][sS][tT][aA][tT][eE])|[nN]([uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[eE][xX][tT]_[rR][eE][sS][uU][lL][tT])|[cC]([hH][aA]([nN][gG][eE]_[uU][sS][eE][rR]|[rR][aA][cC][tT][eE][rR]_[sS][eE][tT]_[nN][aA][mM][eE])|[oO][mM][mM][iI][tT]|[lL][oO][sS][eE])|[tT][hH][rR][eE][aA][dD]_([sS][aA][fF][eE]|[iI][dD])|[iI][nN]([sS][eE][rR][tT]_[iI][dD]|[iI][tT]|[fF][oO])|[oO][pP][tT][iI][oO][nN][sS]|[dD]([uU][mM][pP]_[dD][eE][bB][uU][gG]_[iI][nN][fF][oO]|[eE][bB][uU][gG]|[aA][tT][aA]_[sS][eE][eE][kK])|[uU][sS][eE]_[rR][eE][sS][uU][lL][tT]|[pP]([iI][nN][gG]|[rR][eE][pP][aA][rR][eE])|[eE][rR][rR]([nN][oO]|[oO][rR])|[kK][iI][lL][lL]|[fF]([iI][eE][lL][dD]_([sS][eE][eE][kK]|[cC][oO][uU][nN][tT]|[tT][eE][lL][lL])|[eE][tT][cC][hH]_([fF][iI][eE][lL][dD]([sS]|_[dD][iI][rR][eE][cC][tT])?|[lL][eE][nN][gG][tT][hH][sS]|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[wW][aA][rR][nN][iI][nN][gG]_[cC][oO][uU][nN][tT]|[aA]([uU][tT][oO][cC][oO][mM][mM][iI][tT]|[fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS])|[rR]([oO][lL][lL][bB][aA][cC][kK]|[eE][aA][lL]_([cC][oO][nN][nN][eE][cC][tT]|[eE][sS][cC][aA][pP][eE]_[sS][tT][rR][iI][nN][gG]|[qQ][uU][eE][rR][yY]))|[gG][eE][tT]_([sS][eE][rR][vV][eE][rR]_([iI][nN][fF][oO]|[vV][eE][rR][sS][iI][oO][nN])|[hH][oO][sS][tT]_[iI][nN][fF][oO]|[cC][lL][iI][eE][nN][tT]_([iI][nN][fF][oO]|[vV][eE][rR][sS][iI][oO][nN])|[pP][rR][oO][tT][oO]_[iI][nN][fF][oO])|[mM][oO][rR][eE]_[rR][eE][sS][uU][lL][tT][sS])(?=\s*\())|([\s\S])/g,/(?:\b[mM][yY][sS][qQ][lL][iI]_[eE][mM][bB][eE][dD][dD][eE][dD]_[sS][eE][rR][vV][eE][rR]_([sS][tT][aA][rR][tT]|[eE][nN][dD])(?=\s*\())|([\s\S])/g,/(?:\b[mM][yY][sS][qQ][lL][iI]_([sS]([tT][mM][tT]_[gG][eE][tT]_[wW][aA][rR][nN][iI][nN][gG][sS]|[eE][tT]_[cC][hH][aA][rR][sS][eE][tT])|[cC][oO][nN][nN][eE][cC][tT](_[eE][rR][rR]([nN][oO]|[oO][rR]))?|[qQ][uU][eE][rR][yY]|[fF][eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[aA]([sS][sS][oO][cC]|[rR][rR][aA][yY]))|[gG][eE][tT]_([cC][hH][aA][rR][sS][eE][tT]|[wW][aA][rR][nN][iI][nN][gG][sS])|[mM][uU][lL][tT][iI]_[qQ][uU][eE][rR][yY])(?=\s*\())|([\s\S])/g,/(?:\b[mM][yY][sS][qQ][lL][iI]_([sS]([eE][nN][dD]_[qQ][uU][eE][rR][yY]|[lL][aA][vV][eE]_[qQ][uU][eE][rR][yY])|[dD][iI][sS][aA][bB][lL][eE]_[rR]([pP][lL]_[pP][aA][rR][sS][eE]|[eE][aA][dD][sS]_[fF][rR][oO][mM]_[mM][aA][sS][tT][eE][rR])|[eE][nN][aA][bB][lL][eE]_[rR]([pP][lL]_[pP][aA][rR][sS][eE]|[eE][aA][dD][sS]_[fF][rR][oO][mM]_[mM][aA][sS][tT][eE][rR])|[rR][pP][lL]_([pP]([aA][rR][sS][eE]_[eE][nN][aA][bB][lL][eE][dD]|[rR][oO][bB][eE])|[qQ][uU][eE][rR][yY]_[tT][yY][pP][eE])|[mM][aA][sS][tT][eE][rR]_[qQ][uU][eE][rR][yY])(?=\s*\())|([\s\S])/g,/(?:\b[mM][yY][sS][qQ][lL][iI]_[rR][eE][pP][oO][rR][tT](?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[nN][aA][mM][eE][dD][nN][oO][dD][eE][mM][aA][pP]_([sS][eE][tT]_[nN][aA][mM][eE][dD]_[iI][tT][eE][mM](_[nN][sS])?|[iI][tT][eE][mM]|[rR][eE][mM][oO][vV][eE]_[nN][aA][mM][eE][dD]_[iI][tT][eE][mM](_[nN][sS])?|[gG][eE][tT]_[nN][aA][mM][eE][dD]_[iI][tT][eE][mM](_[nN][sS])?)(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[nN][aA][mM][eE][lL][iI][sS][tT]_[gG][eE][tT]_[nN][aA][mM][eE]([sS][pP][aA][cC][eE]_[uU][rR][iI])?(?=\s*\())|([\s\S])/g,/(?:\b[nN][cC][uU][rR][sS][eE][sS]_([sS]([hH][oO][wW]_[pP][aA][nN][eE][lL]|[cC][rR](_([sS][eE][tT]|[iI][nN][iI][tT]|[dD][uU][mM][pP]|[rR][eE][sS][tT][oO][rR][eE])|[lL])|[tT][aA]([nN][dD]([oO][uU][tT]|[eE][nN][dD])|[rR][tT]_[cC][oO][lL][oO][rR])|[lL][kK]_([sS][eE][tT]|[nN][oO][uU][tT][rR][eE][fF][rR][eE][sS][hH]|[cC]([oO][lL][oO][rR]|[lL][eE][aA][rR])|[iI][nN][iI][tT]|[tT][oO][uU][cC][hH]|[aA][tT][tT][rR]([sS][eE][tT]|[oO]([nN]|[fF][fF]))?|[rR][eE]([sS][tT][oO][rR][eE]|[fF][rR][eE][sS][hH]))|[aA][vV][eE][tT][tT][yY])|[hH]([iI][dD][eE]_[pP][aA][nN][eE][lL]|[lL][iI][nN][eE]|[aA]([sS]_([cC][oO][lL][oO][rR][sS]|[iI]([cC]|[lL])|[kK][eE][yY])|[lL][fF][dD][eE][lL][aA][yY]))|[nN]([oO]([nN][lL]|[cC][bB][rR][eE][aA][kK]|[eE][cC][hH][oO]|[qQ][iI][fF][lL][uU][sS][hH]|[rR][aA][wW])|[eE][wW](_[pP][aA][nN][eE][lL]|[pP][aA][dD]|[wW][iI][nN])|[aA][pP][mM][sS]|[lL])|[cC]([oO][lL][oO][rR]_([sS][eE][tT]|[cC][oO][nN][tT][eE][nN][tT])|[uU][rR][sS]_[sS][eE][tT]|[lL]([eE][aA][rR]|[rR][tT][oO]([eE][oO][lL]|[bB][oO][tT]))|[aA][nN]_[cC][hH][aA][nN][gG][eE]_[cC][oO][lL][oO][rR]|[bB][rR][eE][aA][kK])|[tT]([yY][pP][eE][aA][hH][eE][aA][dD]|[iI][mM][eE][oO][uU][tT]|[oO][pP]_[pP][aA][nN][eE][lL]|[eE][rR][mM]([nN][aA][mM][eE]|[aA][tT][tT][rR][sS]))|[iI]([sS][eE][nN][dD][wW][iI][nN]|[nN]([sS]([sS][tT][rR]|[cC][hH]|[tT][rR]|[dD][eE][lL][lL][nN]|[eE][rR][tT][lL][nN])|[cC][hH]|[iI][tT](_([cC][oO][lL][oO][rR]|[pP][aA][iI][rR]))?))|[dD]([oO][uU][pP][dD][aA][tT][eE]|[eE]([fF]([iI][nN][eE]_[kK][eE][yY]|_([sS][hH][eE][lL][lL]_[mM][oO][dD][eE]|[pP][rR][oO][gG]_[mM][oO][dD][eE]))|[lL]([cC][hH]|_[pP][aA][nN][eE][lL]|[eE][tT][eE][lL][nN]|[aA][yY]_[oO][uU][tT][pP][uU][tT]|[wW][iI][nN])))|[uU]([sS][eE]_([dD][eE][fF][aA][uU][lL][tT]_[cC][oO][lL][oO][rR][sS]|[eE]([nN][vV]|[xX][tT][eE][nN][dD][eE][dD]_[nN][aA][mM][eE][sS]))|[nN][gG][eE][tT]([cC][hH]|[mM][oO][uU][sS][eE])|[pP][dD][aA][tT][eE]_[pP][aA][nN][eE][lL][sS])|[pP]([nN][oO][uU][tT][rR][eE][fF][rR][eE][sS][hH]|[uU][tT][pP]|[aA]([nN][eE][lL]_([wW][iI][nN][dD][oO][wW]|[aA][bB][oO][vV][eE]|[bB][eE][lL][oO][wW])|[iI][rR]_[cC][oO][nN][tT][eE][nN][tT])|[rR][eE][fF][rR][eE][sS][hH])|[eE]([cC][hH][oO]([cC][hH][aA][rR])?|[nN][dD]|[rR][aA][sS][eE]([cC][hH][aA][rR])?)|[vV]([iI][dD][aA][tT][tT][rR]|[lL][iI][nN][eE])|[kK]([iI][lL][lL][cC][hH][aA][rR]|[eE][yY]([oO][kK]|[pP][aA][dD]))|[qQ][iI][fF][lL][uU][sS][hH]|[fF]([iI][lL][tT][eE][rR]|[lL]([uU][sS][hH][iI][nN][pP]|[aA][sS][hH]))|[lL][oO][nN][gG][nN][aA][mM][eE]|[wW]([sS][tT][aA][nN][dD]([oO][uU][tT]|[eE][nN][dD])|[hH][lL][iI][nN][eE]|[nN][oO][uU][tT][rR][eE][fF][rR][eE][sS][hH]|[cC]([oO][lL][oO][rR]_[sS][eE][tT]|[lL][eE][aA][rR])|[eE][rR][aA][sS][eE]|[vV][lL][iI][nN][eE]|[aA]([tT][tT][rR]([sS][eE][tT]|[oO]([nN]|[fF][fF]))|[dD][dD]([sS][tT][rR]|[cC][hH]))|[gG][eE][tT][cC][hH]|[rR][eE][fF][rR][eE][sS][hH]|[mM][oO]([uU][sS][eE]_[tT][rR][aA][fF][oO]|[vV][eE])|[bB][oO][rR][dD][eE][rR])|[aA]([sS][sS][uU][mM][eE]_[dD][eE][fF][aA][uU][lL][tT]_[cC][oO][lL][oO][rR][sS]|[tT][tT][rR]([sS][eE][tT]|[oO]([nN]|[fF][fF]))|[dD][dD]([sS][tT][rR]|[nN][sS][tT][rR]|[cC][hH]([sS][tT][rR]|[nN][sS][tT][rR])?))|[rR]([eE]([sS][eE][tT]([tT][yY]|_([sS][hH][eE][lL][lL]_[mM][oO][dD][eE]|[pP][rR][oO][gG]_[mM][oO][dD][eE]))|[pP][lL][aA][cC][eE]_[pP][aA][nN][eE][lL]|[fF][rR][eE][sS][hH])|[aA][wW])|[gG][eE][tT]([yY][xX]|[cC][hH]|[mM]([oO][uU][sS][eE]|[aA][xX][yY][xX]))|[bB]([oO]([tT][tT][oO][mM]_[pP][aA][nN][eE][lL]|[rR][dD][eE][rR])|[eE][eE][pP]|[kK][gG][dD]([sS][eE][tT])?|[aA][uU][dD][rR][aA][tT][eE])|[mM]([oO]([uU][sS][eE]([iI][nN][tT][eE][rR][vV][aA][lL]|_[tT][rR][aA][fF][oO]|[mM][aA][sS][kK])|[vV][eE](_[pP][aA][nN][eE][lL])?)|[eE][tT][aA]|[vV]([hH][lL][iI][nN][eE]|[cC][uU][rR]|[iI][nN][cC][hH]|[dD][eE][lL][cC][hH]|[vV][lL][iI][nN][eE]|[wW][aA][dD][dD][sS][tT][rR]|[aA][dD][dD]([sS][tT][rR]|[nN][sS][tT][rR]|[cC][hH]([sS][tT][rR]|[nN][sS][tT][rR])?)|[gG][eE][tT][cC][hH])))(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[nN][oO][dD][eE]_([sS][eE][tT]_[uU][sS][eE][rR]_[dD][aA][tT][aA]|[hH][aA][sS]_([cC][hH][iI][lL][dD]_[nN][oO][dD][eE][sS]|[aA][tT][tT][rR][iI][bB][uU][tT][eE][sS])|[nN][oO][rR][mM][aA][lL][iI][zZ][eE]|[cC]([oO][mM][pP][aA][rR][eE]_[dD][oO][cC][uU][mM][eE][nN][tT]_[pP][oO][sS][iI][tT][iI][oO][nN]|[lL][oO][nN][eE]_[nN][oO][dD][eE])|[iI]([sS]_([sS]([uU][pP][pP][oO][rR][tT][eE][dD]|[aA][mM][eE]_[nN][oO][dD][eE])|[dD][eE][fF][aA][uU][lL][tT]_[nN][aA][mM][eE][sS][pP][aA][cC][eE]|[eE][qQ][uU][aA][lL]_[nN][oO][dD][eE])|[nN][sS][eE][rR][tT]_[bB][eE][fF][oO][rR][eE])|[lL][oO][oO][kK][uU][pP]_([nN][aA][mM][eE][sS][pP][aA][cC][eE]_[uU][rR][iI]|[pP][rR][eE][fF][iI][xX])|[aA][pP][pP][eE][nN][dD]_[cC][hH][iI][lL][dD]|[gG][eE][tT]_([uU][sS][eE][rR]_[dD][aA][tT][aA]|[fF][eE][aA][tT][uU][rR][eE])|[rR][eE]([pP][lL][aA][cC][eE]_[cC][hH][iI][lL][dD]|[mM][oO][vV][eE]_[cC][hH][iI][lL][dD]))(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[nN][oO][dD][eE][lL][iI][sS][tT]_[iI][tT][eE][mM](?=\s*\())|([\s\S])/g,/(?:\b[nN][sS][aA][pP][iI]_([vV][iI][rR][tT][uU][aA][lL]|[rR][eE]([sS][pP][oO][nN][sS][eE]_[hH][eE][aA][dD][eE][rR][sS]|[qQ][uU][eE][sS][tT]_[hH][eE][aA][dD][eE][rR][sS]))(?=\s*\())|([\s\S])/g,/(?:\b[oO][cC][iI]([sS][eE][tT][bB][uU][fF][fF][eE][rR][iI][nN][gG][lL][oO][bB]|_([sS]([tT][aA][tT][eE][mM][eE][nN][tT]_[tT][yY][pP][eE]|[eE]([tT]_[pP][rR][eE][fF][eE][tT][cC][hH]|[rR][vV][eE][rR]_[vV][eE][rR][sS][iI][oO][nN]))|[cC]([oO]([nN][nN][eE][cC][tT]|[lL][lL][eE][cC][tT][iI][oO][nN]_([sS][iI][zZ][eE]|[tT][rR][iI][mM]|[eE][lL][eE][mM][eE][nN][tT]_([aA][sS][sS][iI][gG][nN]|[gG][eE][tT])|[aA]([sS][sS][iI][gG][nN]|[pP][pP][eE][nN][dD])|[mM][aA][xX])|[mM][mM][iI][tT])|[lL][oO][sS][eE]|[aA][nN][cC][eE][lL])|[nN]([uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[eE][wW]_([cC]([oO]([nN][nN][eE][cC][tT]|[lL][lL][eE][cC][tT][iI][oO][nN])|[uU][rR][sS][oO][rR])|[dD][eE][sS][cC][rR][iI][pP][tT][oO][rR]))|[iI][nN][tT][eE][rR][nN][aA][lL]_[dD][eE][bB][uU][gG]|[dD][eE][fF][iI][nN][eE]_[bB][yY]_[nN][aA][mM][eE]|[pP]([cC][oO][nN][nN][eE][cC][tT]|[aA]([sS][sS][wW][oO][rR][dD]_[cC][hH][aA][nN][gG][eE]|[rR][sS][eE]))|[eE]([rR][rR][oO][rR]|[xX][eE][cC][uU][tT][eE])|[fF]([iI][eE][lL][dD]_([sS]([cC][aA][lL][eE]|[iI][zZ][eE])|[nN][aA][mM][eE]|[iI][sS]_[nN][uU][lL][lL]|[tT][yY][pP][eE](_[rR][aA][wW])?|[pP][rR][eE][cC][iI][sS][iI][oO][nN])|[eE][tT][cC][hH](_([oO][bB][jJ][eE][cC][tT]|[aA]([sS][sS][oO][cC]|[lL][lL]|[rR][rR][aA][yY])|[rR][oO][wW]))?|[rR][eE][eE]_([sS][tT][aA][tT][eE][mM][eE][nN][tT]|[cC][oO][lL][lL][eE][cC][tT][iI][oO][nN]|[dD][eE][sS][cC][rR][iI][pP][tT][oO][rR]))|[lL][oO][bB]_([sS]([iI][zZ][eE]|[eE][eE][kK]|[aA][vV][eE])|[cC]([oO][pP][yY]|[lL][oO][sS][eE])|[tT]([eE][lL][lL]|[rR][uU][nN][cC][aA][tT][eE])|[iI]([sS]_[eE][qQ][uU][aA][lL]|[mM][pP][oO][rR][tT])|[eE]([oO][fF]|[rR][aA][sS][eE]|[xX][pP][oO][rR][tT])|[fF][lL][uU][sS][hH]|[aA][pP][pP][eE][nN][dD]|[wW][rR][iI][tT][eE](_[tT][eE][mM][pP][oO][rR][aA][rR][yY])?|[lL][oO][aA][dD]|[rR][eE]([wW][iI][nN][dD]|[aA][dD]))|[rR]([oO][lL][lL][bB][aA][cC][kK]|[eE][sS][uU][lL][tT])|[bB][iI][nN][dD]_([aA][rR][rR][aA][yY]_[bB][yY]_[nN][aA][mM][eE]|[bB][yY]_[nN][aA][mM][eE]))|[fF][eE][tT][cC][hH][iI][nN][tT][oO]|[gG][eE][tT][bB][uU][fF][fF][eE][rR][iI][nN][gG][lL][oO][bB])(?=\s*\())|([\s\S])/g,/(?:\b[oO][pP][eE][nN][sS][sS][lL]_([sS]([iI][gG][nN]|[eE][aA][lL])|[cC][sS][rR]_([sS][iI][gG][nN]|[nN][eE][wW]|[eE][xX][pP][oO][rR][tT](_[tT][oO]_[fF][iI][lL][eE])?|[gG][eE][tT]_([sS][uU][bB][jJ][eE][cC][tT]|[pP][uU][bB][lL][iI][cC]_[kK][eE][yY]))|[oO][pP][eE][nN]|[eE][rR][rR][oO][rR]_[sS][tT][rR][iI][nN][gG]|[pP]([uU][bB][lL][iI][cC]_([dD][eE][cC][rR][yY][pP][tT]|[eE][nN][cC][rR][yY][pP][tT])|[kK]([cC][sS](12_([eE][xX][pP][oO][rR][tT](_[tT][oO]_[fF][iI][lL][eE])?|[rR][eE][aA][dD])|7_([sS][iI][gG][nN]|[dD][eE][cC][rR][yY][pP][tT]|[eE][nN][cC][rR][yY][pP][tT]|[vV][eE][rR][iI][fF][yY]))|[eE][yY]_([nN][eE][wW]|[eE][xX][pP][oO][rR][tT](_[tT][oO]_[fF][iI][lL][eE])?|[fF][rR][eE][eE]|[gG][eE][tT]_([dD][eE][tT][aA][iI][lL][sS]|[pP]([uU][bB][lL][iI][cC]|[rR][iI][vV][aA][tT][eE]))))|[rR][iI][vV][aA][tT][eE]_([dD][eE][cC][rR][yY][pP][tT]|[eE][nN][cC][rR][yY][pP][tT]))|[vV][eE][rR][iI][fF][yY]|[xX]509_([cC][hH][eE][cC][kK](_[pP][rR][iI][vV][aA][tT][eE]_[kK][eE][yY]|[pP][uU][rR][pP][oO][sS][eE])|[pP][aA][rR][sS][eE]|[eE][xX][pP][oO][rR][tT](_[tT][oO]_[fF][iI][lL][eE])?|[fF][rR][eE][eE]|[rR][eE][aA][dD]))(?=\s*\())|([\s\S])/g,/(?:\b[oO]([uU][tT][pP][uU][tT]_([aA][dD][dD]_[rR][eE][wW][rR][iI][tT][eE]_[vV][aA][rR]|[rR][eE][sS][eE][tT]_[rR][eE][wW][rR][iI][tT][eE]_[vV][aA][rR][sS])|[bB]_([sS][tT][aA][rR][tT]|[cC][lL][eE][aA][nN]|[iI][mM][pP][lL][iI][cC][iI][tT]_[fF][lL][uU][sS][hH]|[eE][nN][dD]_([cC][lL][eE][aA][nN]|[fF][lL][uU][sS][hH])|[fF][lL][uU][sS][hH]|[lL][iI][sS][tT]_[hH][aA][nN][dD][lL][eE][rR][sS]|[gG][eE][tT]_([sS][tT][aA][tT][uU][sS]|[cC]([oO][nN][tT][eE][nN][tT][sS]|[lL][eE][aA][nN])|[fF][lL][uU][sS][hH]|[lL][eE]([nN][gG][tT][hH]|[vV][eE][lL]))))(?=\s*\())|([\s\S])/g,/(?:\b([uU][nN][pP][aA][cC][kK]|[pP][aA][cC][kK])(?=\s*\())|([\s\S])/g,/(?:\b[gG][eE][tT]([lL][aA][sS][tT][mM][oO][dD]|[mM][yY]([iI][nN][oO][dD][eE]|[uU][iI][dD]|[pP][iI][dD]|[gG][iI][dD]))(?=\s*\())|([\s\S])/g,/(?:\b[pP][cC][nN][tT][lL]_([sS]([iI][gG][nN][aA][lL]|[eE][tT][pP][rR][iI][oO][rR][iI][tT][yY])|[eE][xX][eE][cC]|[fF][oO][rR][kK]|[wW]([sS][tT][oO][pP][sS][iI][gG]|[tT][eE][rR][mM][sS][iI][gG]|[iI][fF]([sS]([iI][gG][nN][aA][lL][eE][dD]|[tT][oO][pP][pP][eE][dD])|[eE][xX][iI][tT][eE][dD])|[eE][xX][iI][tT][sS][tT][aA][tT][uU][sS]|[aA][iI][tT]([pP][iI][dD])?)|[aA][lL][aA][rR][mM]|[gG][eE][tT][pP][rR][iI][oO][rR][iI][tT][yY])(?=\s*\())|([\s\S])/g,/(?:\b[pP][dD][oO]_[dD][rR][iI][vV][eE][rR][sS](?=\s*\())|([\s\S])/g,/(?:\b[pP][gG]_([sS][eE]([nN][dD]_([eE][xX][eE][cC][uU][tT][eE]|[pP][rR][eE][pP][aA][rR][eE]|[qQ][uU][eE][rR][yY](_[pP][aA][rR][aA][mM][sS])?)|[tT]_([cC][lL][iI][eE][nN][tT]_[eE][nN][cC][oO][dD][iI][nN][gG]|[eE][rR][rR][oO][rR]_[vV][eE][rR][bB][oO][sS][iI][tT][yY])|[lL][eE][cC][tT])|[hH][oO][sS][tT]|[nN][uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[cC]([oO]([nN]([nN][eE][cC][tT]([iI][oO][nN]_([sS][tT][aA][tT][uU][sS]|[rR][eE][sS][eE][tT]|[bB][uU][sS][yY]))?|[vV][eE][rR][tT])|[pP][yY]_([tT][oO]|[fF][rR][oO][mM]))|[aA][nN][cC][eE][lL]_[qQ][uU][eE][rR][yY]|[lL]([iI][eE][nN][tT]_[eE][nN][cC][oO][dD][iI][nN][gG]|[oO][sS][eE]))|[iI][nN][sS][eE][rR][tT]|[tT]([tT][yY]|[rR][aA]([nN][sS][aA][cC][tT][iI][oO][nN]_[sS][tT][aA][tT][uU][sS]|[cC][eE]))|[oO][pP][tT][iI][oO][nN][sS]|[dD]([eE][lL][eE][tT][eE]|[bB][nN][aA][mM][eE])|[uU]([nN]([tT][rR][aA][cC][eE]|[eE][sS][cC][aA][pP][eE]_[bB][yY][tT][eE][aA])|[pP][dD][aA][tT][eE])|[eE]([sS][cC][aA][pP][eE]_([sS][tT][rR][iI][nN][gG]|[bB][yY][tT][eE][aA])|[nN][dD]_[cC][oO][pP][yY]|[xX][eE][cC][uU][tT][eE])|[pP]([cC][oO][nN][nN][eE][cC][tT]|[iI][nN][gG]|[oO][rR][tT]|[uU][tT]_[lL][iI][nN][eE]|[aA][rR][aA][mM][eE][tT][eE][rR]_[sS][tT][aA][tT][uU][sS]|[rR][eE][pP][aA][rR][eE])|[vV][eE][rR][sS][iI][oO][nN]|[fF]([iI][eE][lL][dD]_([sS][iI][zZ][eE]|[nN]([uU][mM]|[aA][mM][eE])|[iI][sS]_[nN][uU][lL][lL]|[tT]([yY][pP][eE](_[oO][iI][dD])?|[aA][bB][lL][eE])|[pP][rR][tT][lL][eE][nN])|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[aA]([sS][sS][oO][cC]|[lL][lL](_[cC][oO][lL][uU][mM][nN][sS])?|[rR][rR][aA][yY])|[rR]([oO][wW]|[eE][sS][uU][lL][tT]))|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[qQ][uU][eE][rR][yY](_[pP][aA][rR][aA][mM][sS])?|[aA][fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS]|[lL]([oO]_([sS][eE][eE][kK]|[cC]([lL][oO][sS][eE]|[rR][eE][aA][tT][eE])|[tT][eE][lL][lL]|[iI][mM][pP][oO][rR][tT]|[oO][pP][eE][nN]|[uU][nN][lL][iI][nN][kK]|[eE][xX][pP][oO][rR][tT]|[wW][rR][iI][tT][eE]|[rR][eE][aA][dD](_[aA][lL][lL])?)|[aA][sS][tT]_([nN][oO][tT][iI][cC][eE]|[oO][iI][dD]|[eE][rR][rR][oO][rR]))|[gG][eE][tT]_([nN][oO][tT][iI][fF][yY]|[pP][iI][dD]|[rR][eE][sS][uU][lL][tT])|[rR][eE][sS][uU][lL][tT]_([sS]([tT][aA][tT][uU][sS]|[eE][eE][kK])|[eE][rR][rR][oO][rR](_[fF][iI][eE][lL][dD])?)|[mM][eE][tT][aA]_[dD][aA][tT][aA])(?=\s*\())|([\s\S])/g,/(?:\b([vV][iI][rR][tT][uU][aA][lL]|[aA][pP][aA][cC][hH][eE]_([sS][eE][tT][eE][nN][vV]|[nN][oO][tT][eE]|[cC][hH][iI][lL][dD]_[tT][eE][rR][mM][iI][nN][aA][tT][eE]|[lL][oO][oO][kK][uU][pP]_[uU][rR][iI]|[gG][eE][tT]_([vV][eE][rR][sS][iI][oO][nN]|[mM][oO][dD][uU][lL][eE][sS])|[rR][eE]([sS]([eE][tT]_[tT][iI][mM][eE][oO][uU][tT]|[pP][oO][nN][sS][eE]_[hH][eE][aA][dD][eE][rR][sS])|[qQ][uU][eE][sS][tT]_([sS]([oO][mM][eE]_[aA][uU][tT][hH]_[rR][eE][qQ][uU][iI][rR][eE][dD]|[uU][bB]_[rR][eE][qQ]_([lL][oO][oO][kK][uU][pP]_([uU][rR][iI]|[fF][iI][lL][eE])|[mM][eE][tT][hH][oO][dD]_[uU][rR][iI])|[eE]([tT]_([eE][tT][aA][gG]|[lL][aA][sS][tT]_[mM][oO][dD][iI][fF][iI][eE][dD])|[rR][vV][eE][rR]_[pP][oO][rR][tT])|[aA][tT][iI][sS][fF][iI][eE][sS])|[hH][eE][aA][dD][eE][rR][sS](_([iI][nN]|[oO][uU][tT]))?|[iI][sS]_[iI][nN][iI][tT][iI][aA][lL]_[rR][eE][qQ]|[dD][iI][sS][cC][aA][rR][dD]_[rR][eE][qQ][uU][eE][sS][tT]_[bB][oO][dD][yY]|[uU][pP][dD][aA][tT][eE]_[mM][tT][iI][mM][eE]|[eE][rR][rR]_[hH][eE][aA][dD][eE][rR][sS]_[oO][uU][tT]|[lL][oO][gG]_[eE][rR][rR][oO][rR]|[aA][uU][tT][hH]_([nN][aA][mM][eE]|[tT][yY][pP][eE])|[rR]([uU][nN]|[eE][mM][oO][tT][eE]_[hH][oO][sS][tT])|[mM][eE][eE][tT][sS]_[cC][oO][nN][dD][iI][tT][iI][oO][nN][sS])))|[gG][eE][tT][aA][lL][lL][hH][eE][aA][dD][eE][rR][sS])(?=\s*\())|([\s\S])/g,/(?:\b([sS][tT][rR]([tT][oO][tT][iI][mM][eE]|[fF][tT][iI][mM][eE])|[cC][hH][eE][cC][kK][dD][aA][tT][eE]|[tT][iI][mM][eE]([zZ][oO][nN][eE]_([nN][aA][mM][eE]_([fF][rR][oO][mM]_[aA][bB][bB][rR]|[gG][eE][tT])|[iI][dD][eE][nN][tT][iI][fF][iI][eE][rR][sS]_[lL][iI][sS][tT]|[tT][rR][aA][nN][sS][iI][tT][iI][oO][nN][sS]_[gG][eE][tT]|[oO]([pP][eE][nN]|[fF][fF][sS][eE][tT]_[gG][eE][tT])|[aA][bB][bB][rR][eE][vV][iI][aA][tT][iI][oO][nN][sS]_[lL][iI][sS][tT]))?|[iI][dD][aA][tT][eE]|[dD][aA][tT][eE](_([sS][uU][nN]([sS][eE][tT]|_[iI][nN][fF][oO]|[rR][iI][sS][eE])|[cC][rR][eE][aA][tT][eE]|[iI][sS][oO][dD][aA][tT][eE]_[sS][eE][tT]|[tT][iI][mM][eE]([zZ][oO][nN][eE]_([sS][eE][tT]|[gG][eE][tT])|_[sS][eE][tT])|[dD]([eE][fF][aA][uU][lL][tT]_[tT][iI][mM][eE][zZ][oO][nN][eE]_([sS][eE][tT]|[gG][eE][tT])|[aA][tT][eE]_[sS][eE][tT])|[oO][fF][fF][sS][eE][tT]_[gG][eE][tT]|[pP][aA][rR][sS][eE]|[fF][oO][rR][mM][aA][tT]|[mM][oO][dD][iI][fF][yY]))?|[lL][oO][cC][aA][lL][tT][iI][mM][eE]|[gG]([eE][tT][dD][aA][tT][eE]|[mM]([sS][tT][rR][fF][tT][iI][mM][eE]|[dD][aA][tT][eE]|[mM][kK][tT][iI][mM][eE]))|[mM][kK][tT][iI][mM][eE])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[iI][mM][pP][oO][rR][tT]_[sS][iI][mM][pP][lL][eE][xX][mM][lL](?=\s*\())|([\s\S])/g,/(?:\b[fF][bB][sS][qQ][lL]_([hH][oO][sS][tT][nN][aA][mM][eE]|[sS]([tT]([oO][pP]_[dD][bB]|[aA][rR][tT]_[dD][bB])|[eE]([tT]_([cC][hH][aA][rR][aA][cC][tT][eE][rR][sS][eE][tT]|[tT][rR][aA][nN][sS][aA][cC][tT][iI][oO][nN]|[pP][aA][sS][sS][wW][oO][rR][dD]|[lL][oO][bB]_[mM][oO][dD][eE])|[lL][eE][cC][tT]_[dD][bB]))|[nN]([uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[eE][xX][tT]_[rR][eE][sS][uU][lL][tT])|[cC]([hH][aA][nN][gG][eE]_[uU][sS][eE][rR]|[oO]([nN][nN][eE][cC][tT]|[mM][mM][iI][tT])|[lL][oO]([sS][eE]|[bB]_[sS][iI][zZ][eE])|[rR][eE][aA][tT][eE]_([cC][lL][oO][bB]|[dD][bB]|[bB][lL][oO][bB]))|[tT][aA][bB][lL][eE]_[nN][aA][mM][eE]|[iI][nN][sS][eE][rR][tT]_[iI][dD]|[dD]([aA][tT][aA](_[sS][eE][eE][kK]|[bB][aA][sS][eE](_[pP][aA][sS][sS][wW][oO][rR][dD])?)|[rR][oO][pP]_[dD][bB]|[bB]_([sS][tT][aA][tT][uU][sS]|[qQ][uU][eE][rR][yY]))|[uU][sS][eE][rR][nN][aA][mM][eE]|[eE][rR][rR]([nN][oO]|[oO][rR])|[pP]([cC][oO][nN][nN][eE][cC][tT]|[aA][sS][sS][wW][oO][rR][dD])|[fF]([iI][eE][lL][dD]_([sS][eE][eE][kK]|[nN][aA][mM][eE]|[tT]([yY][pP][eE]|[aA][bB][lL][eE])|[fF][lL][aA][gG][sS]|[lL][eE][nN])|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[fF][iI][eE][lL][dD]|[lL][eE][nN][gG][tT][hH][sS]|[aA]([sS][sS][oO][cC]|[rR][rR][aA][yY])|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[qQ][uU][eE][rR][yY]|[wW][aA][rR][nN][iI][nN][gG][sS]|[lL][iI][sS][tT]_([tT][aA][bB][lL][eE][sS]|[dD][bB][sS]|[fF][iI][eE][lL][dD][sS])|[aA]([uU][tT][oO][cC][oO][mM][mM][iI][tT]|[fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS])|[gG][eE][tT]_[aA][uU][tT][oO][sS][tT][aA][rR][tT]_[iI][nN][fF][oO]|[rR]([oO]([wW][sS]_[fF][eE][tT][cC][hH][eE][dD]|[lL][lL][bB][aA][cC][kK])|[eE]([sS][uU][lL][tT]|[aA][dD]_([cC][lL][oO][bB]|[bB][lL][oO][bB])))|[bB][lL][oO][bB]_[sS][iI][zZ][eE])(?=\s*\())|([\s\S])/g,/(?:\b[fF][tT][pP]_([sS]([sS][lL]_[cC][oO][nN][nN][eE][cC][tT]|[yY][sS][tT][yY][pP][eE]|[iI]([tT][eE]|[zZ][eE])|[eE][tT]_[oO][pP][tT][iI][oO][nN])|[nN]([lL][iI][sS][tT]|[bB]_([cC][oO][nN][tT][iI][nN][uU][eE]|[pP][uU][tT]|[fF]([pP][uU][tT]|[gG][eE][tT])|[gG][eE][tT]))|[cC]([hH]([dD][iI][rR]|[mM][oO][dD])|[dD][uU][pP]|[oO][nN][nN][eE][cC][tT]|[lL][oO][sS][eE])|[dD][eE][lL][eE][tT][eE]|[eE][xX][eE][cC]|[pP]([uU][tT]|[aA][sS][vV]|[wW][dD])|[fF]([pP][uU][tT]|[gG][eE][tT])|[aA][lL][lL][oO][cC]|[lL][oO][gG][iI][nN]|[gG][eE][tT](_[oO][pP][tT][iI][oO][nN])?|[rR]([eE][nN][aA][mM][eE]|[aA][wW]([lL][iI][sS][tT])?|[mM][dD][iI][rR])|[mM]([dD][tT][mM]|[kK][dD][iI][rR]))(?=\s*\())|([\s\S])/g,/(?:\b([vV][iI][rR][tT][uU][aA][lL]|[aA][pP][aA][cC][hH][eE]_([sS][eE][tT][eE][nN][vV]|[nN][oO][tT][eE]|[gG][eE][tT](_([vV][eE][rR][sS][iI][oO][nN]|[mM][oO][dD][uU][lL][eE][sS])|[eE][nN][vV])|[rR][eE][sS][pP][oO][nN][sS][eE]_[hH][eE][aA][dD][eE][rR][sS])|[gG][eE][tT][aA][lL][lL][hH][eE][aA][dD][eE][rR][sS])(?=\s*\())|([\s\S])/g,/(?:\b[iI][mM][aA][pP]_([hH][eE][aA][dD][eE][rR]([sS]|[iI][nN][fF][oO])|[sS]([cC][aA][nN]|[tT][aA][tT][uU][sS]|[oO][rR][tT]|[uU][bB][sS][cC][rR][iI][bB][eE]|[eE]([tT](_[qQ][uU][oO][tT][aA]|[fF][lL][aA][gG]_[fF][uU][lL][lL]|[aA][cC][lL])|[aA][rR][cC][hH])|[aA][vV][eE][bB][oO][dD][yY])|[cC]([hH][eE][cC][kK]|[lL]([oO][sS][eE]|[eE][aA][rR][fF][lL][aA][gG]_[fF][uU][lL][lL])|[rR][eE][aA][tT][eE][mM][aA][iI][lL][bB][oO][xX])|[nN][uU][mM]_([rR][eE][cC][eE][nN][tT]|[mM][sS][gG])|[tT]([hH][rR][eE][aA][dD]|[iI][mM][eE][oO][uU][tT])|8[bB][iI][tT]|[dD][eE][lL][eE][tT][eE]([mM][aA][iI][lL][bB][oO][xX])?|[oO][pP][eE][nN]|[uU]([nN]([sS][uU][bB][sS][cC][rR][iI][bB][eE]|[dD][eE][lL][eE][tT][eE])|[iI][dD]|[tT][fF](7_([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE])|8))|[eE]([rR][rR][oO][rR][sS]|[xX][pP][uU][nN][gG][eE])|[pP][iI][nN][gG]|[qQ][pP][rR][iI][nN][tT]|[fF][eE][tT][cC][hH]([hH][eE][aA][dD][eE][rR]|[sS][tT][rR][uU][cC][tT][uU][rR][eE]|_[oO][vV][eE][rR][vV][iI][eE][wW]|[bB][oO][dD][yY])|[lL]([sS][uU][bB]|[iI][sS][tT]|[aA][sS][tT]_[eE][rR][rR][oO][rR])|[aA]([pP][pP][eE][nN][dD]|[lL][eE][rR][tT][sS])|[gG][eE][tT]([sS][uU][bB][sS][cC][rR][iI][bB][eE][dD]|_[qQ][uU][oO][tT][aA]([rR][oO][oO][tT])?|[aA][cC][lL]|[mM][aA][iI][lL][bB][oO][xX][eE][sS])|[rR]([eE]([nN][aA][mM][eE][mM][aA][iI][lL][bB][oO][xX]|[oO][pP][eE][nN])|[fF][cC]822_([pP][aA][rR][sS][eE]_([hH][eE][aA][dD][eE][rR][sS]|[aA][dD][rR][lL][iI][sS][tT])|[wW][rR][iI][tT][eE]_[aA][dD][dD][rR][eE][sS][sS]))|[mM]([sS][gG][nN][oO]|[iI][mM][eE]_[hH][eE][aA][dD][eE][rR]_[dD][eE][cC][oO][dD][eE]|[aA][iI][lL](_([cC][oO]([pP][yY]|[mM][pP][oO][sS][eE])|[mM][oO][vV][eE])|[bB][oO][xX][mM][sS][gG][iI][nN][fF][oO])?)|[bB]([iI][nN][aA][rR][yY]|[oO][dD][yY]([sS][tT][rR][uU][cC][tT])?|[aA][sS][eE]64))(?=\s*\())|([\s\S])/g,/(?:\b[mM][bB]_([sS][pP][lL][iI][tT]|[eE][rR][eE][gG]([iI](_[rR][eE][pP][lL][aA][cC][eE])?|_([sS][eE][aA][rR][cC][hH](_([sS][eE][tT][pP][oO][sS]|[iI][nN][iI][tT]|[pP][oO][sS]|[gG][eE][tT]([pP][oO][sS]|[rR][eE][gG][sS])|[rR][eE][gG][sS]))?|[rR][eE][pP][lL][aA][cC][eE]|[mM][aA][tT][cC][hH]))?|[rR][eE][gG][eE][xX]_([sS][eE][tT]_[oO][pP][tT][iI][oO][nN][sS]|[eE][nN][cC][oO][dD][iI][nN][gG]))(?=\s*\())|([\s\S])/g,/(?:\b[sS][mM][fF][iI]_([sS][eE][tT]([tT][iI][mM][eE][oO][uU][tT]|[fF][lL][aA][gG][sS]|[rR][eE][pP][lL][yY])|[cC][hH][gG][hH][eE][aA][dD][eE][rR]|[dD][eE][lL][rR][cC][pP][tT]|[aA][dD][dD]([hH][eE][aA][dD][eE][rR]|[rR][cC][pP][tT])|[rR][eE][pP][lL][aA][cC][eE][bB][oO][dD][yY]|[gG][eE][tT][sS][yY][mM][vV][aA][lL])(?=\s*\())|([\s\S])/g,/(?:\b[mM][sS][qQ][lL]_([sS][eE][lL][eE][cC][tT]_[dD][bB]|[nN][uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[cC]([oO][nN][nN][eE][cC][tT]|[lL][oO][sS][eE]|[rR][eE][aA][tT][eE]_[dD][bB])|[dD]([aA][tT][aA]_[sS][eE][eE][kK]|[rR][oO][pP]_[dD][bB]|[bB]_[qQ][uU][eE][rR][yY])|[eE][rR][rR][oO][rR]|[pP][cC][oO][nN][nN][eE][cC][tT]|[fF]([iI][eE][lL][dD]_([sS][eE][eE][kK]|[nN][aA][mM][eE]|[tT]([yY][pP][eE]|[aA][bB][lL][eE])|[fF][lL][aA][gG][sS]|[lL][eE][nN])|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[fF][iI][eE][lL][dD]|[aA][rR][rR][aA][yY]|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[qQ][uU][eE][rR][yY]|[aA][fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS]|[lL][iI][sS][tT]_([tT][aA][bB][lL][eE][sS]|[dD][bB][sS]|[fF][iI][eE][lL][dD][sS])|[rR][eE][sS][uU][lL][tT])(?=\s*\())|([\s\S])/g,/(?:\b[mM][sS][sS][qQ][lL]_([sS][eE][lL][eE][cC][tT]_[dD][bB]|[nN]([uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[eE][xX][tT]_[rR][eE][sS][uU][lL][tT])|[cC]([oO][nN][nN][eE][cC][tT]|[lL][oO][sS][eE])|[iI][nN][iI][tT]|[dD][aA][tT][aA]_[sS][eE][eE][kK]|[eE][xX][eE][cC][uU][tT][eE]|[pP][cC][oO][nN][nN][eE][cC][tT]|[qQ][uU][eE][rR][yY]|[fF]([iI][eE][lL][dD]_([sS][eE][eE][kK]|[nN][aA][mM][eE]|[tT][yY][pP][eE]|[lL][eE][nN][gG][tT][hH])|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[fF][iI][eE][lL][dD]|[aA]([sS][sS][oO][cC]|[rR][rR][aA][yY])|[rR][oO][wW]|[bB][aA][tT][cC][hH])|[rR][eE][eE]_([sS][tT][aA][tT][eE][mM][eE][nN][tT]|[rR][eE][sS][uU][lL][tT]))|[gG]([uU][iI][dD]_[sS][tT][rR][iI][nN][gG]|[eE][tT]_[lL][aA][sS][tT]_[mM][eE][sS][sS][aA][gG][eE])|[rR]([oO][wW][sS]_[aA][fF][fF][eE][cC][tT][eE][dD]|[eE][sS][uU][lL][tT])|[bB][iI][nN][dD]|[mM][iI][nN]_([eE][rR][rR][oO][rR]_[sS][eE][vV][eE][rR][iI][tT][yY]|[mM][eE][sS][sS][aA][gG][eE]_[sS][eE][vV][eE][rR][iI][tT][yY]))(?=\s*\())|([\s\S])/g,/(?:\b[mM][yY][sS][qQ][lL]_([sS]([tT][aA][tT]|[eE]([tT]_[cC][hH][aA][rR][sS][eE][tT]|[lL][eE][cC][tT]_[dD][bB]))|[nN][uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[cC]([oO][nN][nN][eE][cC][tT]|[lL]([iI][eE][nN][tT]_[eE][nN][cC][oO][dD][iI][nN][gG]|[oO][sS][eE])|[rR][eE][aA][tT][eE]_[dD][bB])|[tT][hH][rR][eE][aA][dD]_[iI][dD]|[iI][nN]([sS][eE][rR][tT]_[iI][dD]|[fF][oO])|[dD]([aA][tT][aA]_[sS][eE][eE][kK]|[rR][oO][pP]_[dD][bB]|[bB]_[qQ][uU][eE][rR][yY])|[uU][nN][bB][uU][fF][fF][eE][rR][eE][dD]_[qQ][uU][eE][rR][yY]|[eE]([sS][cC][aA][pP][eE]_[sS][tT][rR][iI][nN][gG]|[rR][rR]([nN][oO]|[oO][rR]))|[pP]([cC][oO][nN][nN][eE][cC][tT]|[iI][nN][gG])|[fF]([iI][eE][lL][dD]_([sS][eE][eE][kK]|[nN][aA][mM][eE]|[tT]([yY][pP][eE]|[aA][bB][lL][eE])|[fF][lL][aA][gG][sS]|[lL][eE][nN])|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[fF][iI][eE][lL][dD]|[lL][eE][nN][gG][tT][hH][sS]|[aA]([sS][sS][oO][cC]|[rR][rR][aA][yY])|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[qQ][uU][eE][rR][yY]|[aA][fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS]|[lL][iI][sS][tT]_([tT][aA][bB][lL][eE][sS]|[dD][bB][sS]|[pP][rR][oO][cC][eE][sS][sS][eE][sS]|[fF][iI][eE][lL][dD][sS])|[rR][eE]([sS][uU][lL][tT]|[aA][lL]_[eE][sS][cC][aA][pP][eE]_[sS][tT][rR][iI][nN][gG])|[gG][eE][tT]_([sS][eE][rR][vV][eE][rR]_[iI][nN][fF][oO]|[hH][oO][sS][tT]_[iI][nN][fF][oO]|[cC][lL][iI][eE][nN][tT]_[iI][nN][fF][oO]|[pP][rR][oO][tT][oO]_[iI][nN][fF][oO]))(?=\s*\())|([\s\S])/g,/(?:\b([sS][oO][lL][iI][dD]_[fF][eE][tT][cC][hH]_[pP][rR][eE][vV]|[oO][dD][bB][cC]_([sS]([tT][aA][tT][iI][sS][tT][iI][cC][sS]|[pP][eE][cC][iI][aA][lL][cC][oO][lL][uU][mM][nN][sS]|[eE][tT][oO][pP][tT][iI][oO][nN])|[nN]([uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[eE][xX][tT]_[rR][eE][sS][uU][lL][tT])|[cC]([oO]([nN][nN][eE][cC][tT]|[lL][uU][mM][nN]([sS]|[pP][rR][iI][vV][iI][lL][eE][gG][eE][sS])|[mM][mM][iI][tT])|[uU][rR][sS][oO][rR]|[lL][oO][sS][eE](_[aA][lL][lL])?)|[tT][aA][bB][lL][eE]([sS]|[pP][rR][iI][vV][iI][lL][eE][gG][eE][sS])|[dD][aA][tT][aA]_[sS][oO][uU][rR][cC][eE]|[eE]([rR][rR][oO][rR]([mM][sS][gG])?|[xX][eE][cC]([uU][tT][eE])?)|[pP]([cC][oO][nN][nN][eE][cC][tT]|[rR]([iI][mM][aA][rR][yY][kK][eE][yY][sS]|[oO][cC][eE][dD][uU][rR][eE]([sS]|[cC][oO][lL][uU][mM][nN][sS])|[eE][pP][aA][rR][eE]))|[fF]([iI][eE][lL][dD]_([sS][cC][aA][lL][eE]|[nN]([uU][mM]|[aA][mM][eE])|[tT][yY][pP][eE]|[lL][eE][nN])|[oO][rR][eE][iI][gG][nN][kK][eE][yY][sS]|[eE][tT][cC][hH]_([iI][nN][tT][oO]|[oO][bB][jJ][eE][cC][tT]|[aA][rR][rR][aA][yY]|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[aA][uU][tT][oO][cC][oO][mM][mM][iI][tT]|[lL][oO][nN][gG][rR][eE][aA][dD][lL][eE][nN]|[gG][eE][tT][tT][yY][pP][eE][iI][nN][fF][oO]|[rR]([oO][lL][lL][bB][aA][cC][kK]|[eE][sS][uU][lL][tT](_[aA][lL][lL])?)|[bB][iI][nN][mM][oO][dD][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[pP][rR][eE][gG]_([sS][pP][lL][iI][tT]|[qQ][uU][oO][tT][eE]|[lL][aA][sS][tT]_[eE][rR][rR][oO][rR]|[gG][rR][eE][pP]|[rR][eE][pP][lL][aA][cC][eE](_[cC][aA][lL][lL][bB][aA][cC][kK])?|[mM][aA][tT][cC][hH](_[aA][lL][lL])?)(?=\s*\())|([\s\S])/g,/(?:\b([sS][pP][lL]_([cC][lL][aA][sS][sS][eE][sS]|[oO][bB][jJ][eE][cC][tT]_[hH][aA][sS][hH]|[aA][uU][tT][oO][lL][oO][aA][dD](_([cC][aA][lL][lL]|[uU][nN][rR][eE][gG][iI][sS][tT][eE][rR]|[eE][xX][tT][eE][nN][sS][iI][oO][nN][sS]|[fF][uU][nN][cC][tT][iI][oO][nN][sS]|[rR][eE][gG][iI][sS][tT][eE][rR]))?)|[cC][lL][aA][sS][sS]_([iI][mM][pP][lL][eE][mM][eE][nN][tT][sS]|[pP][aA][rR][eE][nN][tT][sS]))(?=\s*\())|([\s\S])/g,/(?:\b[sS][yY][bB][aA][sS][eE]_([sS][eE]([tT]_[mM][eE][sS][sS][aA][gG][eE]_[hH][aA][nN][dD][lL][eE][rR]|[lL][eE][cC][tT]_[dD][bB])|[nN][uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[cC]([oO][nN][nN][eE][cC][tT]|[lL][oO][sS][eE])|[dD]([eE][aA][dD][lL][oO][cC][kK]_[rR][eE][tT][rR][yY]_[cC][oO][uU][nN][tT]|[aA][tT][aA]_[sS][eE][eE][kK])|[uU][nN][bB][uU][fF][fF][eE][rR][eE][dD]_[qQ][uU][eE][rR][yY]|[pP][cC][oO][nN][nN][eE][cC][tT]|[fF]([iI][eE][lL][dD]_[sS][eE][eE][kK]|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[fF][iI][eE][lL][dD]|[aA]([sS][sS][oO][cC]|[rR][rR][aA][yY])|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[qQ][uU][eE][rR][yY]|[aA][fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS]|[rR][eE][sS][uU][lL][tT]|[gG][eE][tT]_[lL][aA][sS][tT]_[mM][eE][sS][sS][aA][gG][eE]|[mM][iI][nN]_([sS][eE][rR][vV][eE][rR]_[sS][eE][vV][eE][rR][iI][tT][yY]|[cC][lL][iI][eE][nN][tT]_[sS][eE][vV][eE][rR][iI][tT][yY]))(?=\s*\())|([\s\S])/g,/(?:\b[sS][yY][bB][aA][sS][eE]_([sS][eE][lL][eE][cC][tT]_[dD][bB]|[nN][uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[cC]([oO][nN][nN][eE][cC][tT]|[lL][oO][sS][eE])|[dD][aA][tT][aA]_[sS][eE][eE][kK]|[pP][cC][oO][nN][nN][eE][cC][tT]|[fF]([iI][eE][lL][dD]_[sS][eE][eE][kK]|[eE][tT][cC][hH]_([oO][bB][jJ][eE][cC][tT]|[fF][iI][eE][lL][dD]|[aA][rR][rR][aA][yY]|[rR][oO][wW])|[rR][eE][eE]_[rR][eE][sS][uU][lL][tT])|[qQ][uU][eE][rR][yY]|[aA][fF][fF][eE][cC][tT][eE][dD]_[rR][oO][wW][sS]|[rR][eE][sS][uU][lL][tT]|[gG][eE][tT]_[lL][aA][sS][tT]_[mM][eE][sS][sS][aA][gG][eE]|[mM][iI][nN]_([eE][rR][rR][oO][rR]_[sS][eE][vV][eE][rR][iI][tT][yY]|[mM][eE][sS][sS][aA][gG][eE]_[sS][eE][vV][eE][rR][iI][tT][yY]))(?=\s*\())|([\s\S])/g,/(?:\b[xX][mM][lL][wW][rR][iI][tT][eE][rR]_([sS]([tT][aA][rR][tT]_([cC]([oO][mM][mM][eE][nN][tT]|[dD][aA][tT][aA])|[dD]([tT][dD](_([eE]([nN][tT][iI][tT][yY]|[lL][eE][mM][eE][nN][tT])|[aA][tT][tT][lL][iI][sS][tT]))?|[oO][cC][uU][mM][eE][nN][tT])|[pP][iI]|[eE][lL][eE][mM][eE][nN][tT](_[nN][sS])?|[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN][sS])?)|[eE][tT]_[iI][nN][dD][eE][nN][tT](_[sS][tT][rR][iI][nN][gG])?)|[tT][eE][xX][tT]|[oO]([uU][tT][pP][uU][tT]_[mM][eE][mM][oO][rR][yY]|[pP][eE][nN]_([uU][rR][iI]|[mM][eE][mM][oO][rR][yY]))|[eE][nN][dD]_([cC]([oO][mM][mM][eE][nN][tT]|[dD][aA][tT][aA])|[dD]([tT][dD](_([eE]([nN][tT][iI][tT][yY]|[lL][eE][mM][eE][nN][tT])|[aA][tT][tT][lL][iI][sS][tT]))?|[oO][cC][uU][mM][eE][nN][tT])|[pP][iI]|[eE][lL][eE][mM][eE][nN][tT]|[aA][tT][tT][rR][iI][bB][uU][tT][eE])|[fF]([uU][lL][lL]_[eE][nN][dD]_[eE][lL][eE][mM][eE][nN][tT]|[lL][uU][sS][hH])|[wW][rR][iI][tT][eE]_([cC]([oO][mM][mM][eE][nN][tT]|[dD][aA][tT][aA])|[dD][tT][dD](_([eE]([nN][tT][iI][tT][yY]|[lL][eE][mM][eE][nN][tT])|[aA][tT][tT][lL][iI][sS][tT]))?|[pP][iI]|[eE][lL][eE][mM][eE][nN][tT](_[nN][sS])?|[aA][tT][tT][rR][iI][bB][uU][tT][eE](_[nN][sS])?|[rR][aA][wW]))(?=\s*\())|([\s\S])/g,/(?:\b([sS]([tT][aA][tT]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX])|[eE][tT]([cC][oO][mM][mM][eE][nN][tT]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX])|[aA][rR][cC][hH][iI][vV][eE][cC][oO][mM][mM][eE][nN][tT]))|[cC]([lL][oO][sS][eE]|[rR][eE][aA][tT][eE][eE][mM][pP][tT][yY][dD][iI][rR])|[dD][eE][lL][eE][tT][eE]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX])|[oO][pP][eE][nN]|[zZ][iI][pP]_([cC][lL][oO][sS][eE]|[oO][pP][eE][nN]|[eE][nN][tT][rR][yY]_([nN][aA][mM][eE]|[cC]([oO][mM][pP][rR][eE][sS][sS]([iI][oO][nN][mM][eE][tT][hH][oO][dD]|[eE][dD][sS][iI][zZ][eE])|[lL][oO][sS][eE])|[oO][pP][eE][nN]|[fF][iI][lL][eE][sS][iI][zZ][eE]|[rR][eE][aA][dD])|[rR][eE][aA][dD])|[uU][nN][cC][hH][aA][nN][gG][eE]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX]|[aA][lL][lL])|[lL][oO][cC][aA][tT][eE][nN][aA][mM][eE]|[aA][dD][dD][fF]([iI][lL][eE]|[rR][oO][mM][sS][tT][rR][iI][nN][gG])|[rR][eE][nN][aA][mM][eE]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX])|[gG][eE][tT]([sS][tT][rR][eE][aA][mM]|[cC][oO][mM][mM][eE][nN][tT]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX])|[nN][aA][mM][eE][iI][nN][dD][eE][xX]|[fF][rR][oO][mM]([nN][aA][mM][eE]|[iI][nN][dD][eE][xX])|[aA][rR][cC][hH][iI][vV][eE][cC][oO][mM][mM][eE][nN][tT]))(?=\s*\())|([\s\S])/g,/(?:\b[pP][oO][sS][iI][xX]_([sS]([tT][rR][eE][rR][rR][oO][rR]|[eE][tT]([sS][iI][dD]|[uU][iI][dD]|[pP][gG][iI][dD]|[eE]([uU][iI][dD]|[gG][iI][dD])|[gG][iI][dD]))|[cC][tT][eE][rR][mM][iI][dD]|[iI]([sS][aA][tT][tT][yY]|[nN][iI][tT][gG][rR][oO][uU][pP][sS])|[tT]([tT][yY][nN][aA][mM][eE]|[iI][mM][eE][sS])|[uU][nN][aA][mM][eE]|[kK][iI][lL][lL]|[aA][cC][cC][eE][sS][sS]|[gG][eE][tT]([sS][iI][dD]|[cC][wW][dD]|_[lL][aA][sS][tT]_[eE][rR][rR][oO][rR]|[uU][iI][dD]|[eE]([uU][iI][dD]|[gG][iI][dD])|[pP]([iI][dD]|[pP][iI][dD]|[wW]([nN][aA][mM]|[uU][iI][dD])|[gG]([iI][dD]|[rR][pP]))|[lL][oO][gG][iI][nN]|[rR][lL][iI][mM][iI][tT]|[gG]([iI][dD]|[rR]([nN][aA][mM]|[oO][uU][pP][sS]|[gG][iI][dD])))|[mM][kK]([nN][oO][dD]|[fF][iI][fF][oO]))(?=\s*\())|([\s\S])/g,/(?:\b[pP][rR][oO][cC]_([cC][lL][oO][sS][eE]|[tT][eE][rR][mM][iI][nN][aA][tT][eE]|[oO][pP][eE][nN]|[gG][eE][tT]_[sS][tT][aA][tT][uU][sS])(?=\s*\())|([\s\S])/g,/(?:\b[pP][sS][pP][eE][lL][lL]_([sS]([tT][oO][rR][eE]_[rR][eE][pP][lL][aA][cC][eE][mM][eE][nN][tT]|[uU][gG][gG][eE][sS][tT]|[aA][vV][eE]_[wW][oO][rR][dD][lL][iI][sS][tT])|[cC]([hH][eE][cC][kK]|[oO][nN][fF][iI][gG]_([sS][aA][vV][eE]_[rR][eE][pP][lL]|[cC][rR][eE][aA][tT][eE]|[iI][gG][nN][oO][rR][eE]|[dD]([iI][cC][tT]_[dD][iI][rR]|[aA][tT][aA]_[dD][iI][rR])|[pP][eE][rR][sS][oO][nN][aA][lL]|[rR]([uU][nN][tT][oO][gG][eE][tT][hH][eE][rR]|[eE][pP][lL])|[mM][oO][dD][eE])|[lL][eE][aA][rR]_[sS][eE][sS][sS][iI][oO][nN])|[nN][eE][wW](_([cC][oO][nN][fF][iI][gG]|[pP][eE][rR][sS][oO][nN][aA][lL]))?|[aA][dD][dD]_[tT][oO]_([sS][eE][sS][sS][iI][oO][nN]|[pP][eE][rR][sS][oO][nN][aA][lL]))(?=\s*\())|([\s\S])/g,/(?:\b[qQ][uU][oO][tT][eE][dD]_[pP][rR][iI][nN][tT][aA][bB][lL][eE]_[dD][eE][cC][oO][dD][eE](?=\s*\())|([\s\S])/g,/(?:\b([sS][rR][aA][nN][dD]|[gG][eE][tT][rR][aA][nN][dD][mM][aA][xX]|[rR][aA][nN][dD]|[mM][tT]_([sS][rR][aA][nN][dD]|[gG][eE][tT][rR][aA][nN][dD][mM][aA][xX]|[rR][aA][nN][dD]))(?=\s*\())|([\s\S])/g,/(?:\b[rR][eE][aA][dD][lL][iI][nN][eE](_([cC]([oO][mM][pP][lL][eE][tT][iI][oO][nN]_[fF][uU][nN][cC][tT][iI][oO][nN]|[aA][lL][lL][bB][aA][cC][kK]_([hH][aA][nN][dD][lL][eE][rR]_([iI][nN][sS][tT][aA][lL][lL]|[rR][eE][mM][oO][vV][eE])|[rR][eE][aA][dD]_[cC][hH][aA][rR])|[lL][eE][aA][rR]_[hH][iI][sS][tT][oO][rR][yY])|[iI][nN][fF][oO]|[oO][nN]_[nN][eE][wW]_[lL][iI][nN][eE]|[wW][rR][iI][tT][eE]_[hH][iI][sS][tT][oO][rR][yY]|[lL][iI][sS][tT]_[hH][iI][sS][tT][oO][rR][yY]|[aA][dD][dD]_[hH][iI][sS][tT][oO][rR][yY]|[rR][eE]([dD][iI][sS][pP][lL][aA][yY]|[aA][dD]_[hH][iI][sS][tT][oO][rR][yY])))?(?=\s*\())|([\s\S])/g,/(?:\b[rR][eE][cC][oO][dD][eE]_([sS][tT][rR][iI][nN][gG]|[fF][iI][lL][eE])(?=\s*\())|([\s\S])/g,/(?:\b([sS]([pP][lL][iI][tT]([iI])?|[qQ][lL]_[rR][eE][gG][cC][aA][sS][eE])|[eE][rR][eE][gG]([iI](_[rR][eE][pP][lL][aA][cC][eE])?|_[rR][eE][pP][lL][aA][cC][eE])?)(?=\s*\())|([\s\S])/g,/(?:\b[sS][eE][sS][sS][iI][oO][nN]_([sS]([tT][aA][rR][tT]|[eE][tT]_([sS][aA][vV][eE]_[hH][aA][nN][dD][lL][eE][rR]|[cC][oO][oO][kK][iI][eE]_[pP][aA][rR][aA][mM][sS])|[aA][vV][eE]_[pP][aA][tT][hH])|[cC][aA][cC][hH][eE]_([eE][xX][pP][iI][rR][eE]|[lL][iI][mM][iI][tT][eE][rR])|[nN][aA][mM][eE]|[iI]([sS]_[rR][eE][gG][iI][sS][tT][eE][rR][eE][dD]|[dD])|[dD][eE]([sS][tT][rR][oO][yY]|[cC][oO][dD][eE])|[uU][nN]([sS][eE][tT]|[rR][eE][gG][iI][sS][tT][eE][rR])|[eE][nN][cC][oO][dD][eE]|[wW][rR][iI][tT][eE]_[cC][lL][oO][sS][eE]|[rR][eE][gG]([iI][sS][tT][eE][rR]|[eE][nN][eE][rR][aA][tT][eE]_[iI][dD])|[gG][eE][tT]_[cC][oO][oO][kK][iI][eE]_[pP][aA][rR][aA][mM][sS]|[mM][oO][dD][uU][lL][eE]_[nN][aA][mM][eE])(?=\s*\())|([\s\S])/g,/(?:\b[sS][hH][mM][oO][pP]_([sS][iI][zZ][eE]|[cC][lL][oO][sS][eE]|[dD][eE][lL][eE][tT][eE]|[oO][pP][eE][nN]|[wW][rR][iI][tT][eE]|[rR][eE][aA][dD])(?=\s*\())|([\s\S])/g,/(?:\b[sS][iI][mM][pP][lL][eE][xX][mM][lL]_([iI][mM][pP][oO][rR][tT]_[dD][oO][mM]|[lL][oO][aA][dD]_([sS][tT][rR][iI][nN][gG]|[fF][iI][lL][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[cC][oO][nN][fF][iI][rR][mM]_[eE][xX][tT][nN][aA][mM][eE]_[cC][oO][mM][pP][iI][lL][eE][dD](?=\s*\())|([\s\S])/g,/(?:\b([sS][nN][mM][pP]([sS][eE][tT]|2_([sS][eE][tT]|[wW][aA][lL][kK]|[rR][eE][aA][lL]_[wW][aA][lL][kK]|[gG][eE][tT]([nN][eE][xX][tT])?)|3_([sS][eE][tT]|[wW][aA][lL][kK]|[rR][eE][aA][lL]_[wW][aA][lL][kK]|[gG][eE][tT]([nN][eE][xX][tT])?)|_([sS][eE][tT]_([oO][iI][dD]_[oO][uU][tT][pP][uU][tT]_[fF][oO][rR][mM][aA][tT]|[eE][nN][uU][mM]_[pP][rR][iI][nN][tT]|[vV][aA][lL][uU][eE][rR][eE][tT][rR][iI][eE][vV][aA][lL]|[qQ][uU][iI][cC][kK]_[pP][rR][iI][nN][tT])|[rR][eE][aA][dD]_[mM][iI][bB]|[gG][eE][tT]_([vV][aA][lL][uU][eE][rR][eE][tT][rR][iI][eE][vV][aA][lL]|[qQ][uU][iI][cC][kK]_[pP][rR][iI][nN][tT]))|[wW][aA][lL][kK]|[rR][eE][aA][lL][wW][aA][lL][kK]|[gG][eE][tT]([nN][eE][xX][tT])?)|[pP][hH][pP]_[sS][nN][mM][pP][vV]3)(?=\s*\())|([\s\S])/g,/(?:\b[sS][oO][cC][kK][eE][tT]_([sS]([hH][uU][tT][dD][oO][wW][nN]|[tT][rR][eE][rR][rR][oO][rR]|[eE]([nN][dD]([tT][oO])?|[tT]_([nN][oO][nN][bB][lL][oO][cC][kK]|[oO][pP][tT][iI][oO][nN]|[bB][lL][oO][cC][kK])|[lL][eE][cC][tT]))|[cC]([oO][nN][nN][eE][cC][tT]|[lL]([oO][sS][eE]|[eE][aA][rR]_[eE][rR][rR][oO][rR])|[rR][eE][aA][tT][eE](_([pP][aA][iI][rR]|[lL][iI][sS][tT][eE][nN]))?)|[wW][rR][iI][tT][eE]|[lL]([iI][sS][tT][eE][nN]|[aA][sS][tT]_[eE][rR][rR][oO][rR])|[aA][cC][cC][eE][pP][tT]|[gG][eE][tT]([sS][oO][cC][kK][nN][aA][mM][eE]|_[oO][pP][tT][iI][oO][nN]|[pP][eE][eE][rR][nN][aA][mM][eE])|[rR][eE]([cC][vV]([fF][rR][oO][mM])?|[aA][dD])|[bB][iI][nN][dD])(?=\s*\())|([\s\S])/g,/(?:\b[sS][oO][uU][nN][dD][eE][xX](?=\s*\())|([\s\S])/g,/(?:\b[iI][tT][eE][rR][aA][tT][oO][rR]_([cC][oO][uU][nN][tT]|[tT][oO]_[aA][rR][rR][aA][yY]|[aA][pP][pP][lL][yY])(?=\s*\())|([\s\S])/g,/(?:\b[sS][qQ][lL][iI][tT][eE]_([hH][aA][sS]_[pP][rR][eE][vV]|[sS]([iI][nN][gG][lL][eE]_[qQ][uU][eE][rR][yY]|[eE][eE][kK])|[nN]([uU][mM]_([fF][iI][eE][lL][dD][sS]|[rR][oO][wW][sS])|[eE][xX][tT])|[cC]([hH][aA][nN][gG][eE][sS]|[oO][lL][uU][mM][nN]|[uU][rR][rR][eE][nN][tT]|[lL][oO][sS][eE]|[rR][eE][aA][tT][eE]_([fF][uU][nN][cC][tT][iI][oO][nN]|[aA][gG][gG][rR][eE][gG][aA][tT][eE]))|[oO][pP][eE][nN]|[uU]([nN][bB][uU][fF][fF][eE][rR][eE][dD]_[qQ][uU][eE][rR][yY]|[dD][fF]_([dD][eE][cC][oO][dD][eE]_[bB][iI][nN][aA][rR][yY]|[eE][nN][cC][oO][dD][eE]_[bB][iI][nN][aA][rR][yY]))|[eE]([sS][cC][aA][pP][eE]_[sS][tT][rR][iI][nN][gG]|[rR][rR][oO][rR]_[sS][tT][rR][iI][nN][gG]|[xX][eE][cC])|[pP]([oO][pP][eE][nN]|[rR][eE][vV])|[kK][eE][yY]|[vV][aA][lL][iI][dD]|[qQ][uU][eE][rR][yY]|[fF]([iI][eE][lL][dD]_[nN][aA][mM][eE]|[eE][tT][cC][hH]_([sS][iI][nN][gG][lL][eE]|[cC][oO][lL][uU][mM][nN]_[tT][yY][pP][eE][sS]|[oO][bB][jJ][eE][cC][tT]|[aA]([lL][lL]|[rR][rR][aA][yY]))|[aA][cC][tT][oO][rR][yY])|[lL]([iI][bB]([eE][nN][cC][oO][dD][iI][nN][gG]|[vV][eE][rR][sS][iI][oO][nN])|[aA][sS][tT]_([iI][nN][sS][eE][rR][tT]_[rR][oO][wW][iI][dD]|[eE][rR][rR][oO][rR]))|[aA][rR][rR][aA][yY]_[qQ][uU][eE][rR][yY]|[rR][eE][wW][iI][nN][dD]|[bB][uU][sS][yY]_[tT][iI][mM][eE][oO][uU][tT])(?=\s*\())|([\s\S])/g,/(?:\b[sS][tT][rR][eE][aA][mM]_([sS]([oO][cC][kK][eE][tT]_([sS]([hH][uU][tT][dD][oO][wW][nN]|[eE]([nN][dD][tT][oO]|[rR][vV][eE][rR]))|[cC][lL][iI][eE][nN][tT]|[eE][nN][aA][bB][lL][eE]_[cC][rR][yY][pP][tT][oO]|[pP][aA][iI][rR]|[aA][cC][cC][eE][pP][tT]|[rR][eE][cC][vV][fF][rR][oO][mM]|[gG][eE][tT]_[nN][aA][mM][eE])|[eE]([tT]_([tT][iI][mM][eE][oO][uU][tT]|[wW][rR][iI][tT][eE]_[bB][uU][fF][fF][eE][rR]|[bB][lL][oO][cC][kK][iI][nN][gG])|[lL][eE][cC][tT]))|[cC][oO]([nN][tT][eE][xX][tT]_([sS][eE][tT]_([oO][pP][tT][iI][oO][nN]|[pP][aA][rR][aA][mM][sS])|[cC][rR][eE][aA][tT][eE]|[gG][eE][tT]_([dD][eE][fF][aA][uU][lL][tT]|[oO][pP][tT][iI][oO][nN][sS]))|[pP][yY]_[tT][oO]_[sS][tT][rR][eE][aA][mM])|[fF][iI][lL][tT][eE][rR]_([pP][rR][eE][pP][eE][nN][dD]|[aA][pP][pP][eE][nN][dD]|[rR][eE][mM][oO][vV][eE])|[gG][eE][tT]_([cC][oO][nN][tT][eE][nN][tT][sS]|[tT][rR][aA][nN][sS][pP][oO][rR][tT][sS]|[lL][iI][nN][eE]|[wW][rR][aA][pP][pP][eE][rR][sS]|[mM][eE][tT][aA]_[dD][aA][tT][aA]))(?=\s*\())|([\s\S])/g,/(?:\b([hH][eE][bB][rR][eE][vV]([cC])?|[sS]([sS][cC][aA][nN][fF]|[iI][mM][iI][lL][aA][rR]_[tT][eE][xX][tT]|[tT][rR]([sS]([tT][rR]|[pP][nN])|[nN][aA][tT][cC]([aA][sS][eE][cC][mM][pP]|[mM][pP])|[cC]([hH][rR]|[sS][pP][nN]|[oO][lL][lL])|[iI]([sS][tT][rR]|[pP]([sS][lL][aA][sS][hH][eE][sS]|[cC][sS][lL][aA][sS][hH][eE][sS]|[oO][sS]|_[tT][aA][gG][sS]))|[tT]([oO]([uU][pP][pP][eE][rR]|[kK]|[lL][oO][wW][eE][rR])|[rR])|_([sS]([hH][uU][fF][fF][lL][eE]|[pP][lL][iI][tT])|[iI][rR][eE][pP][lL][aA][cC][eE]|[pP][aA][dD]|[wW][oO][rR][dD]_[cC][oO][uU][nN][tT]|[rR]([oO][tT]13|[eE][pP]([eE][aA][tT]|[lL][aA][cC][eE])))|[pP]([oO][sS]|[bB][rR][kK])|[rR]([cC][hH][rR]|[iI][pP][oO][sS]|[eE][vV]|[pP][oO][sS]))|[uU][bB][sS][tT][rR](_([cC][oO]([uU][nN][tT]|[mM][pP][aA][rR][eE])|[rR][eE][pP][lL][aA][cC][eE]))?|[eE][tT][lL][oO][cC][aA][lL][eE])|[cC]([hH]([uU][nN][kK]_[sS][pP][lL][iI][tT]|[rR])|[oO][uU][nN][tT]_[cC][hH][aA][rR][sS])|[nN][lL](2[bB][rR]|_[lL][aA][nN][gG][iI][nN][fF][oO])|[iI][mM][pP][lL][oO][dD][eE]|[tT][rR][iI][mM]|[oO][rR][dD]|[dD][iI][rR][nN][aA][mM][eE]|[uU][cC]([fF][iI][rR][sS][tT]|[wW][oO][rR][dD][sS])|[jJ][oO][iI][nN]|[pP][aA]([tT][hH][iI][nN][fF][oO]|[rR][sS][eE]_[sS][tT][rR])|[eE][xX][pP][lL][oO][dD][eE]|[qQ][uU][oO][tT][eE][mM][eE][tT][aA]|[aA][dD][dD]([sS][lL][aA][sS][hH][eE][sS]|[cC][sS][lL][aA][sS][hH][eE][sS])|[wW][oO][rR][dD][wW][rR][aA][pP]|[lL]([tT][rR][iI][mM]|[oO][cC][aA][lL][eE][cC][oO][nN][vV])|[rR][tT][rR][iI][mM]|[mM][oO][nN][eE][yY]_[fF][oO][rR][mM][aA][tT]|[bB]([iI][nN]2[hH][eE][xX]|[aA][sS][eE][nN][aA][mM][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[sS][tT][rR][iI][nN][gG]_[eE][xX][tT][eE][nN][dD]_[fF][iI][nN][dD]_[oO][fF][fF][sS][eE][tT](16|32)(?=\s*\())|([\s\S])/g,/(?:\b([sS][yY][sS][lL][oO][gG]|[cC][lL][oO][sS][eE][lL][oO][gG]|[oO][pP][eE][nN][lL][oO][gG]|[dD][eE][fF][iI][nN][eE]_[sS][yY][sS][lL][oO][gG]_[vV][aA][rR][iI][aA][bB][lL][eE][sS])(?=\s*\())|([\s\S])/g,/(?:\b[mM][sS][gG]_([sS]([tT][aA][tT]_[qQ][uU][eE][uU][eE]|[eE]([nN][dD]|[tT]_[qQ][uU][eE][uU][eE]))|[rR][eE]([cC][eE][iI][vV][eE]|[mM][oO][vV][eE]_[qQ][uU][eE][uU][eE])|[gG][eE][tT]_[qQ][uU][eE][uU][eE])(?=\s*\())|([\s\S])/g,/(?:\b[sS][eE][mM]_([aA][cC][qQ][uU][iI][rR][eE]|[rR][eE]([lL][eE][aA][sS][eE]|[mM][oO][vV][eE])|[gG][eE][tT])(?=\s*\())|([\s\S])/g,/(?:\b[sS][hH][mM]_([dD][eE][tT][aA][cC][hH]|[pP][uU][tT]_[vV][aA][rR]|[aA][tT][tT][aA][cC][hH]|[gG][eE][tT]_[vV][aA][rR]|[rR][eE][mM][oO][vV][eE](_[vV][aA][rR])?)(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[tT][eE][xX][tT]_([sS][pP][lL][iI][tT]_[tT][eE][xX][tT]|[iI][sS]_[wW][hH][iI][tT][eE][sS][pP][aA][cC][eE]_[iI][nN]_[eE][lL][eE][mM][eE][nN][tT]_[cC][oO][nN][tT][eE][nN][tT]|[rR][eE][pP][lL][aA][cC][eE]_[wW][hH][oO][lL][eE]_[tT][eE][xX][tT])(?=\s*\())|([\s\S])/g,/(?:\b[tT][iI][dD][yY]_([cC]([oO][nN][fF][iI][gG]_[cC][oO][uU][nN][tT]|[lL][eE][aA][nN]_[rR][eE][pP][aA][iI][rR])|[iI][sS]_[xX]([hH][tT][mM][lL]|[mM][lL])|[dD][iI][aA][gG][nN][oO][sS][eE]|[eE][rR][rR][oO][rR]_[cC][oO][uU][nN][tT]|[pP][aA][rR][sS][eE]_([sS][tT][rR][iI][nN][gG]|[fF][iI][lL][eE])|[aA][cC][cC][eE][sS][sS]_[cC][oO][uU][nN][tT]|[wW][aA][rR][nN][iI][nN][gG]_[cC][oO][uU][nN][tT]|[rR][eE][pP][aA][iI][rR]_([sS][tT][rR][iI][nN][gG]|[fF][iI][lL][eE])|[gG][eE][tT]([oO][pP][tT]|_([hH]([tT][mM][lL](_[vV][eE][rR])?|[eE][aA][dD])|[sS][tT][aA][tT][uU][sS]|[cC][oO][nN][fF][iI][gG]|[oO]([uU][tT][pP][uU][tT]|[pP][tT]_[dD][oO][cC])|[eE][rR][rR][oO][rR]_[bB][uU][fF][fF][eE][rR]|[rR]([oO][oO][tT]|[eE][lL][eE][aA][sS][eE])|[bB][oO][dD][yY])))(?=\s*\())|([\s\S])/g,/(?:\b[tT][oO][kK][eE][nN]_([nN][aA][mM][eE]|[gG][eE][tT]_[aA][lL][lL])(?=\s*\())|([\s\S])/g,/(?:\b([sS]([tT][rR][vV][aA][lL]|[eE][tT][tT][yY][pP][eE])|[iI]([sS]_([sS]([cC][aA][lL][aA][rR]|[tT][rR][iI][nN][gG])|[cC][aA][lL][lL][aA][bB][lL][eE]|[nN][uU]([lL][lL]|[mM][eE][rR][iI][cC])|[oO][bB][jJ][eE][cC][tT]|[fF][lL][oO][aA][tT]|[aA][rR][rR][aA][yY]|[lL][oO][nN][gG]|[rR][eE][sS][oO][uU][rR][cC][eE]|[bB][oO][oO][lL])|[nN][tT][vV][aA][lL])|[fF][lL][oO][aA][tT][vV][aA][lL]|[gG][eE][tT][tT][yY][pP][eE])(?=\s*\())|([\s\S])/g,/(?:\b[uU][nN][iI][qQ][iI][dD](?=\s*\())|([\s\S])/g,/(?:\b([uU][rR][lL]([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE])|[pP][aA][rR][sS][eE]_[uU][rR][lL]|[gG][eE][tT]_[hH][eE][aA][dD][eE][rR][sS]|[rR][aA][wW][uU][rR][lL]([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[sS][tT][rR][eE][aA][mM]_([fF][iI][lL][tT][eE][rR]_[rR][eE][gG][iI][sS][tT][eE][rR]|[gG][eE][tT]_[fF][iI][lL][tT][eE][rR][sS]|[bB][uU][cC][kK][eE][tT]_([nN][eE][wW]|[pP][rR][eE][pP][eE][nN][dD]|[aA][pP][pP][eE][nN][dD]|[mM][aA][kK][eE]_[wW][rR][iI][tT][eE][aA][bB][lL][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[uU][sS][eE][rR][dD][aA][tT][aA][hH][aA][nN][dD][lL][eE][rR]_[hH][aA][nN][dD][lL][eE](?=\s*\())|([\s\S])/g,/(?:\b[sS][tT][rR][eE][aA][mM]_[wW][rR][aA][pP][pP][eE][rR]_([uU][nN][rR][eE][gG][iI][sS][tT][eE][rR]|[rR][eE]([sS][tT][oO][rR][eE]|[gG][iI][sS][tT][eE][rR]))(?=\s*\())|([\s\S])/g,/(?:\b[cC][oO][nN][vV][eE][rR][tT]_[uU][uU]([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE])(?=\s*\())|([\s\S])/g,/(?:\b([sS][eE][rR][iI][aA][lL][iI][zZ][eE]|[dD][eE][bB][uU][gG]_[zZ][vV][aA][lL]_[dD][uU][mM][pP]|[uU][nN][sS][eE][rR][iI][aA][lL][iI][zZ][eE]|[vV][aA][rR]_([dD][uU][mM][pP]|[eE][xX][pP][oO][rR][tT])|[mM][eE][mM][oO][rR][yY]_[gG][eE][tT]_([uU][sS][aA][gG][eE]|[pP][eE][aA][kK]_[uU][sS][aA][gG][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[vV][eE][rR][sS][iI][oO][nN]_[cC][oO][mM][pP][aA][rR][eE](?=\s*\())|([\s\S])/g,/(?:\b[wW][dD][dD][xX]_([sS][eE][rR][iI][aA][lL][iI][zZ][eE]_[vV][aA]([lL][uU][eE]|[rR][sS])|[dD][eE][sS][eE][rR][iI][aA][lL][iI][zZ][eE]|[pP][aA][cC][kK][eE][tT]_([sS][tT][aA][rR][tT]|[eE][nN][dD])|[aA][dD][dD]_[vV][aA][rR][sS])(?=\s*\())|([\s\S])/g,/(?:\b([uU][tT][fF]8_([dD][eE][cC][oO][dD][eE]|[eE][nN][cC][oO][dD][eE])|[xX][mM][lL]_([sS][eE][tT]_([sS][tT][aA][rR][tT]_[nN][aA][mM][eE][sS][pP][aA][cC][eE]_[dD][eE][cC][lL]_[hH][aA][nN][dD][lL][eE][rR]|[nN][oO][tT][aA][tT][iI][oO][nN]_[dD][eE][cC][lL]_[hH][aA][nN][dD][lL][eE][rR]|[cC][hH][aA][rR][aA][cC][tT][eE][rR]_[dD][aA][tT][aA]_[hH][aA][nN][dD][lL][eE][rR]|[dD][eE][fF][aA][uU][lL][tT]_[hH][aA][nN][dD][lL][eE][rR]|[oO][bB][jJ][eE][cC][tT]|[uU][nN][pP][aA][rR][sS][eE][dD]_[eE][nN][tT][iI][tT][yY]_[dD][eE][cC][lL]_[hH][aA][nN][dD][lL][eE][rR]|[pP][rR][oO][cC][eE][sS][sS][iI][nN][gG]_[iI][nN][sS][tT][rR][uU][cC][tT][iI][oO][nN]_[hH][aA][nN][dD][lL][eE][rR]|[eE]([nN][dD]_[nN][aA][mM][eE][sS][pP][aA][cC][eE]_[dD][eE][cC][lL]_[hH][aA][nN][dD][lL][eE][rR]|[lL][eE][mM][eE][nN][tT]_[hH][aA][nN][dD][lL][eE][rR]|[xX][tT][eE][rR][nN][aA][lL]_[eE][nN][tT][iI][tT][yY]_[rR][eE][fF]_[hH][aA][nN][dD][lL][eE][rR]))|[eE][rR][rR][oO][rR]_[sS][tT][rR][iI][nN][gG]|[pP][aA][rR][sS][eE](_[iI][nN][tT][oO]_[sS][tT][rR][uU][cC][tT]|[rR]_([sS][eE][tT]_[oO][pP][tT][iI][oO][nN]|[cC][rR][eE][aA][tT][eE](_[nN][sS])?|[fF][rR][eE][eE]|[gG][eE][tT]_[oO][pP][tT][iI][oO][nN]))?|[gG][eE][tT]_([cC][uU][rR][rR][eE][nN][tT]_([cC][oO][lL][uU][mM][nN]_[nN][uU][mM][bB][eE][rR]|[lL][iI][nN][eE]_[nN][uU][mM][bB][eE][rR]|[bB][yY][tT][eE]_[iI][nN][dD][eE][xX])|[eE][rR][rR][oO][rR]_[cC][oO][dD][eE])))(?=\s*\())|([\s\S])/g,/(?:\b[xX][mM][lL][rR][pP][cC]_([sS][eE]([tT]_[tT][yY][pP][eE]|[rR][vV][eE][rR]_([cC]([aA][lL][lL]_[mM][eE][tT][hH][oO][dD]|[rR][eE][aA][tT][eE])|[dD][eE][sS][tT][rR][oO][yY]|[aA][dD][dD]_[iI][nN][tT][rR][oO][sS][pP][eE][cC][tT][iI][oO][nN]_[dD][aA][tT][aA]|[rR][eE][gG][iI][sS][tT][eE][rR]_([iI][nN][tT][rR][oO][sS][pP][eE][cC][tT][iI][oO][nN]_[cC][aA][lL][lL][bB][aA][cC][kK]|[mM][eE][tT][hH][oO][dD])))|[iI][sS]_[fF][aA][uU][lL][tT]|[dD][eE][cC][oO][dD][eE](_[rR][eE][qQ][uU][eE][sS][tT])?|[pP][aA][rR][sS][eE]_[mM][eE][tT][hH][oO][dD]_[dD][eE][sS][cC][rR][iI][pP][tT][iI][oO][nN][sS]|[eE][nN][cC][oO][dD][eE](_[rR][eE][qQ][uU][eE][sS][tT])?|[gG][eE][tT]_[tT][yY][pP][eE])(?=\s*\())|([\s\S])/g,/(?:\b[dD][oO][mM]_[xX][pP][aA][tT][hH]_([eE][vV][aA][lL][uU][aA][tT][eE]|[qQ][uU][eE][rR][yY]|[rR][eE][gG][iI][sS][tT][eE][rR]_[nN][sS])(?=\s*\())|([\s\S])/g,/(?:\b[xX][sS][lL]_[xX][sS][lL][tT][pP][rR][oO][cC][eE][sS][sS][oO][rR]_([hH][aA][sS]_[eE][xX][sS][lL][tT]_[sS][uU][pP][pP][oO][rR][tT]|[sS][eE][tT]_[pP][aA][rR][aA][mM][eE][tT][eE][rR]|[tT][rR][aA][nN][sS][fF][oO][rR][mM]_[tT][oO]_([dD][oO][cC]|[uU][rR][iI]|[xX][mM][lL])|[iI][mM][pP][oO][rR][tT]_[sS][tT][yY][lL][eE][sS][hH][eE][eE][tT]|[rR][eE]([gG][iI][sS][tT][eE][rR]_[pP][hH][pP]_[fF][uU][nN][cC][tT][iI][oO][nN][sS]|[mM][oO][vV][eE]_[pP][aA][rR][aA][mM][eE][tT][eE][rR])|[gG][eE][tT]_[pP][aA][rR][aA][mM][eE][tT][eE][rR])(?=\s*\())|([\s\S])/g,/(?:\b([oO][bB]_[gG][zZ][hH][aA][nN][dD][lL][eE][rR]|[zZ][lL][iI][bB]_[gG][eE][tT]_[cC][oO][dD][iI][nN][gG]_[tT][yY][pP][eE]|[rR][eE][aA][dD][gG][zZ][fF][iI][lL][eE]|[gG][zZ]([cC][oO][mM][pP][rR][eE][sS][sS]|[iI][nN][fF][lL][aA][tT][eE]|[dD][eE][fF][lL][aA][tT][eE]|[oO][pP][eE][nN]|[uU][nN][cC][oO][mM][pP][rR][eE][sS][sS]|[eE][nN][cC][oO][dD][eE]|[fF][iI][lL][eE]))(?=\s*\())|([\s\S])/g,/(?:\b[iI][sS]_[iI][nN][tT]([eE][gG][eE][rR])?(?=\s*\())|([\s\S])/g,/(?:\b([rR][eE]([cC][uU][rR][sS][iI][vV][eE]([rR][eE][gG][eE][xX][iI][tT][eE][rR][aA][tT][oO][rR]|[cC][aA][cC][hH][iI][nN][gG][iI][tT][eE][rR][aA][tT][oO][rR]|[iI][tT][eE][rR][aA][tT][oO][rR][iI][tT][eE][rR][aA][tT][oO][rR]|[dD][iI][rR][eE][cC][tT][oO][rR][yY][iI][tT][eE][rR][aA][tT][oO][rR]|[fF][iI][lL][tT][eE][rR][iI][tT][eE][rR][aA][tT][oO][rR]|[aA][rR][rR][aA][yY][iI][tT][eE][rR][aA][tT][oO][rR])|[fF][lL][eE][cC][tT][iI][oO][nN]([mM][eE][tT][hH][oO][dD]|[cC][lL][aA][sS][sS]|[oO][bB][jJ][eE][cC][tT]|[eE][xX][tT][eE][nN][sS][iI][oO][nN]|[pP]([aA][rR][aA][mM][eE][tT][eE][rR]|[rR][oO][pP][eE][rR][tT][yY])|[fF][uU][nN][cC][tT][iI][oO][nN])?|[gG][eE][xX][iI][tT][eE][rR][aA][tT][oO][rR])|[sS]([tT][dD][cC][lL][aA][sS][sS]|[wW][fF]([sS]([hH][aA][pP][eE]|[oO][uU][nN][dD]|[pP][rR][iI][tT][eE])|[tT][eE][xX][tT]([fF][iI][eE][lL][dD])?|[dD][iI][sS][pP][lL][aA][yY][iI][tT][eE][mM]|[fF]([iI][lL][lL]|[oO][nN][tT]([cC][hH][aA]([rR])?)?)|[aA][cC][tT][iI][oO][nN]|[gG][rR][aA][dD][iI][eE][nN][tT]|[mM][oO]([vV][iI][eE]|[rR][pP][hH])|[bB]([iI][tT][mM][aA][pP]|[uU][tT][tT][oO][nN])))|[xX][mM][lL][rR][eE][aA][dD][eE][rR]|[tT][iI][dD][yY][nN][oO][dD][eE]|[sS]([iI][mM][pP][lL][eE][xX][mM][lL]([iI][tT][eE][rR][aA][tT][oO][rR]|[eE][lL][eE][mM][eE][nN][tT])|[oO][aA][pP]([sS][eE][rR][vV][eE][rR]|[hH][eE][aA][dD][eE][rR]|[cC][lL][iI][eE][nN][tT]|[pP][aA][rR][aA][mM]|[vV][aA][rR]|[fF][aA][uU][lL][tT])|[pP][lL]([tT][eE][mM][pP][fF][iI][lL][eE][oO][bB][jJ][eE][cC][tT]|[oO][bB][jJ][eE][cC][tT][sS][tT][oO][rR][aA][gG][eE]|[fF][iI][lL][eE]([iI][nN][fF][oO]|[oO][bB][jJ][eE][cC][tT])))|[nN][oO][rR][eE][wW][iI][nN][dD][iI][tT][eE][rR][aA][tT][oO][rR]|[cC]([oO][mM][pP][eE][rR][sS][iI][sS][tT][hH][eE][lL][pP][eE][rR]|[aA][cC][hH][iI][nN][gG][iI][tT][eE][rR][aA][tT][oO][rR])|[iI]([nN][fF][iI][nN][iI][tT][eE][iI][tT][eE][rR][aA][tT][oO][rR]|[tT][eE][rR][aA][tT][oO][rR][iI][tT][eE][rR][aA][tT][oO][rR])|[dD]([iI][rR][eE][cC][tT][oO][rR][yY][iI][tT][eE][rR][aA][tT][oO][rR]|[oO][mM]([xX][pP][aA][tT][hH]|[nN][oO][dD][eE]|[cC]([oO][mM][mM][eE][nN][tT]|[dD][aA][tT][aA][sS][eE][cC][tT][iI][oO][nN])|[tT][eE][xX][tT]|[dD][oO][cC][uU][mM][eE][nN][tT]([fF][rR][aA][gG][mM][eE][nN][tT])?|[pP][rR][oO][cC][eE][sS][sS][iI][nN][gG][iI][nN][sS][tT][rR][uU][cC][tT][iI][oO][nN]|[eE]([nN][tT][iI][tT][yY][rR][eE][fF][eE][rR][eE][nN][cC][eE]|[lL][eE][mM][eE][nN][tT])|[aA][tT][tT][rR]))|[pP]([dD][oO]([sS][tT][aA][tT][eE][mM][eE][nN][tT])?|[aA][rR][eE][nN][tT][iI][tT][eE][rR][aA][tT][oO][rR])|[eE]([rR][rR][oO][rR][eE][xX][cC][eE][pP][tT][iI][oO][nN]|[mM][pP][tT][yY][iI][tT][eE][rR][aA][tT][oO][rR]|[xX][cC][eE][pP][tT][iI][oO][nN])|[fF][iI][lL][tT][eE][rR][iI][tT][eE][rR][aA][tT][oO][rR]|[lL][iI][mM][iI][tT][iI][tT][eE][rR][aA][tT][oO][rR]|[aA]([pP]([pP][eE][nN][dD][iI][tT][eE][rR][aA][tT][oO][rR]|[aA][cC][hH][eE][rR][eE][qQ][uU][eE][sS][tT])|[rR][rR][aA][yY]([iI][tT][eE][rR][aA][tT][oO][rR]|[oO][bB][jJ][eE][cC][tT])))(?=\s*\())|([\s\S])/g,/(?:\b(([pP][rR][iI][nN][tT]|[eE][cC][hH][oO])\b|([iI][sS][sS][eE][tT]|[uU][nN][sS][eE][tT]|[eE]([vV][aA][lL]|[mM][pP][tT][yY])|[lL][iI][sS][tT])(?=\s*\()))|([\s\S])/g,/((\/[eimnosux]*))|([\s\S])/g,/(<\/)((?:[sS][cC][rR][iI][pP][tT]))|([\s\S])/g,/(\/\/)(.*?((?=<\/script)|(?=\n)\n?))|([\s\S])/g,/(\{(literal)(\}))|([\s\S])/g,/((\\.)|.)(\-((\\.)|[^\]]))|([\s\S])/g,/^(HTML)((;?)((?=\n)\n?))|([\s\S])/g,/\\(a|b|e|f|n|r|t|v|\\|')|([\s\S])/g,/\\[0-9]{3}|([\s\S])/g,/\\x[0-9a-fA-F]{2}|([\s\S])/g,/\\c.|([\s\S])/g,/:|\s|=|/g,/~|([\s\S])/g,/\*|\?|([\s\S])/g,/([\?\*\+@!])(\()|([\s\S])/g,/(\\x[0-9A-F]{2})|(\\[0-7]{3})|(\\\n)|(\\\\)|(\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|([\s\S])/g,/\}|(?=;|\))|([\s\S])/g,/\b(try|catch|finally|throw)\b|([\s\S])/g,/\?|:|([\s\S])/g,/\b(return|break|case|continue|default|do|while|for|switch|if|else)\b|([\s\S])/g,/\b(instanceof)\b|([\s\S])/g,/(==|!=|<=|>=|<>|<|>)|([\s\S])/g,/(=)|([\s\S])/g,/(!|&&|\|\|)|([\s\S])/g,/\S|/g,/\.(?=\S)|([\s\S])/g,/\\[bBAZzG]|\^|\$|([\s\S])/g,/\\[1-9][0-9]?|([\s\S])/g,/[\?\+\*][\?\+]?|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??|([\s\S])/g,/\(\?#|([\s\S])/g,/#\s[a-zA-Z0-9,\. \t\?!-:\u0080-\uffff]*(?=\n)|([\s\S])/g,/\(\?[iLmsux]+\)|([\s\S])/g,/(\()(\?P=([a-zA-Z_][a-zA-Z_0-9]*\w*))(\))|([\s\S])/g,/(\()((\?=)|(\?!)|(\?<=)|(\?<!))|([\s\S])/g,/(\()(\?\(([1-9][0-9]?|[a-zA-Z_][a-zA-Z_0-9]*)(\)))|([\s\S])/g,/(\()(((\?P<)(([a-z]\w*)(>))|(\?:))?)|([\s\S])/g,/\$?"|([\s\S])/g,/\$'|([\s\S])/g,/\s*HTML(?=\n)|([\s\S])/g,/(?=;|\})|([\s\S])/g,/'\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)|([\s\S])/g,/(\{\/(literal)(\}))|([\s\S])/g,/\\[wWsSdDhH]|\.|([\s\S])/g,/(\[)((\^)?)|([\s\S])/g,/|(?=(;|,|\(|\)|>|\[|\]|=))|([\s\S])/g,/(?=(;|,|\(|\)|>|\[|\]|=))|([\s\S])/g,/(?=<?xml|<(?:[hH][tT][mM][lL]\b)|!DOCTYPE (?:[hH][tT][mM][lL]\b))|([\s\S])/g,/^(TEXTILE)((?=\n))|([\s\S])/g,/\*\/.*\n|([\s\S])/g,/\/\/|([\s\S])/g,/\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\b|([\s\S])/g,/\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\b|([\s\S])/g,/\b(const|extern|register|restrict|static|volatile|inline)\b|([\s\S])/g,/\bk[A-Z]\w*\b|([\s\S])/g,/\bg[A-Z]\w*\b|([\s\S])/g,/\bs[A-Z]\w*\b|([\s\S])/g,/\b(NULL|true|false|TRUE|FALSE)\b|([\s\S])/g,/\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|([\s\S])/g,/^\s*#\s*(define)(\s+(([a-zA-Z_][a-zA-Z0-9_]*))((?:(\()((\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*((,)(\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*))*((?:\.\.\.)?))(\))))?))|([\s\S])/g,/^\s*#\s*(error|warning)(\b)|([\s\S])/g,/^\s*#\s*(include|import)(\b\s+)|([\s\S])/g,/^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)(\b)|([\s\S])/g,/\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\b|([\s\S])/g,/\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\b|([\s\S])/g,/\b(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\b|([\s\S])/g,/\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\b|([\s\S])/g,/\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\b|([\s\S])/g,/new|/g,/else|/g,/\w|/g,/&&|/g,/[\*&>]|/g,/(?:^|(?:(?=\s)|(?=\s*[A-Za-z_])))(\s*)((?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()((?=((?:[A-Za-z_](?=([A-Za-z0-9_]*))\6|::)+))\5|(?:(?:operator)(?:[\-\*&<>=\+!]+|\(\)|\[\])))(\s*(?=\()))|([\s\S])/g,/(?:^|(?:(?=\s)))(\s*)((?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()((?=((?:[A-Za-z_](?=([A-Za-z0-9_]*))\6|::)+))\5|(?:(?:operator)(?:[\-\*&<>=\+!]+|\(\)|\[\])))(\s*(?=\()))|([\s\S])/g,/(?:^|(?:(?=\s*[A-Za-z_])))(\s*)((?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()((?=((?:[A-Za-z_](?=([A-Za-z0-9_]*))\6|::)+))\5|(?:(?:operator)(?:[\-\*&<>=\+!]+|\(\)|\[\])))(\s*(?=\()))|([\s\S])/g,/(?:^)(\s*)((?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()((?=((?:[A-Za-z_](?=([A-Za-z0-9_]*))\6|::)+))\5|(?:(?:operator)(?:[\-\*&<>=\+!]+|\(\)|\[\])))(\s*(?=\()))|([\s\S])/g,/[\-a-z]|/g,/(?=[\-a-z])|([\s\S])/g,/(:)(\s*)|([\s\S])/g,/^\t*(RUBY)((?=\n))|([\s\S])/g,/^(\3)((?=\n))|([\s\S])/g,/(\?)(>)|([\s\S])/g,/^\t*(PYTHON)((?=\n))|([\s\S])/g,/(?=[^\]\s])|([\s\S])/g,/\b(id)(\b\s*(=))|([\s\S])/g,/(\|)|([\s\S])/g,/[_a-zA-Z][_a-zA-Z0-9]*|([\s\S])/g,/(?=\S)|([\s\S])/g,/^\t*(APPLESCRIPT)((?=\n))|([\s\S])/g,/(\s*)(\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))|([\s\S])/g,/(?:(?=\s)(?:|)(\s+))?((\b(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()(?=((?:(?!NS)[A-Za-z_](?=([A-Za-z0-9_]*))\6\b|::)+))\5)(\s*(\()))|([\s\S])/g,/(?:(?=\s)(?:)(\s+))?((\b(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()(?=((?:(?!NS)[A-Za-z_](?=([A-Za-z0-9_]*))\6\b|::)+))\5)(\s*(\()))|([\s\S])/g,/((\b(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()(?=((?:(?!NS)[A-Za-z_](?=([A-Za-z0-9_]*))\6\b|::)+))\5)(\s*(\()))|([\s\S])/g,/(?:(?:(?=\s)\s+))((?=((?:[A-Za-z_](?=([A-Za-z0-9_]*))\3|::)+))\2|(?:(?:operator)(?:[\-\*&<>=\+!]+|\(\)|\[\]))?)(\s*(\())|([\s\S])/g,/\/\*\*\/|([\s\S])/g,/^(\3)((;?)((?=\n)))|([\s\S])/g,/^\s*(#\s*(if(n?def)?)(\b.*?(?:(?=(?:\/\/|\/\*))|(?=\n))))|([\s\S])/g,/\b(?:[a-z]\w*(\.))*([A-Z]+\w*)|([\s\S])/g,/(?=:)|([\s\S])/g,/\b([a-zA-Z_][a-zA-Z_0-9]*)(\s*(?:(,)|(?=[\n\):])))|([\s\S])/g,/(#)(.*(?=\n)\n?)|([\s\S])/g,/\b(?:(0[xX][0-9a-fA-F]*)[lL])|([\s\S])/g,/\b(?:(0[xX][0-9a-fA-F]*))|([\s\S])/g,/\b(?:(0[0-7]+)[lL])|([\s\S])/g,/\b(0[0-7]+)|([\s\S])/g,/[^a-zA-Z0-9_]|/g,/\b(?:(((\d+(\.(?=[^a-zA-Z_])\d*)?|\.\d+)([eE][\-\+]?\d+)?))[jJ])|([\s\S])/g,/\b(?:(((\d+(\.(?=[^a-zA-Z_])\d*)?)([eE][\-\+]?\d+)?))[jJ])|([\s\S])/g,/\b(?:(\d+\.\d*([eE][\-\+]?\d+)?))(?=[^a-zA-Z_])|([\s\S])/g,/[^0-9a-zA-Z_]|/g,/(?:(\.\d+([eE][\-\+]?\d+)?))|([\s\S])/g,/\b(?:(\d+[eE][\-\+]?\d+))|([\s\S])/g,/\b(?:([1-9]+[0-9]*|0)[lL])|([\s\S])/g,/\b([1-9]+[0-9]*|0)|([\s\S])/g,/\b(global)(\b)|([\s\S])/g,/\b(?:(import)|(from))(\b)|([\s\S])/g,/\b(elif|else|except|finally|for|if|try|while|with)\b|([\s\S])/g,/\b(break|continue|pass|raise|return|yield)\b|([\s\S])/g,/\b(and|in|is|not|or)\b|([\s\S])/g,/\b(as|assert|del|exec|print)(\b)|([\s\S])/g,/<=|>=|==|<|>|<>|([\s\S])/g,/\+=|\-=|\*=|\/=|\/\/=|%=|&=|\|=|\^=|>>=|<<=|\*\*=|([\s\S])/g,/\+|\-|\*|\*\*|\/|\/\/|%|<<|>>|&|\||\^|~|([\s\S])/g,/^\s*(class)(\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*:))|([\s\S])/g,/^\s*(class)(\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*\())|([\s\S])/g,/^\s*(class)(\s+(?=[a-zA-Z_][a-zA-Z_0-9]))|([\s\S])/g,/^\s*(def)(\s+(?=[A-Za-z_][A-Za-z0-9_]*\s*\())|([\s\S])/g,/^\s*(def)(\s+(?=[A-Za-z_][A-Za-z0-9_]*))|([\s\S])/g,/(lambda)((?=\s+))|([\s\S])/g,/^\s*(?=@\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\()|([\s\S])/g,/^\s*(?=@\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*)|([\s\S])/g,/\s*(\()|([\s\S])/g,/(?=[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\()|([\s\S])/g,/(?=[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\[)|([\s\S])/g,/\s*(\[)|([\s\S])/g,/\b(def|lambda)(\b)|([\s\S])/g,/\b(class)(\b)|([\s\S])/g,/\b(None|True|False|Ellipsis|NotImplemented)\b|([\s\S])/g,/(\[)((\s*(\]))(\b))|([\s\S])/g,/(\()(\s*(\)))|([\s\S])/g,/(\{)(\s*(\}))|([\s\S])/g,/page|include|taglib|([\s\S])/g,/\b(artwork|application|encoder|EQ preset|item|source|visual|(EQ |browser )?window|((audio CD|device|shared|URL|file) )?track|playlist window|((audio CD|device|radio tuner|library|folder|user) )?playlist)s?\b|([\s\S])/g,/\b(add|back track|convert|fast forward|(next|previous) track|pause|play(pause)?|refresh|resume|rewind|search|stop|update|eject|subscribe|update(Podcast|AllPodcasts)|download)\b|([\s\S])/g,/\b(current (playlist|stream (title|URL)|track)|player state)\b|([\s\S])/g,/\b(current (encoder|EQ preset|visual)|EQ enabled|fixed indexing|full screen|mute|player position|sound volume|visuals enabled|visual size)\b|([\s\S])/g,/\s*(?:(?=\})|(:))|([\s\S])/g,/\]\]>|([\s\S])/g,/[><]\(|([\s\S])/g,/&>|\d*>&\d*|\d*(>>|>|<)|\d*<&|\d*<>|([\s\S])/g,/(?=\w?[^=;]*(?:class|(?:@)?interface|enum)\s+\w+)|([\s\S])/g,/^(SQL)((;?)((?=\n)\n?))|([\s\S])/g,/^\s*#\s*if(n?def)?\b.*(?=\n)|([\s\S])/g,/|(?=\w)|([\s\S])/g,/(?=\w)|([\s\S])/g,/\s*((\/\/)(.*(?=\n)\n?))|([\s\S])/g,/\b(time)\b|([\s\S])/g,/[\|!]|([\s\S])/g,/\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|\-)?[0-9]+)?)\b|([\s\S])/g,/(\/)([imsxeADSUXu]*)(")|([\s\S])/g,/\\\}|\\\\|([\s\S])/g,/\b(?:void|boolean|byte|char|short|int|float|long|double)\b|([\s\S])/g,/\b(assert)(\s)|([\s\S])/g,/\s*\1(?=\n)|([\s\S])/g,/(?:^\s*)<\?python(?!.*\?>)|([\s\S])/g,/(\[{2})|([\s\S])/g,/(\({2})|([\s\S])/g,/(\{)((?=\s|(?=\n)))|([\s\S])/g,/[A-Za-z_][A-Za-z_0-9]*(?=\s*\()|([\s\S])/g,/(?!new)(?=\w)(?![^\{]*;)(?!.*\/\/)(?!.*=)(?=.*\()|([\s\S])/g,/'\/(?=(?=((\\.|[^'\/])+))\1\/[imsxeADSUXu]*')|([\s\S])/g,/\b([a-zA-Z\-:]+)|([\s\S])/g,/!|:[\-=\?]?|\*|@|#{1,2}|%{1,2}|\/|([\s\S])/g,/(\[)(([^\]]+)(\]))|([\s\S])/g,/(?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\()|([\s\S])/g,/(?=\{|;)|([\s\S])/g,/\b((alert|dialog) reply)\b|([\s\S])/g,/\b(file information)\b|([\s\S])/g,/\b(POSIX files?|system information|volume settings)\b|([\s\S])/g,/\b(URLs?|internet address(es)?|web pages?|FTP items?)\b|([\s\S])/g,/\b(info for|list (disks|folder)|mount volume|path to( resource)?)\b|([\s\S])/g,/\b(beep|choose (application|color|file( name)?|folder|from list|remote application|URL)|delay|display (alert|dialog)|say)\b|([\s\S])/g,/\b(ASCII (character|number)|localized string|offset|summarize)\b|([\s\S])/g,/\b(set the clipboard to|the clipboard|clipboard info)\b|([\s\S])/g,/\b(open for access|close access|read|write|get eof|set eof)\b|([\s\S])/g,/\b((load|store|run) script|scripting components)\b|([\s\S])/g,/\b(current date|do shell script|get volume settings|random number|round|set volume|system attribute|system info|time to GMT)\b|([\s\S])/g,/\b(opening folder|(closing|moving) folder window for|adding folder items to|removing folder items from)\b|([\s\S])/g,/\b(open location|handle CGI request)\b|([\s\S])/g,/\s*(?:(,)|(?=\]))|([\s\S])/g,/\b(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\b|([\s\S])/g,/(?=\])|([\s\S])/g,/(\b0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\s*,\s*)(0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\s*,\s*)(0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\b)|([\s\S])/g,/\b([0-9]{1,2}|100)\s*%,\s*([0-9]{1,2}|100)\s*%,\s*([0-9]{1,2}|100)\s*%|([\s\S])/g,/[^'"\) \t]+|([\s\S])/g,/\\[`\\\$]|([\s\S])/g,/(>(<))(\/(?:([\-_a-zA-Z0-9]+)((:)))?(([\-_a-zA-Z0-9:]+)(>)))|([\s\S])/g,/(?=<\/(?:[sS][tT][yY][lL][eE]))|([\s\S])/g,/'|/g,/(')((('))((?!')))|([\s\S])/g,/([uU]r)(''')|([\s\S])/g,/([uU]R)(''')|([\s\S])/g,/(r)(''')|([\s\S])/g,/(R)(''')|([\s\S])/g,/([uU])(''')|([\s\S])/g,/([uU]r)(')|([\s\S])/g,/([uU]R)(')|([\s\S])/g,/(r)(')|([\s\S])/g,/(R)(')|([\s\S])/g,/([uU])(')|([\s\S])/g,/(''')((?=\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)))|([\s\S])/g,/(')((?=\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)))|([\s\S])/g,/(')|([\s\S])/g,/\s*(\))(\s*)|([\s\S])/g,/\bnew\b|([\s\S])/g,/\$\({2}|([\s\S])/g,/\$\(|([\s\S])/g,/\b(friend|explicit|virtual)\b|([\s\S])/g,/\b(private:|protected:|public:)|([\s\S])/g,/\b(catch|operator|try|throw|using)\b|([\s\S])/g,/\bdelete\b(\s*\[\])?|\bnew\b(?!\])|([\s\S])/g,/\b(f|m)[A-Z]\w*\b|([\s\S])/g,/\b(this)\b|([\s\S])/g,/\btemplate\b\s*|([\s\S])/g,/\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\b\s*|([\s\S])/g,/\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b|([\s\S])/g,/\b(class|wchar_t)\b|([\s\S])/g,/\b(export|mutable|typename)\b|([\s\S])/g,/=|/g,/(?:^|(?:))((?=((?:[A-Za-z_][A-Za-z0-9_]*::)*))\2~[A-Za-z_][A-Za-z0-9_]*)(\s*(\())|([\s\S])/g,/(?:^)((?=((?:[A-Za-z_][A-Za-z0-9_]*::)*))\2~[A-Za-z_][A-Za-z0-9_]*)(\s*(\())|([\s\S])/g,/(?=\n)|'|([\s\S])/g,/\\(x[0-9a-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)|([\s\S])/g,/;|&&|&|\|\||([\s\S])/g,/\\(\\|[abefnprtv'"\?]|[0-3]\d{0,2}|[4-7]\d?|x[a-fA-F0-9]{0,2})|([\s\S])/g,/(<!)((ENTITY)(\s([\-_a-zA-Z0-9]+)))|([\s\S])/g,/(<<<)((')([^']*(')))|([\s\S])/g,/(<<<)((")((\\("|\\)|[^"])*(")))|([\s\S])/g,/(<<<)(([^\s\\]|\\.)+)|([\s\S])/g,/^\s*(class)(\s+(([\.a-zA-Z0-9_:]+(\s*(<)(\s*[\.a-zA-Z0-9_:]+))?)|((<<)(\s*[\.a-zA-Z0-9_:]+))))|([\s\S])/g,/^\s*(module)(\s+(([A-Z]\w*(::))?(([A-Z]\w*(::))?(([A-Z]\w*(::))*([A-Z]\w*)))))|([\s\S])/g,/\belse(\s)+if\b|([\s\S])/g,/\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![\?!])|([\s\S])/g,/\bdo\b\s*|([\s\S])/g,/\{|/g,/(\s+)|([\s\S])/g,/\b(and|not|or)\b|([\s\S])/g,/\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![\?!])|\bdefined\?|\bblock_given\?|([\s\S])/g,/\bdefined\?|\bblock_given\?|([\s\S])/g,/\b(nil|true|false)\b(?![\?!])|([\s\S])/g,/\b(__(FILE|LINE)__|self)\b(?![\?!])|([\s\S])/g,/\b(initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![\?!])|([\s\S])/g,/\b(require|gem)(\b)|([\s\S])/g,/(@)([a-zA-Z_]\w*)|([\s\S])/g,/(@@)([a-zA-Z_]\w*)|([\s\S])/g,/(\$)([a-zA-Z_]\w*)|([\s\S])/g,/(\$)(!|@|&|`|'|\+|\d+|~|=|\/|\\|,|;|\.|<|>|_|\*|\$|\?|:|"|\-[0adFiIlpv])|([\s\S])/g,/\b(ENV)(\[)|([\s\S])/g,/\b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[))|([\s\S])/g,/\b[A-Z]\w*\b|([\s\S])/g,/(?=def\b)(def)(\s+((?=([a-zA-Z_]\w*(?=(\.|::))\5))\4?(?=([a-zA-Z_]\w*(?=([\?!]|=(?!>)))\7?|===?|>[>=]?|<=>|<[<=]?|[%&`\/\|]|\*\*?|=?~|[\-\+]@?|\[\]=?))\6)(\s*(\()))|([\s\S])/g,/(?=def\b)(def)(\s+((?=([a-zA-Z_]\w*(?=(\.|::))\5))\4?(?=([a-zA-Z_]\w*(?=([\?!]|=(?!>)))\7?|===?|>[>=]?|<=>|<[<=]?|[%&`\/\|]|\*\*?|=?~|[\-\+]@?|\[\]=?))\6)([ \t](?=[ \t]*[^\s#])))|([\s\S])/g,/(?=def\b)(def)(\b(\s+((?=([a-zA-Z_]\w*(?=(\.|::))\6))\5?(?=([a-zA-Z_]\w*(?=([\?!]|=(?!>)))\8?|===?|>[>=]?|<=>|<[<=]?|[%&`\/\|]|\*\*?|=?~|[\-\+]@?|\[\]=?))\7))?)|([\s\S])/g,/\b(0[xX][0-9a-fA-F](?=(_?[0-9a-fA-F]))\2*|\d(?=(_?\d))\3*(\.(?![^[:space:][:digit:]])(?=(_?\d))\5*)?([eE][\-\+]?\d(?=(_?\d))\7*)?|0[bB][01]+)\b|([\s\S])/g,/:'|([\s\S])/g,/:"|([\s\S])/g,/\/=|([\s\S])/g,/%x\{|([\s\S])/g,/%x\[|([\s\S])/g,/%x<|([\s\S])/g,/%x\(|([\s\S])/g,/%x([^\w])|([\s\S])/g,/[=>~\(\?:\[,\|&;]|/g,/[\s;]if\s|[\s;]or\s|/g,/[\s\.]sub\s|[\s;]and\s|[\s;]not\s|/g,/[\s\.]scan\s|[\s\.]sub!\s|[\s\.]gsub\s|[\s;]when\s|/g,/[\s;]while\s|[\s\.]index\s|[\s;]elsif\s|[\s\.]gsub!\s|[\s\.]match\s|/g,/[\s;]unless\s|/g,/[\s;]assert_match\s|/g,/^if\s|/g,/^when\s|/g,/^while\s|^elsif\s|/g,/^unless\s|/g,/(?:^||)\s*((\/))((?![\*\+\{\}\?]))|([\s\S])/g,/(?:^|)\s*((\/))((?![\*\+\{\}\?]))|([\s\S])/g,/(?:^)\s*((\/))((?![\*\+\{\}\?]))|([\s\S])/g,/%r\[|([\s\S])/g,/%r\(|([\s\S])/g,/%r<|([\s\S])/g,/%r([^\w])|([\s\S])/g,/%[QWSR]?\(|([\s\S])/g,/%[QWSR]?\[|([\s\S])/g,/%[QWSR]?<|([\s\S])/g,/%[QWSR]?\{|([\s\S])/g,/%[QWSR]([^\w])|([\s\S])/g,/%([^\w\s=])|([\s\S])/g,/%[qws]\(|([\s\S])/g,/%[qws]<|([\s\S])/g,/%[qws]\[|([\s\S])/g,/%[qws]\{|([\s\S])/g,/%[qws]([^\w])|([\s\S])/g,/(:)((?=([a-zA-Z_]\w*(?=([\?!]|=(?![>=])))\4?|===?|>[>=]?|<[<=]?|<=>|[%&`\/\|]|\*\*?|=?~|[\-\+]@?|\[\]=?|@@?[a-zA-Z_]\w*))\3)|([\s\S])/g,/(?=([a-zA-Z_]\w*(?=([\?!]|=(?![>=])))\2?|===?|>[>=]?|<[<=]?|<=>|[%`\/\|]|\*\*?|=?~|[\-\+]@?|\[\]=?|@@?[a-zA-Z_]\w*))\1(:)((?!:))|([\s\S])/g,/^=begin|([\s\S])/g,/(?:^[ \t]+)?(#)(.*(?=\n)\n?)|([\s\S])/g,/\?(\\(x[0-9a-fA-F]{1,2}(?![0-9a-fA-F])\b|0[0-7]{0,2}(?![0-7])\b|[^x0MC])|(\\[MC]\-)+\w|[^\s\\])|([\s\S])/g,/^__END__\n|([\s\S])/g,/(?=(=\s*<<(\w+)))\1(?!\s+#\s*([Cc]|sh|[Jj]ava))|([\s\S])/g,/(?=(<<\-HTML\b))\1|([\s\S])/g,/(?=(<<\-SQL\b))\1|([\s\S])/g,/(?=(<<\-(["\\']?)(\w+_(?:[eE][vV][aA][lL]))\2))\1|([\s\S])/g,/(?=(<<\-(\w+)))\1|([\s\S])/g,/(?=(=\s*<<(\w+)))\1(?=\s+#\s*[Cc](?!(\+\+|[Ss][Ss])))|([\s\S])/g,/(?=(=\s*<<(\w+)))\1(?=\s+#\s*[Cc]\+\+)|([\s\S])/g,/(?=(=\s*<<(\w+)))\1(?=\s+#\s*[Cc][Ss][Ss])|([\s\S])/g,/(?=(=\s*<<(\w+)))\1(?=\s+#\s*[Jj]ava[Ss]cript)|([\s\S])/g,/(?=(=\s*<<(\w+)))\1(?=\s+#\s*sh)|([\s\S])/g,/do|\{\s|/g,/do\s|/g,/<<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|<<|([\s\S])/g,/[ \t]|/g,/<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|\?|([\s\S])/g,/<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|([\s\S])/g,/!+|\bnot\b|&&|\band\b|\|\||\bor\b|\^|([\s\S])/g,/\bnot\b|&&|\band\b|\|\||\bor\b|\^|([\s\S])/g,/(%|&|\*\*|\*|\+|\-|\/)|([\s\S])/g,/\||~|>>|([\s\S])/g,/\.|::|([\s\S])/g];
-var B=[[A[0],3,[1],[[2]]],[A[1],2,[1],[[]]],[A[2],3,[1],[[2]]],[A[3],1,[],[]],[A[4],1,[],[]],[A[5],4,[1,3],[[2],[]]],[A[6],3,[1,2],[[2],[]]],[A[7],1,[0],[[]]],[A[8],10,[1,4,5,6,7],[[2],[5,7,8],[7,8],[7,8],[8]]],[A[9],7,[1,3,4,5,6],[[2],[4,6],[6],[6],[]]],[A[10],5,[1,4],[[2],[]]],[A[11],1,[],[]],[A[12],1,[0],[[]]],[A[13],1,[0],[[]]],[A[14],1,[0],[[]]],[A[15],1,[0],[[]]],[A[16],1,[0],[[]]],[A[17],2,[],[]],[A[18],2,[],[]],[A[19],1,[],[]],[A[20],1,[],[]],[A[21],3,[],[]],[A[22],1,[0],[[]]],[A[23],1,[],[]],[A[24],1,[],[]],[A[3],1,[],[]],[A[25],3,[0,1],[[],[2]]],[A[26],1,[],[]],[A[27],4,[1,2],[[],[3]]],[A[28],4,[1,2],[[],[3]]],[A[29],1,[],[]],[A[29],1,[],[]],[A[31],1,[0],[[]]],[A[32],2,[1],[[]]],[A[27],4,[1,2],[[],[3]]],[A[28],4,[1,2],[[],[3]]],[A[29],1,[],[]],[A[33],10,[1,3,8],[[2,6],[5,6],[9]]],[A[34],4,[1,3],[[2],[]]],[A[35],9,[1,3,5,7],[[2],[4],[6],[8]]],[A[36],5,[1,3],[[2],[4]]],[A[37],34,[1,3,5,7,9,12,14,16,19,21,24,26,28,30,32],[[2],[4],[6],[8],[10,11],[13],[15,18],[17,18],[20],[22,23],[25],[27],[29,33],[31,33],[33]]],[A[38],3,[],[]],[A[39],1,[],[]],[A[40],11,[],[]],[A[41],4,[],[]],[A[42],1,[],[]],[A[43],5,[],[]],[A[44],3,[],[]],[A[45],1,[],[]],[A[46],4,[],[]],[A[47],1,[],[]],[A[48],2,[],[]],[A[49],1,[],[]],[A[50],1,[],[]],[A[51],1,[],[]],[A[52],1,[],[]],[A[53],5,[],[]],[A[54],2,[],[]],[A[55],2,[],[]],[A[56],4,[1,3],[[2],[]]],[A[57],3,[1],[[2]]],[A[58],5,[1,3],[[2],[4]]],[A[59],3,[1],[[2]]],[A[60],5,[1,3],[[2],[4]]],[A[61],3,[1],[[2]]],[A[62],3,[1],[[2]]],[A[63],1,[0],[[]]],[A[64],3,[1],[[2]]],[A[65],1,[],[]],[A[66],1,[0],[[]]],[A[67],1,[],[]],[A[68],5,[1,4],[[2],[]]],[A[11],1,[],[]],[A[69],1,[],[]],[A[70],1,[],[]],[A[24],1,[0],[[]]],[A[71],4,[1,3],[[2],[]]],[A[72],4,[1],[[2]]],[A[15],1,[0],[[]]],[A[32],2,[1],[[]]],[A[24],1,[0],[[]]],[A[3],1,[],[]],[A[73],1,[],[]],[A[74],1,[],[]],[A[1],2,[1],[[]]],[A[75],1,[0],[[]]],[A[3],1,[],[]],[A[4],1,[],[]],[A[76],5,[1,3],[[2],[4]]],[A[77],1,[0],[[]]],[A[78],1,[],[]],[A[65],1,[0],[[]]],[A[79],5,[1,2],[[4],[3,4]]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[82],1,[],[]],[A[83],6,[1,5],[[4],[]]],[A[84],1,[0],[[]]],[A[31],1,[0],[[]]],[A[84],1,[0],[[]]],[A[85],1,[],[]],[A[70],1,[],[]],[A[86],1,[],[]],[A[65],1,[0],[[]]],[A[82],1,[0],[[]]],[A[65],1,[0],[[]]],[A[87],3,[0,1],[[],[2]]],[A[88],6,[],[]],[A[32],2,[1],[[]]],[A[24],1,[0],[[]]],[A[89],1,[],[]],[A[90],2,[],[]],[A[91],2,[1],[[]]],[A[27],4,[1,2],[[],[3]]],[A[92],5,[1,2],[[4],[3,4]]],[A[29],1,[],[]],[A[82],1,[0],[[]]],[A[93],1,[],[]],[A[94],2,[],[]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[95],1,[],[]],[A[96],1,[],[]],[A[97],3,[1,2],[[],[]]],[A[98],3,[1],[[2]]],[A[82],1,[],[]],[A[99],1,[0],[[]]],[A[15],1,[0],[[]]],[A[66],1,[],[]],[A[100],1,[],[]],[A[101],4,[1],[[2]]],[A[102],5,[],[]],[A[103],3,[],[]],[A[104],4,[],[]],[A[105],3,[],[]],[A[106],2,[],[]],[A[107],2,[],[]],[A[108],1,[],[]],[A[109],7,[1,4,5],[[2],[6],[6]]],[A[110],4,[],[]],[A[111],5,[1,3],[[2],[4]]],[A[112],9,[],[]],[A[113],4,[1],[[3]]],[A[114],2,[1],[[]]],[A[115],8,[1,2,3,5,7],[[6],[6],[4,6],[6],[]]],[A[116],1,[],[]],[A[117],1,[],[]],[A[118],3,[0,1],[[],[2]]],[A[119],3,[1,2],[[2],[]]],[A[120],1,[],[]],[A[121],1,[],[]],[A[122],1,[],[]],[A[123],2,[],[]],[A[124],5,[1,3],[[2],[4]]],[A[16],1,[0],[[]]],[A[126],2,[],[]],[A[127],2,[],[]],[A[128],1,[],[]],[A[65],1,[0],[[]]],[A[24],1,[0],[[]]],[A[65],1,[0],[[]]],[A[129],1,[],[]],[A[90],2,[],[]],[A[16],1,[0],[[]]],[A[15],1,[0],[[]]],[A[130],3,[1],[[2]]],[A[131],1,[0],[[]]],[A[132],3,[1],[[2]]],[A[133],1,[],[]],[A[66],1,[0],[[]]],[A[97],3,[1,2],[[],[]]],[A[134],4,[1,3],[[2],[]]],[A[135],9,[1,3,5,7,8],[[2],[4],[6],[8],[]]],[A[136],6,[1,3],[[2],[4]]],[A[95],1,[],[]],[A[137],5,[1,3],[[2],[4]]],[A[138],5,[1,3],[[2],[4]]],[A[82],1,[0],[[]]],[A[139],1,[0],[[]]],[A[140],7,[1,2,5,6],[[4],[3,4],[6],[]]],[A[141],1,[],[]],[A[142],4,[1],[[2]]],[A[24],1,[0],[[]]],[A[143],4,[1],[[2]]],[A[23],1,[0],[[]]],[A[144],4,[1],[[2]]],[A[16],1,[0],[[]]],[A[145],1,[0],[[]]],[A[77],1,[0],[[]]],[A[67],1,[],[]],[A[146],2,[1],[[]]],[A[32],2,[1],[[]]],[A[147],2,[1],[[]]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[16],1,[0],[[]]],[A[24],1,[0],[[]]],[A[151],2,[],[]],[A[152],5,[0,1,3],[[],[2],[4]]],[A[153],5,[0,1,3],[[],[2],[4]]],[A[154],5,[0,1,3],[[],[2],[4]]],[A[155],5,[0,1,3],[[],[2],[4]]],[A[16],1,[0],[[]]],[A[156],1,[],[]],[A[16],1,[0],[[]]],[A[66],1,[0],[[]]],[A[157],1,[0],[[]]],[A[1],2,[1],[[]]],[A[158],2,[1],[[]]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[159],5,[0,1,3],[[],[2],[4]]],[A[160],1,[0],[[]]],[A[161],2,[1],[[]]],[A[29],1,[],[]],[A[163],1,[],[]],[A[164],1,[0],[[]]],[A[165],1,[],[]],[A[166],1,[],[]],[A[167],1,[],[]],[A[168],6,[1,2,5],[[],[3],[]]],[A[169],20,[1,2,5,7,9,11,13,14,15,17,18,19],[[4],[3,4],[6],[],[],[12],[19],[19],[16,19],[19],[19],[]]],[A[170],11,[0],[[]]],[A[65],1,[0],[[]]],[A[171],1,[],[]],[A[172],1,[0],[[]]],[A[173],1,[],[]],[A[174],1,[0],[[]]],[A[175],6,[2],[[3]]],[A[16],1,[0],[[]]],[A[176],2,[],[]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[177],1,[0],[[]]],[A[85],1,[],[]],[A[70],1,[],[]],[A[178],1,[],[]],[A[180],1,[],[]],[A[146],2,[1],[[]]],[A[181],3,[1],[[2]]],[A[182],2,[1],[[]]],[A[183],2,[],[]],[A[184],2,[],[]],[A[185],3,[1],[[2]]],[A[186],4,[1],[[2]]],[A[187],4,[1],[[2]]],[A[188],4,[1],[[2]]],[A[189],4,[1],[[2]]],[A[190],4,[1],[[2]]],[A[191],4,[1],[[2]]],[A[192],5,[1,3],[[2],[4]]],[A[193],3,[1],[[2]]],[A[194],1,[],[]],[A[195],2,[1],[[]]],[A[196],3,[0,1],[[],[2]]],[A[65],1,[0],[[]]],[A[197],5,[1,4],[[2],[]]],[A[198],5,[1,4],[[2],[]]],[A[199],3,[1],[[2]]],[A[200],3,[1,2],[[],[]]],[A[201],1,[],[]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[82],1,[],[]],[A[202],2,[1],[[]]],[A[67],1,[],[]],[A[203],1,[0],[[]]],[A[204],12,[1,3,4,6,7,8,10],[[2],[10],[5,10],[7,10],[10],[9,10],[]]],[A[205],1,[0],[[]]],[A[207],4,[0,2],[[],[3]]],[A[208],3,[0,-1],[[],[]]],[A[209],2,[],[]],[A[84],1,[0],[[]]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[16],1,[0],[[]]],[A[65],1,[],[]],[A[210],2,[1],[[]]],[A[211],1,[],[]],[A[24],1,[0],[[]]],[A[65],1,[],[]],[A[212],14,[1,3,5,6,9,11,13],[[2],[4],[8],[7,8],[10],[12],[]]],[A[213],14,[1,3,5,6,9,11,12],[[2],[4],[8],[7,8],[10,13],[13],[13]]],[A[214],14,[1,3,5,6,9,11,12],[[2],[4],[8],[7,8],[10,13],[13],[13]]],[A[215],7,[1,3,4],[[2],[6],[5,6]]],[A[216],10,[1,3,4,7],[[2],[6],[5,6],[8,9]]],[A[217],1,[0],[[]]],[A[218],1,[],[]],[A[219],1,[0],[[]]],[A[220],2,[],[]],[A[97],3,[1,2],[[],[]]],[A[221],2,[1],[[]]],[A[222],5,[1,3,4],[[2],[],[]]],[A[201],1,[],[]],[A[182],2,[1],[[]]],[A[82],1,[0],[[]]],[A[223],4,[1,3],[[2],[]]],[A[224],1,[0],[[]]],[A[225],3,[1],[[2]]],[A[226],1,[],[]],[A[146],2,[1],[[]]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[227],1,[0],[[]]],[A[228],1,[0],[[]]],[A[229],4,[1,3],[[2],[]]],[A[230],2,[0],[[]]],[A[231],1,[0],[[]]],[A[232],1,[],[]],[A[15],1,[],[]],[A[29],1,[],[]],[A[16],1,[0],[[]]],[A[24],1,[0],[[]]],[A[234],3,[1],[[2]]],[A[235],3,[1],[[2]]],[A[236],3,[1],[[2]]],[A[237],1,[0],[[]]],[A[146],2,[1],[[]]],[A[240],1,[],[]],[A[241],1,[],[]],[A[242],1,[],[]],[A[243],3,[],[]],[A[16],1,[0],[[]]],[A[244],2,[],[]],[A[245],1,[],[]],[A[246],3,[0,1],[[],[2]]],[A[247],1,[],[]],[A[226],1,[],[]],[A[226],1,[0],[[]]],[A[97],3,[1,2],[[],[]]],[A[226],1,[],[]],[A[248],2,[],[]],[A[249],1,[0],[[]]],[A[217],1,[0],[[]]],[A[250],4,[1],[[2]]],[A[251],4,[1],[[2]]],[A[252],7,[1,3,5],[[2],[4],[6]]],[A[253],7,[1,3,5],[[2],[4],[6]]],[A[254],10,[],[]],[A[255],3,[1],[[2]]],[A[256],9,[1,3,5,6],[[2],[4],[8],[7,8]]],[A[257],2,[],[]],[A[258],11,[1,3,5,7,8,10],[[2],[4],[6],[9],[9],[]]],[A[259],4,[],[]],[A[260],4,[],[]],[A[261],9,[1,3,5,6,8],[[2],[4],[],[7],[]]],[A[262],4,[1,3],[[2],[]]],[A[263],1,[],[]],[A[264],2,[],[]],[A[265],1,[],[]],[A[266],2,[],[]],[A[267],2,[],[]],[A[268],2,[],[]],[A[269],3,[],[]],[A[270],1,[],[]],[A[271],2,[],[]],[A[272],2,[],[]],[A[273],1,[],[]],[A[274],4,[1,3],[[2],[]]],[A[276],5,[1,3],[[2],[4]]],[A[129],1,[],[]],[A[90],2,[],[]],[A[277],3,[0,1],[[],[2]]],[A[278],3,[],[]],[A[279],6,[],[]],[A[280],2,[],[]],[A[281],2,[],[]],[A[282],2,[],[]],[A[283],2,[],[]],[A[284],2,[],[]],[A[285],14,[],[]],[A[286],2,[],[]],[A[287],3,[],[]],[A[288],3,[],[]],[A[289],3,[],[]],[A[290],3,[],[]],[A[291],2,[],[]],[A[97],3,[1,2],[[],[]]],[A[16],1,[0],[[]]],[A[16],1,[0],[[]]],[A[292],1,[0],[[]]],[A[293],2,[],[]],[A[294],2,[],[]],[A[295],2,[],[]],[A[296],2,[],[]],[A[297],2,[],[]],[A[298],2,[1],[[]]],[A[299],1,[0],[[]]],[A[300],1,[0],[[]]],[A[301],1,[0],[[]]],[A[302],6,[1,3,5],[[2],[4],[]]],[A[303],4,[1,3],[[2],[]]],[A[84],1,[0],[[]]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[308],3,[1],[[2]]],[A[1],2,[1],[[]]],[A[292],1,[0],[[]]],[A[65],1,[0],[[]]],[A[31],1,[0],[[]]],[A[3],1,[],[]],[A[309],1,[0],[[]]],[A[310],3,[0],[[]]],[A[16],1,[0],[[]]],[A[3],1,[],[]],[A[226],1,[0],[[]]],[A[16],1,[0],[[]]],[A[311],3,[0,1],[[],[2]]],[A[312],2,[],[]],[A[313],2,[],[]],[A[314],11,[],[]],[A[315],4,[1],[[2]]],[A[316],3,[1,2],[[2],[]]],[A[317],3,[1,2],[[2],[]]],[A[318],3,[1,2],[[2],[]]],[A[319],3,[1,2],[[2],[]]],[A[320],3,[1,2],[[2],[]]],[A[321],3,[1,2],[[2],[]]],[A[322],3,[1,2],[[2],[]]],[A[323],3,[1,2],[[2],[]]],[A[324],3,[1,2],[[2],[]]],[A[325],3,[1,2],[[2],[]]],[A[326],4,[1],[[2]]],[A[327],4,[1],[[2]]],[A[81],2,[1],[[]]],[A[328],2,[1],[[]]],[A[24],1,[0],[[]]],[A[329],1,[],[]],[A[24],1,[0],[[]]],[A[3],1,[],[]],[A[331],2,[1],[[]]],[A[292],1,[0],[[]]],[A[332],1,[],[]],[A[333],1,[],[]],[A[334],3,[],[]],[A[335],3,[1],[[2]]],[A[336],3,[1],[[2]]],[A[49],1,[],[]],[A[337],4,[1],[[2]]],[A[338],4,[1],[[2]]],[A[339],15,[1,3,5,7,8,10,12],[[2],[4],[6,13],[13],[13],[11,13],[13]]],[A[340],1,[],[]],[A[341],1,[],[]],[A[65],1,[0],[[]]],[A[226],1,[0],[[]]],[A[342],1,[],[]],[A[69],1,[],[]],[A[70],1,[],[]],[A[343],2,[0,1],[[],[]]],[A[344],1,[0],[[]]],[A[345],3,[1],[[2]]],[A[346],3,[1],[[2]]],[A[347],3,[1],[[2]]],[A[84],1,[0],[[]]],[A[79],5,[1,2],[[4],[3,4]]],[A[348],2,[1],[[]]],[A[349],2,[],[]],[A[350],2,[],[]],[A[351],2,[],[]],[A[352],2,[],[]],[A[353],3,[],[]],[A[355],2,[],[]],[A[356],1,[],[]],[A[357],4,[1],[[2]]],[A[358],4,[1,3],[[2],[]]],[A[359],1,[],[]],[A[360],1,[0],[[]]],[A[361],2,[1],[[]]],[A[363],1,[],[]],[A[24],1,[0],[[]]],[A[226],1,[0],[[]]],[A[16],1,[0],[[]]],[A[146],2,[],[]],[A[364],2,[],[]],[A[23],1,[0],[[]]],[A[3],1,[],[]],[A[23],1,[],[]],[A[365],6,[0,1,4],[[],[2],[5]]],[A[366],6,[0,1,4],[[],[2],[5]]],[A[367],6,[0,1,4],[[],[2],[5]]],[A[368],6,[0,1,4],[[],[2],[5]]],[A[369],6,[0,1,4],[[],[2],[5]]],[A[370],6,[0,1,4],[[],[2],[5]]],[A[371],6,[0,1,4],[[],[2],[5]]],[A[372],6,[0,1,4],[[],[2],[5]]],[A[373],6,[0,1,4],[[],[2],[5]]],[A[374],6,[0,1,4],[[],[2],[5]]],[A[375],6,[0,1,4],[[],[2],[5]]],[A[376],6,[0,1,4],[[],[2],[5]]],[A[377],6,[0,1,4],[[],[2],[5]]],[A[378],6,[0,1,4],[[],[2],[5]]],[A[84],1,[0],[[]]],[A[379],1,[0],[[]]],[A[380],2,[1],[[]]],[A[381],5,[1,3],[[2],[4]]],[A[361],2,[1],[[]]],[A[382],1,[],[]],[A[383],2,[1],[[]]],[A[384],1,[0],[[]]],[A[385],10,[],[]],[A[356],1,[],[]],[A[386],4,[1,2,3],[[],[],[]]],[A[387],7,[1,3,5],[[2],[4],[6]]],[A[1],2,[1],[[]]],[A[388],4,[0],[[]]],[A[389],5,[1,4],[[2],[]]],[A[390],2,[],[]],[A[391],1,[],[]],[A[392],1,[0],[[]]],[A[393],1,[],[]],[A[394],1,[],[]],[A[395],1,[],[]],[A[396],1,[],[]],[A[203],1,[0],[[]]],[A[397],7,[1,3,4,5],[[2],[],[],[6]]],[A[98],3,[1],[[2]]],[A[24],1,[0],[[]]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[398],2,[],[]],[A[203],1,[0],[[]]],[A[27],4,[1,2],[[],[3]]],[A[92],5,[1,2],[[4],[3,4]]],[A[29],1,[],[]],[A[75],1,[],[]],[A[399],1,[0],[[]]],[A[75],1,[0],[[]]],[A[400],1,[0],[[]]],[A[401],5,[1,2,4],[[],[3],[]]],[A[4],1,[],[]],[A[232],1,[],[]],[A[203],1,[0],[[]]],[A[402],1,[],[]],[A[114],2,[1],[[]]],[A[97],3,[1,2],[[],[]]],[A[95],1,[],[]],[A[116],1,[],[]],[A[403],1,[],[]],[A[404],3,[1],[[2]]],[A[405],1,[],[]],[A[226],1,[],[]],[A[24],1,[0],[[]]],[A[406],2,[],[]],[A[407],2,[],[]],[A[408],3,[],[]],[A[409],1,[],[]],[A[410],1,[],[]],[A[411],1,[0],[[]]],[A[70],1,[],[]],[A[412],3,[],[]],[A[413],12,[],[]],[A[414],58,[],[]],[A[415],1,[],[]],[A[416],6,[1,2,4],[[],[3],[5]]],[A[98],3,[1],[[2]]],[A[32],2,[1],[[]]],[A[417],2,[],[]],[A[31],1,[0],[[]]],[A[16],1,[0],[[]]],[A[24],1,[0],[[]]],[A[418],5,[],[]],[A[420],1,[],[]],[A[421],1,[],[]],[A[422],1,[],[]],[A[423],1,[],[]],[A[424],3,[1],[[2]]],[A[425],1,[],[]],[A[226],1,[],[]],[A[426],2,[],[]],[A[427],2,[],[]],[A[29],1,[],[]],[A[66],1,[],[]],[A[416],6,[1,2,4],[[],[3],[5]]],[A[389],5,[1,4],[[2],[]]],[A[392],1,[0],[[]]],[A[66],1,[0],[[]]],[A[428],3,[1],[[2]]],[A[429],1,[],[]],[A[430],1,[],[]],[A[431],1,[],[]],[A[432],1,[],[]],[A[433],1,[],[]],[A[434],1,[0],[[]]],[A[435],3,[1],[[2]]],[A[436],2,[1],[[]]],[A[437],2,[],[]],[A[77],1,[0],[[]]],[A[438],2,[1],[[]]],[A[439],1,[],[]],[A[440],3,[],[]],[A[29],1,[],[]],[A[441],7,[1,2,4],[[6],[3,6],[5,6]]],[A[114],2,[1],[[]]],[A[443],1,[],[]],[A[180],1,[],[]],[A[445],2,[],[]],[A[446],2,[],[]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[98],3,[1],[[2]]],[A[77],1,[0],[[]]],[A[447],1,[],[]],[A[448],4,[1,2],[[],[3]]],[A[449],9,[1,2,5],[[4],[3,4],[8]]],[A[226],1,[0],[[]]],[A[82],1,[0],[[]]],[A[441],7,[1,2,4],[[6],[3,6],[5,6]]],[A[75],1,[0],[[]]],[A[450],6,[1,3,5],[[2],[4],[]]],[A[451],6,[1,3,5],[[2],[4],[]]],[A[452],1,[],[]],[A[453],2,[],[]],[A[201],1,[],[]],[A[455],1,[],[]],[A[436],2,[1],[[]]],[A[456],2,[0],[[]]],[A[446],2,[],[]],[A[457],1,[],[]],[A[458],3,[0,1],[[],[2]]],[A[459],3,[1],[[2]]],[A[32],2,[1],[[]]],[A[460],7,[1,3,5],[[2],[4],[6]]],[A[461],15,[1,3,5,7,9,11,13,14],[[2],[4],[6],[8],[10],[12],[14],[]]],[A[462],9,[1,3,5,7],[[2],[4],[6],[8]]],[A[463],13,[1,3,5,7,9,11,12],[[2],[4],[6],[8],[10],[12],[]]],[A[464],11,[1,3,5,7,9,10],[[2],[4],[6],[8],[10],[]]],[A[465],9,[1,3,5,7,8],[[2],[4],[6],[8],[]]],[A[466],9,[1,3,5,7,8],[[2],[4],[6],[8],[]]],[A[467],18,[1,2,4,5,6,7,9,10,12,14,16,17],[[11],[3,11],[5,11],[11],[11],[8,11],[10,11],[11],[13],[15],[17],[]]],[A[468],4,[1,3],[[2],[]]],[A[469],2,[],[]],[A[470],2,[],[]],[A[471],6,[],[]],[A[24],1,[0],[[]]],[A[16],1,[0],[[]]],[A[472],1,[0],[[]]],[A[217],1,[0],[[]]],[A[473],3,[1],[[2]]],[A[474],2,[1],[[]]],[A[475],2,[],[]],[A[476],2,[],[]],[A[477],2,[],[]],[A[478],2,[],[]],[A[479],1,[],[]],[A[480],1,[],[]],[A[481],1,[],[]],[A[482],2,[],[]],[A[483],2,[],[]],[A[484],2,[],[]],[A[485],90,[],[]],[A[486],31,[],[]],[A[487],101,[],[]],[A[488],65,[],[]],[A[489],2,[],[]],[A[490],32,[],[]],[A[492],2,[],[]],[A[493],2,[],[]],[A[494],2,[],[]],[A[497],3,[1],[[2]]],[A[265],1,[],[]],[A[498],1,[],[]],[A[499],1,[],[]],[A[500],1,[],[]],[A[501],1,[],[]],[A[502],1,[],[]],[A[65],1,[0],[[]]],[A[65],1,[0],[[]]],[A[503],1,[],[]],[A[226],1,[],[]],[A[504],1,[],[]],[A[505],1,[0],[[]]],[A[226],1,[],[]],[A[146],2,[1],[[]]],[A[506],1,[],[]],[A[507],18,[],[]],[A[510],4,[1],[[3]]],[A[116],1,[],[]],[A[511],1,[],[]],[A[512],5,[],[]],[A[513],5,[],[]],[A[514],4,[],[]],[A[515],1,[],[]],[A[516],2,[],[]],[A[517],13,[],[]],[A[520],2,[],[]],[A[521],2,[],[]],[A[522],2,[],[]],[A[523],2,[],[]],[A[524],3,[],[]],[A[525],22,[],[]],[A[526],4,[],[]],[A[528],3,[1],[[2]]],[A[75],1,[0],[[]]],[A[529],1,[],[]],[A[530],5,[1],[[2]]],[A[263],1,[],[]],[A[273],1,[],[]],[A[531],1,[],[]],[A[532],4,[1,3],[[2],[]]],[A[15],1,[],[]],[A[533],2,[1],[[]]],[A[534],2,[],[]],[A[535],5,[1,3],[[2],[4]]],[A[536],5,[1,3],[[2],[4]]],[A[75],1,[0],[[]]],[A[16],1,[0],[[]]],[A[3],1,[],[]],[A[67],1,[],[]],[A[85],1,[],[]],[A[70],1,[],[]],[A[84],1,[0],[[]]],[A[380],2,[1],[[]]],[A[537],1,[],[]],[A[538],1,[0],[[]]],[A[539],1,[],[]],[A[540],2,[1],[[]]],[A[543],2,[1],[[]]],[A[328],2,[1],[[]]],[A[328],2,[1],[[]]],[A[328],2,[1],[[]]],[A[544],4,[1,3],[[2],[]]],[A[545],14,[1,3,5,7,9,11,13],[[2],[4],[6],[8],[10],[12],[]]],[A[546],8,[1,3,5,6],[[2],[4],[],[7]]],[A[24],1,[0],[[]]],[A[70],1,[],[]],[A[328],2,[1],[[]]],[A[3],1,[],[]],[A[547],2,[],[]],[A[548],1,[0],[[]]],[A[222],5,[1,3,4],[[2],[],[]]],[A[201],1,[],[]],[A[182],2,[1],[[]]],[A[23],1,[0],[[]]],[A[549],1,[],[]],[A[550],7,[1,2,3,5],[[2,4],[4],[4],[6]]],[A[551],3,[0,1],[[],[2]]],[A[552],6,[1,3],[[2],[5]]],[A[553],3,[1,2],[[2],[]]],[A[554],1,[0],[[]]],[A[555],1,[0],[[]]],[A[556],5,[1,3],[[2],[4]]],[A[557],5,[1,3],[[2],[4]]],[A[558],3,[1,2],[[2],[]]],[A[559],3,[1,2],[[2],[]]],[A[560],3,[1,2],[[2],[]]],[A[561],3,[1,2],[[2],[]]],[A[562],1,[],[]],[A[15],1,[],[]],[A[65],1,[0],[[]]],[A[65],1,[],[]],[A[24],1,[0],[[]]],[A[563],1,[],[]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[564],1,[],[]],[A[75],1,[0],[[]]],[A[565],1,[],[]],[A[75],1,[],[]],[A[566],1,[],[]],[A[97],3,[1,2],[[],[]]],[A[567],2,[],[]],[A[568],3,[1],[[2]]],[A[569],1,[],[]],[A[570],4,[1,3],[[2],[]]],[A[457],1,[],[]],[A[571],1,[],[]],[A[75],1,[0],[[]]],[A[446],2,[],[]],[A[232],1,[],[]],[A[65],1,[0],[[]]],[A[333],1,[],[]],[A[80],4,[1,2],[[],[3]]],[A[81],2,[1,-1],[[],[]]],[A[572],5,[0,1,3],[[],[2],[4]]],[A[573],5,[1],[[2]]],[A[65],1,[],[]],[A[575],3,[1],[[2]]],[A[576],2,[1],[[]]],[A[577],1,[],[]],[A[578],1,[],[]],[A[579],3,[1],[[2]]],[A[580],1,[0],[[]]],[A[146],2,[1],[[]]],[A[581],4,[1,3],[[2],[]]],[A[117],1,[],[]],[A[582],1,[0],[[]]],[A[95],1,[],[]],[A[90],2,[],[]],[A[583],3,[1,2],[[2],[]]],[A[584],41,[],[]],[A[585],2,[],[]],[A[586],1,[],[]],[A[587],2,[],[]],[A[588],28,[],[]],[A[589],5,[],[]],[A[590],7,[],[]],[A[591],1,[],[]],[A[592],24,[],[]],[A[593],3,[],[]],[A[594],2,[],[]],[A[595],7,[],[]],[A[596],2,[],[]],[A[597],2,[],[]],[A[598],12,[],[]],[A[599],1,[],[]],[A[600],1,[],[]],[A[601],4,[],[]],[A[602],1,[],[]],[A[603],1,[],[]],[A[604],4,[],[]],[A[605],6,[],[]],[A[606],6,[],[]],[A[607],1,[],[]],[A[608],6,[],[]],[A[609],17,[],[]],[A[610],2,[],[]],[A[611],1,[],[]],[A[612],3,[],[]],[A[613],1,[],[]],[A[614],2,[],[]],[A[615],1,[],[]],[A[616],2,[],[]],[A[617],16,[],[]],[A[618],6,[],[]],[A[619],3,[],[]],[A[620],18,[],[]],[A[621],17,[],[]],[A[622],8,[],[]],[A[623],4,[],[]],[A[624],3,[],[]],[A[625],2,[],[]],[A[626],1,[],[]],[A[627],45,[],[]],[A[628],5,[],[]],[A[629],17,[],[]],[A[630],7,[],[]],[A[631],2,[],[]],[A[632],2,[],[]],[A[633],5,[],[]],[A[634],4,[],[]],[A[635],1,[],[]],[A[636],4,[],[]],[A[637],2,[],[]],[A[638],8,[],[]],[A[639],6,[],[]],[A[640],8,[],[]],[A[641],3,[],[]],[A[642],4,[],[]],[A[643],7,[],[]],[A[644],6,[],[]],[A[645],2,[],[]],[A[646],2,[],[]],[A[647],1,[],[]],[A[648],16,[],[]],[A[649],1,[],[]],[A[650],3,[],[]],[A[651],3,[],[]],[A[652],2,[],[]],[A[653],1,[],[]],[A[654],22,[],[]],[A[655],21,[],[]],[A[656],20,[],[]],[A[631],2,[],[]],[A[657],1,[],[]],[A[658],4,[],[]],[A[659],3,[],[]],[A[660],1,[],[]],[A[661],6,[],[]],[A[662],3,[],[]],[A[663],36,[],[]],[A[664],2,[],[]],[A[665],8,[],[]],[A[666],7,[],[]],[A[667],1,[],[]],[A[668],5,[],[]],[A[669],2,[],[]],[A[670],79,[],[]],[A[671],10,[],[]],[A[672],1,[],[]],[A[673],3,[],[]],[A[674],36,[],[]],[A[675],21,[],[]],[A[676],8,[],[]],[A[677],2,[],[]],[A[678],3,[],[]],[A[679],7,[],[]],[A[680],1,[],[]],[A[680],1,[],[]],[A[681],41,[],[]],[A[682],16,[],[]],[A[683],16,[],[]],[A[684],1,[],[]],[A[685],29,[],[]],[A[686],15,[],[]],[A[687],5,[],[]],[A[688],31,[],[]],[A[689],9,[],[]],[A[690],4,[],[]],[A[691],10,[],[]],[A[692],13,[],[]],[A[693],20,[],[]],[A[694],23,[],[]],[A[695],4,[],[]],[A[696],6,[],[]],[A[697],10,[],[]],[A[698],7,[],[]],[A[699],28,[],[]],[A[700],18,[],[]],[A[701],15,[],[]],[A[702],2,[],[]],[A[703],10,[],[]],[A[704],1,[],[]],[A[705],3,[],[]],[A[706],7,[],[]],[A[707],2,[],[]],[A[708],6,[],[]],[A[709],9,[],[]],[A[632],2,[],[]],[A[710],2,[],[]],[A[711],3,[],[]],[A[712],1,[],[]],[A[713],11,[],[]],[A[714],14,[],[]],[A[715],1,[],[]],[A[716],2,[],[]],[A[717],17,[],[]],[A[718],14,[],[]],[A[719],29,[],[]],[A[720],2,[],[]],[A[721],2,[],[]],[A[722],5,[],[]],[A[723],3,[],[]],[A[724],3,[],[]],[A[725],2,[],[]],[A[726],12,[],[]],[A[727],2,[],[]],[A[728],7,[],[]],[A[729],1,[],[]],[A[730],4,[],[]],[A[731],3,[],[]],[A[732],1,[],[]],[A[733],3,[],[]],[A[734],2,[],[]],[A[735],4,[],[]],[A[736],1,[],[]],[A[737],4,[],[]],[A[738],11,[],[]],[A[739],8,[],[]],[A[740],2,[],[]],[A[741],4,[],[]],[A[742],3,[],[]],[A[743],2,[],[]],[A[744],33,[],[]],[A[745],5,[],[]],[A[146],2,[],[]],[A[746],3,[1,2],[[],[]]],[A[84],1,[0],[[]]],[A[65],1,[0],[[]]],[A[77],1,[0],[[]]],[A[747],3,[1,2],[[2],[]]],[A[748],4,[1],[[2]]],[A[217],1,[0],[[]]],[A[23],1,[0],[[]]],[A[32],2,[1],[[]]],[A[100],1,[],[]],[A[749],4,[1,2],[[],[3]]],[A[361],2,[1],[[]]],[A[750],6,[2,5],[[3],[]]],[A[751],5,[0,1,3],[[],[2],[4]]],[A[24],1,[0],[[]]],[A[752],2,[],[]],[A[753],1,[],[]],[A[754],1,[],[]],[A[755],1,[],[]],[A[757],1,[],[]],[A[758],1,[],[]],[A[759],3,[1,2],[[2],[]]],[A[760],14,[1,2,3,4,5,6,7,8,9,10,11,12,13],[[],[],[],[],[],[],[],[],[],[],[],[],[]]],[A[32],2,[1],[[]]],[A[761],1,[],[]],[A[292],1,[],[]],[A[226],1,[],[]],[A[65],1,[0],[[]]],[A[762],2,[],[]],[A[763],1,[],[]],[A[764],2,[],[]],[A[765],2,[],[]],[A[766],2,[],[]],[A[767],2,[],[]],[A[267],2,[],[]],[A[268],2,[],[]],[A[768],2,[],[]],[A[770],1,[],[]],[A[265],1,[],[]],[A[411],1,[0],[[]]],[A[75],1,[0],[[]]],[A[771],1,[],[]],[A[772],1,[],[]],[A[773],2,[],[]],[A[171],1,[],[]],[A[774],1,[],[]],[A[775],1,[],[]],[A[776],1,[],[]],[A[777],5,[],[]],[A[778],7,[1,2,3,4,5,6],[[2],[],[],[],[],[]]],[A[779],5,[1,2,3],[[2],[],[4]]],[A[780],9,[1,4,6,7,8],[[2],[5],[7],[],[]]],[A[3],1,[],[]],[A[24],1,[0],[[]]],[A[781],1,[0],[[]]],[A[782],1,[0],[[]]],[A[200],3,[1,2],[[],[]]],[A[201],1,[],[]],[A[783],1,[0],[[]]],[A[784],1,[],[]],[A[122],1,[0],[[]]],[A[785],2,[0],[[]]],[A[786],4,[1,2],[[],[3]]],[A[787],1,[],[]],[A[3],1,[],[]],[A[788],4,[1,3],[[2],[]]],[A[95],1,[],[]],[A[217],1,[0],[[]]],[A[789],2,[],[]],[A[790],2,[],[]],[A[540],2,[1],[[]]],[A[245],1,[0],[[]]],[A[791],1,[],[]],[A[792],3,[0,1],[[],[2]]],[A[217],1,[0],[[]]],[A[793],1,[],[]],[A[794],1,[0],[[]]],[A[795],2,[],[]],[A[796],2,[],[]],[A[797],2,[],[]],[A[798],1,[],[]],[A[799],1,[],[]],[A[800],1,[],[]],[A[801],2,[],[]],[A[802],11,[],[]],[A[16],1,[0],[[]]],[A[24],1,[0],[[]]],[A[803],16,[1,3,6,8,11,15],[[2],[5],[7],[15],[12,14,15],[]]],[A[804],3,[1],[[2]]],[A[805],3,[1],[[2]]],[A[806],3,[1],[[2]]],[A[807],2,[],[]],[A[808],2,[],[]],[A[809],2,[],[]],[A[810],2,[],[]],[A[811],2,[],[]],[A[817],8,[1,4],[[2],[7]]],[A[818],8,[1,4],[[2],[7]]],[A[818],8,[1,4],[[2],[7]]],[A[819],8,[1,4],[[2],[7]]],[A[820],8,[1,4],[[2],[7]]],[A[820],8,[1,4],[[2],[7]]],[A[819],8,[1,4],[[2],[7]]],[A[820],8,[1,4],[[2],[7]]],[A[820],8,[1,4],[[2],[7]]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[75],1,[],[]],[A[82],1,[0],[[]]],[A[822],1,[],[]],[A[823],3,[1],[[2]]],[A[824],3,[0,1],[[],[2]]],[A[825],3,[0,1],[[],[2]]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[16],1,[0],[[]]],[A[141],1,[],[]],[A[826],3,[0,1],[[],[2]]],[A[82],1,[0],[[]]],[A[827],3,[0,1],[[],[2]]],[A[828],1,[],[]],[A[292],1,[],[]],[A[829],4,[1,3],[[2],[]]],[A[129],1,[],[]],[A[90],2,[],[]],[A[830],2,[1],[[]]],[A[831],1,[],[]],[A[117],1,[],[]],[A[832],1,[],[]],[A[833],3,[0,1],[[],[2]]],[A[24],1,[0],[[]]],[A[834],204,[1,3],[[2],[203]]],[A[835],9,[1,3,8],[[2],[7],[]]],[A[836],9,[1,3,8],[[2],[7],[]]],[A[836],9,[1,3,8],[[2],[7],[]]],[A[837],8,[-1,2,7],[[],[6],[]]],[A[838],6,[1,5],[[4],[]]],[A[1],2,[1],[[]]],[A[839],1,[0],[[]]],[A[84],1,[0],[[]]],[A[82],1,[0],[[]]],[A[292],1,[],[]],[A[75],1,[],[]],[A[840],5,[1,3],[[2],[4]]],[A[841],5,[1,2],[[],[4]]],[A[183],2,[],[]],[A[842],3,[1],[[2]]],[A[82],1,[],[]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[843],1,[],[]],[A[844],4,[1,3],[[2],[]]],[A[149],4,[1,2,3],[[],[],[]]],[A[150],3,[1,-1,2],[[],[],[]]],[A[845],3,[1],[[2]]],[A[846],2,[],[]],[A[847],2,[],[]],[A[848],2,[],[]],[A[849],2,[],[]],[A[851],6,[],[]],[A[852],6,[],[]],[A[853],3,[],[]],[A[855],3,[],[]],[A[856],2,[],[]],[A[857],2,[],[]],[A[858],2,[],[]],[A[859],3,[1],[[2]]],[A[860],4,[1,2],[[3],[3]]],[A[861],2,[],[]],[A[862],2,[],[]],[A[863],2,[],[]],[A[864],3,[1],[[2]]],[A[865],1,[],[]],[A[866],1,[],[]],[A[867],1,[],[]],[A[273],1,[],[]],[A[868],3,[1],[[2]]],[A[869],3,[1],[[2]]],[A[870],3,[1],[[2]]],[A[871],3,[1],[[2]]],[A[872],3,[1],[[2]]],[A[873],3,[1],[[2]]],[A[874],1,[],[]],[A[875],1,[],[]],[A[876],2,[1],[[]]],[A[877],1,[],[]],[A[878],1,[],[]],[A[879],2,[1],[[]]],[A[880],3,[1],[[2]]],[A[881],3,[1],[[2]]],[A[882],2,[],[]],[A[182],2,[],[]],[A[883],6,[1,3,4],[[2],[5],[5]]],[A[383],2,[1],[[]]],[A[884],4,[1,2,3],[[2],[],[]]],[A[885],4,[1,2,3],[[2],[],[]]],[A[540],2,[1],[[]]],[A[360],1,[0],[[]]],[A[886],1,[],[]],[A[379],1,[0],[[]]],[A[65],1,[0],[[]]],[A[65],1,[0],[[]]],[A[82],1,[0],[[]]],[A[887],7,[],[]],[A[888],5,[],[]],[A[889],4,[],[]],[A[890],3,[],[]],[A[891],2,[1],[[]]],[A[146],2,[1],[[]]],[A[23],1,[0],[[]]],[A[892],1,[0],[[]]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[893],1,[0],[[]]],[A[894],2,[],[]],[A[895],1,[],[]],[A[67],1,[],[]],[A[67],1,[],[]],[A[896],5,[0,1,3],[[],[2],[4]]],[A[579],3,[1],[[2]]],[A[845],3,[1],[[2]]],[A[217],1,[0],[[]]],[A[897],2,[],[]],[A[898],1,[],[]],[A[899],1,[],[]],[A[226],1,[],[]],[A[217],1,[0],[[]]],[A[900],4,[1,2],[[],[3]]],[A[901],2,[],[]],[A[902],1,[],[]],[A[903],10,[],[]],[A[904],4,[0],[[]]],[A[390],2,[],[]],[A[389],5,[1,4],[[2],[]]],[A[392],1,[0],[[]]],[A[393],1,[],[]],[A[82],1,[0],[[]]],[A[905],1,[],[]],[A[906],1,[],[]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[141],1,[],[]],[A[907],3,[1],[[2]]],[A[77],1,[],[]],[A[908],1,[0],[[]]],[A[909],1,[],[]],[A[69],1,[],[]],[A[70],1,[],[]],[A[910],2,[1],[[]]],[A[911],2,[1],[[]]],[A[182],2,[1],[[]]],[A[912],3,[1],[[2]]],[A[24],1,[0],[[]]],[A[203],1,[0],[[]]],[A[913],1,[],[]],[A[914],1,[],[]],[A[328],2,[1],[[]]],[A[3],1,[],[]],[A[915],3,[0],[[]]],[A[535],5,[1,3],[[2],[4]]],[A[82],1,[0],[[]]],[A[841],5,[1,2],[[],[4]]],[A[916],2,[],[]],[A[826],3,[0,1],[[],[2]]],[A[82],1,[0],[[]]],[A[82],1,[0],[[]]],[A[917],1,[],[]],[A[918],5,[1,4],[[2],[]]],[A[146],2,[1],[[]]],[A[919],1,[],[]],[A[182],2,[1],[[]]],[A[920],1,[],[]],[A[921],3,[],[]],[A[922],2,[],[]],[A[923],2,[],[]],[A[924],3,[],[]],[A[925],4,[],[]],[A[926],5,[],[]],[A[927],3,[],[]],[A[928],2,[],[]],[A[929],2,[],[]],[A[930],3,[],[]],[A[931],2,[],[]],[A[932],3,[],[]],[A[933],2,[],[]],[A[82],1,[],[]],[A[934],2,[1],[[]]],[A[935],2,[],[]],[A[75],1,[0],[[]]],[A[446],2,[],[]],[A[22],1,[0],[[]]],[A[936],1,[],[]],[A[146],2,[1],[[]]],[A[937],16,[],[]],[A[938],4,[],[]],[A[939],1,[],[]],[A[16],1,[0],[[]]],[A[361],2,[1],[[]]],[A[77],1,[0],[[]]],[A[16],1,[0],[[]]],[A[23],1,[0],[[]]],[A[940],1,[],[]],[A[95],1,[],[]],[A[82],1,[0],[[]]],[A[941],10,[1,2,4,5,6,8,9],[[3],[3],[5,7],[7],[7],[9],[]]],[A[24],1,[0],[[]]],[A[942],1,[],[]],[A[944],6,[1,3,4],[[2],[5],[5]]],[A[945],3,[1,2],[[2],[]]],[A[946],3,[1,2],[[2],[]]],[A[947],3,[1,2],[[2],[]]],[A[948],3,[1,2],[[2],[]]],[A[949],3,[1,2],[[2],[]]],[A[950],3,[1,2],[[2],[]]],[A[951],3,[1,2],[[2],[]]],[A[952],3,[1,2],[[2],[]]],[A[953],3,[1,2],[[2],[]]],[A[954],3,[1,2],[[2],[]]],[A[955],4,[1],[[2]]],[A[956],4,[1],[[2]]],[A[306],2,[1],[[]]],[A[957],2,[1],[[]]],[A[305],4,[1,2],[[],[3]]],[A[306],2,[1,-1],[[],[]]],[A[789],2,[],[]],[A[790],2,[],[]],[A[540],2,[1],[[]]],[A[958],3,[1],[[2]]],[A[939],1,[],[]],[A[959],1,[0],[[]]],[A[960],1,[0],[[]]],[A[23],1,[0],[[]]],[A[961],1,[0],[[]]],[A[962],2,[],[]],[A[963],2,[],[]],[A[964],2,[],[]],[A[965],2,[],[]],[A[966],2,[],[]],[A[967],2,[],[]],[A[968],1,[],[]],[A[969],2,[],[]],[A[970],2,[],[]],[A[971],2,[],[]],[A[972],2,[],[]],[A[974],5,[1,4],[[3],[]]],[A[975],5,[1,4],[[3],[]]],[A[974],5,[1,4],[[3],[]]],[A[975],5,[1,4],[[3],[]]],[A[4],1,[],[]],[A[976],1,[0],[[]]],[A[977],2,[],[]],[A[978],1,[],[]],[A[203],1,[0],[[]]],[A[66],1,[],[]],[A[82],1,[],[]],[A[24],1,[],[]],[A[232],1,[],[]],[A[15],1,[],[]],[A[77],1,[0],[[]]],[A[979],2,[],[]],[A[3],1,[],[]],[A[65],1,[],[]],[A[86],1,[],[]],[A[1],2,[1],[[]]],[A[980],6,[1,3,5],[[2],[4],[]]],[A[981],6,[1,2,3,5],[[2],[],[4],[]]],[A[982],8,[1,2,3,7],[[2],[],[4],[]]],[A[983],4,[1,2],[[2],[]]],[A[77],1,[0],[[]]],[A[984],11,[1,3,5,6,8,9],[[2],[],[],[7],[],[10]]],[A[985],13,[1,3,4,5,7,8,10,11],[[2],[],[6],[6],[9],[9],[12],[12]]],[A[986],2,[],[]],[A[987],2,[],[]],[A[988],1,[],[]],[A[990],2,[],[]],[A[991],2,[],[]],[A[992],2,[],[]],[A[993],1,[],[]],[A[994],2,[],[]],[A[995],3,[],[]],[A[996],2,[],[]],[A[997],3,[1],[[2]]],[A[998],3,[1],[[2]]],[A[999],3,[1],[[2]]],[A[1000],3,[1],[[2]]],[A[1001],3,[1],[[2]]],[A[1002],3,[1],[[2]]],[A[1003],3,[],[]],[A[1004],1,[],[]],[A[1005],10,[1,3,9],[[2],[8],[]]],[A[1006],9,[1,3],[[2],[8]]],[A[1007],9,[1,4],[[2],[]]],[A[1008],8,[],[]],[A[1009],1,[0],[[]]],[A[1010],1,[0],[[]]],[A[1011],1,[],[]],[A[24],1,[0],[[]]],[A[16],1,[0],[[]]],[A[23],1,[0],[[]]],[A[1012],1,[0],[[]]],[A[1013],1,[0],[[]]],[A[1014],1,[0],[[]]],[A[1015],1,[0],[[]]],[A[1016],2,[0],[[]]],[A[1028],4,[1,2],[[3],[3]]],[A[1029],4,[1,2],[[3],[3]]],[A[1029],4,[1,2],[[3],[3]]],[A[1030],4,[1,2],[[3],[3]]],[A[228],1,[0],[[]]],[A[1031],1,[0],[[]]],[A[1032],1,[0],[[]]],[A[1033],1,[0],[[]]],[A[1034],2,[0],[[]]],[A[1035],1,[0],[[]]],[A[1036],1,[0],[[]]],[A[1037],1,[0],[[]]],[A[1038],1,[0],[[]]],[A[1039],2,[0],[[]]],[A[1040],2,[0],[[]]],[A[1041],1,[0],[[]]],[A[1042],1,[0],[[]]],[A[1043],1,[0],[[]]],[A[1044],1,[0],[[]]],[A[1045],2,[0],[[]]],[A[1046],5,[1],[[2]]],[A[1047],5,[3],[[4]]],[A[1048],1,[0],[[]]],[A[1049],3,[1],[[2]]],[A[1050],4,[],[]],[A[1051],1,[0],[[]]],[A[1052],4,[0],[[]]],[A[1053],2,[0],[[]]],[A[1054],2,[0],[[]]],[A[1055],4,[0],[[]]],[A[1056],3,[0],[[]]],[A[1057],4,[0],[[]]],[A[1058],3,[0],[[]]],[A[1059],3,[0],[[]]],[A[1060],3,[0],[[]]],[A[1061],3,[0],[[]]],[A[830],2,[1],[[]]],[A[263],1,[],[]],[A[1064],1,[],[]],[A[1066],1,[],[]],[A[1067],1,[],[]],[A[1068],1,[],[]],[A[1069],1,[],[]],[A[1070],2,[],[]],[A[273],1,[],[]],[A[1071],1,[],[]],[A[116],1,[],[]],[A[265],1,[],[]],[A[117],1,[],[]],[A[1072],1,[],[]],[A[500],1,[],[]],[A[502],1,[],[]],[A[501],1,[],[]]];
-var H={487:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[0],["a.b.c"],[0,0],N,"",L))){break ifs;}}return J;}}),509:({scopes:"d.e.f.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1],["h.i.e.j.g"],[0,0],N,"d.e.f.g",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),21:({scopes:"k.l.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[2],["h.i.k.j.m"],[0,0],N,"k.l.m",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[3],[],[],N,"n.o.p.m",L))){break ifs;}}return J;}}),356:({scopes:"q.r.s.t",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[4],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[344].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[347].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),423:({scopes:"u.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[5],["h.i.e.v","w.x.e.v"],[0,0,1,1],N,"d.e.s.v",L))){M.push(424);O.push(" d.e.s.v");
-break ifs;}if((J=E(Q,P,B[6],["h.i.e.v","w.x.e.z.v"],[0,0,1,1],N,"d.e.y.z.v",L))){M.push(426);O.push(" d.e.y.z.v");
-break ifs;}if((J=E(Q,P,B[7],["h.i.q.v"],[0,0],N,"q.r.v",L))){M.push(427);O.push(" q.r.v");break ifs;}if((J=E(Q,P,B[8],["h.i.e.v","w.x.e.bb.v","w.x.e.v","h.bc.bb.v","w.x.e.bd.v"],[0,0,1,1,2,3,3,2,4,4],N,"d.e.ba.v",L))){M.push(428);
-O.push(" d.e.ba.v");break ifs;}if((J=E(Q,P,B[9],["h.i.e.v","w.x.e.bb.v","w.x.e.v","h.bc.bb.v","w.x.e.bd.v"],[0,0,1,1,2,3,3,2,4,4],N,"d.e.v",L))){M.push(429);
-O.push(" d.e.v");break ifs;}if((J=E(Q,P,B[10],["h.i.n.v","h.i.n.v"],[0,0,1,1],N,"n.o.w.v",L))){break ifs;
-}if((J=E(Q,P,B[11],[],[],N,"be.bf.bg.v",L))){break ifs;}if((J=E(Q,P,B[12],["h.bk.bj.bl.v"],[0,0],N,"bh.bi.bj.v",L))){M.push(430);
-O.push(" bh.bi.bj.v");break ifs;}if((J=E(Q,P,B[13],["h.bk.bj.bl.v"],[0,0],N,"bh.c.bj.v",L))){M.push(431);
-O.push(" bh.c.bj.v");break ifs;}if((J=E(Q,P,B[14],["h.i.k.bl.v"],[0,0],N,"k.bm.bn.v",L))){M.push(432);
-O.push(" k.bm.bn.v");break ifs;}}return J;}}),244:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[15],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(243);O.push("");break ifs;
-}}return J;}}),65:({scopes:"k.bq.br.bs.bt bh.bs.bj.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[16],["h.i.k.j.bt"],[0,0],N,"k.bq.br.bs.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[17],[],[],N,"q.bu.bv.bs",L))){break ifs;}if((J=E(Q,P,B[18],[],[],N,"q.bu.bw.bs",L))){break ifs;
-}if((J=E(Q,P,B[19],[],[],N,"k.bq.bx.by.bs",L))){M.push(59);O.push(" k.bq.bx.by.bs");break ifs;}if((J=E(Q,P,B[20],[],[],N,"k.bq.f.bz.by.bs",L))){M.push(60);
-O.push(" k.bq.f.bz.by.bs");break ifs;}if((J=E(Q,P,B[21],[],[],N,"k.bq.br.by.bs",L))){M.push(61);O.push(" k.bq.br.by.bs");
-break ifs;}if((J=E(Q,P,B[22],["n.o.p.bt"],[0,0],N,"k.bq.br.bs",L))){M.push(62);O.push(" k.bq.br.bs");
-break ifs;}if((J=E(Q,P,B[23],[],[],N,"k.bq.f.bz.bs",L))){M.push(63);O.push(" k.bq.f.bz.bs");break ifs;
-}if((J=E(Q,P,B[24],[],[],N,"k.bq.bx.bs",L))){M.push(64);O.push(" k.bq.bx.bs");break ifs;}if((J=E(Q,P,B[25],[],[],N,"n.o.p.bt",L))){break ifs;
-}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),293:({scopes:"k.bm.ca.cb.cc.cd u.g.cc.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[26],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.cc.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if(false){break ifs;}}return J;}}),130:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[27],[],[],N,"",L))){M.push(129);O.push("");break ifs;}}return J;}}),350:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[28],["d.s.ch","ce.cf.ci.cj.ch"],[0,1,1,0],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[29],["d.s.ch","ce.cf.ci.ck.ch"],[0,1,1,0],N,"",L))){M.push(348);
-O.push("");break ifs;}if((J=E(Q,P,B[30],[],[],N,"q.r.s.cl",L))){M.push(349);O.push(" q.r.s.cl");break ifs;
-}}return J;}}),124:({scopes:"q.r.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[31]:null),[],[],N,"q.r.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[159].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),190:({scopes:"k.cn.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[32],["h.i.k.j.bp"],[0,0],N,"k.cn.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),417:({scopes:"d.co.cp.cq.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[33],["ce.cf.cr"],[0,0],N,"d.co.cp.cq.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[410].go(Q,P,K,M,O,L))){break ifs;}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),354:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[34],["d.s.ch","ce.cf.ci.cj.ch"],[0,1,1,0],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[35],["d.s.ch","ce.cf.ci.ck.ch"],[0,1,1,0],N,"",L))){M.push(352);
-O.push("");break ifs;}if((J=E(Q,P,B[36],[],[],N,"q.r.s.cl.cs",L))){M.push(353);O.push(" q.r.s.cl.cs");
-break ifs;}}return J;}}),256:({scopes:"bh.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[258].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[37],["ce.f.ct.bs","ce.f.bs","w.x.cu.bs"],[0,0,1,1,2,2],N,"d.ct.bs",L))){break ifs;
-}if((J=E(Q,P,B[38],["ce.f.ct.bs","ce.f.bs"],[0,0,1,1],N,"d.cv.bs",L))){break ifs;}if((J=E(Q,P,B[39],["ce.f.ct.bs","ce.f.cw.bs","w.x.cu.bs","ce.f.cx.bs"],[0,0,1,1,2,2,3,3],N,"d.cv.bs",L))){break ifs;
-}if((J=E(Q,P,B[40],["ce.f.ct.bs","ce.f.cw.bs"],[0,0,1,1],N,"d.cy.bs",L))){break ifs;}if((J=E(Q,P,B[41],["a.cz.bs","a.cz.bs","n.da.bs","a.cz.bs","n.da.bs","a.cz.bs","n.da.bs","n.da.bs","a.cz.bs","n.da.bs","a.cz.bs","a.cz.bs","a.cz.bs","n.da.bs","a.cz.bs"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14],N,"",L))){break ifs;
-}if((J=E(Q,P,B[42],[],[],N,"a.b.bs",L))){break ifs;}if((J=E(Q,P,B[43],[],[],N,"n.da.bs",L))){break ifs;
-}if((J=E(Q,P,B[44],[],[],N,"ce.f.db.bs",L))){break ifs;}if((J=E(Q,P,B[45],[],[],N,"ce.f.dc.ct.dd.bs",L))){break ifs;
-}if((J=E(Q,P,B[46],[],[],N,"ce.f.db.dd.bs",L))){break ifs;}if((J=E(Q,P,B[47],[],[],N,"ce.f.de.bs",L))){break ifs;
-}if((J=E(Q,P,B[48],[],[],N,"ce.f.df.bs",L))){break ifs;}if((J=E(Q,P,B[49],[],[],N,"ce.f.dg.bs",L))){break ifs;
-}if((J=E(Q,P,B[50],[],[],N,"ce.f.dh.bs",L))){break ifs;}if((J=E(Q,P,B[51],[],[],N,"ce.f.di.bs",L))){break ifs;
-}if((J=E(Q,P,B[52],[],[],N,"ce.f.dj.bs",L))){break ifs;}if((J=E(Q,P,B[53],[],[],N,"ce.dk.dl.bs",L))){break ifs;
-}if((J=E(Q,P,B[54],[],[],N,"ce.dk.dm.bs",L))){break ifs;}if((J=E(Q,P,B[55],[],[],N,"ce.dk.dn.bs",L))){break ifs;
-}if((J=E(Q,P,B[56],[],[],N,"ce.dk.do.bs",L))){break ifs;}if((J=E(Q,P,B[57],[],[],N,"dp.cu.dq.bs",L))){break ifs;
-}if((J=E(Q,P,B[58],[],[],N,"dp.cu.dr.bs",L))){break ifs;}if((J=E(Q,P,B[59],[],[],N,"dp.cu.k.bs",L))){break ifs;
-}if((J=E(Q,P,B[60],["n.f.ds.bs","n.f.dt.bs"],[0,0,1,1],N,"",L))){break ifs;}if((J=H[268].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[261].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),313:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[61],["ce.cf.cd"],[0,0],N,"d.bo.du.cd",L))){M.push(306);O.push(" d.bo.du.cd");
-break ifs;}if((J=E(Q,P,B[62],["ce.cf.cd","dw.f.dx.cd"],[0,0,1,1],N,"d.bo.dv.cd",L))){M.push(307);O.push(" d.bo.dv.cd");
-break ifs;}if((J=E(Q,P,B[63],["ce.cf.cd"],[0,0],N,"d.bo.dy.cd",L))){M.push(308);O.push(" d.bo.dy.cd");
-break ifs;}if((J=E(Q,P,B[64],["ce.cf.cd","dw.f.dx.cd"],[0,0,1,1],N,"d.bo.dz.cd",L))){M.push(309);O.push(" d.bo.dz.cd");
-break ifs;}if((J=E(Q,P,B[65],["ce.cf.cd"],[0,0],N,"d.bo.ea.cd",L))){M.push(311);O.push(" d.bo.ea.cd");
-break ifs;}if((J=E(Q,P,B[66],["ce.cf.cd"],[0,0],N,"d.bo.eb.cd",L))){M.push(312);O.push(" d.bo.eb.cd");
-break ifs;}}return J;}}),518:({scopes:"bh.bp.ec.bj.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[67],["h.bk.bj.bp.ec"],[0,0],N,"bh.bp.ec.bj.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[68],["h.i.q.bp.ec"],[0,0],N,"q.bu.bv.bp.ec",L))){break ifs;}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),389:({scopes:"q.r.l",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[69],[],[],N,"q.r.l",(function(){(L&&L());M.pop();O.pop();})))){}}return J;
-}}),250:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[70],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(249);O.push("");break ifs;
-}}return J;}}),128:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[71],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[121].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[122].go(Q,P,K,M,O,L))){break ifs;}if((J=H[120].go(Q,P,K,M,O,L))){break ifs;}if((J=H[137].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[142].go(Q,P,K,M,O,L))){break ifs;}if((J=H[143].go(Q,P,K,M,O,L))){break ifs;}if((J=H[140].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[136].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),511:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[72],["h.i.w.g","h.i.w.g"],[0,0,1,1],N,"n.o.w.g",L))){break ifs;}if((J=E(Q,P,B[73],[],[],N,"be.bf.bg.g",L))){break ifs;
-}}return J;}}),61:({scopes:"k.bq.br.by.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[74],[],[],N,"k.bq.br.by.bs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[75],[],[],N,"n.o.p.bt",L))){break ifs;
-}}return J;}}),264:({scopes:"k.bq.bx.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[76],["h.i.k.j.bs"],[0,0],N,"k.bq.bx.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[262].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),380:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[77],["w.x.cu.ee","h.i.ef.ch"],[0,0,1,1],N,"d.cu.ed.ee",L))){M.push(378);
-O.push(" d.cu.ed.ee");break ifs;}if((J=E(Q,P,B[78],["h.i.ef.ch"],[0,0],N,"d.cu.ed.eg.ee",L))){M.push(379);
-O.push(" d.cu.ed.eg.ee");break ifs;}}return J;}}),242:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[79],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(241);O.push("");break ifs;
-}}return J;}}),413:({scopes:"d.co.cp.eh.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[80],["ce.cf.cr"],[0,0],N,"d.co.cp.eh.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[422].go(Q,P,K,M,O,L))){break ifs;}if((J=H[410].go(Q,P,K,M,O,L))){break ifs;}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),489:({scopes:"k.bq.bx.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[81],["h.i.k.j.c"],[0,0],N,"k.bq.bx.c",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[82],[],[],N,"n.o.p.c",L))){break ifs;}}return J;}}),126:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[83],[],[],N,"q.r.cm",L))){M.push(124);O.push(" q.r.cm");break ifs;}if((J=E(Q,P,B[84],[],[],N,"q.r.cm",L))){M.push(125);
-O.push(" q.r.cm");break ifs;}}return J;}}),425:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[85],["h.i.e.v"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[434].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[436].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),198:({scopes:"k.bq.f.ei.ej.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[86],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.ej.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[230].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),262:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[87],[],[],N,"n.o.p.bs",L))){break ifs;}}return J;}}),352:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[88],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[342].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),132:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[142].go(Q,P,K,M,O,L))){break ifs;}if((J=H[137].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[136].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),141:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[89],["h.bc.ek.bu.cm","be.bf.el.cm"],[0,0,1,1],N,"",L))){break ifs;}}return J;
-}}),204:({scopes:"k.bq.f.ei.em.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[90],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.em.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[91],[],[],N,"n.o.p.bp",L))){break ifs;}if((J=H[242].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),254:({scopes:"k.l.en.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[92],["h.i.en.bp"],[0,0],N,"k.l.en.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),364:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[93],["d.s.ch","ce.cf.ci.ch"],[0,1,1,0],N,"",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),147:({scopes:"k.bq.br.r.eo.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[94]:B[95]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.eo.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),376:({scopes:"d.r.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[96],[],[],N,"d.r.ee",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[97],["dp.cu.er.ch","h.i.ef.ch"],[0,0,1,1],N,"d.eq.ch",L))){break ifs;
-}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),461:({scopes:"q.r.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[98],["h.i.q.c"],[0,0],N,"q.r.c",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),202:({scopes:"k.bq.f.ei.f.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[99],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.f.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),44:({scopes:"q.r.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[100],["h.i.q.bt"],[0,0],N,"q.r.bt",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),67:({scopes:"k.bq.bx.by.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[101],[],[],N,"k.bq.bx.by.bs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[102],[],[],N,"n.o.p.bt",L))){break ifs;
-}}return J;}}),107:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[103],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[130].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),301:({scopes:"k.cn.es.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[104],["h.i.k.j.cd"],[0,0],N,"k.cn.es.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),200:({scopes:"k.bq.br.bp.et",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[105],["h.i.k.j.bp"],[0,0],N,"k.bq.br.bp.et",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[238].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),42:({scopes:"d.cu.eu.ev.bt d.ev.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[106],["h.i.ev.j.bt"],[0,0],N,"d.cu.eu.ev.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[79].go(Q,P,K,M,O,L))){break ifs;}if((J=H[48].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),291:({scopes:"k.bm.ca.cb.ew.cd u.g.ew.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[107],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.ew.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if(false){break ifs;}}return J;}}),120:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[108],[],[],N,"dp.cz.ex.cm",L))){break ifs;}}return J;}}),419:({scopes:"d.co.cq.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[109],["ce.cf.cr"],[0,0],N,"d.co.cq.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),15:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[110],["h.i.k.bl.ey"],[0,0],N,"k.bq.bx.ey",L))){M.push(14);O.push(" k.bq.bx.ey");
-break ifs;}}return J;}}),329:({scopes:"q.bu.ez.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[111],[],[],N,"q.bu.ez.ee",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[112],[],[],N,"h.bc.ek.ee",L))){break ifs;
-}}return J;}}),118:({scopes:"d.fa.fb.fc.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[113],["h.bc.fb.cm"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),362:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[114],["d.s.ch","ce.cf.ci.cj.ch"],[0,1,1,0],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[115],["d.s.ch","ce.cf.ci.ck.ch"],[0,1,1,0],N,"",L))){M.push(360);
-O.push(" q.r.s.t.cs");break ifs;}if((J=E(Q,P,B[116],[],[],N,"",L))){M.push(361);O.push("");break ifs;
-}}return J;}}),260:({scopes:"k.l.fd.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[117],["h.i.k.j.bs"],[0,0],N,"k.l.fd.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[263].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),305:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[118],[],[],N,"ce.dk.fe.cd",L))){break ifs;}if((J=E(Q,P,B[119],[],[],N,"ce.dk.fe.cd",L))){break ifs;
-}}return J;}}),149:({scopes:"k.bq.br.r.ff.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[120]:B[121]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.ff.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),38:({scopes:"d.fg.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[122],[],[],N,"d.fg.bt",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[123],[],[],N,"w.f.fh.bt",L))){break ifs;
-}}return J;}}),166:({scopes:"k.bq.bx.fi.fj.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[124],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.fj.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),309:({scopes:"d.bo.dz.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[125],["ce.cf.cd"],[0,0],N,"d.bo.dz.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),340:({scopes:"d.r.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[126],[],[],N,"d.r.ch",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[342].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),196:({scopes:"k.l.fl.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[127],["h.i.k.j.bp"],[0,0],N,"k.l.fl.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),246:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[128],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(245);O.push("");break ifs;
-}}return J;}}),484:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[129],[],[],N,"",L))){M.push(483);O.push("");break ifs;}}return J;}}),105:({scopes:"d.cu.fm.cm w.x.cu.fm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[130],[],[],N,"d.cu.fm.cm",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[131],["h.i.fm.cm"],[0,0],N,"",L))){M.push(104);
-O.push("");break ifs;}}return J;}}),407:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[132],[],[],N,"dp.fn.fo.fp.cr",L))){break ifs;}if((J=E(Q,P,B[133],[],[],N,"dp.fn.fo.fq.cr",L))){break ifs;
-}if((J=E(Q,P,B[134],[],[],N,"dp.fn.fo.fr.cr",L))){break ifs;}if((J=E(Q,P,B[135],[],[],N,"dp.cu.fo.fp.cr",L))){break ifs;
-}if((J=E(Q,P,B[136],[],[],N,"dp.n.fo.cr",L))){break ifs;}if((J=E(Q,P,B[137],[],[],N,"dp.dw.fo.cr",L))){break ifs;
-}}return J;}}),52:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[138],[],[],N,"be.bf.fs.ft.bt",L))){break ifs;}if((J=E(Q,P,B[139],["ce.f.ft.bt","a.b.bt","be.bf.fu.ft.bt"],[0,0,1,1,2,2],N,"",L))){break ifs;
-}if((J=E(Q,P,B[140],[],[],N,"fv.fw.fx.bt",L))){break ifs;}if((J=E(Q,P,B[141],["ce.f.ft.bt","fv.fw.fx.bt"],[0,0,1,1],N,"",L))){break ifs;
-}if((J=E(Q,P,B[142],[],[],N,"ce.f.ft.bt",L))){break ifs;}if((J=E(Q,P,B[143],["ce.f.ft.bt"],[0,0],N,"d.e.fy.ft.bt",L))){break ifs;
-}}return J;}}),403:({scopes:"d.fz.ev.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[144],["h.bk.ev.cr"],[0,0],N,"d.fz.ev.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[145],["n.f.ga.cr","d.gb.cr","h.i.gb.cr","h.i.gb.cr","h.bc.gc.cr"],[0,1,2,2,3,3,1,0,4,4],N,"",L))){break ifs;
-}if((J=E(Q,P,B[146],[],[],N,"h.bc.gc.cr",L))){break ifs;}if((J=E(Q,P,B[147],[],[],N,"h.bc.ev.cr",L))){break ifs;
-}if((J=H[408].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),289:({scopes:"k.bm.ca.cb.g.cd u.g.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[148],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.g.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[494].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),441:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[149],["a.cz.ge.c","h.i.gf.bl.c"],[0,0,1,1],N,"d.gd.ge.c",L))){M.push(440);
-O.push(" d.gd.ge.c");break ifs;}if((J=E(Q,P,B[150],[],[],N,"a.cz.ge.c",L))){break ifs;}}return J;}}),493:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[490].go(Q,P,K,M,O,L))){break ifs;}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[463].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),482:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[151],[],[],N,"a.b.c",L))){break ifs;}if((J=H[485].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[486].go(Q,P,K,M,O,L))){break ifs;}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[152],[],[],N,"dw.gg.c",L))){break ifs;
-}}return J;}}),513:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[153],[],[],N,"",L))){M.push(512);O.push("");break ifs;}}return J;}}),139:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[154],["dw.gg.cu.cm","ce.dk.gh.cm"],[0,0,1,1],N,"",L))){M.push(138);O.push("");
-break ifs;}}return J;}}),266:({scopes:"k.bq.br.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[155],["h.i.k.j.bs"],[0,0],N,"k.bq.br.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[263].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),338:({scopes:"d.cu.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[125],(P-1))?B[156]:B[157]),[],[],N,"d.cu.ch",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[346].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[158],[],[],N,"a.b.ch",L))){break ifs;
-}if((J=H[341].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),439:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[485].go(Q,P,K,M,O,L))){break ifs;}if((J=H[486].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),378:({scopes:"d.cu.ed.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[159],["h.i.ef.ch"],[0,0],N,"d.cu.ed.ee",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),524:({scopes:"k.bq.bx.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[160],["h.i.k.j.g"],[0,0],N,"k.bq.bx.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;}if((J=H[511].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),50:({scopes:"d.ev.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[161],["h.i.ev.j.bt"],[0,0],N,"d.ev.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[51].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),336:({scopes:"d.s.ch.gi",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[162],[],[],N,"d.s.ch.gi",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[163],[],[],N,"h.bc.ek.ch",L))){break ifs;
-}if((J=E(Q,P,B[164],["h.i.k.bl.ch"],[0,0],N,"k.bq.br.gi.ch",L))){M.push(334);O.push(" k.bq.br.gi.ch");
-break ifs;}if((J=E(Q,P,B[165],["h.i.k.bl.ch"],[0,0],N,"k.bq.f.gj.gi.ch",L))){M.push(335);O.push(" k.bq.f.gj.gi.ch");
-break ifs;}}return J;}}),82:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[166],["h.i.dw.bt"],[0,0],N,"dw.f.bt",L))){break ifs;}}return J;}}),208:({scopes:"q.r.gk.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[167],["h.i.q.bp"],[0,0],N,"q.r.gk.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),311:({scopes:"d.bo.ea.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[168],["ce.cf.cd"],[0,0],N,"d.bo.ea.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[169],[],[],N,"d.bo.gl.cd",L))){M.push(310);O.push(" d.bo.gl.cd");break ifs;
-}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),252:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[170],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(251);O.push("");break ifs;
-}}return J;}}),168:({scopes:"k.bq.bx.fi.gm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[171],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.gm.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),399:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[172],["ce.cf.gn.cr","w.x.cz.go.cr"],[0,0,1,1],N,"d.gn.cr",L))){M.push(396);
-O.push(" d.gn.cr");break ifs;}if((J=E(Q,P,B[173],["ce.cf.gq.cr","w.x.cu.gr.cr","h.i.ef.cr","dw.gg.gr.cr","h.i.ef.cr"],[0,0,1,1,2,2,3,3,4,4],N,"d.cu.gp.cr",L))){M.push(397);
-O.push(" d.cu.gp.cr");break ifs;}if((J=E(Q,P,B[174],["ce.cf.gq.cr","w.x.cu.gr.cr"],[0,0,1,1],N,"d.cu.gs.cr",L))){M.push(398);
-O.push(" d.cu.gs.cr");break ifs;}if((J=H[421].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),40:({scopes:"d.fn.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[175],[],[],N,"d.fn.bt",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[176],["a.b.gt.bt","w.f.fh.bt"],[0,0,1,1],N,"",L))){break ifs;
-}if((J=E(Q,P,B[177],["a.b.gu.bt","dp.fn.gu.bt"],[0,0,1,1],N,"",L))){M.push(39);O.push("");break ifs;}}return J;
-}}),186:({scopes:"k.cn.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[178],["h.i.k.j.bp"],[0,0],N,"k.cn.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[238].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),401:({scopes:"q.r.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[179],["h.i.q.cr"],[0,0],N,"q.r.cr",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),495:({scopes:"d.e.gv.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[180],["h.i.e.g","d.bo.gw.g","w.x.e.g","h.i.e.g"],[0,1,1,0,2,2,3,3],N,"d.e.gv.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),443:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[181],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),268:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[182],["h.i.k.bl.bs"],[0,0],N,"k.bq.bx.bs",L))){break ifs;}if((J=E(Q,P,B[183],["h.i.k.bl.bs"],[0,0],N,"k.bq.bx.bs",L))){M.push(264);
-O.push(" k.bq.bx.bs");break ifs;}if((J=E(Q,P,B[184],["h.i.k.bl.bs"],[0,0],N,"k.bq.f.bz.bs",L))){break ifs;
-}if((J=E(Q,P,B[185],["h.i.k.bl.bs"],[0,0],N,"k.bq.f.bz.bs",L))){M.push(265);O.push(" k.bq.f.bz.bs");break ifs;
-}if((J=E(Q,P,B[186],["h.i.k.bl.bs"],[0,0],N,"k.bq.br.bs",L))){break ifs;}if((J=E(Q,P,B[187],["h.i.k.bl.bs"],[0,0],N,"k.bq.br.bs",L))){M.push(266);
-O.push(" k.bq.br.bs");break ifs;}if((J=E(Q,P,B[188],["h.i.k.bl.bs"],[0,0],N,"k.f.bq.gx.bs",L))){M.push(267);
-O.push(" k.f.bq.gx.bs");break ifs;}}return J;}}),188:({scopes:"k.cn.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[189],["h.i.k.j.bp"],[0,0],N,"k.cn.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[244].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),92:({scopes:"w.x.cz.fn.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[190],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[132].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),315:({scopes:"d.fa.gy.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[191],["h.i.gy.cd"],[0,0],N,"d.fa.gy.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),415:({scopes:"d.co.cp.gz.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[192],["ce.cf.cr"],[0,0],N,"d.co.cp.gz.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[412].go(Q,P,K,M,O,L))){break ifs;}if((J=H[410].go(Q,P,K,M,O,L))){break ifs;}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),396:({scopes:"d.gn.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[193],["ce.cf.gn.cr"],[0,0],N,"d.gn.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),156:({scopes:"k.bq.br.fi.bs.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[194]:B[195]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.bs.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),522:({scopes:"k.bq.br.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[196],["h.i.k.j.g"],[0,0],N,"k.bq.br.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;}if((J=H[511].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),78:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[197],["h.i.k.bl.bt"],[0,0],N,"k.bq.bx.bt",L))){M.push(77);O.push(" k.bq.bx.bt d.ha.bq.bx.bt");
-break ifs;}}return J;}}),35:({scopes:"k.bm.ca.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[198],[],[],N,"k.bm.ca.bt",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[199],["h.bk.bj.bl.bt","h.i.k.bt","ce.dk.ca.bt"],[0,1,1,2,2,0],N,"d.bj.g",L))){M.push(31);
-O.push(" d.bj.g u.g");break ifs;}if((J=E(Q,P,B[200],["h.bk.bj.bl.bt","h.i.k.bt","ce.dk.ca.bt"],[0,1,1,2,2,0],N,"d.bj.v",L))){M.push(32);
-O.push(" d.bj.v u.v");break ifs;}if((J=E(Q,P,B[201],["h.bk.bj.bl.bt","h.i.k.bt","ce.dk.ca.bt"],[0,1,1,2,2,0],N,"d.bj.bs",L))){M.push(33);
-O.push(" d.bj.bs bh.bs");break ifs;}if((J=E(Q,P,B[202],["h.bk.bj.bl.bt","h.i.k.bt","ce.dk.ca.bt"],[0,1,1,2,2,0],N,"d.bj.m",L))){M.push(34);
-O.push(" d.bj.m bh.m");break ifs;}}return J;}}),321:({scopes:"k.bq.br.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[203],["h.i.k.j.cd"],[0,0],N,"k.bq.br.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[204],[],[],N,"n.o.p.cd",L))){break ifs;}if((J=H[326].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[302].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),184:({scopes:"k.bq.br.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[205],["h.i.k.j.bp"],[0,0],N,"k.bq.br.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),248:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[206],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(247);O.push("");break ifs;
-}}return J;}}),213:({scopes:"k.bm.bj.bs.bp u.bs.bj.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[207],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.bs.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),507:({scopes:"d.e.r.gv.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[208],["h.i.e.j.g"],[0,0],N,"d.e.r.gv.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),429:({scopes:"d.e.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[209],["h.i.e.v"],[0,0],N,"d.e.v",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[437].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),145:({scopes:"k.bq.br.r.hb.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[210]:B[211]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.hb.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),32:({scopes:"d.bj.v u.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[212],["h.bk.bj.j.bt","ce.dk.ca.bt","h.i.k.bt"],[0,1,1,2,2,0],N,"d.bj.v",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[423].go(Q,P,K,M,O,L))){break ifs;}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),272:({scopes:"d.bo.hc.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[213],["h.hd.hc.cd"],[0,0],N,"d.bo.hc.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[214],["h.i.he.cd"],[0,0],N,"d.bo.he.cd",L))){M.push(270);O.push(" d.bo.he.cd");
-break ifs;}if((J=E(Q,P,(G(Q,A[162],(P-1))?B[215]:null),[],[],N,"d.bo.hf.cd",L))){M.push(271);O.push(" d.bo.hf.cd");
-break ifs;}}return J;}}),499:({scopes:"n.f.hg.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[216],[],[],N,"n.f.hg.g",(function(){(L&&L());M.pop();O.pop();})))){}}return J;
-}}),192:({scopes:"k.l.fl.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[217],["h.i.k.j.bp"],[0,0],N,"k.l.fl.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[240].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),30:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[218],[],[],N,"n.da.hh.bt",L))){break ifs;}if((J=E(Q,P,B[219],[],[],N,"n.da.hi.bt",L))){break ifs;
-}if((J=E(Q,P,B[220],[],[],N,"n.o.p.bt",L))){break ifs;}if((J=E(Q,P,B[221],["dw.f.bt","h.i.dw.bt","h.i.dw.bt"],[0,1,1,2,2,0],N,"",L))){break ifs;
-}if((J=E(Q,P,B[222],["dw.f.bt","h.i.dw.bt","ce.dk.fn.bt","dw.f.hj.bt","be.bf.bt","ce.dk.hk.bt","n.da.hl.bt","dw.f.hl.bt","h.i.dw.bt","k.bm.hl.bt","be.bf.hm.bt","ce.dk.hn.bt"],[0,1,1,0,2,2,3,3,4,4,5,5,6,6,7,8,8,7,9,9,10,10,11,11],N,"",L))){break ifs;
-}if((J=E(Q,P,B[223],["h.i.dw.bt"],[0,0],N,"",L))){M.push(29);O.push("");break ifs;}}return J;}}),270:({scopes:"d.bo.he.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[224],["h.i.he.cd"],[0,0],N,"d.bo.he.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[225],[],[],N,"h.bc.ho.cd",L))){break ifs;}if((J=H[323].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[326].go(Q,P,K,M,O,L))){break ifs;}if((J=H[302].go(Q,P,K,M,O,L))){break ifs;}if((J=H[316].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),497:({scopes:"q.r.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[226],["h.i.q.g"],[0,0],N,"q.r.g",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[227],[],[],N,"be.bf.hp.g",L))){break ifs;}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),194:({scopes:"k.l.fl.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[228],["h.i.k.j.bp"],[0,0],N,"k.l.fl.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[252].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),84:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[229],["h.i.dw.bt"],[0,0],N,"dw.f.hq.hr.bt",L))){break ifs;}}return J;
-}}),334:({scopes:"k.bq.br.gi.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[230],["h.i.k.j.ch"],[0,0],N,"k.bq.br.gi.ch",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),143:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[231],[],[],N,"dp.dw.hs.cm",L))){break ifs;}}return J;}}),154:({scopes:"k.bq.br.fi.ff.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[232]:B[233]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.ff.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),503:({scopes:"q.r.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[234],["h.i.q.m"],[0,0],N,"q.r.m",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),69:({scopes:"k.bq.br.by.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[235],[],[],N,"k.bq.br.by.bs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[236],[],[],N,"n.o.p.bt",L))){break ifs;
-}}return J;}}),90:({scopes:"d.fn.ht.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[237],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,(G(Q,A[179],(P-1))?B[238]:null),[],[],N,"",L))){M.push(89);
-O.push(" w.f.fh.cm");break ifs;}}return J;}}),103:({scopes:"d.cu.fm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[239],["h.i.hu.j.cm"],[0,0],N,"d.cu.fm.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[240],["h.i.fm.cm"],[0,0],N,"",L))){M.push(101);O.push(" w.x.cu.fm.cm");break ifs;
-}if((J=E(Q,P,B[241],["h.i.hu.bl.cm"],[0,0],N,"",L))){M.push(102);O.push(" d.cu.fm.hu.cm");break ifs;}}return J;
-}}),478:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[242],[],[],N,"a.cz.cq.c",L))){M.push(475);O.push(" a.cz.cq.c");break ifs;
-}if((J=E(Q,P,B[243],[],[],N,"a.cz.hv.ev.c",L))){M.push(477);O.push(" a.cz.hv.ev.c");break ifs;}if((J=E(Q,P,B[244],["ce.dk.hw.c"],[0,0],N,"a.cz.c",L))){break ifs;
-}}return J;}}),531:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[530].go(Q,P,K,M,O,L))){break ifs;}if((J=H[526].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[523].go(Q,P,K,M,O,L))){break ifs;}if((J=H[525].go(Q,P,K,M,O,L))){break ifs;}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),421:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[245],["ce.cf.cr"],[0,0],N,"d.co.cp.eh.cr",L))){M.push(413);O.push(" d.co.cp.eh.cr");
-break ifs;}if((J=E(Q,P,B[246],["ce.cf.cr"],[0,0],N,"d.co.cp.fo.cr",L))){M.push(414);O.push(" d.co.cp.fo.cr");
-break ifs;}if((J=E(Q,P,B[247],["ce.cf.cr"],[0,0],N,"d.co.cp.gz.cr",L))){M.push(415);O.push(" d.co.cp.gz.cr");
-break ifs;}if((J=E(Q,P,B[248],["ce.cf.cr"],[0,0],N,"d.co.cp.hx.cr",L))){M.push(416);O.push(" d.co.cp.hx.cr");
-break ifs;}if((J=E(Q,P,B[249],["ce.cf.cr"],[0,0],N,"d.co.cp.cq.cr",L))){M.push(417);O.push(" d.co.cp.cq.cr");
-break ifs;}if((J=E(Q,P,B[250],["ce.cf.cr"],[0,0],N,"d.co.cp.cq.cr",L))){M.push(418);O.push(" d.co.cp.cq.cr");
-break ifs;}if((J=E(Q,P,B[251],["ce.cf.cr","ce.cf.cr"],[0,0,1,1],N,"d.co.cq.cr",L))){M.push(419);O.push(" d.co.cq.cr");
-break ifs;}if((J=E(Q,P,B[252],["ce.cf.cr"],[0,0],N,"d.co.cq.cr",L))){M.push(420);O.push(" d.co.cq.cr");
-break ifs;}}return J;}}),177:({scopes:"d.hy.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[253],[],[],N,"d.hy.bp",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),276:({scopes:"k.f.dn.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[254],["h.i.k.j.cd"],[0,0],N,"k.f.dn.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[314].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),295:({scopes:"k.bm.ca.cb.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[255],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}}return J;}}),318:({scopes:"k.cn.hz.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[256],["h.i.k.j.cd"],[0,0],N,"k.cn.hz.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),387:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[257],["a.cz.ee","w.x.cz.ee"],[0,0,1,1],N,"d.ia.ee",L))){M.push(382);
-O.push(" d.ia.ee");break ifs;}if((J=E(Q,P,B[258],["a.cz.ee","w.x.cz.ee"],[0,0,1,1],N,"d.ib.ee",L))){M.push(384);
-O.push(" d.ib.ee");break ifs;}if((J=E(Q,P,B[259],["a.b.ee"],[0,0],N,"d.ic.ee",L))){M.push(386);O.push(" d.ic.ee");
-break ifs;}}return J;}}),98:({scopes:"d.cu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[260],["h.i.ef.bl.cm","be.bf.id.cm"],[0,0,1,1],N,"d.cu.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[261],[],[],N,"",L))){M.push(97);O.push(" w.x.cu.cm");break ifs;}}return J;
-}}),155:({scopes:"k.bq.br.r.bs.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[262]:B[263]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.bs.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),385:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[264],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[387].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),275:({scopes:"d.bo.ie.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[265],["h.i.ie.cd"],[0,0],N,"d.bo.ie.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[305].go(Q,P,K,M,O,L))){break ifs;}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),94:({scopes:"w.x.cu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[266],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[132].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),211:({scopes:"k.bm.ca.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[267],["h.i.k.j.bp"],[0,0],N,"k.bm.ca.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),22:({scopes:"bh.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[268],["h.if.bj.ig.bt","bh.bt.bj.bu.ih.g","h.bk.bj.bl.bt","bh.bt","h.bk.bj.j.bt","bh.bt","h.if.bj.ii.bt"],[0,0,1,2,2,3,3,4,5,5,4,1,6,6],N,"",L))){break ifs;
-}if((J=E(Q,P,B[269],["h.if.bj.ig.bt"],[0,0],N,"",L))){M.push(24);O.push("");break ifs;}if((J=E(Q,P,(G(Q,A[206],(P-2))?B[270]:B[271]),["h.bk.bj.bl.bt","d.ij.bt"],[0,1,1,0],N,"bh.bt.bj.bu.g",L))){M.push(25);
-O.push(" bh.bt.bj.bu.g");break ifs;}}return J;}}),467:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[272],[],[],N,"",L))){M.push(466);O.push("");break ifs;}}return J;}}),36:({scopes:"q.r.gk.ft.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[273],["h.i.q.bt"],[0,0],N,"q.r.gk.ft.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[52].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),150:({scopes:"k.bq.br.fi.hb.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[274]:B[275]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.hb.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),75:({scopes:"k.bq.br.bt d.ha.bq.br.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[276],["h.i.k.j.bt"],[0,0],N,"k.bq.br.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),345:({scopes:"d.ik.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[277],[],[],N,"d.ik.ch",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),100:({scopes:"d.cu.fy.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[278],["h.i.ef.j.cm"],[0,0],N,"d.cu.fy.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[279],[],[],N,"",L))){M.push(99);O.push(" d.cu.fy.ef.cm");break ifs;}}return J;
-}}),320:({scopes:"k.bq.bx.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[280],["h.i.k.j.cd"],[0,0],N,"k.bq.bx.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),45:({scopes:"d.cu.bt d.cu.hu.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[281],[],[],N,"d.cu.bt",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[282],["a.cz.bt","a.b.bt","dw.f.bt","h.i.dw.bt","ce.dk.gh.bt","dp.cu.il.bt","h.i.ev.bl.bt"],[0,0,1,1,2,3,3,2,4,4,5,5,6,6],N,"d.cu.eu.ev.bt",L))){M.push(42);
-O.push(" d.cu.eu.ev.bt d.ev.bt");break ifs;}if((J=E(Q,P,B[283],["a.cz.bt","a.b.bt","dw.f.bt","h.i.dw.bt","ce.dk.gh.bt","n.im.bt","be.bf.in.bt"],[0,0,1,1,2,3,3,2,4,4,5,5,6,6],N,"d.cu.eu.ev.bt",L))){break ifs;
-}if((J=E(Q,P,B[284],["dp.fn.bt","a.b.bt","dw.f.bt","h.i.dw.bt","ce.dk.gh.bt","n.im.bt","be.bf.in.bt"],[0,0,1,1,2,3,3,2,4,4,5,5,6,6],N,"d.cu.eu.io.bt",L))){break ifs;
-}if((J=E(Q,P,B[285],["a.b.bt","dw.f.bt","h.i.dw.bt"],[0,0,1,2,2,1],N,"d.cu.eu.ip.bt",L))){break ifs;}if((J=E(Q,P,B[286],["a.b.bt","dw.f.bt","h.i.dw.bt","ce.dk.gh.bt"],[0,0,1,2,2,1,3,3],N,"d.cu.eu.iq.bt",L))){M.push(43);
-O.push(" d.cu.eu.iq.bt");break ifs;}if((J=E(Q,P,B[287],["h.i.q.bt"],[0,0],N,"q.r.bt",L))){M.push(44);
-O.push(" q.r.bt");break ifs;}}return J;}}),224:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[288],[],[],N,"",L))){M.push(223);O.push("");break ifs;}}return J;}}),18:({scopes:"k.bq.br.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[289],["h.i.k.j.m"],[0,0],N,"k.bq.br.m",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[290],[],[],N,"n.o.p.m",L))){break ifs;}}return J;}}),173:({scopes:"k.bq.bx.fi.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[291],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),89:({scopes:"w.f.fh.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[292],["h.bc.ht.cm"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),96:({scopes:"d.cu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[293],["h.i.ef.j.cm","h.bk.cu.bl.cm","be.bf.ir.cm"],[0,0,1,1,2,2],N,"d.cu.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[294],[],[],N,"",L))){M.push(94);O.push(" w.x.cu.cm");break ifs;}if((J=E(Q,P,B[295],["h.i.ef.bl.cm"],[0,0],N,"",L))){M.push(95);
-O.push(" d.cu.ef.cm");break ifs;}}return J;}}),455:({scopes:"d.fn.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[296],["h.bk.fn.j.c"],[0,0],N,"d.fn.c",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[487].go(Q,P,K,M,O,L))){break ifs;}if((J=H[460].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[297],["a.b.c","w.x.cz.fn.c"],[0,0,1,1],N,"d.fn.gb.c",L))){break ifs;
-}if((J=E(Q,P,B[298],["a.b.gt.c"],[0,0],N,"d.i.fn.is.it.c",L))){M.push(452);O.push(" d.i.fn.is.it.c");
-break ifs;}if((J=E(Q,P,B[299],["a.b.gu.c"],[0,0],N,"d.i.fn.iu.iv.c",L))){M.push(453);O.push(" d.i.fn.iu.iv.c");
-break ifs;}if((J=E(Q,P,B[300],[],[],N,"d.fn.iw.c",L))){M.push(454);O.push(" d.fn.iw.c");break ifs;}}return J;
-}}),392:({scopes:"d.en.l",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[301],["h.i.en.l"],[0,0],N,"d.en.l",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[388].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),79:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[55].go(Q,P,K,M,O,L))){break ifs;}if((J=H[66].go(Q,P,K,M,O,L))){break ifs;}if((J=H[76].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[58].go(Q,P,K,M,O,L))){break ifs;}if((J=H[72].go(Q,P,K,M,O,L))){break ifs;}if((J=H[78].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),152:({scopes:"k.bq.br.fi.eo.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[302]:B[303]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.eo.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),261:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[304],["h.i.k.bl.bs"],[0,0],N,"k.l.bs",L))){M.push(259);O.push(" k.l.bs");
-break ifs;}if((J=E(Q,P,B[305],["h.i.k.bl.bs"],[0,0],N,"k.l.fd.bs",L))){M.push(260);O.push(" k.l.fd.bs");
-break ifs;}}return J;}}),383:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[306],["h.i.be.ee","be.bf.ix.ee"],[0,0,1,1],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[387].go(Q,P,K,M,O,L))){break ifs;}if((J=H[380].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),24:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[206],(P-2))?B[307]:null),["h.if.bj.ii.bt"],[0,0],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[308],["h.bk.bj.bl.bt"],[0,0],N,"bh.bt.bj.r.g",L))){M.push(23);O.push(" bh.bt.bj.r.g");
-break ifs;}}return J;}}),480:({scopes:"w.f.fh.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[309],[],[],N,"w.f.fh.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[310],[],[],N,"a.cz.cq.c",L))){M.push(479);O.push(" a.cz.cq.c");break ifs;}}return J;}}),529:({scopes:"d.iy.iz.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[233],(P-1))?B[311]:null),[],[],N,"d.iy.iz.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[312],["h.i.k.bl.g"],[0,0],N,"k.bq.br.g",L))){M.push(527);O.push(" k.bq.br.g d.ja.iz.g");
-break ifs;}if((J=E(Q,P,B[313],["h.i.k.bl.g"],[0,0],N,"k.bq.bx.g",L))){M.push(528);O.push(" k.bq.bx.g d.ja.iz.g");
-break ifs;}}return J;}}),326:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[314],["h.i.dw.cd"],[0,0],N,"dw.f.jb.cd",L))){break ifs;}if((J=E(Q,P,B[315],["h.i.dw.cd"],[0,0],N,"dw.f.jc.cd",L))){break ifs;
-}if((J=E(Q,P,B[316],["h.i.dw.cd"],[0,0],N,"dw.f.jd.cd",L))){break ifs;}if((J=E(Q,P,B[317],["h.i.dw.cd"],[0,0],N,"dw.f.je.cd",L))){M.push(325);
-O.push(" dw.f.je.cd");break ifs;}}return J;}}),390:({scopes:"d.en.jf.l",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[318],["h.i.en.l"],[0,0],N,"d.en.jf.l",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[388].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),324:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[319]:null),[],[],N,"dp.cu.jg.cd",L))){break ifs;
-}if((J=E(Q,P,B[320],[],[],N,"dp.cu.jg.cd",L))){break ifs;}}return J;}}),6:({scopes:"d.jh.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[321],[],[],N,"d.jh.ey",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[322],[],[],N,"dp.cz.jh.ey",L))){break ifs;
-}}return J;}}),395:({scopes:"bh.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[399].go(Q,P,K,M,O,L))){break ifs;}if((J=H[408].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),523:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[323],["h.i.k.bl.g"],[0,0],N,"k.bq.br.g",L))){M.push(522);O.push(" k.bq.br.g");
-break ifs;}}return J;}}),485:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[324],[],[],N,"a.cz.ji.ev.c",L))){break ifs;}}return J;}}),209:({scopes:"u.g.bj.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[325],[],[],N,"u.g.bj.bp",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[494].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),286:({scopes:"k.bm.ca.cm.cd bh.cm.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[326],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cm.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),465:({scopes:"d.jj.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[327],[],[],N,"d.jj.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[484].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[328],[],[],N,"",L))){M.push(464);O.push("");break ifs;}}return J;}}),236:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[329],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(235);O.push("");break ifs;
-}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),169:({scopes:"k.bq.bx.fi.ff.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[330],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.ff.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),459:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[460].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[331],[],[],N,"",L))){M.push(458);
-O.push("");break ifs;}if((J=H[451].go(Q,P,K,M,O,L))){break ifs;}if((J=H[484].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[463].go(Q,P,K,M,O,L))){break ifs;}if((J=H[449].go(Q,P,K,M,O,L))){break ifs;}if((J=H[468].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[487].go(Q,P,K,M,O,L))){break ifs;}if((J=H[490].go(Q,P,K,M,O,L))){break ifs;}if((J=H[439].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),47:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[332],[],[],N,"k.bm.ca.bt",L))){M.push(35);O.push(" k.bm.ca.bt");break ifs;
-}if((J=E(Q,P,B[333],["h.i.q.bt"],[0,0],N,"q.r.gk.ft.bt",L))){M.push(36);O.push(" q.r.gk.ft.bt");break ifs;
-}if((J=E(Q,P,B[334],["h.i.q.bt"],[0,0],N,"q.r.bt",L))){M.push(37);O.push(" q.r.bt");break ifs;}if((J=E(Q,P,B[335],["h.i.q.bt"],[0,0],N,"q.bu.ez.bt",L))){break ifs;
-}if((J=E(Q,P,B[336],["h.i.q.bt"],[0,0],N,"q.bu.bv.bt",L))){break ifs;}if((J=E(Q,P,B[337],["a.cz.fg.bt","w.x.cz.fg.bt","a.b.gt.bt"],[0,0,1,1,2,2],N,"d.fg.bt",L))){M.push(38);
-O.push(" d.fg.bt");break ifs;}if((J=E(Q,P,B[338],["a.b.jk.bt","a.cz.fn.bt","w.x.cz.fn.bt"],[0,0,1,1,2,2],N,"d.fn.bt",L))){M.push(40);
-O.push(" d.fn.bt");break ifs;}if((J=E(Q,P,B[339],[],[],N,"ce.cf.bt",L))){break ifs;}if((J=E(Q,P,B[340],["ce.cf.ci.gi.bt"],[0,0],N,"d.gi.bt",L))){M.push(41);
-O.push(" d.gi.bt");break ifs;}if((J=E(Q,P,B[341],["ce.cf.ex.bt","dp.fn.bt","dw.f.bt","h.i.dw.bt"],[0,0,1,1,2,3,3,2],N,"d.jl.bt",L))){break ifs;
-}if((J=E(Q,P,B[342],[],[],N,"ce.cf.ex.bt",L))){break ifs;}if((J=E(Q,P,B[343],["a.b.bt","a.cz.cu.bt","a.b.jm.bt","dp.cu.hs.bt","w.x.cu.bt","h.i.ef.bl.bt"],[0,0,1,1,2,2,3,3,4,4,5,5],N,"d.cu.bt",L))){M.push(45);
-O.push(" d.cu.bt d.cu.hu.bt");break ifs;}if((J=E(Q,P,B[344],[],[],N,"a.cz.bt",L))){break ifs;}if((J=E(Q,P,B[345],[],[],N,"a.b.bt",L))){break ifs;
-}if((J=H[49].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[346],["ce.dk.fn.bt","d.eq.jn.bt","dw.f.fn.bt","h.i.dw.bt","n.f.fn.bt"],[0,0,1,1,2,3,3,2,4,4],N,"",L))){break ifs;
-}if((J=H[81].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[347],["h.i.k.bt","ce.dk.ca.bt"],[0,0,1,1],N,"k.bm.ca.bt",L))){M.push(46);
-O.push(" k.bm.ca.bt");break ifs;}if((J=E(Q,P,B[348],[],[],N,"ce.dk.ga.bt",L))){break ifs;}if((J=E(Q,P,B[349],[],[],N,"a.b.jm.bt",L))){break ifs;
-}if((J=E(Q,P,B[350],[],[],N,"h.hd.jo.bt",L))){break ifs;}if((J=E(Q,P,B[351],[],[],N,"ce.dk.jp.bt",L))){break ifs;
-}if((J=E(Q,P,B[352],[],[],N,"ce.dk.jq.bt",L))){break ifs;}if((J=E(Q,P,B[353],[],[],N,"ce.dk.jr.bt",L))){break ifs;
-}if((J=E(Q,P,B[354],[],[],N,"ce.dk.fe.bt",L))){break ifs;}if((J=E(Q,P,B[355],[],[],N,"ce.dk.js.bt",L))){break ifs;
-}if((J=E(Q,P,B[356],[],[],N,"ce.dk.dm.bt",L))){break ifs;}if((J=E(Q,P,B[357],[],[],N,"ce.dk.k.bt",L))){break ifs;
-}if((J=E(Q,P,B[358],[],[],N,"ce.dk.gh.bt",L))){break ifs;}if((J=E(Q,P,B[359],["ce.dk.cz.bt","dp.fn.bt"],[0,0,1,1],N,"",L))){break ifs;
-}if((J=H[48].go(Q,P,K,M,O,L))){break ifs;}if((J=H[79].go(Q,P,K,M,O,L))){break ifs;}if((J=H[74].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[27].go(Q,P,K,M,O,L))){break ifs;}if((J=H[85].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,(G(Q,A[275],(P-1))?B[360]:null),["ce.dk.bt","dw.f.hj.bt"],[0,0,1,1],N,"",L))){break ifs;
-}if((J=H[28].go(Q,P,K,M,O,L))){break ifs;}if((J=H[26].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),332:({scopes:"d.s.jt.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[361],[],[],N,"d.s.jt.ch",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[362],[],[],N,"h.bc.ek.ch",L))){break ifs;
-}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),284:({scopes:"k.bm.ca.bp.cd bh.bp.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[363],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.bp.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),412:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[364],[],[],N,"dp.fn.gz.ju.cr",L))){break ifs;}if((J=E(Q,P,B[365],[],[],N,"dp.fn.gz.jv.cr",L))){break ifs;
-}if((J=E(Q,P,B[366],[],[],N,"dp.cu.gz.jv.cr",L))){break ifs;}if((J=E(Q,P,B[367],[],[],N,"dp.fn.gz.jw.cr",L))){break ifs;
-}if((J=E(Q,P,B[368],[],[],N,"dp.cu.gz.jw.cr",L))){break ifs;}if((J=E(Q,P,B[369],[],[],N,"dp.fn.gz.jx.cr",L))){break ifs;
-}if((J=E(Q,P,B[370],[],[],N,"dp.cu.gz.jy.cr",L))){break ifs;}if((J=E(Q,P,B[371],[],[],N,"dp.fn.gz.jz.cr",L))){break ifs;
-}if((J=E(Q,P,B[372],[],[],N,"dp.cu.gz.jz.cr",L))){break ifs;}if((J=E(Q,P,B[373],[],[],N,"dp.fn.gz.ka.cr",L))){break ifs;
-}if((J=E(Q,P,B[374],[],[],N,"dp.fn.gz.kb.cr",L))){break ifs;}if((J=E(Q,P,B[375],[],[],N,"dp.cu.gz.gz.cr",L))){break ifs;
-}if((J=E(Q,P,B[376],[],[],N,"dp.fn.gz.v.cr",L))){break ifs;}if((J=E(Q,P,B[377],[],[],N,"dp.fn.kc.f.cr",L))){break ifs;
-}}return J;}}),171:({scopes:"k.bq.bx.fi.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[378],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),330:({scopes:"k.bq.br.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[379],["h.i.k.j.ch"],[0,0],N,"k.bq.br.ch",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[369].go(Q,P,K,M,O,L))){break ifs;}if((J=H[370].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),182:({scopes:"n.f.kd.ke.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[380],["h.i.n.bp"],[0,0],N,"n.f.kd.ke.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),230:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[381],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(229);O.push("");break ifs;
-}}return J;}}),410:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[382],[],[],N,"dp.fn.kf.cr",L))){break ifs;}if((J=E(Q,P,B[383],[],[],N,"dp.cu.kf.cr",L))){break ifs;
-}if((J=E(Q,P,B[384],[],[],N,"dp.n.kf.cr",L))){break ifs;}if((J=E(Q,P,B[385],[],[],N,"dp.dw.kf.cr",L))){break ifs;
-}if((J=E(Q,P,B[386],[],[],N,"dp.fn.kg.cr",L))){break ifs;}}return J;}}),138:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[387],["h.bc.ef.cm"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),519:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[388],["h.i.q.kh"],[0,0],N,"q.r.kh",L))){M.push(516);O.push(" q.r.kh");
-break ifs;}if((J=E(Q,P,B[389],["h.bk.bj.bp"],[0,0],N,"bh.bp.bj.g",L))){M.push(517);O.push(" bh.bp.bj.g");
-break ifs;}if((J=E(Q,P,B[390],["h.bk.bj.bp.ec"],[0,0],N,"bh.bp.ec.bj.g",L))){M.push(518);O.push(" bh.bp.ec.bj.g");
-break ifs;}}return J;}}),282:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[391],["a.cz.cu.cd","w.x.cu.cd","h.i.hu.cd"],[0,0,1,1,2,2],N,"d.cu.cd",L))){M.push(280);
-O.push(" d.cu.cd");break ifs;}if((J=E(Q,P,B[392],["w.x.cu.cd","h.i.hu.cd"],[0,0,1,1],N,"d.cu.cd",L))){M.push(281);
-O.push(" d.cu.cd");break ifs;}}return J;}}),10:({scopes:"q.r.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[393],["h.i.q.ey"],[0,0],N,"q.r.ey",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),161:({scopes:"k.bq.bx.r.fj.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[394]:B[395]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.fj.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),505:({scopes:"bh.m.bj.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[307],(P-8))?B[396]:null),["h.i.e.g"],[0,0],N,"bh.m.bj.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,((!G(Q,A[307],(P-8)))?B[397]:null),["h.i.e.g"],[0,0],N,"",L))){M.push(504);
-O.push("");break ifs;}}return J;}}),232:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[398],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(231);O.push("");break ifs;
-}}return J;}}),179:({scopes:"d.cu.ki.kj.bp dw.gg.cu.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[399],["h.i.ef.bp"],[0,0],N,"d.cu.ki.kj.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),207:({scopes:"k.bq.f.ei.em.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[400],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.em.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[401],[],[],N,"",L))){break ifs;}}return J;}}),431:({scopes:"bh.c.bj.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[402],["h.bk.bj.j.v"],[0,0],N,"bh.c.bj.v",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[438].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),55:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[403],["h.i.k.bl.bt"],[0,0],N,"k.l.ke.bt",L))){M.push(54);O.push(" k.l.ke.bt");
-break ifs;}}return J;}}),12:({scopes:"k.bq.br.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[404],["h.i.k.j.ey"],[0,0],N,"k.bq.br.ey",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[405],[],[],N,"n.o.p.ey",L))){break ifs;}}return J;}}),234:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[406],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(233);O.push("");break ifs;
-}}return J;}}),433:({scopes:"k.bq.br.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[407],["h.i.k.j.v"],[0,0],N,"k.bq.br.v",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),288:({scopes:"k.bm.ca.cr.cd bh.cr.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[408],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cr.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),463:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[409],[],[],N,"n.im.c",L))){break ifs;}if((J=E(Q,P,B[410],[],[],N,"dw.im.c",L))){break ifs;
-}if((J=E(Q,P,B[411],[],[],N,"n.da.c",L))){break ifs;}if((J=E(Q,P,B[412],["ce.dk.hw.c"],[0,0],N,"n.f.c",L))){break ifs;
-}}return J;}}),159:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[413],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.r.hb.cm",L))){M.push(145);
-O.push(" k.bq.br.r.hb.cm");break ifs;}if((J=E(Q,P,B[414],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.r.fj.cm",L))){M.push(146);
-O.push(" k.bq.br.r.fj.cm");break ifs;}if((J=E(Q,P,B[415],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.r.eo.cm",L))){M.push(147);
-O.push(" k.bq.br.r.eo.cm");break ifs;}if((J=E(Q,P,B[416],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.r.gm.cm",L))){M.push(148);
-O.push(" k.bq.br.r.gm.cm");break ifs;}if((J=E(Q,P,B[417],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.r.ff.cm",L))){M.push(149);
-O.push(" k.bq.br.r.ff.cm");break ifs;}if((J=E(Q,P,B[418],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.fi.hb.cm",L))){M.push(150);
-O.push(" k.bq.br.fi.hb.cm");break ifs;}if((J=E(Q,P,B[419],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.fi.fj.cm",L))){M.push(151);
-O.push(" k.bq.br.fi.fj.cm");break ifs;}if((J=E(Q,P,B[420],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.fi.eo.cm",L))){M.push(152);
-O.push(" k.bq.br.fi.eo.cm");break ifs;}if((J=E(Q,P,B[421],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.fi.gm.cm",L))){M.push(153);
-O.push(" k.bq.br.fi.gm.cm");break ifs;}if((J=E(Q,P,B[422],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.br.fi.ff.cm",L))){M.push(154);
-O.push(" k.bq.br.fi.ff.cm");break ifs;}if((J=E(Q,P,B[423],["h.i.k.bl.cm"],[0,0],N,"k.bq.br.r.bs.cm",L))){M.push(155);
-O.push(" k.bq.br.r.bs.cm");break ifs;}if((J=E(Q,P,B[424],["h.i.k.bl.cm"],[0,0],N,"k.bq.br.fi.bs.cm",L))){M.push(156);
-O.push(" k.bq.br.fi.bs.cm");break ifs;}if((J=E(Q,P,B[425],["h.i.k.bl.cm"],[0,0],N,"k.bq.br.r.cm",L))){M.push(157);
-O.push(" k.bq.br.r.cm");break ifs;}if((J=E(Q,P,B[426],["h.i.k.bl.cm"],[0,0],N,"k.bq.br.fi.cm",L))){M.push(158);
-O.push(" k.bq.br.fi.cm");break ifs;}}return J;}}),457:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[460].go(Q,P,K,M,O,L))){break ifs;}if((J=H[456].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[467].go(Q,P,K,M,O,L))){break ifs;}if((J=H[473].go(Q,P,K,M,O,L))){break ifs;}if((J=H[441].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[487].go(Q,P,K,M,O,L))){break ifs;}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),181:({scopes:"n.f.kd.kk.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[427],["h.i.n.bp"],[0,0],N,"n.f.kd.kk.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[428],[],[],N,"n.o.p.bp",L))){break ifs;}}return J;}}),14:({scopes:"k.bq.bx.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[429],["h.i.k.j.ey"],[0,0],N,"k.bq.bx.ey",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[430],[],[],N,"n.o.p.ey",L))){break ifs;}}return J;}}),278:({scopes:"d.bo.en.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[330],(P-1)))?B[431]:null),["h.i.en.cd"],[0,0],N,"d.bo.en.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),228:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[432],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(227);O.push("");break ifs;
-}}return J;}}),452:({scopes:"d.i.fn.is.it.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[433],[],[],N,"d.i.fn.is.it.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[481].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[460].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),2:({scopes:"d.kl.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[434],[],[],N,"d.kl.ey",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[11].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[435],[],[],N,"w.x.e.ey",L))){break ifs;}if((J=E(Q,P,B[436],["h.i.w.ey"],[0,0],N,"w.f.km.fn.ey",L))){break ifs;
-}if((J=E(Q,P,B[437],["h.i.w.ey"],[0,0],N,"w.f.km.iz.ey",L))){break ifs;}if((J=E(Q,P,B[438],[],[],N,"w.x.e.kn.ey",L))){break ifs;
-}if((J=E(Q,P,B[439],["h.i.w.ey"],[0,0],N,"w.f.km.ko.ey",L))){break ifs;}if((J=E(Q,P,B[440],["h.i.w.ey"],[0,0],N,"w.f.km.kp.ey",L))){break ifs;
-}if((J=E(Q,P,B[441],["h.i.w.ey","w.f.km.kr.ey","h.bc.dk.ey","k.bm.ks.ey","k.bq.br.ks.ey","h.i.k.bl.ey","h.i.k.j.ey"],[0,0,1,1,2,2,3,3,4,5,5,6,6,4],N,"d.kq.ey",L))){break ifs;
-}}return J;}}),343:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[442],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[344].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[347].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),110:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[443],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[130].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),372:({scopes:"d.cu.kt.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[444],["h.i.ef.ch"],[0,0],N,"d.cu.kt.ee",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),238:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[445],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(237);O.push("");break ifs;
-}}return J;}}),136:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[446],[],[],N,"",L))){break ifs;}}return J;}}),59:({scopes:"k.bq.bx.by.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[447],[],[],N,"k.bq.bx.by.bs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[448],[],[],N,"n.o.p.bt",L))){break ifs;
-}}return J;}}),226:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[449],["h.bk.bj.bp","bh.bp.bj.bh.ih"],[0,1,1,0],N,"bh.bp.bj.bh",L))){break ifs;
-}if((J=E(Q,P,B[450],["h.bk.bj.bp"],[0,0],N,"bh.bp.bj.bh",L))){M.push(225);O.push(" bh.bp.bj.bh");break ifs;
-}if((J=E(Q,P,B[451],["h.i.dw.bp"],[0,0],N,"dw.f.ku.kv.bp",L))){break ifs;}if((J=E(Q,P,B[452],["h.i.dw.bp"],[0,0],N,"dw.f.ku.fn.bp",L))){break ifs;
-}if((J=E(Q,P,B[453],["h.i.dw.bp"],[0,0],N,"dw.f.ku.hq.bp",L))){break ifs;}}return J;}}),257:({scopes:"q.r.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[454],["h.i.q.bs"],[0,0],N,"q.r.ch",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),366:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[455],["d.s.ch","ce.cf.ci.ch"],[0,1,1,0],N,"",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[342].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),8:({scopes:"d.kw.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[456],["h.hd.kx.ey"],[0,0],N,"d.kw.ey",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[457],[],[],N,"dp.n.kw.ey",L))){break ifs;}if((J=E(Q,P,B[458],[],[],N,"dp.n.ky.ey",L))){break ifs;
-}if((J=E(Q,P,B[459],[],[],N,"dp.n.kz.la.ey",L))){break ifs;}if((J=E(Q,P,B[460],[],[],N,"be.lb.kz.lc.ey",L))){break ifs;
-}if((J=E(Q,P,B[461],[],[],N,"n.da.ey",L))){break ifs;}if((J=E(Q,P,(G(Q,A[354],(P-1))?B[462]:B[463]),[],[],N,"ce.f.ld.ey",L))){break ifs;
-}if((J=E(Q,P,B[464],["h.i.n.ey"],[0,0],N,"n.f.kz.le.ey",L))){break ifs;}if((J=H[13].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[15].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[465],["dp.cu.lf.ey","h.bk.cu.ey"],[0,0,1,1],N,"",L))){M.push(7);
-O.push("");break ifs;}if((J=E(Q,P,B[466],[],[],N,"ce.f.lg.ey",L))){break ifs;}}return J;}}),516:({scopes:"q.r.kh",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[467],["h.i.q.kh"],[0,0],N,"q.r.kh",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),116:({scopes:"d.fa.lh.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[468],["h.i.lh.j.cm"],[0,0],N,"d.fa.lh.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,(G(Q,A[362],(P-1))?B[469]:null),[],[],N,"",L))){M.push(115);O.push(" d.fa.lh.li.cm");
-break ifs;}}return J;}}),525:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[470],["h.i.k.bl.g"],[0,0],N,"k.bq.bx.g",L))){M.push(524);O.push(" k.bq.bx.g");
-break ifs;}}return J;}}),240:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[471],["h.bk.bo.bp"],[0,0],N,"",L))){M.push(239);O.push("");break ifs;
-}}return J;}}),527:({scopes:"k.bq.br.g d.ja.iz.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[472],["h.i.k.j.g"],[0,0],N,"k.bq.br.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;}if((J=H[511].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),114:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[473],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),368:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[474],[],[],N,"ce.dk.lj.ch",L))){break ifs;}}return J;}}),73:({scopes:"k.cn.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[475],["h.i.k.j.bt"],[0,0],N,"k.cn.bt",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[476],[],[],N,"n.o.p.bt",L))){break ifs;}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),63:({scopes:"k.bq.f.bz.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[477],[],[],N,"k.bq.f.bz.bs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),297:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[478],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.bp.cd",L))){M.push(283);
-O.push(" k.bm.ca.cb.bp.cd bh.bp.bj.cd");break ifs;}if((J=E(Q,P,B[479],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.bp.cd",L))){M.push(284);
-O.push(" k.bm.ca.bp.cd bh.bp.bj.cd");break ifs;}if((J=E(Q,P,B[480],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.cm.cd",L))){M.push(285);
-O.push(" k.bm.ca.cb.cm.cd bh.cm.bj.cd");break ifs;}if((J=E(Q,P,B[481],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cm.cd",L))){M.push(286);
-O.push(" k.bm.ca.cm.cd bh.cm.bj.cd");break ifs;}if((J=E(Q,P,B[482],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.cr.cd",L))){M.push(287);
-O.push(" k.bm.ca.cb.cr.cd bh.cr.bj.cd");break ifs;}if((J=E(Q,P,B[483],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cr.cd",L))){M.push(288);
-O.push(" k.bm.ca.cr.cd bh.cr.bj.cd");break ifs;}if((J=E(Q,P,B[484],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.g.cd",L))){M.push(289);
-O.push(" k.bm.ca.cb.g.cd u.g.bj.cd");break ifs;}if((J=E(Q,P,B[485],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.g.cd",L))){M.push(290);
-O.push(" k.bm.ca.g.cd u.g.bj.cd");break ifs;}if((J=E(Q,P,B[486],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.ew.cd",L))){M.push(291);
-O.push(" k.bm.ca.cb.ew.cd u.g.ew.bj.cd");break ifs;}if((J=E(Q,P,B[487],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.ew.cd",L))){M.push(292);
-O.push(" k.bm.ca.ew.cd u.g.ew.bj.cd");break ifs;}if((J=E(Q,P,B[488],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.cc.cd",L))){M.push(293);
-O.push(" k.bm.ca.cb.cc.cd u.g.cc.bj.cd");break ifs;}if((J=E(Q,P,B[489],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cc.cd",L))){M.push(294);
-O.push(" k.bm.ca.cc.cd u.g.cc.bj.cd");break ifs;}if((J=E(Q,P,B[490],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cb.cd",L))){M.push(295);
-O.push(" k.bm.ca.cb.cd");break ifs;}if((J=E(Q,P,B[491],["h.i.k.cd","ce.dk.ca.cd","ce.cf.cg.cd"],[0,1,1,2,2,0],N,"k.bm.ca.cd",L))){M.push(296);
-O.push(" k.bm.ca.cd");break ifs;}}return J;}}),20:({scopes:"q.r.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[492],["h.i.q.m"],[0,0],N,"q.r.m",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),280:({scopes:"d.cu.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[493],["h.i.cu.cd"],[0,0],N,"d.cu.cd",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),4:({scopes:"d.lk.ci.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[494],["ce.cf.lk.ci.ey"],[0,0],N,"d.lk.ci.ey",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[13].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[495],["dp.cu.ll.ey","h.bk.cu.ey"],[0,0,1,1],N,"",L))){M.push(3);
-O.push("");break ifs;}}return J;}}),112:({scopes:"d.lm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[496],["h.i.hu.j.cm"],[0,0],N,"d.lm.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[497],[],[],N,"",L))){M.push(110);O.push("");break ifs;}if((J=E(Q,P,B[498],["h.i.hu.bl.cm"],[0,0],N,"",L))){M.push(111);
-O.push(" d.lm.hu.cm");break ifs;}}return J;}}),214:({scopes:"k.bm.bj.bp.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[499],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.bp.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),370:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[500],[],[],N,"n.f.ln.ch",L))){break ifs;}if((J=E(Q,P,B[501],[],[],N,"be.bf.ln.ch",L))){break ifs;
-}}return J;}}),134:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[502],["n.o.p.ff.lo.cm","n.o.p.ff.lp.cm","n.o.p.ff.x.cm"],[0,0,1,1,2,2],N,"",L))){break ifs;
-}}return J;}}),502:({scopes:"bh.ey.bj.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[503],["h.i.e.g","w.x.e.lq.g","h.i.e.g"],[0,0,1,1,2,2],N,"bh.ey.bj.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[504],["h.i.e.g"],[0,0],N,"",L))){M.push(501);
-O.push("");break ifs;}}return J;}}),57:({scopes:"k.l.kk.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[505],["h.i.k.j.bt"],[0,0],N,"k.l.kk.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[506],["h.i.lr.bt","h.i.lr.bt"],[0,0,1,1],N,"k.l.lr.bt",L))){break ifs;}if((J=E(Q,P,B[507],[],[],N,"n.o.p.ls.bt",L))){break ifs;
-}if((J=E(Q,P,B[508],[],[],N,"n.o.p.bt",L))){break ifs;}if((J=E(Q,P,B[509],["h.i.lt.bt"],[0,0],N,"k.l.lt.bt",L))){M.push(56);
-O.push(" k.l.lt.bt");break ifs;}if((J=E(Q,P,B[510],[],[],N,"ce.dk.l.bt",L))){break ifs;}}return J;}}),303:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[511],[],[],N,"ce.cf.cd",L))){break ifs;}if((J=E(Q,P,B[512],[],[],N,"a.b.cd",L))){break ifs;
-}}return J;}}),470:({scopes:"d.ki.lu.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[513],[],[],N,"d.ki.lu.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[439].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),220:({scopes:"k.bm.bj.cd.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[514],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.cd.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),28:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[515],["ce.f.lv.bt","dw.f.bt","dp.fn.bt","dp.fn.bt"],[0,0,1,1,2,2,3,3],N,"",L))){break ifs;
-}}return J;}}),307:({scopes:"d.bo.dv.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[516],["ce.cf.cd"],[0,0],N,"d.bo.dv.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),435:({scopes:"k.bq.bx.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[517],["h.i.k.j.v"],[0,0],N,"k.bq.bx.v",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),163:({scopes:"k.bq.bx.r.gm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[518]:B[519]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.gm.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),122:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[520],[],[],N,"dp.cz.cm",L))){break ifs;}}return J;}}),218:({scopes:"k.bm.bj.ey.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[521],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.ey.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[1].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),358:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[522],["d.s.ch","ce.cf.ci.cj.ch"],[0,1,1,0],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[523],["d.s.ch","ce.cf.ci.ck.ch"],[0,1,1,0],N,"",L))){M.push(356);
-O.push(" q.r.s.t");break ifs;}if((J=E(Q,P,B[524],[],[],N,"",L))){M.push(357);O.push("");break ifs;}}return J;
-}}),476:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[525],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),427:({scopes:"q.r.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[526],["h.i.q.v"],[0,0],N,"q.r.v",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),53:({scopes:"k.l.lt.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[527],["h.i.lt.bt"],[0,0],N,"k.l.lt.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),299:({scopes:"k.f.dn.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[528],["h.i.k.j.cd"],[0,0],N,"k.f.dn.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[314].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),347:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[529],["d.s.ch","ce.cf.ci.lw.ch","d.ja.lx.ch"],[0,1,1,2,2,0],N,"d.bk",L))){break ifs;
-}}return J;}}),360:({scopes:"q.r.s.t.cs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[530],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[344].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[347].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),474:({scopes:"a.cz.cq.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[531],[],[],N,"a.cz.cq.c",(function(){(L&&L());M.pop();O.pop();})))){}}return J;
-}}),216:({scopes:"k.bm.bj.ch.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[532],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.ch.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[327].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),222:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[533],[],[],N,"n.o.p.bp",L))){break ifs;}}return J;}}),175:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[159].go(Q,P,K,M,O,L))){break ifs;}if((J=H[174].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),381:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[534],["h.i.be.ee"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[387].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[380].go(Q,P,K,M,O,L))){break ifs;}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),165:({scopes:"k.bq.bx.fi.hb.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[535],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.hb.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),450:({scopes:"d.gd.jf.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[536],[],[],N,"d.gd.jf.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[537],[],[],N,"ce.dk.ly.lz.c",L))){break ifs;
-}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),472:({scopes:"d.ki.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[538],[],[],N,"d.ki.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[487].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[539],["w.x.cu.c"],[0,0],N,"d.ki.gb.c",L))){M.push(469);O.push(" d.ki.gb.c");break ifs;
-}if((J=E(Q,P,B[540],[],[],N,"d.ki.lu.c",L))){M.push(470);O.push(" d.ki.lu.c");break ifs;}if((J=H[492].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[541],[],[],N,"d.ki.iw.c",L))){M.push(471);O.push(" d.ki.iw.c");break ifs;}}return J;}}),71:({scopes:"k.bq.bx.bs.bt bh.bs.bj.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[542],["h.i.k.j.bt"],[0,0],N,"k.bq.bx.bs.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[543],[],[],N,"q.bu.bv.bs",L))){break ifs;}if((J=E(Q,P,B[544],[],[],N,"q.bu.bw.bs",L))){break ifs;
-}if((J=E(Q,P,B[545],[],[],N,"k.bq.bx.by.bs",L))){M.push(67);O.push(" k.bq.bx.by.bs");break ifs;}if((J=E(Q,P,B[546],[],[],N,"k.bq.f.bz.by.bs",L))){M.push(68);
-O.push(" k.bq.f.bz.by.bs");break ifs;}if((J=E(Q,P,B[547],[],[],N,"k.bq.br.by.bs",L))){M.push(69);O.push(" k.bq.br.by.bs");
-break ifs;}if((J=E(Q,P,B[548],["n.o.p.bt"],[0,0],N,"k.bq.bx.bs",L))){M.push(70);O.push(" k.bq.bx.bs");
-break ifs;}if((J=E(Q,P,B[549],[],[],N,"n.o.p.bt",L))){break ifs;}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),26:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[550],[],[],N,"n.im.bt",L))){break ifs;}if((J=E(Q,P,B[551],[],[],N,"dp.n.ma.bt",L))){break ifs;
-}if((J=E(Q,P,B[552],[],[],N,"dp.n.mb.bt",L))){break ifs;}if((J=E(Q,P,B[553],[],[],N,"n.f.bt",L))){break ifs;
-}}return J;}}),359:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[554],["d.s.ch","ce.cf.ci.cj.ch","n.da.s.ch"],[0,1,1,2,2,0],N,"",L))){M.push(358);
-O.push("");break ifs;}}return J;}}),308:({scopes:"d.bo.dy.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[555],["ce.cf.cd"],[0,0],N,"d.bo.dy.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),420:({scopes:"d.co.cq.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[556],["ce.cf.cr"],[0,0],N,"d.co.cq.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),121:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[557],[],[],N,"dp.cu.jg.cm",L))){break ifs;}}return J;}}),201:({scopes:"k.bq.f.ei.ej.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[558],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.ej.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),490:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[559],["h.i.k.bl.c"],[0,0],N,"k.bq.br.c",L))){M.push(488);O.push(" k.bq.br.c");
-break ifs;}if((J=E(Q,P,B[560],["h.i.k.bl.c"],[0,0],N,"k.bq.bx.c",L))){M.push(489);O.push(" k.bq.bx.c");
-break ifs;}}return J;}}),123:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[561],[],[],N,"n.f.ln.cm",L))){break ifs;}}return J;}}),448:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[419],(P-1))?(G(Q,A[125],(P-1))?B[562]:B[563]):(G(Q,A[125],(P-1))?B[564]:B[565])),[],[],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[566],["a.cz.c"],[0,0],N,"",L))){M.push(444);O.push("");break ifs;
-}if((J=E(Q,P,B[567],[],[],N,"",L))){M.push(446);O.push("");break ifs;}if((J=E(Q,P,B[568],[],[],N,"d.mc.c",L))){M.push(447);
-O.push(" d.mc.c");break ifs;}}return J;}}),422:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[569],[],[],N,"dp.fn.eh.cr",L))){break ifs;}if((J=E(Q,P,B[570],[],[],N,"dp.cu.eh.cr",L))){break ifs;
-}}return J;}}),446:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[162],(P-1))?B[571]:null),[],[],N,"",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[572],[],[],N,"",L))){M.push(445);
-O.push("");break ifs;}}return J;}}),363:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[573],["d.s.ch","ce.cf.ci.cj.ch","n.da.s.ch"],[0,1,1,2,2,0],N,"",L))){M.push(362);
-O.push("");break ifs;}}return J;}}),255:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[574],["h.i.lr.bp","h.i.lr.bp"],[0,0,1,1],N,"k.l.lr.bp",L))){break ifs;}if((J=E(Q,P,B[575],["h.i.lt.bp"],[0,0],N,"k.l.lt.bp",L))){M.push(253);
-O.push(" k.l.lt.bp");break ifs;}if((J=E(Q,P,B[576],["h.i.en.bp"],[0,0],N,"k.l.en.bp",L))){M.push(254);
-O.push(" k.l.en.bp");break ifs;}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[577]:null),["h.i.q.bp"],[0,0],N,"q.bu.bv.bp",L))){break ifs;
-}}return J;}}),314:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[326].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[578],[],[],N,"ce.dk.jr.cd",L))){break ifs;
-}if((J=E(Q,P,B[579],[],[],N,"n.da.hi.cd",L))){break ifs;}if((J=E(Q,P,B[580],[],[],N,"n.da.hh.cd",L))){break ifs;
-}if((J=E(Q,P,B[581],[],[],N,"n.da.f.cd",L))){break ifs;}if((J=E(Q,P,B[582],[],[],N,"n.da.md.cd",L))){break ifs;
-}}return J;}}),517:({scopes:"bh.bp.bj.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[583],["h.bk.bj.bp"],[0,0],N,"bh.bp.bj.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[584],["h.i.q.bp"],[0,0],N,"q.bu.bv.bp",L))){break ifs;}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),424:({scopes:"d.e.s.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[585],["h.i.e.v"],[0,0],N,"d.e.s.v",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[586],[],[],N,"w.f.km.v",L))){break ifs;}if((J=H[434].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[436].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),500:({scopes:"d.e.y.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[587],["h.i.e.g"],[0,0],N,"d.e.y.g",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[588],["w.x.e.z.g"],[0,0],N,"d.e.y.z.g",L))){M.push(498);O.push(" d.e.y.z.g");break ifs;
-}if((J=E(Q,P,B[589],[],[],N,"n.f.hg.g",L))){M.push(499);O.push(" n.f.hg.g");break ifs;}if((J=E(Q,P,B[590],[],[],N,"be.bf.hp.g",L))){break ifs;
-}}return J;}}),125:({scopes:"q.r.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[591]:null),[],[],N,"q.r.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[174].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),355:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[592],["d.s.ch","ce.cf.ci.cj.ch","n.da.s.ch"],[0,1,1,2,2,0],N,"",L))){M.push(354);
-O.push("");break ifs;}}return J;}}),119:({scopes:"d.fa.fb.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[593],["h.i.fb.j.cm"],[0,0],N,"d.fa.fb.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[442],(P-1)))?B[594]:null),[],[],N,"",L))){M.push(117);
-O.push(" d.fa.fb.ga.cm");break ifs;}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[444],(P-1)))?B[595]:null),[],[],N,"",L))){M.push(118);
-O.push(" d.fa.fb.fc.cm");break ifs;}}return J;}}),512:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[596],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[22].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),349:({scopes:"q.r.s.cl",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[597],[],[],N,"q.r.s.cl",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[344].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[347].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),148:({scopes:"k.bq.br.r.gm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[598]:B[599]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.gm.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),306:({scopes:"d.bo.du.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[600],["ce.cf.cd"],[0,0],N,"d.bo.du.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),199:({scopes:"k.bq.f.ei.ej.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[601],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.ej.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[244].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),1:({scopes:"bh.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[602],[],[],N,"d.kl.ey",L))){M.push(2);O.push(" d.kl.ey");break ifs;}if((J=H[11].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[603],["ce.cf.lk.ci.ey","h.i.ce.ey"],[0,1,1,0],N,"d.lk.ci.ey",L))){M.push(4);O.push(" d.lk.ci.ey");
-break ifs;}if((J=E(Q,P,B[604],["ce.cf.lk.me.ey","h.i.ce.ey","dp.n.me.ey"],[0,1,1,0,2,2],N,"d.lk.me.ey",L))){M.push(5);
-O.push(" d.lk.me.ey");break ifs;}if((J=E(Q,P,B[605],["h.bk.ka.ey"],[0,0],N,"d.ka.ey",L))){M.push(9);O.push(" d.ka.ey");
-break ifs;}}return J;}}),85:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[83].go(Q,P,K,M,O,L))){break ifs;}if((J=H[84].go(Q,P,K,M,O,L))){break ifs;}if((J=H[82].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),267:({scopes:"k.f.bq.gx.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[606],["h.i.k.j.bs"],[0,0],N,"k.f.bq.gx.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[263].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),351:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[607],["d.s.ch","ce.cf.ci.cj.ch","n.da.s.ch"],[0,1,1,2,2,0],N,"",L))){M.push(350);
-O.push("");break ifs;}}return J;}}),229:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[608],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[230].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),438:({scopes:"bh.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[609],["ce.f.mf.c","a.b.mf.c","h.hd.c"],[0,0,1,1,2,2],N,"d.mf.c",L))){break ifs;
-}if((J=E(Q,P,B[610],["ce.f.ci.c","a.b.ci.c","h.hd.c"],[0,0,1,1,2,2],N,"d.ci.c",L))){break ifs;}if((J=H[460].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[441].go(Q,P,K,M,O,L))){break ifs;}if((J=H[456].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),129:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[611],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[612],[],[],N,"",L))){M.push(127);
-O.push("");break ifs;}if((J=E(Q,P,((!G(Q,A[454],(P-1)))?B[613]:null),[],[],N,"",L))){M.push(128);O.push("");
-break ifs;}}return J;}}),41:({scopes:"d.gi.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[614],[],[],N,"d.gi.bt",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[47].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),496:({scopes:"d.e.s.v.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[615],["h.i.e.g"],[0,0],N,"d.e.s.v.g",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[526].go(Q,P,K,M,O,L))){break ifs;}if((J=H[523].go(Q,P,K,M,O,L))){break ifs;}if((J=H[525].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),66:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[616],["h.i.k.bl.bt"],[0,0],N,"k.bq.br.bs.bt",L))){M.push(65);O.push(" k.bq.br.bs.bt bh.bs.bj.bt");
-break ifs;}}return J;}}),353:({scopes:"q.r.s.cl.cs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[617],[],[],N,"q.r.s.cl.cs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[344].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[347].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),108:({scopes:"d.eq.hu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[618],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[139].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),290:({scopes:"k.bm.ca.g.cd u.g.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[619],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.g.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[494].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),312:({scopes:"d.bo.eb.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[620],["ce.cf.cd"],[0,0],N,"d.bo.eb.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),418:({scopes:"d.co.cp.cq.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[621],["ce.cf.cr"],[0,0],N,"d.co.cp.cq.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[410].go(Q,P,K,M,O,L))){break ifs;}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),16:({scopes:"bh.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[622],["dp.fn.m","dp.n.m","ce.dk.m"],[0,0,1,1,2,2],N,"d.fn.m",L))){break ifs;
-}if((J=E(Q,P,B[623],["dp.fn.m","dp.n.m","w.x.cu.m","ce.dk.m","a.cz.cu.m","h.i.ef.bl.m","dw.gg.cu.m","h.i.ef.j.m"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7],N,"d.cu.mg.m",L))){break ifs;
-}if((J=E(Q,P,B[624],["dp.fn.m","dp.n.m","w.x.cu.m","ce.dk.m"],[0,0,1,1,2,2,3,3],N,"d.cu.m",L))){break ifs;
-}if((J=E(Q,P,B[625],["dp.fn.m","w.x.cu.m","ce.dk.m","a.cz.cu.m","h.i.ef.bl.m","dw.gg.cu.m","h.i.ef.j.m"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6],N,"d.cu.m",L))){break ifs;
-}if((J=E(Q,P,B[626],["w.x.cu.m","ce.dk.m","a.cz.cu.m","h.i.ef.bl.m","dw.gg.cu.m","h.i.ef.j.m"],[0,0,1,1,2,2,3,3,4,4,5,5],N,"d.cu.m",L))){break ifs;
-}if((J=E(Q,P,B[627],["a.cz.cu.m","w.x.cu.m","h.i.ef.bl.m","dw.gg.cu.m","h.i.ef.j.m"],[0,0,1,1,2,2,3,3,4,4],N,"d.cu.m",L))){break ifs;
-}if((J=E(Q,P,B[628],["w.x.cu.m","a.cz.cu.m","h.i.ef.bl.m","dw.gg.cu.m","h.i.ef.j.m"],[0,0,1,1,2,2,3,3,4,4],N,"d.cu.mh.m",L))){break ifs;
-}if((J=E(Q,P,B[629],["k.bq.bx.m","h.i.k.bl.m","w.x.cu.m","h.i.k.j.m","k.bq.br.m","h.i.k.bl.m","w.x.cu.m","h.i.k.j.m","w.x.cu.m","h.i.ef.bl.m","dw.gg.cu.m","h.i.ef.j.m"],[0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,8,8,9,9,10,10,11,11],N,"d.cu.mh.m",L))){break ifs;
-}if((J=E(Q,P,B[630],["ce.dk.lv.m","w.x.cz.kv.m"],[0,0,1,1],N,"d.fn.kv.ed",L))){break ifs;}if((J=E(Q,P,B[631],[],[],N,"w.x.cz.hv.m.mi",L))){break ifs;
-}if((J=E(Q,P,B[632],[],[],N,"dp.cu.m.mi",L))){break ifs;}if((J=E(Q,P,B[633],[],[],N,"n.da.m",L))){break ifs;
-}if((J=E(Q,P,B[634],["h.i.k.bl.m"],[0,0],N,"k.bq.bx.m",L))){M.push(17);O.push(" k.bq.bx.m");break ifs;
-}if((J=E(Q,P,B[635],["h.i.k.bl.m"],[0,0],N,"k.bq.br.m",L))){M.push(18);O.push(" k.bq.br.m");break ifs;
-}if((J=E(Q,P,B[636],["h.i.q.m"],[0,0],N,"q.r.gk.m",L))){M.push(19);O.push(" q.r.gk.m");break ifs;}if((J=E(Q,P,B[637],["h.i.q.m"],[0,0],N,"q.r.m",L))){M.push(20);
-O.push(" q.r.m");break ifs;}if((J=E(Q,P,B[638],["h.i.q.m"],[0,0],N,"q.bu.ez.m",L))){break ifs;}if((J=E(Q,P,B[639],["h.i.q.g.m"],[0,0],N,"q.r.g.m",L))){break ifs;
-}if((J=E(Q,P,B[640],[],[],N,"a.cz.m",L))){break ifs;}if((J=E(Q,P,B[641],[],[],N,"a.b.m",L))){break ifs;
-}if((J=E(Q,P,B[642],[],[],N,"ce.cf.m",L))){break ifs;}if((J=E(Q,P,B[643],[],[],N,"ce.dk.m",L))){break ifs;
-}if((J=E(Q,P,B[644],[],[],N,"n.im.mj.mk.m",L))){break ifs;}if((J=E(Q,P,B[645],[],[],N,"n.im.mj.ml.m",L))){break ifs;
-}if((J=E(Q,P,B[646],[],[],N,"n.im.mm.m",L))){break ifs;}if((J=E(Q,P,B[647],[],[],N,"dw.im.m",L))){break ifs;
-}if((J=E(Q,P,B[648],[],[],N,"ce.f.m",L))){break ifs;}if((J=E(Q,P,B[649],[],[],N,"dp.fn.m",L))){break ifs;
-}if((J=E(Q,P,B[650],[],[],N,"dp.cu.m",L))){break ifs;}if((J=E(Q,P,B[651],[],[],N,"dp.cu.mn.m",L))){break ifs;
-}if((J=E(Q,P,(G(Q,A[454],(P-1))?B[652]:null),[],[],N,"dp.n.m",L))){break ifs;}if((J=E(Q,P,(G(Q,A[454],(P-1))?B[653]:null),[],[],N,"dp.n.mn.m",L))){break ifs;
-}if((J=E(Q,P,B[654],[],[],N,"dp.n.mn.m",L))){break ifs;}if((J=E(Q,P,B[655],[],[],N,"dp.cu.mo.m",L))){break ifs;
-}if((J=E(Q,P,((!G(Q,A[491],(P-1)))?B[656]:B[657]),[],[],N,"ce.dk.m",L))){break ifs;}if((J=E(Q,P,B[658],[],[],N,"n.im.m",L))){break ifs;
-}if((J=E(Q,P,(((G(Q,A[238],(P-0))||G(Q,A[495],(P-1)))||G(Q,A[496],(P-6)))?B[659]:null),["h.i.k.bl.m"],[0,0],N,"k.l.m",L))){M.push(21);
-O.push(" k.l.m");break ifs;}if((J=E(Q,P,B[660],[],[],N,"h.hd.mp.m",L))){break ifs;}if((J=E(Q,P,B[661],[],[],N,"d.mq.hv.mr.m",L))){break ifs;
-}if((J=E(Q,P,B[662],[],[],N,"d.mq.ki.ms.m",L))){break ifs;}if((J=E(Q,P,B[663],[],[],N,"d.mt.mu.m",L))){break ifs;
-}if((J=E(Q,P,B[664],[],[],N,"d.mt.mv.m",L))){break ifs;}if((J=E(Q,P,B[665],[],[],N,"d.mt.mw.m",L))){break ifs;
-}}return J;}}),249:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[666],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[250].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),203:({scopes:"k.bq.f.ei.em.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[667],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.em.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[668],[],[],N,"n.o.p.bp",L))){break ifs;}if((J=H[248].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),341:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[669],[],[],N,"d.r.ch",L))){M.push(340);O.push(" d.r.ch");break ifs;}}return J;
-}}),43:({scopes:"d.cu.eu.iq.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[670],[],[],N,"d.cu.eu.iq.bt",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[51].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),492:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[671],["a.b.c"],[0,0],N,"d.mx.c",L))){M.push(491);O.push(" d.mx.c");break ifs;
-}}return J;}}),377:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[672],[],[],N,"d.r.ee",L))){M.push(376);O.push(" d.r.ee");break ifs;}}return J;
-}}),106:({scopes:"d.eq.cm d.eq.hu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[673],["h.i.hu.j.cm"],[0,0],N,"d.eq.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[139].go(Q,P,K,M,O,L))){break ifs;}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),400:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[674],[],[],N,"h.bc.ek.bu.cr",L))){break ifs;}if((J=E(Q,P,B[675],[],[],N,"ce.dk.cr",L))){break ifs;
-}if((J=E(Q,P,(((G(Q,A[238],(P-0))||G(Q,A[508],(P-2)))||G(Q,A[509],(P-4)))?B[676]:null),["ce.cf.cr"],[0,0],N,"",L))){break ifs;
-}if((J=E(Q,P,B[677],[],[],N,"h.bc.gc.hj.cr",L))){break ifs;}if((J=E(Q,P,B[678],[],[],N,"h.bk.en.cr",L))){break ifs;
-}if((J=E(Q,P,B[679],[],[],N,"ce.cf.cr",L))){break ifs;}if((J=E(Q,P,B[680],[],[],N,"ce.cf.jm.cr",L))){break ifs;
-}if((J=E(Q,P,B[681],[],[],N,"n.f.my.cr",L))){break ifs;}if((J=E(Q,P,B[682],[],[],N,"n.im.mj.cr",L))){break ifs;
-}if((J=E(Q,P,B[683],[],[],N,"n.im.mm.cr",L))){break ifs;}if((J=E(Q,P,B[684],[],[],N,"n.f.mz.cr",L))){break ifs;
-}if((J=E(Q,P,((G(Q,A[518],(P-8))||G(Q,A[519],(P-11)))?B[685]:null),[],[],N,"n.f.na.cr",L))){break ifs;
-}if((J=E(Q,P,B[686],[],[],N,"n.f.nb.cr",L))){break ifs;}if((J=E(Q,P,B[687],[],[],N,"n.f.nc.cr",L))){break ifs;
-}if((J=E(Q,P,B[688],[],[],N,"dw.im.cr",L))){break ifs;}if((J=E(Q,P,B[689],[],[],N,"dp.cu.nd.cr",L))){break ifs;
-}if((J=E(Q,P,B[690],[],[],N,"dp.fn.nd.cr",L))){break ifs;}if((J=E(Q,P,B[691],[],[],N,"n.da.cr",L))){break ifs;
-}if((J=E(Q,P,(G(Q,A[527],(P-4))?B[692]:null),["dw.f.cr"],[0,0],N,"",L))){break ifs;}}return J;}}),205:({scopes:"k.bq.f.ei.em.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[693],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.em.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[694],[],[],N,"n.o.p.bp",L))){break ifs;}if((J=H[228].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),263:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[695],["h.i.k.j.bs"],[0,0],N,"k.cn.bs",L))){break ifs;}}return J;}}),51:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[79].go(Q,P,K,M,O,L))){break ifs;}if((J=H[48].go(Q,P,K,M,O,L))){break ifs;}if((J=H[74].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[85].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[696],[],[],N,"ce.dk.ga.bt",L))){break ifs;}if((J=E(Q,P,B[697],[],[],N,"ce.dk.gh.bt",L))){break ifs;
-}if((J=E(Q,P,B[698],[],[],N,"a.b.jm.bt",L))){break ifs;}if((J=E(Q,P,B[699],["dp.cu.il.bt","h.i.ev.bl.bt"],[0,0,1,1],N,"d.ev.bt",L))){M.push(50);
-O.push(" d.ev.bt");break ifs;}if((J=H[28].go(Q,P,K,M,O,L))){break ifs;}if((J=H[26].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),375:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[700],[],[],N,"d.ne.ee",L))){M.push(374);O.push(" d.ne.ee");break ifs;
-}}return J;}}),510:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[519].go(Q,P,K,M,O,L))){break ifs;}if((J=H[513].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[521].go(Q,P,K,M,O,L))){break ifs;}if((J=H[515].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),87:({scopes:"d.fn.nf.cm w.x.cz.fn.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[701],["h.bk.fn.bl.cm"],[0,0],N,"d.fn.nf.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[131].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),140:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[702],[],[],N,"dw.im.cm",L))){break ifs;}}return J;}}),398:({scopes:"d.cu.gs.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[703],["ce.cf.gq.cr","w.x.cu.gr.cr"],[0,0,1,1],N,"d.cu.gs.cr",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[704],["ce.cf.ng.cr","dw.gg.gr.cr"],[0,0,1,1],N,"",L))){break ifs;
-}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),253:({scopes:"k.l.lt.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[705],["h.i.lt.bp"],[0,0],N,"k.l.lt.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),488:({scopes:"k.bq.br.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[706],["h.i.k.j.c"],[0,0],N,"k.bq.br.c",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[707],[],[],N,"n.o.p.c",L))){break ifs;}}return J;}}),127:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[708],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[142].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[143].go(Q,P,K,M,O,L))){break ifs;}if((J=H[137].go(Q,P,K,M,O,L))){break ifs;}if((J=H[136].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),68:({scopes:"k.bq.f.bz.by.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[709],[],[],N,"k.bq.f.bz.by.bs",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[710],[],[],N,"n.o.p.bt",L))){break ifs;}}return J;}}),37:({scopes:"q.r.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[711],["h.i.q.bt"],[0,0],N,"q.r.bt",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),5:({scopes:"d.lk.me.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[712],["ce.cf.lk.me.ey"],[0,0],N,"d.lk.me.ey",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[1].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),514:({scopes:"bh.cm.bj.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[713],[],[],N,"bh.cm.bj.g",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),259:({scopes:"k.l.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[714],["h.i.k.j.bs"],[0,0],N,"k.l.bs",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[263].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[715],[],[],N,"n.o.p.nh.bs",L))){break ifs;
-}}return J;}}),406:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[716],["h.bk.ev.cr"],[0,0],N,"d.fz.ev.cr",L))){M.push(403);O.push(" d.fz.ev.cr");
-break ifs;}if((J=E(Q,P,(G(Q,A[541],(P-12))?(G(Q,A[542],(P-4))?B[717]:B[718]):(G(Q,A[542],(P-4))?B[719]:null)),["h.i.k.cr"],[0,0],N,"k.bq.br.ni.cr",L))){M.push(404);
-O.push(" k.bq.br.ni.cr");break ifs;}if((J=E(Q,P,B[720],["h.i.k.cr"],[0,0],N,"k.bq.br.cr",L))){M.push(405);
-O.push(" k.bq.br.cr");break ifs;}if((J=E(Q,P,B[721],["h.i.gb.cr","h.i.gb.cr"],[0,0,1,1],N,"d.gb.cr",L))){break ifs;
-}if((J=E(Q,P,B[722],["h.i.fz.cr","dp.fn.nd.cr","a.cz.nj.cr","k.bm.fz.cr","h.i.fz.cr","ce.dk.cr","dp.fn.nd.cr"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6],N,"d.fz.cr",L))){break ifs;
-}}return J;}}),49:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[723],["ce.dk.fn.bt","d.eq.hv.bt","dw.f.hj.bt","h.i.dw.bt"],[0,0,1,1,2,3,3,2],N,"",L))){break ifs;
-}}return J;}}),77:({scopes:"k.bq.bx.bt d.ha.bq.bx.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[724],["h.i.k.j.bt"],[0,0],N,"k.bq.bx.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[725],[],[],N,"n.o.p.bt",L))){break ifs;}}return J;}}),404:({scopes:"k.bq.br.ni.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[726],["h.i.k.cr"],[0,0],N,"k.bq.br.ni.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[727],[],[],N,"n.o.p.cr",L))){break ifs;}}return J;}}),142:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[728],[],[],N,"dp.cu.hs.cm",L))){break ifs;}}return J;}}),195:({scopes:"k.l.fl.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[729],["h.i.k.j.bp"],[0,0],N,"k.l.fl.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[246].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),91:({scopes:"d.fn.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[730],["h.i.ht.j.cm","h.bk.fn.bl.cm","be.bf.ir.cm"],[0,0,1,1,2,2],N,"d.fn.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[731],[],[],N,"",L))){M.push(88);O.push(" w.x.cz.fn.cm");break ifs;
-}if((J=E(Q,P,B[732],["h.i.ht.bl.cm"],[0,0],N,"",L))){M.push(90);O.push(" d.fn.ht.cm");break ifs;}}return J;
-}}),185:({scopes:"k.cn.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[733],["h.i.k.j.bp"],[0,0],N,"k.cn.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),339:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[734],[],[],N,"dw.f.nk.ch",L))){break ifs;}}return J;}}),437:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[735],["w.f.km.bb.v","w.f.km.v","h.bc.bb.v","w.f.km.bd.v"],[0,0,1,2,2,1,3,3],N,"",L))){break ifs;
-}if((J=H[434].go(Q,P,K,M,O,L))){break ifs;}if((J=H[436].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),292:({scopes:"k.bm.ca.ew.cd u.g.ew.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[736],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.ew.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if(false){break ifs;}}return J;}}),269:({scopes:"bh.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[274].go(Q,P,K,M,O,L))){break ifs;}if((J=H[317].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[304].go(Q,P,K,M,O,L))){break ifs;}if((J=H[279].go(Q,P,K,M,O,L))){break ifs;}if((J=H[313].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[282].go(Q,P,K,M,O,L))){break ifs;}if((J=H[323].go(Q,P,K,M,O,L))){break ifs;}if((J=H[326].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[302].go(Q,P,K,M,O,L))){break ifs;}if((J=H[297].go(Q,P,K,M,O,L))){break ifs;}if((J=H[298].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[319].go(Q,P,K,M,O,L))){break ifs;}if((J=H[316].go(Q,P,K,M,O,L))){break ifs;}if((J=H[303].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[324].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),494:({scopes:"u.g.nl",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[737],["h.i.e.g","w.x.e.g"],[0,0,1,1],N,"d.e.gv.g",L))){M.push(495);O.push(" d.e.gv.g");
-break ifs;}if((J=E(Q,P,B[738],["h.i.e.g","w.x.e.v.g"],[0,0,1,1],N,"d.e.s.v.g",L))){M.push(496);O.push(" d.e.s.v.g");
-break ifs;}if((J=E(Q,P,B[739],["h.i.q.g"],[0,0],N,"q.r.g",L))){M.push(497);O.push(" q.r.g");break ifs;
-}if((J=E(Q,P,B[740],["h.i.e.g"],[0,0],N,"d.e.y.g",L))){M.push(500);O.push(" d.e.y.g");break ifs;}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[741],["h.i.e.g","w.x.e.lq.g"],[0,0,1,1],N,"bh.ey.bj.g",L))){M.push(502);O.push(" bh.ey.bj.g");
-break ifs;}if((J=E(Q,P,B[742],["h.i.e.g","w.x.e.gn.g"],[0,0,1,1],N,"bh.m.bj.g",L))){M.push(505);O.push(" bh.m.bj.g");
-break ifs;}if((J=E(Q,P,B[743],["h.i.e.g","w.x.e.fa.gv.g"],[0,0,1,1],N,"d.e.fa.gv.g",L))){M.push(506);
-O.push(" d.e.fa.gv.g");break ifs;}if((J=E(Q,P,B[744],["h.i.e.bl.g","w.x.e.r.gv.g"],[0,0,1,1],N,"d.e.r.gv.g",L))){M.push(507);
-O.push(" d.e.r.gv.g");break ifs;}if((J=E(Q,P,B[745],["h.i.e.bl.g","w.x.e.fy.gv.g"],[0,0,1,1],N,"d.e.fy.gv.g",L))){M.push(508);
-O.push(" d.e.fy.gv.g");break ifs;}if((J=E(Q,P,B[746],["h.i.e.bl.g","w.x.e.f.g"],[0,0,1,1],N,"d.e.f.g",L))){M.push(509);
-O.push(" d.e.f.g");break ifs;}if((J=H[511].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[747],[],[],N,"be.bf.nm.g",L))){break ifs;
-}if((J=E(Q,P,B[748],[],[],N,"be.bf.nn.g",L))){break ifs;}}return J;}}),197:({scopes:"k.bq.f.ei.ej.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[749],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.ej.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[250].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),483:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[750],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),183:({scopes:"k.bq.bx.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[751],["h.i.k.j.bp"],[0,0],N,"k.bq.bx.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[752],[],[],N,"n.o.p.bp",L))){break ifs;}}return J;}}),146:({scopes:"k.bq.br.r.fj.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[753]:B[754]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.fj.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),271:({scopes:"d.bo.hf.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[755],[],[],N,"d.bo.hf.cd",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),56:({scopes:"k.l.lt.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[756],["h.i.lt.bt"],[0,0],N,"k.l.lt.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[757],[],[],N,"n.o.p.bt",L))){break ifs;}}return J;}}),442:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[758],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),453:({scopes:"d.i.fn.iu.iv.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[759],[],[],N,"d.i.fn.iu.iv.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[481].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[460].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),408:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[402].go(Q,P,K,M,O,L))){break ifs;}if((J=H[406].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[400].go(Q,P,K,M,O,L))){break ifs;}if((J=H[411].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),167:({scopes:"k.bq.bx.fi.eo.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[760],["h.i.k.j.cm","be.bf.fk.cm"],[0,0,1,1],N,"k.bq.bx.fi.eo.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),39:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[761],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[762],["dp.fn.gu.bt"],[0,0],N,"",L))){break ifs;
-}}return J;}}),95:({scopes:"d.cu.ef.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[763],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[139].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[764],["dw.gg.cu.cm","h.bc.ef.cm"],[0,0,1,1],N,"",L))){break ifs;}}return J;}}),102:({scopes:"d.cu.fm.hu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[765],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[139].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),310:({scopes:"d.bo.gl.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[766],[],[],N,"d.bo.gl.cd",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[273].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),187:({scopes:"k.cn.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[767],["h.i.k.j.bp"],[0,0],N,"k.cn.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[230].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),357:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[768],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),479:({scopes:"a.cz.cq.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[769],[],[],N,"a.cz.cq.c",(function(){(L&&L());M.pop();O.pop();})))){}}return J;
-}}),251:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[770],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[252].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),379:({scopes:"d.cu.ed.eg.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[771],[],[],N,"d.cu.ed.eg.ee",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),157:({scopes:"k.bq.br.r.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[30],(P-3))?B[772]:B[773]),["h.i.k.j.cm","d.ep.br.cm"],[0,1,1,0],N,"k.bq.br.r.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),34:({scopes:"d.bj.m bh.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[774],["h.bk.bj.j.bt","ce.dk.ca.bt","h.i.k.bt"],[0,1,1,2,2,0],N,"d.bj.m",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[16].go(Q,P,K,M,O,L))){break ifs;}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),83:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[775],["h.i.dw.bt"],[0,0],N,"dw.f.hq.bt",L))){break ifs;}}return J;}}),469:({scopes:"d.ki.gb.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[776],[],[],N,"d.ki.gb.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[482].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),131:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[137].go(Q,P,K,M,O,L))){break ifs;}if((J=H[136].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),274:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,((!G(Q,A[574],(P-1)))?B[777]:null),["h.i.q.cd"],[0,0],N,"q.bu.bv.cd",L))){break ifs;
-}}return J;}}),508:({scopes:"d.e.fy.gv.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[778],["h.i.e.j.g"],[0,0],N,"d.e.fy.gv.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),498:({scopes:"d.e.y.z.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[779],[],[],N,"d.e.y.z.g",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[780],[],[],N,"k.bq.br.z.no.g",L))){break ifs;
-}}return J;}}),402:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[781],["h.i.q.cr"],[0,0],N,"q.bu.bw.cr",L))){break ifs;}if((J=E(Q,P,B[782],["h.i.q.cr"],[0,0],N,"q.r.cr",L))){M.push(401);
-O.push(" q.r.cr");break ifs;}}return J;}}),440:({scopes:"d.gd.ge.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[783],["h.i.gf.j.c"],[0,0],N,"d.gd.ge.c",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[784],["n.f.ga.c","ce.dk.gh.c"],[0,0,1,1],N,"",L))){break ifs;}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[785],[],[],N,"h.np.hj.c",L))){break ifs;}}return J;}}),193:({scopes:"k.l.fl.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[786],["h.i.k.j.bp"],[0,0],N,"k.l.fl.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[232].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),144:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[388].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),333:({scopes:"d.s.nq.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[787],[],[],N,"d.s.nq.ch",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[788],[],[],N,"h.bc.ek.ch",L))){break ifs;
-}}return J;}}),81:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[789],["dp.cu.il.bt","h.i.ev.bl.bt"],[0,0,1,1],N,"d.ev.bt",L))){M.push(80);
-O.push(" d.ev.bt");break ifs;}if((J=E(Q,P,B[790],[],[],N,"dp.cu.ev.bt",L))){break ifs;}if((J=E(Q,P,B[791],[],[],N,"dp.cu.ly.bt",L))){break ifs;
-}if((J=E(Q,P,B[792],[],[],N,"dp.cu.nr.bt",L))){break ifs;}if((J=E(Q,P,B[793],[],[],N,"dp.cu.ns.bt",L))){break ifs;
-}if((J=E(Q,P,B[794],[],[],N,"dp.cu.nt.bt",L))){break ifs;}if((J=E(Q,P,B[795],[],[],N,"dp.cu.nu.bt",L))){break ifs;
-}if((J=E(Q,P,B[796],[],[],N,"dp.cu.nv.bt",L))){break ifs;}if((J=E(Q,P,B[797],[],[],N,"dp.cu.nw.bt",L))){break ifs;
-}if((J=E(Q,P,B[798],[],[],N,"dp.cu.nx.bt",L))){break ifs;}if((J=E(Q,P,B[799],[],[],N,"dp.cu.ny.bt",L))){break ifs;
-}if((J=E(Q,P,B[800],[],[],N,"dp.cu.nz.bt",L))){break ifs;}if((J=E(Q,P,B[801],[],[],N,"dp.cu.oa.bt",L))){break ifs;
-}if((J=E(Q,P,B[802],[],[],N,"dp.cu.ob.bt",L))){break ifs;}if((J=E(Q,P,B[803],[],[],N,"dp.cu.oc.bt",L))){break ifs;
-}if((J=E(Q,P,B[804],[],[],N,"dp.cu.od.bt",L))){break ifs;}if((J=E(Q,P,B[805],[],[],N,"dp.cu.oe.bt",L))){break ifs;
-}if((J=E(Q,P,B[806],[],[],N,"dp.cu.of.bt",L))){break ifs;}if((J=E(Q,P,B[807],[],[],N,"dp.cu.og.bt",L))){break ifs;
-}if((J=E(Q,P,B[808],[],[],N,"dp.cu.oh.bt",L))){break ifs;}if((J=E(Q,P,B[809],[],[],N,"dp.cu.oi.bt",L))){break ifs;
-}if((J=E(Q,P,B[810],[],[],N,"dp.cu.oj.bt",L))){break ifs;}if((J=E(Q,P,B[811],[],[],N,"dp.cu.ok.bt",L))){break ifs;
-}if((J=E(Q,P,B[812],[],[],N,"dp.cu.ol.bt",L))){break ifs;}if((J=E(Q,P,B[813],[],[],N,"dp.cu.om.bt",L))){break ifs;
-}if((J=E(Q,P,B[814],[],[],N,"dp.cu.on.bt",L))){break ifs;}if((J=E(Q,P,B[815],[],[],N,"dp.cu.oo.bt",L))){break ifs;
-}if((J=E(Q,P,B[816],[],[],N,"dp.cu.op.bt",L))){break ifs;}if((J=E(Q,P,B[817],[],[],N,"dp.cu.oq.bt",L))){break ifs;
-}if((J=E(Q,P,B[818],[],[],N,"dp.cu.or.bt",L))){break ifs;}if((J=E(Q,P,B[819],[],[],N,"dp.cu.os.bt",L))){break ifs;
-}if((J=E(Q,P,B[820],[],[],N,"dp.cu.ot.bt",L))){break ifs;}if((J=E(Q,P,B[821],[],[],N,"dp.cu.ou.bt",L))){break ifs;
-}if((J=E(Q,P,B[822],[],[],N,"dp.cu.ov.bt",L))){break ifs;}if((J=E(Q,P,B[823],[],[],N,"dp.cu.ow.bt",L))){break ifs;
-}if((J=E(Q,P,B[824],[],[],N,"dp.cu.ox.bt",L))){break ifs;}if((J=E(Q,P,B[825],[],[],N,"dp.cu.oy.bt",L))){break ifs;
-}if((J=E(Q,P,B[826],[],[],N,"dp.cu.oz.bt",L))){break ifs;}if((J=E(Q,P,B[827],[],[],N,"dp.cu.pa.bt",L))){break ifs;
-}if((J=E(Q,P,B[828],[],[],N,"dp.cu.pb.bt",L))){break ifs;}if((J=E(Q,P,B[829],[],[],N,"dp.cu.pc.bt",L))){break ifs;
-}if((J=E(Q,P,B[830],[],[],N,"dp.cu.pd.bt",L))){break ifs;}if((J=E(Q,P,B[831],[],[],N,"dp.cu.pe.bt",L))){break ifs;
-}if((J=E(Q,P,B[832],[],[],N,"dp.cu.pf.bt",L))){break ifs;}if((J=E(Q,P,B[833],[],[],N,"dp.cu.pg.bt",L))){break ifs;
-}if((J=E(Q,P,B[834],[],[],N,"dp.cu.ph.bt",L))){break ifs;}if((J=E(Q,P,B[835],[],[],N,"dp.cu.pi.bt",L))){break ifs;
-}if((J=E(Q,P,B[836],[],[],N,"dp.cu.pj.bt",L))){break ifs;}if((J=E(Q,P,B[837],[],[],N,"dp.cu.pk.bt",L))){break ifs;
-}if((J=E(Q,P,B[838],[],[],N,"dp.cu.pl.bt",L))){break ifs;}if((J=E(Q,P,B[839],[],[],N,"dp.cu.pm.bt",L))){break ifs;
-}if((J=E(Q,P,B[840],[],[],N,"dp.cu.g.bt",L))){break ifs;}if((J=E(Q,P,B[841],[],[],N,"dp.cu.pn.bt",L))){break ifs;
-}if((J=E(Q,P,B[842],[],[],N,"dp.cu.po.bt",L))){break ifs;}if((J=E(Q,P,B[843],[],[],N,"dp.cu.pp.bt",L))){break ifs;
-}if((J=E(Q,P,B[844],[],[],N,"dp.cu.pq.bt",L))){break ifs;}if((J=E(Q,P,B[845],[],[],N,"dp.cu.pr.bt",L))){break ifs;
-}if((J=E(Q,P,B[846],[],[],N,"dp.cu.ps.bt",L))){break ifs;}if((J=E(Q,P,B[847],[],[],N,"dp.cu.pt.bt",L))){break ifs;
-}if((J=E(Q,P,B[848],[],[],N,"dp.cu.pu.bt",L))){break ifs;}if((J=E(Q,P,B[849],[],[],N,"dp.cu.pv.bt",L))){break ifs;
-}if((J=E(Q,P,B[850],[],[],N,"dp.cu.fg.bt",L))){break ifs;}if((J=E(Q,P,B[851],[],[],N,"dp.cu.pw.bt",L))){break ifs;
-}if((J=E(Q,P,B[852],[],[],N,"dp.cu.mh.bt",L))){break ifs;}if((J=E(Q,P,B[853],[],[],N,"dp.cu.px.bt",L))){break ifs;
-}if((J=E(Q,P,B[854],[],[],N,"dp.cu.py.bt",L))){break ifs;}if((J=E(Q,P,B[855],[],[],N,"dp.cu.pz.bt",L))){break ifs;
-}if((J=E(Q,P,B[856],[],[],N,"dp.cu.qa.bt",L))){break ifs;}if((J=E(Q,P,B[857],[],[],N,"dp.cu.fx.bt",L))){break ifs;
-}if((J=E(Q,P,B[858],[],[],N,"dp.cu.qb.bt",L))){break ifs;}if((J=E(Q,P,B[859],[],[],N,"dp.cu.qc.bt",L))){break ifs;
-}if((J=E(Q,P,B[860],[],[],N,"dp.cu.dn.bt",L))){break ifs;}if((J=E(Q,P,B[861],[],[],N,"dp.cu.qd.bt",L))){break ifs;
-}if((J=E(Q,P,B[862],[],[],N,"dp.cu.qe.bt",L))){break ifs;}if((J=E(Q,P,B[863],[],[],N,"dp.cu.qf.bt",L))){break ifs;
-}if((J=E(Q,P,B[864],[],[],N,"dp.cu.qg.bt",L))){break ifs;}if((J=E(Q,P,B[865],[],[],N,"dp.cu.qh.bt",L))){break ifs;
-}if((J=E(Q,P,B[866],[],[],N,"dp.cu.qi.bt",L))){break ifs;}if((J=E(Q,P,B[867],[],[],N,"dp.cu.qj.bt",L))){break ifs;
-}if((J=E(Q,P,B[868],[],[],N,"dp.cu.qk.bt",L))){break ifs;}if((J=E(Q,P,B[869],[],[],N,"dp.cu.ql.bt",L))){break ifs;
-}if((J=E(Q,P,B[870],[],[],N,"dp.cu.qm.bt",L))){break ifs;}if((J=E(Q,P,B[871],[],[],N,"dp.cu.qn.bt",L))){break ifs;
-}if((J=E(Q,P,B[872],[],[],N,"dp.cu.qo.bt",L))){break ifs;}if((J=E(Q,P,B[873],[],[],N,"dp.cu.qp.bt",L))){break ifs;
-}if((J=E(Q,P,B[874],[],[],N,"dp.cu.qq.bt",L))){break ifs;}if((J=E(Q,P,B[875],[],[],N,"dp.cu.qr.bt",L))){break ifs;
-}if((J=E(Q,P,B[876],[],[],N,"dp.cu.qs.bt",L))){break ifs;}if((J=E(Q,P,B[877],[],[],N,"dp.cu.qt.bt",L))){break ifs;
-}if((J=E(Q,P,B[878],[],[],N,"dp.cu.qu.bt",L))){break ifs;}if((J=E(Q,P,B[879],[],[],N,"dp.cu.qv.bt",L))){break ifs;
-}if((J=E(Q,P,B[880],[],[],N,"dp.cu.qw.bt",L))){break ifs;}if((J=E(Q,P,B[881],[],[],N,"dp.cu.qx.bt",L))){break ifs;
-}if((J=E(Q,P,B[882],[],[],N,"dp.cu.qy.bt",L))){break ifs;}if((J=E(Q,P,B[883],[],[],N,"dp.cu.qz.bt",L))){break ifs;
-}if((J=E(Q,P,B[884],[],[],N,"dp.cu.ra.bt",L))){break ifs;}if((J=E(Q,P,B[885],[],[],N,"dp.cu.rb.bt",L))){break ifs;
-}if((J=E(Q,P,B[886],[],[],N,"dp.cu.rc.bt",L))){break ifs;}if((J=E(Q,P,B[887],[],[],N,"dp.cu.rd.bt",L))){break ifs;
-}if((J=E(Q,P,B[888],[],[],N,"dp.cu.re.bt",L))){break ifs;}if((J=E(Q,P,B[889],[],[],N,"dp.cu.rf.bt",L))){break ifs;
-}if((J=E(Q,P,B[890],[],[],N,"dp.cu.rg.bt",L))){break ifs;}if((J=E(Q,P,B[891],[],[],N,"dp.cu.rh.bt",L))){break ifs;
-}if((J=E(Q,P,B[892],[],[],N,"dp.cu.ri.bt",L))){break ifs;}if((J=E(Q,P,B[893],[],[],N,"dp.cu.rj.bt",L))){break ifs;
-}if((J=E(Q,P,B[894],[],[],N,"dp.cu.rk.bt",L))){break ifs;}if((J=E(Q,P,B[895],[],[],N,"dp.cu.rl.bt",L))){break ifs;
-}if((J=E(Q,P,B[896],[],[],N,"dp.cu.rm.bt",L))){break ifs;}if((J=E(Q,P,B[897],[],[],N,"dp.cu.rn.bt",L))){break ifs;
-}if((J=E(Q,P,B[898],[],[],N,"dp.cu.ro.bt",L))){break ifs;}if((J=E(Q,P,B[899],[],[],N,"dp.cu.rp.bt",L))){break ifs;
-}if((J=E(Q,P,B[900],[],[],N,"dp.cu.rq.bt",L))){break ifs;}if((J=E(Q,P,B[901],[],[],N,"dp.cu.rr.bt",L))){break ifs;
-}if((J=E(Q,P,B[902],[],[],N,"dp.cu.rs.bt",L))){break ifs;}if((J=E(Q,P,B[903],[],[],N,"dp.cu.rt.bt",L))){break ifs;
-}if((J=E(Q,P,B[904],[],[],N,"dp.cu.ru.bt",L))){break ifs;}if((J=E(Q,P,B[905],[],[],N,"dp.cu.rv.bt",L))){break ifs;
-}if((J=E(Q,P,B[906],[],[],N,"dp.cu.rw.bt",L))){break ifs;}if((J=E(Q,P,B[907],[],[],N,"dp.cu.rx.bt",L))){break ifs;
-}if((J=E(Q,P,B[908],[],[],N,"dp.cu.ry.bt",L))){break ifs;}if((J=E(Q,P,B[909],[],[],N,"dp.cu.rz.bt",L))){break ifs;
-}if((J=E(Q,P,B[910],[],[],N,"dp.cu.sa.bt",L))){break ifs;}if((J=E(Q,P,B[911],[],[],N,"dp.cu.sb.bt",L))){break ifs;
-}if((J=E(Q,P,B[912],[],[],N,"dp.cu.sc.bt",L))){break ifs;}if((J=E(Q,P,B[913],[],[],N,"dp.cu.sd.bt",L))){break ifs;
-}if((J=E(Q,P,B[914],[],[],N,"dp.cu.se.bt",L))){break ifs;}if((J=E(Q,P,B[915],[],[],N,"dp.cu.sf.bt",L))){break ifs;
-}if((J=E(Q,P,B[916],[],[],N,"dp.cu.sg.bt",L))){break ifs;}if((J=E(Q,P,B[917],[],[],N,"dp.cu.sh.bt",L))){break ifs;
-}if((J=E(Q,P,B[918],[],[],N,"dp.cu.si.bt",L))){break ifs;}if((J=E(Q,P,B[919],[],[],N,"dp.cu.sj.bt",L))){break ifs;
-}if((J=E(Q,P,B[920],[],[],N,"dp.cu.sk.bt",L))){break ifs;}if((J=E(Q,P,B[921],[],[],N,"dp.cu.sl.bt",L))){break ifs;
-}if((J=E(Q,P,B[922],[],[],N,"dp.cu.sm.bt",L))){break ifs;}if((J=E(Q,P,B[923],[],[],N,"dp.cu.sn.bt",L))){break ifs;
-}if((J=E(Q,P,B[924],[],[],N,"dp.cu.so.bt",L))){break ifs;}if((J=E(Q,P,B[925],[],[],N,"dp.cu.sp.bt",L))){break ifs;
-}if((J=E(Q,P,B[926],[],[],N,"dp.cu.sq.bt",L))){break ifs;}if((J=E(Q,P,B[927],[],[],N,"dp.cu.sr.bt",L))){break ifs;
-}if((J=E(Q,P,B[928],[],[],N,"dp.cu.k.bt",L))){break ifs;}if((J=E(Q,P,B[929],[],[],N,"dp.cu.ss.bt",L))){break ifs;
-}if((J=E(Q,P,B[930],[],[],N,"dp.cu.st.bt",L))){break ifs;}if((J=E(Q,P,B[931],[],[],N,"dp.cu.su.bt",L))){break ifs;
-}if((J=E(Q,P,B[932],[],[],N,"dp.cu.sv.bt",L))){break ifs;}if((J=E(Q,P,B[933],[],[],N,"dp.cu.sw.bt",L))){break ifs;
-}if((J=E(Q,P,B[934],[],[],N,"dp.cu.u.bt",L))){break ifs;}if((J=E(Q,P,B[935],[],[],N,"dp.cu.sx.bt",L))){break ifs;
-}if((J=E(Q,P,B[936],[],[],N,"dp.cu.sy.bt",L))){break ifs;}if((J=E(Q,P,B[937],[],[],N,"dp.cu.cz.bt",L))){break ifs;
-}if((J=E(Q,P,B[938],[],[],N,"dp.cu.sz.bt",L))){break ifs;}if((J=E(Q,P,B[939],[],[],N,"dp.cu.ll.bt",L))){break ifs;
-}if((J=E(Q,P,B[940],[],[],N,"dp.cu.ta.bt",L))){break ifs;}if((J=E(Q,P,B[941],[],[],N,"dp.cu.tb.bt",L))){break ifs;
-}if((J=E(Q,P,B[942],[],[],N,"dp.cu.tc.bt",L))){break ifs;}if((J=E(Q,P,B[943],[],[],N,"dp.cu.td.bt",L))){break ifs;
-}if((J=E(Q,P,B[944],[],[],N,"dp.cu.te.bt",L))){break ifs;}if((J=E(Q,P,B[945],[],[],N,"dp.cu.tf.bt",L))){break ifs;
-}if((J=E(Q,P,B[946],[],[],N,"dp.cu.tg.bt",L))){break ifs;}if((J=E(Q,P,B[947],[],[],N,"dp.cu.v.bt",L))){break ifs;
-}if((J=E(Q,P,B[948],[],[],N,"dp.cu.th.bt",L))){break ifs;}if((J=E(Q,P,B[949],[],[],N,"dp.cu.ti.bt",L))){break ifs;
-}if((J=E(Q,P,B[950],[],[],N,"dp.cu.tj.bt",L))){break ifs;}if((J=E(Q,P,B[951],[],[],N,"dp.cu.tk.bt",L))){break ifs;
-}if((J=E(Q,P,B[952],[],[],N,"dp.cu.di.bt",L))){break ifs;}if((J=E(Q,P,B[953],[],[],N,"dp.fn.jg.bt",L))){break ifs;
-}if((J=E(Q,P,B[954],[],[],N,"dp.cu.il.bt",L))){break ifs;}}return J;}}),391:({scopes:"d.en.jf.tl.l",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[955],[],[],N,"d.en.jf.tl.l",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[388].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),191:({scopes:"k.l.tm.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[956],["k.l.tm.bp","h.i.k.bp"],[0,1,1,0],N,"",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),328:({scopes:"q.r.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[957],["h.i.q.ch"],[0,0],N,"q.r.ch",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),247:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[958],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[248].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),335:({scopes:"k.bq.f.gj.gi.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[959],["h.i.k.j.ch"],[0,0],N,"k.bq.f.gj.gi.ch",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),504:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[960],["h.i.e.g","w.x.e.gn.g"],[0,0,1,1],N,"",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[961],["h.i.q.m"],[0,0],N,"q.bu.ez.m",L))){break ifs;}if((J=E(Q,P,B[962],["h.i.q.m"],[0,0],N,"q.r.m",L))){M.push(503);
-O.push(" q.r.m");break ifs;}if((J=H[513].go(Q,P,K,M,O,L))){break ifs;}if((J=H[16].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),265:({scopes:"k.bq.f.bz.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[963],["h.i.k.j.bs"],[0,0],N,"k.bq.f.bz.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[262].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),414:({scopes:"d.co.cp.fo.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[964],["ce.cf.cr"],[0,0],N,"d.co.cp.fo.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[407].go(Q,P,K,M,O,L))){break ifs;}if((J=H[410].go(Q,P,K,M,O,L))){break ifs;}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),104:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[965],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[130].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),521:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[966],["bh.tn.bj.g","dp.cu.nd.tn"],[0,1,1,0],N,"",L))){M.push(520);O.push("");
-break ifs;}}return J;}}),393:({scopes:"n.f.lt.to.l",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[967],["h.i.lt.l"],[0,0],N,"n.f.lt.to.l",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[394].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[968],["n.o.p.tq.l","n.o.p.tq.l"],[0,0,1,1],N,"n.f.lt.tp.l",L))){break ifs;
-}}return J;}}),31:({scopes:"d.bj.g u.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[969],["h.bk.bj.j.bt","ce.dk.ca.bt","h.i.k.bt"],[0,1,1,2,2,0],N,"d.bj.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[494].go(Q,P,K,M,O,L))){break ifs;}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),322:({scopes:"k.bq.bx.es.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[970],["h.i.k.j.cd"],[0,0],N,"k.bq.bx.es.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[971],[],[],N,"n.o.p.tr.cd",L))){break ifs;}if((J=E(Q,P,B[972],[],[],N,"n.o.p.hh.cd",L))){break ifs;
-}if((J=E(Q,P,B[973],[],[],N,"n.o.p.hi.cd",L))){break ifs;}if((J=E(Q,P,B[974],[],[],N,"n.o.p.ts.cd",L))){break ifs;
-}}return J;}}),316:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[756],(P-1)))?B[975]:null),[],[],N,"ce.dk.tt.cd",L))){break ifs;
-}if((J=E(Q,P,B[976],[],[],N,"ce.dk.tu.cd",L))){break ifs;}if((J=E(Q,P,B[977],["ce.dk.gy.cd","h.i.gy.cd"],[0,0,1,1],N,"d.fa.gy.cd",L))){M.push(315);
-O.push(" d.fa.gy.cd");break ifs;}}return J;}}),133:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[978],["n.o.p.hi.cm","n.o.p.hh.cm","n.o.p.tv.cm","n.o.p.tw.cm","n.o.p.tx.cm","n.o.p.ty.cm","n.o.p.tz.cm","n.o.p.ua.cm","n.o.p.ub.cm","n.o.p.uc.cm","n.o.p.ud.cm","n.o.p.ue.cm","n.o.p.uf.cm"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12],N,"",L))){break ifs;
-}}return J;}}),416:({scopes:"d.co.cp.hx.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[979],["ce.cf.cr"],[0,0],N,"d.co.cp.hx.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[409].go(Q,P,K,M,O,L))){break ifs;}if((J=H[410].go(Q,P,K,M,O,L))){break ifs;}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),444:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[980],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[981],[],[],N,"",L))){M.push(442);
-O.push("");break ifs;}if((J=E(Q,P,B[982],[],[],N,"",L))){M.push(443);O.push("");break ifs;}}return J;
-}}),189:({scopes:"k.cn.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[983],["h.i.k.j.bp"],[0,0],N,"k.cn.bp",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[250].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),468:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[984],[],[],N,"ce.cf.ug.c",L))){break ifs;}if((J=E(Q,P,B[985],[],[],N,"ce.cf.c",L))){break ifs;
-}if((J=E(Q,P,B[986],[],[],N,"ce.cf.c",L))){break ifs;}if((J=E(Q,P,B[987],[],[],N,"ce.dk.c",L))){break ifs;
-}if((J=E(Q,P,B[988],[],[],N,"ce.dk.dm.c",L))){break ifs;}if((J=E(Q,P,B[989],[],[],N,"ce.dk.gh.c",L))){break ifs;
-}if((J=E(Q,P,B[990],[],[],N,"ce.dk.jq.c",L))){break ifs;}if((J=E(Q,P,B[991],[],[],N,"ce.dk.jr.c",L))){break ifs;
-}if((J=E(Q,P,B[992],[],[],N,"ce.dk.fe.c",L))){break ifs;}if((J=E(Q,P,(G(Q,A[769],(P-1))?B[993]:null),[],[],N,"ce.dk.hw.c",L))){break ifs;
-}if((J=E(Q,P,B[994],[],[],N,"h.hd.c",L))){break ifs;}}return J;}}),70:({scopes:"k.bq.bx.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[995],["n.o.p.bt"],[0,0],N,"k.bq.bx.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),231:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[996],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[232].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),388:({scopes:"bh.l.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[997],[],[],N,"ce.cf.uh.l",L))){break ifs;}if((J=E(Q,P,B[998],[],[],N,"ce.f.ui.l",L))){break ifs;
-}if((J=E(Q,P,B[999],[],[],N,"ce.dk.uj.l",L))){break ifs;}if((J=E(Q,P,B[1000],[],[],N,"ce.dk.uk.l",L))){break ifs;
-}if((J=E(Q,P,B[1001],[],[],N,"q.r.l",L))){M.push(389);O.push(" q.r.l");break ifs;}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[1002]:null),[],[],N,"q.bu.bv.l",L))){break ifs;
-}if((J=E(Q,P,B[1003],[],[],N,"ce.f.ul.l",L))){break ifs;}if((J=E(Q,P,B[1004],[],[],N,"ce.f.ui.um.l",L))){break ifs;
-}if((J=E(Q,P,B[1005],["h.i.en.l","h.i.en.jf.l","d.jf.un.l","d.jf.uo.l","d.jf.up.l","d.jf.uq.l"],[0,0,1,2,2,3,3,4,4,5,5,1],N,"d.en.jf.l",L))){M.push(390);
-O.push(" d.en.jf.l");break ifs;}if((J=E(Q,P,B[1006],["h.i.en.l","h.i.en.jf.tl.l","w.x.bk.ui.l"],[0,0,1,2,2,1],N,"d.en.jf.tl.l",L))){M.push(391);
-O.push(" d.en.jf.tl.l");break ifs;}if((J=E(Q,P,B[1007],["h.i.en.l","h.i.en.ur.l","w.x.bk.en.l","h.i.en.ur.l","h.i.en.us.l"],[0,0,1,1,2,2,3,3,4,4],N,"d.en.l",L))){M.push(392);
-O.push(" d.en.l");break ifs;}if((J=H[394].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),323:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1008],[],[],N,"n.o.p.cd",L))){break ifs;}if((J=E(Q,P,B[1009],["h.i.k.bl.cd"],[0,0],N,"k.bq.bx.cd",L))){M.push(320);
-O.push(" k.bq.bx.cd");break ifs;}if((J=E(Q,P,B[1010],["h.i.k.bl.cd"],[0,0],N,"k.bq.br.cd",L))){M.push(321);
-O.push(" k.bq.br.cd");break ifs;}if((J=E(Q,P,B[1011],["h.i.k.bl.cd"],[0,0],N,"k.bq.bx.es.cd",L))){M.push(322);
-O.push(" k.bq.bx.es.cd");break ifs;}}return J;}}),93:({scopes:"d.fn.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1012],["h.i.ht.bl.cm","be.bf.ut.cm"],[0,0,1,1],N,"d.fn.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[1013],[],[],N,"",L))){M.push(92);O.push(" w.x.cz.fn.cm");break ifs;
-}}return J;}}),212:({scopes:"k.bm.bj.g.bp u.g.bj.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1014],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.g.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[494].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),466:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1015],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[1016],["n.f.jj.c"],[0,0],N,"d.jj.c",L))){M.push(465);
-O.push(" d.jj.c");break ifs;}}return J;}}),72:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1017],["h.i.k.bl.bt"],[0,0],N,"k.bq.bx.bs.bt",L))){M.push(71);O.push(" k.bq.bx.bs.bt bh.bs.bj.bt");
-break ifs;}}return J;}}),520:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1018],["bh.tn.bj.g","dp.cu.nd.tn"],[0,1,1,0],N,"",(function(){(L&&L());
-M.pop();O.pop();})))){}}return J;}}),394:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1019],[],[],N,"n.o.lt.l",L))){break ifs;}if((J=E(Q,P,B[1020],[],[],N,"n.o.p.tq.l",L))){break ifs;
-}if((J=E(Q,P,B[1021],["h.i.lt.l","ce.dk.uu.l"],[0,0,1,1],N,"n.f.lt.to.l",L))){M.push(393);O.push(" n.f.lt.to.l");
-break ifs;}}return J;}}),180:({scopes:"d.cu.ki.kj.bp dw.gg.cu.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1022],[],[],N,"d.cu.ki.kj.bp",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),11:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1023],["h.i.q.ey"],[0,0],N,"q.r.ey",L))){M.push(10);O.push(" q.r.ey");
-break ifs;}}return J;}}),384:({scopes:"d.ib.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[125],(P-1))?B[1024]:B[1025]),[],[],N,"d.ib.ee",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[375].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1026],["h.i.bo.ee"],[0,0],N,"",L))){M.push(383);
-O.push("");break ifs;}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),210:({scopes:"u.uv",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1027],["k.bm.uw.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[1028],[],[],N,"u.g.bj.bp",L))){M.push(209);O.push(" u.g.bj.bp");break ifs;}}return J;
-}}),294:({scopes:"k.bm.ca.cc.cd u.g.cc.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1029],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cc.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if(false){break ifs;}}return J;}}),327:({scopes:"bh.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[359].go(Q,P,K,M,O,L))){break ifs;}if((J=H[351].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[365].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1030],["h.i.q.ch"],[0,0],N,"q.r.ch",L))){M.push(328);
-O.push(" q.r.ch");break ifs;}if((J=E(Q,P,B[1031],[],[],N,"be.bf.ux.ch",L))){break ifs;}if((J=E(Q,P,B[1032],["h.i.q.ch"],[0,0],N,"q.bu.ez.ee",L))){M.push(329);
-O.push(" q.bu.ez.ee");break ifs;}if((J=E(Q,P,B[1033],[],[],N,"ce.cf.ch",L))){break ifs;}if((J=E(Q,P,B[1034],[],[],N,"a.cz.ch",L))){break ifs;
-}if((J=E(Q,P,B[1035],[],[],N,"a.b.ch",L))){break ifs;}if((J=E(Q,P,B[1036],[],[],N,"n.f.dw.uy.ch",L))){break ifs;
-}if((J=E(Q,P,B[1037],[],[],N,"dw.f.ku.hq.uy.ch",L))){break ifs;}if((J=E(Q,P,B[1038],[],[],N,"dw.f.ku.jn.uy.ch",L))){break ifs;
-}if((J=E(Q,P,B[1039],[],[],N,"n.im.ch",L))){break ifs;}if((J=H[368].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1040],[],[],N,"n.da.ch",L))){break ifs;
-}if((J=E(Q,P,B[1041],["h.i.k.bl.ch"],[0,0],N,"k.bq.br.ch",L))){M.push(330);O.push(" k.bq.br.ch");break ifs;
-}if((J=E(Q,P,B[1042],["h.i.k.bl.ch"],[0,0],N,"k.bq.bx.ch",L))){M.push(331);O.push(" k.bq.bx.ch");break ifs;
-}if((J=E(Q,P,B[1043],["ce.cf.ci.uz.ch","w.x.cu.s.ch","h.i.ef.ch","dw.gg.s.ch","h.bc.ef.ch","h.i.ef.ch"],[0,0,1,1,2,2,3,4,4,3,5,5],N,"d.s.jt.ch",L))){M.push(332);
-O.push(" d.s.jt.ch");break ifs;}if((J=E(Q,P,B[1044],["ce.cf.ci.va.ch"],[0,0],N,"d.s.nq.ch",L))){M.push(333);
-O.push(" d.s.nq.ch");break ifs;}if((J=E(Q,P,B[1045],["ce.cf.ci.gi.ch"],[0,0],N,"d.s.ch.gi",L))){M.push(336);
-O.push(" d.s.ch.gi");break ifs;}if((J=H[347].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1046],["ce.cf.ci.ch"],[0,0],N,"d.s.ch",L))){M.push(337);
-O.push(" d.s.ch");break ifs;}if((J=E(Q,P,B[1047],[],[],N,"dp.cz.vb.ch",L))){break ifs;}if((J=E(Q,P,B[1048],[],[],N,"dp.cz.vc.ch",L))){break ifs;
-}if((J=E(Q,P,B[1049],[],[],N,"dp.cz.vd.ch",L))){break ifs;}if((J=E(Q,P,B[1050],[],[],N,"dp.n.uy.ch",L))){break ifs;
-}if((J=E(Q,P,B[1051],[],[],N,"dp.cz.uy.ch",L))){break ifs;}if((J=H[341].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,((!((G(Q,A[812],(P-3))||G(Q,A[813],(P-4)))||G(Q,A[496],(P-6))))?(G(Q,A[814],(P-1))?((!G(Q,A[815],(P-2)))?(G(Q,A[816],(P-1))?B[1052]:B[1053]):B[1054]):((!G(Q,A[815],(P-2)))?(G(Q,A[816],(P-1))?B[1055]:B[1056]):B[1057])):((!G(Q,A[815],(P-2)))?(G(Q,A[816],(P-1))?B[1058]:B[1059]):B[1060])),["h.if.cu.ig.ch","w.x.cu.ch"],[0,0,1,1],N,"d.cu.ch",L))){M.push(338);
-O.push(" d.cu.ch");break ifs;}}return J;}}),153:({scopes:"k.bq.br.fi.gm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[1061]:B[1062]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.gm.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),178:({scopes:"d.ve.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1063],[],[],N,"d.ve.bp",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),9:({scopes:"d.ka.ey",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1064],["h.bk.ka.ey"],[0,0],N,"d.ka.ey",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[11].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,((!G(Q,A[821],(P-1)))?B[1065]:null),[],[],N,"d.jh.ey",L))){M.push(6);
-O.push(" d.jh.ey");break ifs;}if((J=E(Q,P,B[1066],["h.bc.gc.ey"],[0,0],N,"d.kw.ey",L))){M.push(8);O.push(" d.kw.ey");
-break ifs;}}return J;}}),283:({scopes:"k.bm.ca.cb.bp.cd bh.bp.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1067],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.bp.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),296:({scopes:"k.bm.ca.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1068],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}}return J;}}),151:({scopes:"k.bq.br.fi.fj.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[1069]:B[1070]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.fj.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),76:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1071],["h.i.k.bl.bt"],[0,0],N,"k.bq.br.bt",L))){M.push(75);O.push(" k.bq.br.bt d.ha.bq.br.bt");
-break ifs;}}return J;}}),454:({scopes:"d.fn.iw.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1072],[],[],N,"d.fn.iw.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[457].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),23:({scopes:"bh.bt.bj.r.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1073],["h.bk.bj.j.bt","bh.bt"],[0,1,1,0],N,"bh.bt.bj.r.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[47].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),233:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1074],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[234].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),285:({scopes:"k.bm.ca.cb.cm.cd bh.cm.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1075],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.cm.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),477:({scopes:"a.cz.hv.ev.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1076],[],[],N,"a.cz.hv.ev.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[1077],[],[],N,"",L))){M.push(476);
-O.push("");break ifs;}}return J;}}),530:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1078],["w.f.km.iz.g","h.bc.gc.g"],[0,0,1,1],N,"d.iy.iz.g",L))){M.push(529);
-O.push(" d.iy.iz.g");break ifs;}}return J;}}),337:({scopes:"d.s.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1079],[],[],N,"d.s.ch",(function(){(L&&L());M.pop();O.pop();})))){}if((J=E(Q,P,B[1080],[],[],N,"h.bc.ek.ch",L))){break ifs;
-}}return J;}}),221:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1081],["h.bc.dw.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[1082],[],[],N,"dw.f.r.bp",L))){break ifs;}if((J=E(Q,P,B[1083],[],[],N,"h.bc.dw.bp",L))){break ifs;
-}}return J;}}),273:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1084],[],[],N,"d.bo.hc.cd",L))){M.push(272);O.push(" d.bo.hc.cd");break ifs;
-}}return J;}}),287:({scopes:"k.bm.ca.cb.cr.cd bh.cr.bj.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1085],["h.i.k.cd","ce.cf.cg.cd"],[0,1,1,0],N,"k.bm.ca.cb.cr.cd",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),331:({scopes:"k.bq.bx.ch",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1086],["h.i.k.j.ch"],[0,0],N,"k.bq.bx.ch",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[369].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),342:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[363].go(Q,P,K,M,O,L))){break ifs;}if((J=H[355].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[367].go(Q,P,K,M,O,L))){break ifs;}if((J=H[368].go(Q,P,K,M,O,L))){break ifs;}if((J=H[339].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[1087],["h.if.dp.cu.ig.ch","dp.cu.vf.ch"],[0,0,1,1],N,"",L))){break ifs;}if((J=E(Q,P,(((G(Q,A[812],(P-3))||G(Q,A[813],(P-4)))||G(Q,A[496],(P-6)))?((!G(Q,A[814],(P-1)))?B[1088]:B[1089]):((!G(Q,A[814],(P-1)))?B[1090]:B[1091])),["h.if.eq.ig.ch","dp.cu.er.ch","h.i.ef.ch"],[0,0,1,1,2,2],N,"d.eq.ch",L))){break ifs;
-}if((J=E(Q,P,((!((G(Q,A[812],(P-3))||G(Q,A[813],(P-4)))||G(Q,A[496],(P-6))))?(G(Q,A[814],(P-1))?B[1092]:null):null),["dw.f.ch","h.i.ef.ch"],[0,0,1,1],N,"d.vg.ch",L))){break ifs;
-}if((J=H[341].go(Q,P,K,M,O,L))){break ifs;}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),506:({scopes:"d.e.fa.gv.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1093],["h.i.e.g"],[0,0],N,"d.e.fa.gv.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[531].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),460:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1094],["h.i.q.c"],[0,0],N,"q.r.ih.c",L))){break ifs;}if(false){break ifs;
-}if((J=H[462].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),19:({scopes:"q.r.gk.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1095],["h.i.q.m"],[0,0],N,"q.r.gk.m",(function(){(L&&L());M.pop();O.pop();
-})))){}}return J;}}),29:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1096],["h.i.dw.bt"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[27].go(Q,P,K,M,O,L))){break ifs;}if((J=H[82].go(Q,P,K,M,O,L))){break ifs;}if((J=H[49].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[48].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1097],[],[],N,"ce.dk.hk.bt",L))){break ifs;}if((J=E(Q,P,B[1098],[],[],N,"ce.dk.hn.bt",L))){break ifs;
-}}return J;}}),46:({scopes:"k.bm.ca.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1099],["ce.dk.ca.bt","h.i.k.bt"],[0,0,1,1],N,"k.bm.ca.bt",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),367:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1100],["d.s.ch","ce.cf.ci.ch"],[0,1,1,0],N,"",L))){M.push(366);O.push("");
-break ifs;}}return J;}}),481:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1101],[],[],N,"w.f.fh.c",L))){M.push(480);O.push(" w.f.fh.c");break ifs;
-}if((J=E(Q,P,B[1102],["ce.dk.hw.c"],[0,0],N,"w.f.fh.c",L))){break ifs;}}return J;}}),458:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1103],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),172:({scopes:"k.bq.bx.r.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[1104]:B[1105]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),99:({scopes:"d.cu.fy.ef.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1106],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[139].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[1107],["dw.gg.cu.cm","h.bc.ef.cm"],[0,0,1,1],N,"",L))){break ifs;}}return J;}}),158:({scopes:"k.bq.br.fi.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[148],(P-1))?B[1108]:B[1109]),["h.i.k.j.cm","d.ep.br.cm","be.bf.fk.cm"],[0,1,1,0,2,2],N,"k.bq.br.fi.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),86:({scopes:"bh.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1110],["h.i.q.cm"],[0,0],N,"q.bu.bv.cm",L))){break ifs;}if((J=E(Q,P,B[1111],[],[],N,"n.da.md.vh.vi.cm",L))){break ifs;
-}if((J=E(Q,P,B[1112],[],[],N,"n.da.md.vi.cm",L))){break ifs;}if((J=E(Q,P,B[1113],[],[],N,"n.da.md.vh.hh.cm",L))){break ifs;
-}if((J=E(Q,P,B[1114],[],[],N,"n.da.md.hh.cm",L))){break ifs;}if((J=E(Q,P,(G(Q,A[850],(P-1))?B[1115]:B[1116]),[],[],N,"n.da.vj.cm",L))){break ifs;
-}if((J=E(Q,P,B[1117],[],[],N,"n.da.vk.cm",L))){break ifs;}if((J=E(Q,P,(G(Q,A[854],(P-1))?B[1118]:null),[],[],N,"n.da.vk.cm",L))){break ifs;
-}if((J=E(Q,P,B[1119],[],[],N,"n.da.vk.cm",L))){break ifs;}if((J=E(Q,P,B[1120],[],[],N,"n.da.md.vh.vl.cm",L))){break ifs;
-}if((J=E(Q,P,B[1121],[],[],N,"n.da.md.vl.cm",L))){break ifs;}if((J=E(Q,P,B[1122],["a.b.hq.cm"],[0,0],N,"",L))){break ifs;
-}if((J=E(Q,P,B[1123],["ce.cf.ci.cm","ce.cf.ci.vm.cm"],[0,0,1,1],N,"",L))){break ifs;}if((J=E(Q,P,B[1124],[],[],N,"ce.cf.vn.cm",L))){break ifs;
-}if((J=E(Q,P,B[1125],[],[],N,"ce.cf.vn.cm",L))){break ifs;}if((J=E(Q,P,B[1126],[],[],N,"ce.dk.fe.cm",L))){break ifs;
-}if((J=E(Q,P,B[1127],["ce.f.cm"],[0,0],N,"",L))){break ifs;}if((J=E(Q,P,B[1128],[],[],N,"ce.dk.dm.cm",L))){break ifs;
-}if((J=E(Q,P,B[1129],[],[],N,"ce.dk.gh.vo.cm",L))){break ifs;}if((J=E(Q,P,B[1130],[],[],N,"ce.dk.jr.cm",L))){break ifs;
-}if((J=E(Q,P,B[1131],[],[],N,"ce.dk.gh.cm",L))){break ifs;}if((J=E(Q,P,B[1132],["a.cz.fn.cm"],[0,0],N,"d.fn.nf.cm",L))){M.push(87);
-O.push(" d.fn.nf.cm w.x.cz.fn.cm");break ifs;}if((J=E(Q,P,B[1133],["a.cz.fn.cm"],[0,0],N,"d.fn.cm",L))){M.push(91);
-O.push(" d.fn.cm");break ifs;}if((J=E(Q,P,B[1134],["a.cz.fn.cm"],[0,0],N,"d.fn.cm",L))){M.push(93);O.push(" d.fn.cm");
-break ifs;}if((J=E(Q,P,B[1135],["a.cz.cu.cm"],[0,0],N,"d.cu.cm",L))){M.push(96);O.push(" d.cu.cm");break ifs;
-}if((J=E(Q,P,B[1136],["a.cz.cu.cm"],[0,0],N,"d.cu.cm",L))){M.push(98);O.push(" d.cu.cm");break ifs;}if((J=E(Q,P,B[1137],["a.cz.cu.fy.cm"],[0,0],N,"d.cu.fy.cm",L))){M.push(100);
-O.push(" d.cu.fy.cm");break ifs;}if((J=E(Q,P,B[1138],[],[],N,"d.cu.fm.cm",L))){M.push(103);O.push(" d.cu.fm.cm");
-break ifs;}if((J=E(Q,P,B[1139],[],[],N,"d.cu.fm.cm",L))){M.push(105);O.push(" d.cu.fm.cm w.x.cu.fm.cm");
-break ifs;}if((J=E(Q,P,(G(Q,A[419],(P-1))?B[1140]:null),["h.i.hu.bl.cm"],[0,0],N,"d.eq.cm",L))){M.push(106);
-O.push(" d.eq.cm d.eq.hu.cm");break ifs;}if((J=E(Q,P,B[1141],[],[],N,"d.eq.cm",L))){M.push(109);O.push(" d.eq.cm");
-break ifs;}if((J=E(Q,P,B[1142],[],[],N,"d.lm.cm",L))){M.push(112);O.push(" d.lm.cm");break ifs;}if((J=E(Q,P,(G(Q,A[419],(P-1))?B[1143]:null),["h.i.hu.bl.cm"],[0,0],N,"d.lm.cm",L))){M.push(113);
-O.push(" d.lm.cm d.lm.hu.cm");break ifs;}if((J=E(Q,P,B[1144],["a.cz.cu.cm"],[0,0],N,"",L))){break ifs;
-}if((J=E(Q,P,B[1145],["a.cz.fn.cm"],[0,0],N,"",L))){break ifs;}if((J=H[141].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[140].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1146],[],[],N,"n.im.cm",L))){break ifs;}if((J=H[174].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[159].go(Q,P,K,M,O,L))){break ifs;}if((J=H[130].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1147],[],[],N,"",L))){M.push(114);
-O.push("");break ifs;}if((J=E(Q,P,B[1148],["h.i.lh.bl.cm","d.vp.cm","h.i.lh.j.cm"],[0,0,1,2,2,1],N,"",L))){break ifs;
-}if((J=E(Q,P,B[1149],["h.i.lh.bl.cm"],[0,0],N,"d.fa.lh.cm",L))){M.push(116);O.push(" d.fa.lh.cm");break ifs;
-}if((J=E(Q,P,B[1150],["h.i.vq.bl.cm","d.vr.cm","h.i.vq.j.cm"],[0,0,1,2,2,1],N,"d.fa.vq.cm",L))){break ifs;
-}if((J=E(Q,P,B[1151],["h.i.fb.bl.cm","d.vs.cm","h.i.fb.j.cm"],[0,0,1,2,2,1],N,"d.fa.fb.cm",L))){break ifs;
-}if((J=E(Q,P,B[1152],["h.i.fb.bl.cm"],[0,0],N,"d.fa.fb.cm",L))){M.push(119);O.push(" d.fa.fb.cm");break ifs;
-}}return J;}}),430:({scopes:"bh.bi.bj.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1153],["h.bk.bj.j.v"],[0,0],N,"bh.bi.bj.v",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1154],[],[],N,"ce.f.vt.v",L))){break ifs;}}return J;}}),281:({scopes:"d.cu.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1155],["h.i.cu.cd"],[0,0],N,"d.cu.cd",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),373:({scopes:"d.cu.kt.mg.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1156],["h.i.ef.ch"],[0,0],N,"d.cu.kt.mg.ee",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),80:({scopes:"d.ev.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1157],["h.i.ev.j.bt"],[0,0],N,"d.ev.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[47].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),225:({scopes:"bh.bp.bj.bh",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1158],["h.bk.bj.bp"],[0,0],N,"bh.bp.bj.bh",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[236].go(Q,P,K,M,O,L))){break ifs;}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),409:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1159],[],[],N,"dp.fn.hx.cr",L))){break ifs;}if((J=E(Q,P,B[1160],[],[],N,"dp.cu.hx.cr",L))){break ifs;
-}if((J=E(Q,P,B[1161],[],[],N,"dp.n.hx.cr",L))){break ifs;}if((J=E(Q,P,B[1162],[],[],N,"dp.dw.hx.cr",L))){break ifs;
-}}return J;}}),117:({scopes:"d.fa.fb.ga.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1163],["h.bc.vu.fb.cm"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),277:({scopes:"d.bo.vv.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1164],["h.i.vv.cd"],[0,0],N,"d.bo.vv.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),74:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1165],["h.i.k.bl.bt"],[0,0],N,"k.cn.bt",L))){M.push(73);O.push(" k.cn.bt");
-break ifs;}}return J;}}),432:({scopes:"k.bm.bn.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1166],["h.i.k.j.v"],[0,0],N,"k.bm.bn.v",(function(){(L&&L());M.pop();
-O.pop();})))){}}return J;}}),170:({scopes:"k.bq.bx.r.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[1167]:B[1168]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),160:({scopes:"k.bq.bx.r.hb.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[1169]:B[1170]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.hb.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),319:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1171],["h.i.k.bl.cd"],[0,0],N,"k.cn.hz.cd",L))){M.push(318);O.push(" k.cn.hz.cd");
-break ifs;}if((J=E(Q,P,B[1172],[],[],N,"ce.dk.vw.cd",L))){break ifs;}}return J;}}),456:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1173],[],[],N,"d.fn.c",L))){M.push(455);O.push(" d.fn.c");break ifs;
-}}return J;}}),97:({scopes:"w.x.cu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1174],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[132].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),88:({scopes:"w.x.cz.fn.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1175],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[131].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),33:({scopes:"d.bj.bs bh.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1176],["h.bk.bj.j.bt","ce.dk.ca.bt","h.i.k.bt"],[0,1,1,2,2,0],N,"d.bj.bs",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[256].go(Q,P,K,M,O,L))){break ifs;}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),258:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1177],["h.i.q.bs"],[0,0],N,"q.bu.bw.bs",L))){break ifs;}if((J=E(Q,P,B[1178],["h.i.q.bs"],[0,0],N,"q.bu.bv.bs",L))){break ifs;
-}if((J=E(Q,P,B[1179],["h.i.q.bs"],[0,0],N,"q.r.ch",L))){M.push(257);O.push(" q.r.ch");break ifs;}}return J;
-}}),344:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1180],[],[],N,"",L))){M.push(343);O.push("");break ifs;}}return J;}}),386:({scopes:"d.ic.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[125],(P-1))?B[1181]:B[1182]),[],[],N,"d.ic.ee",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[1183],[],[],N,"",L))){M.push(385);O.push("");break ifs;}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),462:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1184],["h.i.q.c"],[0,0],N,"q.r.c",L))){M.push(461);O.push(" q.r.c");
-break ifs;}if((J=E(Q,P,B[1185],["q.bu.ez.c","h.i.q.c"],[0,1,1,0],N,"",L))){break ifs;}}return J;}}),317:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1186],[],[],N,"ce.f.cd",L))){break ifs;}if((J=E(Q,P,B[1187],[],[],N,"ce.dk.vx.cd",L))){break ifs;
-}}return J;}}),48:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1188],[],[],N,"n.da.bt",L))){break ifs;}}return J;}}),54:({scopes:"k.l.ke.bt",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1189],["h.i.k.j.bt"],[0,0],N,"k.l.ke.bt",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1190],[],[],N,"n.o.p.ls.bt",L))){break ifs;}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[1191],["h.i.lr.bt","h.i.lr.bt"],[0,0,1,1],N,"k.l.lr.bt",L))){break ifs;}if((J=E(Q,P,B[1192],["h.i.lt.bt"],[0,0],N,"k.l.lt.bt",L))){M.push(53);
-O.push(" k.l.lt.bt");break ifs;}if((J=E(Q,P,B[1193],[],[],N,"ce.dk.l.bt",L))){break ifs;}}return J;}}),206:({scopes:"k.bq.f.ei.em.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1194],["h.i.k.j.bp"],[0,0],N,"k.bq.f.ei.em.bp",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[1195],[],[],N,"n.o.p.bp",L))){break ifs;}if((J=H[234].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),486:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1196],[],[],N,"a.cz.ji.c",L))){break ifs;}}return J;}}),164:({scopes:"k.bq.bx.r.ff.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[1197]:B[1198]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.ff.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[134].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),471:({scopes:"d.ki.iw.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1199],[],[],N,"d.ki.iw.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),451:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1200],["ce.cf.ly.c"],[0,0],N,"d.gd.jf.c",L))){M.push(450);O.push(" d.gd.jf.c");
-break ifs;}}return J;}}),374:({scopes:"d.ne.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1201],[],[],N,"d.ne.ee",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[375].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),215:({scopes:"k.bm.ca.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1202],["h.i.k.j.bp"],[0,0],N,"k.bm.ca.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),515:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1203],[],[],N,"bh.cm.bj.g",L))){M.push(514);O.push(" bh.cm.bj.g");break ifs;
-}}return J;}}),60:({scopes:"k.bq.f.bz.by.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1204],[],[],N,"k.bq.f.bz.by.bs",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[1205],[],[],N,"n.o.p.bt",L))){break ifs;}}return J;}}),279:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1206],["h.i.ie.cd"],[0,0],N,"d.bo.ie.cd",L))){M.push(275);O.push(" d.bo.ie.cd");
-break ifs;}if((J=E(Q,P,B[1207],["h.i.k.bl.cd"],[0,0],N,"k.f.dn.cd",L))){M.push(276);O.push(" k.f.dn.cd");
-break ifs;}if((J=E(Q,P,B[1208],["h.i.vv.cd"],[0,0],N,"d.bo.vv.cd",L))){M.push(277);O.push(" d.bo.vv.cd");
-break ifs;}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[1209]:null),["h.i.en.cd"],[0,0],N,"d.bo.en.cd",L))){M.push(278);
-O.push(" d.bo.en.cd");break ifs;}}return J;}}),436:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1210],["h.i.k.bl.v"],[0,0],N,"k.bq.bx.v",L))){M.push(435);O.push(" k.bq.bx.v");
-break ifs;}}return J;}}),217:({scopes:"k.bm.bj.vy.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1211],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.vy.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[371].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),27:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1212],[],[],N,"d.eq.bt",L))){break ifs;}}return J;}}),473:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1213],[],[],N,"d.ki.c",L))){M.push(472);O.push(" d.ki.c");break ifs;
-}}return J;}}),405:({scopes:"k.bq.br.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1214],["h.i.k.cr"],[0,0],N,"k.bq.br.cr",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1215],[],[],N,"n.o.p.cr",L))){break ifs;}}return J;}}),58:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1216],["h.i.k.bl.bt"],[0,0],N,"k.l.kk.bt",L))){M.push(57);O.push(" k.l.kk.bt");
-break ifs;}}return J;}}),397:({scopes:"d.cu.gp.cr",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1217],["ce.cf.gq.cr","w.x.cu.gr.cr"],[0,0,1,1],N,"d.cu.gp.cr",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[395].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),237:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1218],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[238].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),365:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1219],["d.s.ch","ce.cf.ci.ch"],[0,1,1,0],N,"",L))){M.push(364);O.push("");
-break ifs;}}return J;}}),526:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1220],[],[],N,"w.f.km.g",L))){break ifs;}}return J;}}),25:({scopes:"bh.bt.bj.bu.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1221],["h.bk.bj.j.bt","bh.bt"],[0,1,1,0],N,"bh.bt.bj.bu.g",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[47].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),235:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1222],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[236].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),325:({scopes:"dw.f.je.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1223],["h.i.dw.cd"],[0,0],N,"dw.f.je.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1224],[],[],N,"ce.dk.vz.cd",L))){break ifs;}if((J=E(Q,P,B[1225],["h.bk.ev.cd","h.bk.ev.cd"],[0,0,1,1],N,"",L))){break ifs;
-}}return J;}}),109:({scopes:"d.eq.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1226],["h.i.hu.j.cm"],[0,0],N,"d.eq.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1227],[],[],N,"",L))){M.push(107);O.push("");break ifs;}if((J=E(Q,P,B[1228],["h.i.hu.bl.cm"],[0,0],N,"",L))){M.push(108);
-O.push(" d.eq.hu.cm");break ifs;}}return J;}}),491:({scopes:"d.mx.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1229],[],[],N,"d.mx.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),411:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1230],[],[],N,"dp.fn.wa.wb.cr",L))){break ifs;}if((J=E(Q,P,B[1231],[],[],N,"dp.fn.wa.pa.cr",L))){break ifs;
-}if((J=E(Q,P,B[1232],[],[],N,"dp.fn.wa.nc.cr",L))){break ifs;}if((J=E(Q,P,B[1233],[],[],N,"dp.fn.wa.wc.cr",L))){break ifs;
-}if((J=E(Q,P,B[1234],[],[],N,"dp.cu.wa.pa.cr",L))){break ifs;}if((J=E(Q,P,B[1235],[],[],N,"dp.cu.wa.wb.cr",L))){break ifs;
-}if((J=E(Q,P,B[1236],[],[],N,"dp.cu.wa.k.cr",L))){break ifs;}if((J=E(Q,P,B[1237],[],[],N,"dp.cu.wa.wd.cr",L))){break ifs;
-}if((J=E(Q,P,B[1238],[],[],N,"dp.cu.wa.we.cr",L))){break ifs;}if((J=E(Q,P,B[1239],[],[],N,"dp.cu.wa.wf.cr",L))){break ifs;
-}if((J=E(Q,P,B[1240],[],[],N,"dp.cu.wa.nc.cr",L))){break ifs;}if((J=E(Q,P,B[1241],[],[],N,"dp.cu.wa.jw.cr",L))){break ifs;
-}if((J=E(Q,P,B[1242],[],[],N,"dp.cu.wa.wc.cr",L))){break ifs;}}return J;}}),464:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1243],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[457].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),115:({scopes:"d.fa.lh.li.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1244],["h.bc.lh.cm"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),137:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1245],[],[],N,"be.bf.x.cm",L))){break ifs;}}return J;}}),227:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1246],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[228].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),361:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1247],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[342].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),62:({scopes:"k.bq.br.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1248],["n.o.p.bt"],[0,0],N,"k.bq.br.bs",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),111:({scopes:"d.lm.hu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1249],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),135:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[142].go(Q,P,K,M,O,L))){break ifs;}if((J=H[143].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[120].go(Q,P,K,M,O,L))){break ifs;}if((J=H[121].go(Q,P,K,M,O,L))){break ifs;}if((J=H[122].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[136].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),7:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1250],["h.bk.cu.ey"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[15].go(Q,P,K,M,O,L))){break ifs;}if((J=H[13].go(Q,P,K,M,O,L))){break ifs;}if((J=E(Q,P,B[1251],[],[],N,"n.f.kz.le.ey",L))){break ifs;
-}if((J=E(Q,P,B[1252],[],[],N,"n.f.kz.wg.ey",L))){break ifs;}if((J=E(Q,P,B[1253],[],[],N,"dw.gg.lf.ey",L))){break ifs;
-}}return J;}}),434:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1254],["h.i.k.bl.v"],[0,0],N,"k.bq.br.v",L))){M.push(433);O.push(" k.bq.br.v");
-break ifs;}}return J;}}),113:({scopes:"d.lm.cm d.lm.hu.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1255],["h.i.hu.j.cm"],[0,0],N,"d.lm.cm",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[86].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),245:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1256],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[246].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),13:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1257],["h.i.k.bl.ey"],[0,0],N,"k.bq.br.ey",L))){M.push(12);O.push(" k.bq.br.ey");
-break ifs;}}return J;}}),300:({scopes:"k.cn.bz.cd",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1258],["h.i.k.j.cd"],[0,0],N,"k.cn.bz.cd",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1259],[],[],N,"n.o.p.cd",L))){break ifs;}if((J=H[269].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),223:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1260],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[176].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),239:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1261],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[255].go(Q,P,K,M,O,L))){break ifs;}if((J=H[240].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),428:({scopes:"d.e.ba.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1262],["h.i.e.v","d.bo.gw.v","w.x.e.bb.v","w.x.e.v","h.bc.bb.v","w.x.e.bd.v","h.i.e.v"],[0,1,1,0,2,2,3,4,4,3,5,5,6,6],N,"d.e.ba.v",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[437].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),528:({scopes:"k.bq.bx.g d.ja.iz.g",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1263],["h.i.k.j.g"],[0,0],N,"k.bq.bx.g",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;}if((J=H[511].go(Q,P,K,M,O,L))){break ifs;}}return J;
-}}),501:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1264],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[510].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[1].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),174:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,((!G(Q,A[943],(P-1)))?B[1265]:null),["h.i.k.bl.cm","h.i.k.j.cm","d.ep.bx.cm"],[0,0,1,2,2,1],N,"k.bq.bx.fi.cm",L))){break ifs;
-}if((J=E(Q,P,B[1266],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.r.hb.cm",L))){M.push(160);O.push(" k.bq.bx.r.hb.cm");
-break ifs;}if((J=E(Q,P,B[1267],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.r.fj.cm",L))){M.push(161);
-O.push(" k.bq.bx.r.fj.cm");break ifs;}if((J=E(Q,P,B[1268],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.r.eo.cm",L))){M.push(162);
-O.push(" k.bq.bx.r.eo.cm");break ifs;}if((J=E(Q,P,B[1269],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.r.gm.cm",L))){M.push(163);
-O.push(" k.bq.bx.r.gm.cm");break ifs;}if((J=E(Q,P,B[1270],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.r.ff.cm",L))){M.push(164);
-O.push(" k.bq.bx.r.ff.cm");break ifs;}if((J=E(Q,P,B[1271],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.fi.hb.cm",L))){M.push(165);
-O.push(" k.bq.bx.fi.hb.cm");break ifs;}if((J=E(Q,P,B[1272],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.fi.fj.cm",L))){M.push(166);
-O.push(" k.bq.bx.fi.fj.cm");break ifs;}if((J=E(Q,P,B[1273],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.fi.eo.cm",L))){M.push(167);
-O.push(" k.bq.bx.fi.eo.cm");break ifs;}if((J=E(Q,P,B[1274],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.fi.gm.cm",L))){M.push(168);
-O.push(" k.bq.bx.fi.gm.cm");break ifs;}if((J=E(Q,P,B[1275],["a.cz.k.cm","h.i.k.bl.cm"],[0,0,1,1],N,"k.bq.bx.fi.ff.cm",L))){M.push(169);
-O.push(" k.bq.bx.fi.ff.cm");break ifs;}if((J=E(Q,P,B[1276],["h.i.k.bl.cm"],[0,0],N,"k.bq.bx.r.cm",L))){M.push(170);
-O.push(" k.bq.bx.r.cm");break ifs;}if((J=E(Q,P,B[1277],["h.i.k.bl.cm"],[0,0],N,"k.bq.bx.fi.cm",L))){M.push(171);
-O.push(" k.bq.bx.fi.cm");break ifs;}if((J=E(Q,P,B[1278],["h.i.k.bl.cm"],[0,0],N,"k.bq.bx.r.cm",L))){M.push(172);
-O.push(" k.bq.bx.r.cm");break ifs;}if((J=E(Q,P,B[1279],["h.i.k.bl.cm"],[0,0],N,"k.bq.bx.fi.cm",L))){M.push(173);
-O.push(" k.bq.bx.fi.cm");break ifs;}}return J;}}),162:({scopes:"k.bq.bx.r.eo.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[304],(P-3))?B[1280]:B[1281]),["h.i.k.j.cm","d.ep.bx.cm"],[0,1,1,0],N,"k.bq.bx.r.eo.cm",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=H[123].go(Q,P,K,M,O,L))){break ifs;}if((J=H[133].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[144].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),382:({scopes:"d.ia.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,(G(Q,A[125],(P-1))?B[1282]:B[1283]),[],[],N,"d.ia.ee",(function(){(L&&L());
-M.pop();O.pop();})))){}if((J=E(Q,P,B[1284],["h.i.bo.ee"],[0,0],N,"",L))){M.push(381);O.push("");break ifs;
-}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),3:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1285],["h.bk.cu.ey"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[1286],[],[],N,"dw.gg.ll.ey",L))){break ifs;}if((J=H[15].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[13].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),449:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1287],["ce.cf.lv.c"],[0,0],N,"",L))){M.push(448);O.push("");break ifs;
-}}return J;}}),302:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1288],["h.i.k.bl.cd"],[0,0],N,"k.f.dn.cd",L))){M.push(299);O.push(" k.f.dn.cd");
-break ifs;}if((J=E(Q,P,B[1289],["h.i.k.bl.cd"],[0,0],N,"k.cn.bz.cd",L))){M.push(300);O.push(" k.cn.bz.cd");
-break ifs;}if((J=E(Q,P,B[1290],["h.i.k.bl.cd"],[0,0],N,"k.cn.es.cd",L))){M.push(301);O.push(" k.cn.es.cd");
-break ifs;}}return J;}}),371:({scopes:"bh.ee",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=H[387].go(Q,P,K,M,O,L))){break ifs;}if((J=H[327].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[1291],[],[],N,"a.b.ee",L))){break ifs;}if((J=E(Q,P,B[1292],[],[],N,"a.b.ee",L))){break ifs;
-}if((J=E(Q,P,B[1293],[],[],N,"ce.cf.ee",L))){break ifs;}if((J=E(Q,P,B[1294],[],[],N,"ce.cf.ee",L))){break ifs;
-}if((J=E(Q,P,B[1295],[],[],N,"dw.f.ku.wh.ee",L))){break ifs;}if((J=E(Q,P,B[1296],[],[],N,"dw.im.ee",L))){break ifs;
-}if((J=E(Q,P,B[1297],[],[],N,"a.cz.wi.ee",L))){break ifs;}if((J=E(Q,P,B[1298],[],[],N,"ce.dk.wj.ee",L))){break ifs;
-}if((J=E(Q,P,B[1299],[],[],N,"ce.dk.ee",L))){break ifs;}if((J=E(Q,P,B[1300],[],[],N,"a.cz.ee",L))){break ifs;
-}if((J=E(Q,P,B[1301],[],[],N,"a.b.ee",L))){break ifs;}if((J=E(Q,P,((!((G(Q,A[973],(P-1))||G(Q,A[812],(P-3)))||G(Q,A[813],(P-4))))?B[1302]:B[1303]),["w.x.cu.ee","h.i.ef.ch"],[0,0,1,1],N,"d.cu.kt.ee",L))){M.push(372);
-O.push(" d.cu.kt.ee");break ifs;}if((J=E(Q,P,((!((G(Q,A[973],(P-1))||G(Q,A[812],(P-3)))||G(Q,A[813],(P-4))))?B[1304]:B[1305]),["w.x.cu.ee","h.i.ef.ch"],[0,0,1,1],N,"d.cu.kt.mg.ee",L))){M.push(373);
-O.push(" d.cu.kt.mg.ee");break ifs;}}return J;}}),348:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1306],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[M[0]].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),17:({scopes:"k.bq.bx.m",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1307],["h.i.k.j.m"],[0,0],N,"k.bq.bx.m",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=E(Q,P,B[1308],[],[],N,"n.o.p.m",L))){break ifs;}}return J;}}),304:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1309],[],[],N,"ce.dk.lh.cd",L))){break ifs;}}return J;}}),219:({scopes:"k.bm.bj.m.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1310],["h.i.k.j.bp"],[0,0],N,"k.bm.bj.m.bp",(function(){(L&&L());M.pop();
-O.pop();})))){}if((J=H[224].go(Q,P,K,M,O,L))){break ifs;}if((J=H[16].go(Q,P,K,M,O,L))){break ifs;}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;
-}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),346:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1311],[],[],N,"d.ik.ch",L))){M.push(345);O.push(" d.ik.ch");break ifs;
-}}return J;}}),447:({scopes:"d.mc.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1312],[],[],N,"d.mc.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[457].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),64:({scopes:"k.bq.bx.bs",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1313],[],[],N,"k.bq.bx.bs",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[30].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),475:({scopes:"a.cz.cq.c",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1314],[],[],N,"a.cz.cq.c",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[478].go(Q,P,K,M,O,L))){break ifs;
-}if((J=E(Q,P,B[1315],[],[],N,"a.cz.cq.c",L))){M.push(474);O.push(" a.cz.cq.c");break ifs;}}return J;}}),243:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1316],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[226].go(Q,P,K,M,O,L))){break ifs;}if((J=H[222].go(Q,P,K,M,O,L))){break ifs;}if((J=H[244].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),369:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1317],[],[],N,"n.o.p.ch",L))){break ifs;}if((J=E(Q,P,B[1318],[],[],N,"be.bf.wk.ch",L))){break ifs;
-}}return J;}}),445:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1319],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[459].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),101:({scopes:"w.x.cu.fm.cm",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1320],[],[],N,"",(function(){(L&&L());M.pop();O.pop();})))){}if((J=H[130].go(Q,P,K,M,O,L))){break ifs;
-}}return J;}}),426:({scopes:"d.e.y.z.v",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1321],["h.i.e.v"],[0,0],N,"d.e.y.z.v",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=E(Q,P,B[1322],["h.i.e.v","w.x.e.w.v","d.w.v"],[0,0,1,1,2,2],N,"",L))){M.push(425);O.push("");
-break ifs;}}return J;}}),298:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1323],["ce.dk.wl.cd","k.bq.bx.wl.cd","h.i.k.bl.cd","h.i.k.j.cd"],[0,0,1,2,2,3,3,1],N,"d.wl.cd",L))){break ifs;
-}if((J=E(Q,P,B[1324],["ce.dk.wl.cd","k.bq.br.wl.cd","h.i.k.bl.cd","h.i.k.j.cd"],[0,0,1,2,2,3,3,1],N,"d.wl.cd",L))){break ifs;
-}if((J=E(Q,P,B[1325],["ce.dk.wl.cd","k.bm.wl.cd"],[0,0,1,1],N,"d.wl.cd",L))){break ifs;}}return J;}}),241:({scopes:"",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1326],["h.bk.bo.bp"],[0,0],N,"",(function(){(L&&L());M.pop();O.pop();
-})))){}if((J=H[242].go(Q,P,K,M,O,L))){break ifs;}}return J;}}),176:({scopes:"bh.bp",go:function(Q,P,K,M,O,L){var N=function(R,S){K(R,(O.join("")+(S&&" "+S)).substring(1));
-};var J=false;ifs:{if((J=E(Q,P,B[1327],["ce.cf.fn.bp","w.x.cz.fn.bp","w.f.fh.bp","h.bc.ht.bp","dw.f.hv.bp","h.i.dw.bp"],[0,0,1,2,3,3,2,4,5,5,4,1],N,"d.fn.bp",L))){break ifs;
-}if((J=E(Q,P,B[1328],["ce.cf.wm.bp","w.x.cz.wm.bp","w.f.fh.wm.wn.bp","h.bc.ht.bp","w.f.fh.wm.wo.bp","h.bc.ht.bp","w.f.fh.wm.wp.bp","h.bc.ht.bp"],[0,0,1,2,3,3,2,4,5,5,4,6,7,7,6,1],N,"d.wm.bp",L))){break ifs;
-}if((J=E(Q,P,((!G(Q,A[454],(P-1)))?B[1329]:null),[],[],N,"be.lb.bp",L))){break ifs;}if((J=E(Q,P,((!G(Q,A[454],(P-1)))?B[1330]:null),[],[],N,"ce.cf.bp",L))){break ifs;
-}if((J=E(Q,P,((!G(Q,A[454],(P-1)))?B[1331]:null),[],[],N,"ce.cf.wq.bp",L))){break ifs;}if((J=E(Q,P,(G(Q,A[989],(P-1))?B[1332]:null),[],[],N,"d.wr.bp.wq",L))){break ifs;
-}if((J=E(Q,P,((!G(Q,A[454],(P-1)))?B[1333]:null),[],[],N,"ce.dk.fe.bp",L))){break ifs;}if((J=E(Q,P,((!G(Q,A[454],(P-1)))?B[1334]:B[1335]),[],[],N,"ce.cf.ws.bp",L))){break ifs;
-}if((J=E(Q,P,B[1336],[],[],N,"n.im.bp",L))){break ifs;}if((J=E(Q,P,B[1337],[],[],N,"dw.im.bp",L))){break ifs;
-}if((J=E(Q,P,B[1338],[],[],N,"ce.f.wt.bp",L))){break ifs;}if((J=E(Q,P,B[1339],["ce.f.wt.bp"],[0,0],N,"d.hy.bp",L))){M.push(177);
-O.push(" d.hy.bp");break ifs;}if((J=E(Q,P,B[1340],["h.i.dw.bp"],[0,0],N,"dw.f.ku.kv.bp",L))){break ifs;
-}if((J=E(Q,P,B[1341],["h.i.dw.bp"],[0,0],N,"dw.f.ku.fn.bp",L))){break ifs;}if((J=E(Q,P,B[1342],["h.i.dw.bp"],[0,0],N,"dw.f.ku.hq.bp",L))){break ifs;
-}if((J=E(Q,P,B[1343],["h.i.dw.bp"],[0,0],N,"dw.f.ku.hq.wu.bp",L))){break ifs;}if((J=E(Q,P,B[1344],["dw.f.n.bp"],[0,0],N,"d.ve.bp",L))){M.push(178);
-O.push(" d.ve.bp");break ifs;}if((J=E(Q,P,B[1345],[],[],N,"dp.fn.bp",L))){break ifs;}if((J=E(Q,P,B[1346],[],[],N,"dw.f.n.bp",L))){break ifs;
-}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[1347]:null),["ce.cf.wv.bp","w.x.cu.bp","h.i.ef.bp"],[0,0,1,1,2,2],N,"d.cu.ki.kj.bp",L))){M.push(179);
-O.push(" d.cu.ki.kj.bp dw.gg.cu.bp");break ifs;}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[1348]:null),["ce.cf.wv.bp","w.x.cu.bp"],[0,0,1,1],N,"d.cu.ki.kj.bp",L))){M.push(180);
-O.push(" d.cu.ki.kj.bp dw.gg.cu.bp");break ifs;}if((J=E(Q,P,((G(Q,A[238],(P-0))||G(Q,A[239],(P-1)))?B[1349]:null),["ce.cf.wv.bp","w.x.cu.bp"],[0,0,1,1],N,"d.cu.ki.ww.bp",L))){break ifs;
-}if((J=E(Q,P,B[1350],[],[],N,"n.da.bp",L))){break ifs;}if((J=E(Q,P,B[1351],["h.i.n.bp"],[0,0],N,"n.f.kd.kk.bp",L))){M.push(181);
-O.push(" n.f.kd.kk.bp");break ifs;}if((J=E(Q,P,B[1352],["h.i.n.bp"],[0,0],N,"n.f.kd.ke.bp",L))){M.push(182);
-O.push(" n.f.kd.ke.bp");break ifs;}if((J=E(Q,P,B[1353],[],[],N,"ce.dk.gh.vo.bp",L))){break ifs;}if((J=E(Q,P,B[1354],["h.i.k.bl.bp"],[0,0],N,"k.bq.bx.bp",L))){M.push(183);
-O.push(" k.bq.bx.bp");break ifs;}if((J=E(Q,P,B[1355],["h.i.k.bl.bp"],[0,0],N,"k.bq.br.bp",L))){M.push(184);
-O.push(" k.bq.br.bp");break ifs;}if((J=E(Q,P,B[1356],["h.i.k.bl.bp"],[0,0],N,"k.cn.bp",L))){M.push(185);
-O.push(" k.cn.bp");break ifs;}if((J=E(Q,P,B[1357],["h.i.k.bl.bp"],[0,0],N,"k.cn.bp",L))){M.push(186);
-O.push(" k.cn.bp");break ifs;}if((J=E(Q,P,B[1358],["h.i.k.bl.bp"],[0,0],N,"k.cn.bp",L))){M.push(187);
-O.push(" k.cn.bp");break ifs;}if((J=E(Q,P,B[1359],["h.i.k.bl.bp"],[0,0],N,"k.cn.bp",L))){M.push(188);
-O.push(" k.cn.bp");break ifs;}if((J=E(Q,P,B[1360],["h.i.k.bl.bp"],[0,0],N,"k.cn.bp",L))){M.push(189);
-O.push(" k.cn.bp");break ifs;}if((J=E(Q,P,B[1361],["h.i.k.bl.bp"],[0,0],N,"k.cn.bp",L))){M.push(190);
-O.push(" k.cn.bp");break ifs;}if((J=E(Q,P,(((((((G(Q,A[1017],(P-1))||G(Q,A[1018],(P-4)))||G(Q,A[1019],(P-5)))||G(Q,A[1020],(P-6)))||G(Q,A[1021],(P-7)))||G(Q,A[1022],(P-8)))||G(Q,A[1023],(P-14)))?((((G(Q,A[1024],(P-3))||G(Q,A[1025],(P-5)))||G(Q,A[1026],(P-6)))||G(Q,A[1027],(P-7)))?B[1362]:B[1363]):((((G(Q,A[1024],(P-3))||G(Q,A[1025],(P-5)))||G(Q,A[1026],(P-6)))||G(Q,A[1027],(P-7)))?B[1364]:B[1365])),["k.l.tm.bp","h.i.k.bp"],[0,1,1,0],N,"",L))){M.push(191);
-O.push(" k.l.tm.bp");break ifs;}if((J=E(Q,P,B[1366],["h.i.k.bl.bp"],[0,0],N,"k.l.fl.bp",L))){M.push(192);
-O.push(" k.l.fl.bp");break ifs;}if((J=E(Q,P,B[1367],["h.i.k.bl.bp"],[0,0],N,"k.l.fl.bp",L))){M.push(193);
-O.push(" k.l.fl.bp");break ifs;}if((J=E(Q,P,B[1368],["h.i.k.bl.bp"],[0,0],N,"k.l.fl.bp",L))){M.push(194);
-O.push(" k.l.fl.bp");break ifs;}if((J=E(Q,P,B[1369],["h.i.k.bl.bp"],[0,0],N,"k.l.fl.bp",L))){M.push(195);
-O.push(" k.l.fl.bp");break ifs;}if((J=E(Q,P,B[1370],["h.i.k.bl.bp"],[0,0],N,"k.l.fl.bp",L))){M.push(196);
-O.push(" k.l.fl.bp");break ifs;}if((J=E(Q,P,B[1371],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.ej.bp",L))){M.push(197);
-O.push(" k.bq.f.ei.ej.bp");break ifs;}if((J=E(Q,P,B[1372],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.ej.bp",L))){M.push(198);
-O.push(" k.bq.f.ei.ej.bp");break ifs;}if((J=E(Q,P,B[1373],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.ej.bp",L))){M.push(199);
-O.push(" k.bq.f.ei.ej.bp");break ifs;}if((J=E(Q,P,B[1374],["h.i.k.bl.bp"],[0,0],N,"k.bq.br.bp.et",L))){M.push(200);
-O.push(" k.bq.br.bp.et");break ifs;}if((J=E(Q,P,B[1375],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.ej.bp",L))){M.push(201);
-O.push(" k.bq.f.ei.ej.bp");break ifs;}if((J=E(Q,P,B[1376],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.f.bp",L))){M.push(202);
-O.push(" k.bq.f.ei.f.bp");break ifs;}if((J=E(Q,P,B[1377],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.em.bp",L))){M.push(203);
-O.push(" k.bq.f.ei.em.bp");break ifs;}if((J=E(Q,P,B[1378],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.em.bp",L))){M.push(204);
-O.push(" k.bq.f.ei.em.bp");break ifs;}if((J=E(Q,P,B[1379],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.em.bp",L))){M.push(205);
-O.push(" k.bq.f.ei.em.bp");break ifs;}if((J=E(Q,P,B[1380],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.em.bp",L))){M.push(206);
-O.push(" k.bq.f.ei.em.bp");break ifs;}if((J=E(Q,P,B[1381],["h.i.k.bl.bp"],[0,0],N,"k.bq.f.ei.em.bp",L))){M.push(207);
-O.push(" k.bq.f.ei.em.bp");break ifs;}if((J=E(Q,P,((!G(Q,A[444],(P-1)))?B[1382]:null),["h.i.n.bp"],[0,0],N,"n.f.kd.bp",L))){break ifs;
-}if((J=E(Q,P,B[1383],["h.i.n.bp"],[0,0],N,"n.f.kd.bp.wx",L))){break ifs;}if((J=E(Q,P,B[1384],["h.i.q.bp"],[0,0],N,"q.r.gk.bp",L))){M.push(208);
-O.push(" q.r.gk.bp");break ifs;}if((J=E(Q,P,B[1385],["h.i.q.bp"],[0,0],N,"q.bu.bv.bp",L))){break ifs;
-}if((J=E(Q,P,((!G(Q,A[814],(P-1)))?B[1386]:null),[],[],N,"n.da.bp",L))){break ifs;}if((J=E(Q,P,B[1387],["k.bm.uw.bp"],[0,0],N,"",L))){M.push(210);
-O.push(" u.uv");break ifs;}if((J=E(Q,P,B[1388],["h.i.k.bl.bp"],[0,0],N,"k.bm.ca.bp",L))){M.push(211);
-O.push(" k.bm.ca.bp");break ifs;}if((J=E(Q,P,B[1389],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.g.bp",L))){M.push(212);
-O.push(" k.bm.bj.g.bp u.g.bj.bp");break ifs;}if((J=E(Q,P,B[1390],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.bs.bp",L))){M.push(213);
-O.push(" k.bm.bj.bs.bp u.bs.bj.bp");break ifs;}if((J=E(Q,P,B[1391],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.bp.bp",L))){M.push(214);
-O.push(" k.bm.bj.bp.bp");break ifs;}if((J=E(Q,P,B[1392],["h.i.k.bl.bp"],[0,0],N,"k.bm.ca.bp",L))){M.push(215);
-O.push(" k.bm.ca.bp");break ifs;}if((J=E(Q,P,B[1393],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.ch.bp",L))){M.push(216);
-O.push(" k.bm.bj.ch.bp");break ifs;}if((J=E(Q,P,B[1394],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.vy.bp",L))){M.push(217);
-O.push(" k.bm.bj.vy.bp");break ifs;}if((J=E(Q,P,B[1395],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.ey.bp",L))){M.push(218);
-O.push(" k.bm.bj.ey.bp");break ifs;}if((J=E(Q,P,B[1396],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.m.bp",L))){M.push(219);
-O.push(" k.bm.bj.m.bp");break ifs;}if((J=E(Q,P,B[1397],["h.i.k.bl.bp"],[0,0],N,"k.bm.bj.cd.bp",L))){M.push(220);
-O.push(" k.bm.bj.cd.bp");break ifs;}if((J=E(Q,P,(((G(Q,A[989],(P-1))||G(Q,A[1062],(P-2)))||G(Q,A[1063],(P-3)))?B[1398]:null),["h.bc.dw.bp"],[0,0],N,"",L))){M.push(221);
-O.push("");break ifs;}if((J=E(Q,P,B[1399],[],[],N,"h.bc.gc",L))){break ifs;}if((J=E(Q,P,B[1400],[],[],N,"ce.dk.gh.vo.bp",L))){break ifs;
-}if((J=E(Q,P,(G(Q,A[1065],(P-1))?B[1401]:B[1402]),[],[],N,"ce.dk.dm.bp",L))){break ifs;}if((J=E(Q,P,(G(Q,A[1065],(P-1))?B[1403]:B[1404]),[],[],N,"ce.dk.fe.bp",L))){break ifs;
-}if((J=E(Q,P,B[1405],[],[],N,"ce.dk.jr.bp",L))){break ifs;}if((J=E(Q,P,B[1406],[],[],N,"ce.dk.gh.bp",L))){break ifs;
-}if((J=E(Q,P,B[1407],[],[],N,"ce.dk.f.bp",L))){break ifs;}if((J=E(Q,P,B[1408],[],[],N,"h.bc.f.bp",L))){break ifs;
-}if((J=E(Q,P,B[1409],[],[],N,"h.bc.mp.bp",L))){break ifs;}if((J=E(Q,P,B[1410],[],[],N,"h.bc.hv.bp",L))){break ifs;
-}if((J=E(Q,P,B[1411],[],[],N,"h.bc.ki.bp",L))){break ifs;}if((J=E(Q,P,B[1412],[],[],N,"h.bk.bo.bp",L))){break ifs;
-}if((J=E(Q,P,B[1413],[],[],N,"h.bk.ev.bp",L))){break ifs;}if((J=E(Q,P,B[1414],[],[],N,"h.bk.cu.bp",L))){break ifs;
-}}return J;}})};var I=function(U,K,O){var M=K.split("/");var L=[];for(var P=0;P<M.length;P++){var Q=H[M[P]].scopes;
-L.push(Q&&" "+Q);}var S=0;var R=U.length;var T=0;var J=function(){if(S>T){O(U.substring(T,S),L.join("").substring(1));
-T=S;}};while(S<R){var N=H[M[M.length-1]].go(U,S,O,M,L,J);if(N){S+=N[0];T+=N[0];}else{S++;}}J();return M.join("/");
-};var D=(function(J){return(((/(?:^| )q(?=\.| |$)|(?:^| )wy\.wz\.xa\.bs(?=\.| |$)/.test(J)&&" t1")||"")+((/(?:^| )wz\.xa\.bs(?=\.| |$)/.test(J)&&" t2")||"")+((/(?:^| )ce(?=\.| |$)|(?:^| )a(?=\.| |$)/.test(J)&&" t3")||"")+((/(?:^| )n\.da(?=\.| |$)/.test(J)&&" t4")||"")+((/(?:^| )n(?=\.| |$)/.test(J)&&" t5")||"")+((/(?:^| )n\.im(?=\.| |$)/.test(J)&&" t6")||"")+((/(?:^| )dw\.im(?=\.| |$)|(?:^| )dw\.f(?=\.| |$)/.test(J)&&" t7")||"")+((/(?:^| )n\.o\.p(?=\.| |$)|(?:^| )k(?=\.| |$).*?(?:^| )bh(?=\.| |$)/.test(J)&&" t8")||"")+((/(?:^| )d\.s(?=\.| |$)/.test(J)&&" t9")||"")+((/(?:^| )ce\.cf\.ci(?=\.| |$)/.test(J)&&" t10")||"")+((/(?:^| )w\.x\.cu(?=\.| |$)|(?:^| )dp\.cu\.gv(?=\.| |$)/.test(J)&&" t11")||"")+((/(?:^| )w\.x\.cz(?=\.| |$)/.test(J)&&" t12")||"")+((/(?:^| )w\.f\.is(?=\.| |$)/.test(J)&&" t13")||"")+((/(?:^| )dw\.gg(?=\.| |$)/.test(J)&&" t14")||"")+((/(?:^| )a\.cz\.ki(?=\.| |$)/.test(J)&&" t15")||"")+((/(?:^| )d\.bk(?=\.| |$).*?(?:^| )w\.x\.bk(?=\.| |$)|(?:^| )gd\.bk(?=\.| |$).*?(?:^| )w\.x\.bk(?=\.| |$)/.test(J)&&" t16")||"")+((/(?:^| )dp\.cu(?=\.| |$)/.test(J)&&" t17")||"")+((/(?:^| )dp\.fn(?=\.| |$)|(?:^| )dp\.cz(?=\.| |$)/.test(J)&&" t18")||"")+((/(?:^| )dp\.n(?=\.| |$)/.test(J)&&" t19")||"")+((/(?:^| )dp\.dw(?=\.| |$)/.test(J)&&" t20")||"")+((/(?:^| )ce\.dk\.m(?=\.| |$)/.test(J)&&" t21")||"")+((/(?:^| )be(?=\.| |$)/.test(J)&&" t22")||"")+((/(?:^| )be\.lb\.ii(?=\.| |$)/.test(J)&&" t23")||"")+((/(?:^| )u(?=\.| |$).*?(?:^| )bh(?=\.| |$)|(?:^| )k\.bm(?=\.| |$)/.test(J)&&" t24")||"")+((/(?:^| )u(?=\.| |$).*?(?:^| )bh(?=\.| |$).*?(?:^| )k\.bm(?=\.| |$)|(?:^| )u(?=\.| |$).*?(?:^| )bh(?=\.| |$).*?(?:^| )u(?=\.| |$).*?(?:^| )bh(?=\.| |$)/.test(J)&&" t25")||"")+((/(?:^| )d\.e\.s\.v(?=\.| |$)/.test(J)&&" t26")||"")+((/(?:^| )d\.e\.y\.z(?=\.| |$)|(?:^| )d\.e\.y\.z(?=\.| |$).*?(?:^| )w(?=\.| |$)|(?:^| )d\.e\.y\.z(?=\.| |$).*?(?:^| )k(?=\.| |$)|(?:^| )d\.e\.s\.v(?=\.| |$)|(?:^| )d\.e\.s\.v(?=\.| |$).*?(?:^| )w(?=\.| |$)|(?:^| )d\.e\.s\.v(?=\.| |$).*?(?:^| )k(?=\.| |$)/.test(J)&&" t27")||"")+((/(?:^| )k\.bq\.xb\.z\.xc(?=\.| |$)/.test(J)&&" t28")||"")+((/(?:^| )d\.e(?=\.| |$)|(?:^| )gd\.e(?=\.| |$)/.test(J)&&" t29")||"")+((/(?:^| )w\.x\.e(?=\.| |$)/.test(J)&&" t30")||"")+((/(?:^| )w\.f\.kr(?=\.| |$)/.test(J)&&" t31")||"")+((/(?:^| )fv\.xd(?=\.| |$)/.test(J)&&" t32")||"")+((/(?:^| )fv\.xe(?=\.| |$)/.test(J)&&" t33")||"")+((/(?:^| )fv\.lh(?=\.| |$)/.test(J)&&" t34")||"")+((/(?:^| )k(?=\.| |$)/.test(J)&&" t35")||"")).substring(1);
-});return{parseLine:I,initialState:"494",getClassesForScope:D};}());
diff --git a/trunk/infrastructure/ace/www/lang_js.js b/trunk/infrastructure/ace/www/lang_js.js
deleted file mode 100644
index 4bbc5b4..0000000
--- a/trunk/infrastructure/ace/www/lang_js.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-grammars = (window.grammars || {}); grammars["source.js"] = (function() {
- var rxTest = function(str, rx, startIndex) {
- rx.lastIndex = startIndex; var rslt = rx.exec(str); return !!(rslt && rslt[0]);
- };
- var tokenizeMatch = function(str, startIndex, rxResult, captureNames, captureGroups, captureLocators, captureStructure, tokenFunc, extraScopes) {
- extraScopes = (extraScopes && " "+extraScopes);
- // each entry of scopeState is undefined or a scope starting with a " ", so that
- // that when the array is joined on '' it is either an empty string or series of
- // space-separated scopes starting with an extra space
- var scopeState = new Array(captureNames.length+1);
- var idx = startIndex;
- var fullLen = rxResult[0].length;
- for(var k=0;k<captureStructure.length;k++) {
- var c = captureStructure[k];
- var g = captureGroups[c];
- if (g < 0) continue;
- var isOpen = (scopeState[c] === undefined);
- var newIndex = startIndex + fullLen;
- var locators = captureLocators[c];
- for(var j=0;j<locators.length;j++) newIndex -= (rxResult[locators[j]]||'').length;
- if (isOpen) {
- newIndex -= (rxResult[g]||'').length;
- }
- if (newIndex > idx) {
- tokenFunc(str.substring(idx, newIndex), (extraScopes+scopeState.join('')).substring(1));
- }
- idx = newIndex;
- if (isOpen) {
- scopeState[c] = " "+captureNames[c];
- }
- else {
- delete scopeState[c];
- }
- }
- if (idx < startIndex + fullLen) {
- tokenFunc(str.substring(idx, startIndex+fullLen), (extraScopes+scopeState.join('')).substring(1));
- }
- };
- var tryMatch = function(str, startIndex, rx, fgn, captureNames, captureGroups, captureLocators, captureStructure, tokenFunc, extraScopes, optOnBeforeTokenize) {
- rx.lastIndex = startIndex;
- var rxResult = rx.exec(str);
- if (! rxResult) return false; // shouldn't happen
- if (rxResult[fgn]) return false; // failure group
- optOnBeforeTokenize && optOnBeforeTokenize();
- tokenizeMatch(str, startIndex, rxResult, captureNames, captureGroups, captureLocators, captureStructure, tokenFunc, extraScopes);
- return [rxResult[0].length];
- };
- var tryMatch2 = function(str, startIndex, postlob, captureNames, captureStructure, tokenFunc, extraScopes, optOnBeforeTokenize) {
- return(postlob ? tryMatch(str,startIndex,postlob[0],postlob[1],captureNames,postlob[2],postlob[3],captureStructure,tokenFunc,extraScopes,optOnBeforeTokenize) : false);
- }
- var rxs = [/(?=\n)|"|([\s\S])/g,/\\(x[0-9a-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.(prototype)(\s*(=)(\s*)))|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.(prototype)(\.([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*(=)(\s*(function)?(\s*(\()((.*?)(\))))))))|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.(prototype)(\.([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*(=)(\s*))))|([\s\S])/g,/([a-zA-Z_\?\.\$][\w\?\.\$]*)(\.([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*(=)(\s*(function)(\s*(\()((.*?)(\)))))))|([\s\S])/g,/([a-zA-Z_\?\$][\w\?\$]*)(\s*(=)(\s*(function)(\s*(\()((.*?)(\))))))|([\s\S])/g,/\b(function)(\s+([a-zA-Z_\$]\w*)?(\s*(\()((.*?)(\)))))|([\s\S])/g,/\b([a-zA-Z_\?\.\$][\w\?\.\$]*)(\s*:\s*\b(function)?(\s*(\()((.*?)(\)))))|([\s\S])/g,/(?:((')((.*?)(')))|((")((.*?)("))))(\s*:\s*\b(function)?(\s*(\()((.*?)(\)))))|([\s\S])/g,/(new)(\s+(\w+(?:\.\w*)?))|([\s\S])/g,/\b(console)\b|([\s\S])/g,/\.(warn|info|log|error|time|timeEnd|assert)\b|([\s\S])/g,/\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))\b|([\s\S])/g,/'|([\s\S])/g,/"|([\s\S])/g,/\/\*\*(?!\/)|([\s\S])/g,/\/\*|([\s\S])/g,/(\/\/)(.*(?=\n)\n?)|([\s\S])/g,/(<!\-\-|\-\->)|([\s\S])/g,/\b(boolean|byte|char|class|double|enum|float|function|int|interface|long|short|var|void)\b|([\s\S])/g,/\b(const|export|extends|final|implements|native|private|protected|public|static|synchronized|throws|transient|volatile)\b|([\s\S])/g,/\b(break|case|catch|continue|default|do|else|finally|for|goto|if|import|package|return|switch|throw|try|while)\b|([\s\S])/g,/\b(delete|in|instanceof|new|typeof|with)\b|([\s\S])/g,/\btrue\b|([\s\S])/g,/\bfalse\b|([\s\S])/g,/\bnull\b|([\s\S])/g,/\b(super|this)\b|([\s\S])/g,/\b(debugger)\b|([\s\S])/g,/\b(Anchor|Applet|Area|Array|Boolean|Button|Checkbox|Date|document|event|FileUpload|Form|Frame|Function|Hidden|History|Image|JavaArray|JavaClass|JavaObject|JavaPackage|java|Layer|Link|Location|Math|MimeType|Number|navigator|netscape|Object|Option|Packages|Password|Plugin|Radio|RegExp|Reset|Select|String|Style|Submit|screen|sun|Text|Textarea|window|XMLHttpRequest)\b|([\s\S])/g,/\b(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(?=\()|([\s\S])/g,/\b(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)|ById)|Attribute(Node)?)|blur)\b(?=\()|([\s\S])/g,/\.|/g,/(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(RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(Color|Image)))\b|([\s\S])/g,/(s(hape|ystemId|c(heme|ope|rolling)|ta(ndby|rt)|ize|ummary|pecified|e(ctionRowIndex|lected(Index)?)|rc)|h(space|t(tpEquiv|mlFor)|e(ight|aders)|ref(lang)?)|n(o(Resize|tation(s|Name)|Shade|Href|de(Name|Type|Value)|Wrap)|extSibling|ame)|c(h(ildNodes|Off|ecked|arset)?|ite|o(ntent|o(kie|rds)|de(Base|Type)?|l(s|Span|or)|mpact)|ell(s|Spacing|Padding)|l(ear|assName)|aption)|t(ype|Bodies|itle|Head|ext|a(rget|gName)|Foot)|i(sMap|ndex|d|m(plementation|ages))|o(ptions|wnerDocument|bject)|d(i(sabled|r)|o(c(type|umentElement)|main)|e(clare|f(er|ault(Selected|Checked|Value)))|at(eTime|a))|useMap|p(ublicId|arentNode|r(o(file|mpt)|eviousSibling))|e(n(ctype|tities)|vent|lements)|v(space|ersion|alue(Type)?|Link|Align)|URL|f(irstChild|orm(s)?|ace|rame(Border)?)|width|l(ink(s)?|o(ngDesc|wSrc)|a(stChild|ng|bel))|a(nchors|c(ce(ssKey|pt(Charset)?)|tion)|ttributes|pplets|l(t|ign)|r(chive|eas)|xis|Link|bbr)|r(ow(s|Span|Index)|ules|e(v|ferrer|l|adOnly))|m(ultiple|e(thod|dia)|a(rgin(Height|Width)|xLength))|b(o(dy|rder)|ackground|gColor))\b|([\s\S])/g,/\b(ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR|WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR)\b|([\s\S])/g,/\bon(R(ow(s(inserted|delete)|e(nter|xit))|e(s(ize(start|end)?|et)|adystatechange))|Mouse(o(ut|ver)|down|up|move)|B(efore(cut|deactivate|u(nload|pdate)|p(aste|rint)|editfocus|activate)|lur)|S(croll|top|ubmit|elect(start|ionchange)?)|H(over|elp)|C(hange|ont(extmenu|rolselect)|ut|ellchange|l(ick|ose))|D(eactivate|ata(setc(hanged|omplete)|available)|r(op|ag(start|over|drop|en(ter|d)|leave)?)|blclick)|Unload|P(aste|ropertychange)|Error(update)?|Key(down|up|press)|Focus|Load|A(ctivate|fter(update|print)|bort))\b|([\s\S])/g,/\(|/g,/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|\*=|\/=|%=|\+=|\-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b|([\s\S])/g,/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|\*=|%=|\+=|\-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b|([\s\S])/g,/\b(Infinity|NaN|undefined)\b|([\s\S])/g,/^[\s\S]|/g,/[=\(:]|/g,/return|/g,/\s*(\/)((?![\/\*\+\{\}\?]))|([\s\S])/g,/;|([\s\S])/g,/,[ \|\t]*|([\s\S])/g,/\.|([\s\S])/g,/\{|\}|([\s\S])/g,/\(|\)|([\s\S])/g,/\[|\]|([\s\S])/g,/(?=\n)|(\/)([igm]*)|([\s\S])/g,/\\.|([\s\S])/g,/\*\/|([\s\S])/g,/(?=\n)|'|([\s\S])/g,/\\(x[0-9a-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)|([\s\S])/g];
- var exs = [[rxs[0],1,[0],[[]]],[rxs[1],2,[],[]],[rxs[2],7,[1,3,5],[[2],[4],[6]]],[rxs[3],15,[1,3,5,7,9,11,13,14],[[2],[4],[6],[8],[10],[12],[14],[]]],[rxs[4],9,[1,3,5,7],[[2],[4],[6],[8]]],[rxs[5],13,[1,3,5,7,9,11,12],[[2],[4],[6],[8],[10],[12],[]]],[rxs[6],11,[1,3,5,7,9,10],[[2],[4],[6],[8],[10],[]]],[rxs[7],9,[1,3,5,7,8],[[2],[4],[6],[8],[]]],[rxs[8],9,[1,3,5,7,8],[[2],[4],[6],[8],[]]],[rxs[9],18,[1,2,4,5,6,7,9,10,12,14,16,17],[[11],[3,11],[5,11],[11],[11],[8,11],[10,11],[11],[13],[15],[17],[]]],[rxs[10],4,[1,3],[[2],[]]],[rxs[11],2,[],[]],[rxs[12],2,[],[]],[rxs[13],6,[],[]],[rxs[14],1,[0],[[]]],[rxs[15],1,[0],[[]]],[rxs[16],1,[0],[[]]],[rxs[17],1,[0],[[]]],[rxs[18],3,[1],[[2]]],[rxs[19],2,[1],[[]]],[rxs[20],2,[],[]],[rxs[21],2,[],[]],[rxs[22],2,[],[]],[rxs[23],2,[],[]],[rxs[24],1,[],[]],[rxs[25],1,[],[]],[rxs[26],1,[],[]],[rxs[27],2,[],[]],[rxs[28],2,[],[]],[rxs[29],2,[],[]],[rxs[30],90,[],[]],[rxs[31],31,[],[]],[rxs[33],101,[],[]],[rxs[34],65,[],[]],[rxs[35],2,[],[]],[rxs[36],32,[],[]],[rxs[38],2,[],[]],[rxs[39],2,[],[]],[rxs[40],2,[],[]],[rxs[44],3,[1],[[2]]],[rxs[45],1,[],[]],[rxs[46],1,[],[]],[rxs[47],1,[],[]],[rxs[48],1,[],[]],[rxs[49],1,[],[]],[rxs[50],1,[],[]],[rxs[51],3,[1],[[2]]],[rxs[52],1,[],[]],[rxs[53],1,[0],[[]]],[rxs[53],1,[0],[[]]],[rxs[54],1,[0],[[]]],[rxs[55],2,[],[]]];
- var frames = {3: ({ scopes:"string.quoted.double.js", go:function(str,startIndex,tokenFunc0,frameStack,scopeStack,optOnMatch) {var tokenFunc = function(txt, scps) { tokenFunc0(txt, (scopeStack.join('')+(scps&&' '+scps)).substring(1)); }; var matchResult; if ((matchResult = tryMatch2(str,startIndex,exs[0],["punctuation.definition.string.end.js"],[0,0],tokenFunc,"string.quoted.double.js",(function() {(optOnMatch&&optOnMatch());frameStack.pop();scopeStack.pop();})))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[1],[],[],tokenFunc,"constant.character.escape.js",optOnMatch))) {} else { return false; } return matchResult;} }),1: ({ scopes:"source.js", go:function(str,startIndex,tokenFunc0,frameStack,scopeStack,optOnMatch) {var tokenFunc = function(txt, scps) { tokenFunc0(txt, (scopeStack.join('')+(scps&&' '+scps)).substring(1)); }; var matchResult; if ((matchResult = tryMatch2(str,startIndex,exs[2],["support.class.js","support.constant.js","keyword.operator.js"],[0,0,1,1,2,2],tokenFunc,"meta.class.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[3],["support.class.js","support.constant.js","entity.name.function.js","keyword.operator.js","storage.type.function.js","punctuation.definition.parameters.begin.js","variable.parameter.function.js","punctuation.definition.parameters.end.js"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7],tokenFunc,"meta.function.prototype.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[4],["support.class.js","support.constant.js","entity.name.function.js","keyword.operator.js"],[0,0,1,1,2,2,3,3],tokenFunc,"meta.function.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[5],["support.class.js","entity.name.function.js","keyword.operator.js","storage.type.function.js","punctuation.definition.parameters.begin.js","variable.parameter.function.js","punctuation.definition.parameters.end.js"],[0,0,1,1,2,2,3,3,4,4,5,5,6,6],tokenFunc,"meta.function.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[6],["entity.name.function.js","keyword.operator.js","storage.type.function.js","punctuation.definition.parameters.begin.js","variable.parameter.function.js","punctuation.definition.parameters.end.js"],[0,0,1,1,2,2,3,3,4,4,5,5],tokenFunc,"meta.function.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[7],["storage.type.function.js","entity.name.function.js","punctuation.definition.parameters.begin.js","variable.parameter.function.js","punctuation.definition.parameters.end.js"],[0,0,1,1,2,2,3,3,4,4],tokenFunc,"meta.function.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[8],["entity.name.function.js","storage.type.function.js","punctuation.definition.parameters.begin.js","variable.parameter.function.js","punctuation.definition.parameters.end.js"],[0,0,1,1,2,2,3,3,4,4],tokenFunc,"meta.function.json.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[9],["string.quoted.single.js","punctuation.definition.string.begin.js","entity.name.function.js","punctuation.definition.string.end.js","string.quoted.double.js","punctuation.definition.string.begin.js","entity.name.function.js","punctuation.definition.string.end.js","entity.name.function.js","punctuation.definition.parameters.begin.js","variable.parameter.function.js","punctuation.definition.parameters.end.js"],[0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,8,8,9,9,10,10,11,11],tokenFunc,"meta.function.json.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[10],["keyword.operator.new.js","entity.name.type.instance.js"],[0,0,1,1],tokenFunc,"meta.class.instance.constructor",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[11],[],[],tokenFunc,"entity.name.type.object.js.firebug",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[12],[],[],tokenFunc,"support.function.js.firebug",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[13],[],[],tokenFunc,"constant.numeric.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[14],["punctuation.definition.string.begin.js"],[0,0],tokenFunc,"string.quoted.single.js",optOnMatch))) {frameStack.push(2);scopeStack.push(" string.quoted.single.js");} else if ((matchResult = tryMatch2(str,startIndex,exs[15],["punctuation.definition.string.begin.js"],[0,0],tokenFunc,"string.quoted.double.js",optOnMatch))) {frameStack.push(3);scopeStack.push(" string.quoted.double.js");} else if ((matchResult = tryMatch2(str,startIndex,exs[16],["punctuation.definition.comment.js"],[0,0],tokenFunc,"comment.block.documentation.js",optOnMatch))) {frameStack.push(4);scopeStack.push(" comment.block.documentation.js");} else if ((matchResult = tryMatch2(str,startIndex,exs[17],["punctuation.definition.comment.js"],[0,0],tokenFunc,"comment.block.js",optOnMatch))) {frameStack.push(5);scopeStack.push(" comment.block.js");} else if ((matchResult = tryMatch2(str,startIndex,exs[18],["punctuation.definition.comment.js"],[0,0],tokenFunc,"comment.line.double-slash.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[19],["punctuation.definition.comment.html.js"],[0,0],tokenFunc,"comment.block.html.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[20],[],[],tokenFunc,"storage.type.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[21],[],[],tokenFunc,"storage.modifier.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[22],[],[],tokenFunc,"keyword.control.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[23],[],[],tokenFunc,"keyword.operator.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[24],[],[],tokenFunc,"constant.language.boolean.true.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[25],[],[],tokenFunc,"constant.language.boolean.false.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[26],[],[],tokenFunc,"constant.language.null.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[27],[],[],tokenFunc,"variable.language.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[28],[],[],tokenFunc,"keyword.other.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[29],[],[],tokenFunc,"support.class.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[30],[],[],tokenFunc,"support.function.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[31],[],[],tokenFunc,"support.function.dom.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,(rxTest(str,rxs[32],(startIndex - 1))?exs[32]:null),[],[],tokenFunc,"support.constant.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,(rxTest(str,rxs[32],(startIndex - 1))?exs[33]:null),[],[],tokenFunc,"support.constant.dom.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[34],[],[],tokenFunc,"support.constant.dom.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[35],[],[],tokenFunc,"support.function.event-handler.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,((! rxTest(str,rxs[37],(startIndex - 1)))?exs[36]:exs[37]),[],[],tokenFunc,"keyword.operator.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[38],[],[],tokenFunc,"constant.language.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,(((rxTest(str,rxs[41],(startIndex - 0)) || rxTest(str,rxs[42],(startIndex - 1))) || rxTest(str,rxs[43],(startIndex - 6)))?exs[39]:null),["punctuation.definition.string.begin.js"],[0,0],tokenFunc,"string.regexp.js",optOnMatch))) {frameStack.push(6);scopeStack.push(" string.regexp.js");} else if ((matchResult = tryMatch2(str,startIndex,exs[40],[],[],tokenFunc,"punctuation.terminator.statement.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[41],[],[],tokenFunc,"meta.delimiter.object.comma.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[42],[],[],tokenFunc,"meta.delimiter.method.period.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[43],[],[],tokenFunc,"meta.brace.curly.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[44],[],[],tokenFunc,"meta.brace.round.js",optOnMatch))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[45],[],[],tokenFunc,"meta.brace.square.js",optOnMatch))) {} else { return false; } return matchResult;} }),6: ({ scopes:"string.regexp.js", go:function(str,startIndex,tokenFunc0,frameStack,scopeStack,optOnMatch) {var tokenFunc = function(txt, scps) { tokenFunc0(txt, (scopeStack.join('')+(scps&&' '+scps)).substring(1)); }; var matchResult; if ((matchResult = tryMatch2(str,startIndex,exs[46],["punctuation.definition.string.end.js"],[0,0],tokenFunc,"string.regexp.js",(function() {(optOnMatch&&optOnMatch());frameStack.pop();scopeStack.pop();})))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[47],[],[],tokenFunc,"constant.character.escape.js",optOnMatch))) {} else { return false; } return matchResult;} }),4: ({ scopes:"comment.block.documentation.js", go:function(str,startIndex,tokenFunc0,frameStack,scopeStack,optOnMatch) {var tokenFunc = function(txt, scps) { tokenFunc0(txt, (scopeStack.join('')+(scps&&' '+scps)).substring(1)); }; var matchResult; if ((matchResult = tryMatch2(str,startIndex,exs[48],["punctuation.definition.comment.js"],[0,0],tokenFunc,"comment.block.documentation.js",(function() {(optOnMatch&&optOnMatch());frameStack.pop();scopeStack.pop();})))) {} else { return false; } return matchResult;} }),5: ({ scopes:"comment.block.js", go:function(str,startIndex,tokenFunc0,frameStack,scopeStack,optOnMatch) {var tokenFunc = function(txt, scps) { tokenFunc0(txt, (scopeStack.join('')+(scps&&' '+scps)).substring(1)); }; var matchResult; if ((matchResult = tryMatch2(str,startIndex,exs[49],["punctuation.definition.comment.js"],[0,0],tokenFunc,"comment.block.js",(function() {(optOnMatch&&optOnMatch());frameStack.pop();scopeStack.pop();})))) {} else { return false; } return matchResult;} }),2: ({ scopes:"string.quoted.single.js", go:function(str,startIndex,tokenFunc0,frameStack,scopeStack,optOnMatch) {var tokenFunc = function(txt, scps) { tokenFunc0(txt, (scopeStack.join('')+(scps&&' '+scps)).substring(1)); }; var matchResult; if ((matchResult = tryMatch2(str,startIndex,exs[50],["punctuation.definition.string.end.js"],[0,0],tokenFunc,"string.quoted.single.js",(function() {(optOnMatch&&optOnMatch());frameStack.pop();scopeStack.pop();})))) {} else if ((matchResult = tryMatch2(str,startIndex,exs[51],[],[],tokenFunc,"constant.character.escape.js",optOnMatch))) {} else { return false; } return matchResult;} })};
-var parseLine = function(line, stateString, tokenFunc) {
- var frameStack = stateString.split('/');
- var scopeStack = [];
- for(var i=0;i<frameStack.length;i++) {
- var scps = frames[frameStack[i]].scopes;
- scopeStack.push(scps && " "+scps);
- }
- var idx = 0;
- var lineLen = line.length;
- var tokenizedIdx = 0;
- var tokenizeUnmatched = function() {
- if (idx > tokenizedIdx) {
- tokenFunc(line.substring(tokenizedIdx, idx), scopeStack.join('').substring(1));
- tokenizedIdx = idx;
- }
- }
- while(idx < lineLen) {
- var frameResult = frames[frameStack[frameStack.length-1]].go(
- line, idx, tokenFunc, frameStack, scopeStack, tokenizeUnmatched);
- if (frameResult) {
- idx += frameResult[0];
- tokenizedIdx += frameResult[0];
- }
- else {
- idx++;
- }
- }
- tokenizeUnmatched();
- return frameStack.join('/');
- };
- var getClassesForScope = (function(scope) { return (((/(?:^| )comment(?=\.| |$)|(?:^| )extract\.custom\.title\.sql(?=\.| |$)/.test(scope) && " t1") || "")+((/(?:^| )custom\.title\.sql(?=\.| |$)/.test(scope) && " t2") || "")+((/(?:^| )keyword(?=\.| |$)|(?:^| )storage(?=\.| |$)/.test(scope) && " t3") || "")+((/(?:^| )constant\.numeric(?=\.| |$)/.test(scope) && " t4") || "")+((/(?:^| )constant(?=\.| |$)/.test(scope) && " t5") || "")+((/(?:^| )constant\.language(?=\.| |$)/.test(scope) && " t6") || "")+((/(?:^| )variable\.language(?=\.| |$)|(?:^| )variable\.other(?=\.| |$)/.test(scope) && " t7") || "")+((/(?:^| )string(?=\.| |$)/.test(scope) && " t8") || "")+((/(?:^| )constant\.character\.escape(?=\.| |$)|(?:^| )string(?=\.| |$).*?(?:^| )source(?=\.| |$)/.test(scope) && " t9") || "")+((/(?:^| )meta\.preprocessor(?=\.| |$)/.test(scope) && " t10") || "")+((/(?:^| )keyword\.control\.import(?=\.| |$)/.test(scope) && " t11") || "")+((/(?:^| )entity\.name\.function(?=\.| |$)|(?:^| )support\.function\.any(?=\.| |$)/.test(scope) && " t12") || "")+((/(?:^| )entity\.name\.type(?=\.| |$)/.test(scope) && " t13") || "")+((/(?:^| )entity\.other\.inherited(?=\.| |$)/.test(scope) && " t14") || "")+((/(?:^| )variable\.parameter(?=\.| |$)/.test(scope) && " t15") || "")+((/(?:^| )storage\.type\.method(?=\.| |$)/.test(scope) && " t16") || "")+((/(?:^| )meta\.section(?=\.| |$).*?(?:^| )entity\.name\.section(?=\.| |$)|(?:^| )declaration\.section(?=\.| |$).*?(?:^| )entity\.name\.section(?=\.| |$)/.test(scope) && " t17") || "")+((/(?:^| )support\.function(?=\.| |$)/.test(scope) && " t18") || "")+((/(?:^| )support\.class(?=\.| |$)|(?:^| )support\.type(?=\.| |$)/.test(scope) && " t19") || "")+((/(?:^| )support\.constant(?=\.| |$)/.test(scope) && " t20") || "")+((/(?:^| )support\.variable(?=\.| |$)/.test(scope) && " t21") || "")+((/(?:^| )keyword\.operator\.js(?=\.| |$)/.test(scope) && " t22") || "")+((/(?:^| )invalid(?=\.| |$)/.test(scope) && " t23") || "")+((/(?:^| )invalid\.deprecated\.trailing(?=\.| |$)/.test(scope) && " t24") || "")+((/(?:^| )text(?=\.| |$).*?(?:^| )source(?=\.| |$)|(?:^| )string\.unquoted(?=\.| |$)/.test(scope) && " t25") || "")+((/(?:^| )text(?=\.| |$).*?(?:^| )source(?=\.| |$).*?(?:^| )string\.unquoted(?=\.| |$)|(?:^| )text(?=\.| |$).*?(?:^| )source(?=\.| |$).*?(?:^| )text(?=\.| |$).*?(?:^| )source(?=\.| |$)/.test(scope) && " t26") || "")+((/(?:^| )meta\.tag\.preprocessor\.xml(?=\.| |$)/.test(scope) && " t27") || "")+((/(?:^| )meta\.tag\.sgml\.doctype(?=\.| |$)|(?:^| )meta\.tag\.sgml\.doctype(?=\.| |$).*?(?:^| )entity(?=\.| |$)|(?:^| )meta\.tag\.sgml\.doctype(?=\.| |$).*?(?:^| )string(?=\.| |$)|(?:^| )meta\.tag\.preprocessor\.xml(?=\.| |$)|(?:^| )meta\.tag\.preprocessor\.xml(?=\.| |$).*?(?:^| )entity(?=\.| |$)|(?:^| )meta\.tag\.preprocessor\.xml(?=\.| |$).*?(?:^| )string(?=\.| |$)/.test(scope) && " t28") || "")+((/(?:^| )string\.quoted\.docinfo\.doctype\.DTD(?=\.| |$)/.test(scope) && " t29") || "")+((/(?:^| )meta\.tag(?=\.| |$)|(?:^| )declaration\.tag(?=\.| |$)/.test(scope) && " t30") || "")+((/(?:^| )entity\.name\.tag(?=\.| |$)/.test(scope) && " t31") || "")+((/(?:^| )entity\.other\.attribute(?=\.| |$)/.test(scope) && " t32") || "")+((/(?:^| )markup\.heading(?=\.| |$)/.test(scope) && " t33") || "")+((/(?:^| )markup\.quote(?=\.| |$)/.test(scope) && " t34") || "")+((/(?:^| )markup\.list(?=\.| |$)/.test(scope) && " t35") || "")).substring(1); });
- return {parseLine:parseLine, initialState:"1",
- getClassesForScope:getClassesForScope};}())
diff --git a/trunk/infrastructure/ace/www/lexer_support.js b/trunk/infrastructure/ace/www/lexer_support.js
deleted file mode 100644
index 3d54f5c..0000000
--- a/trunk/infrastructure/ace/www/lexer_support.js
+++ /dev/null
@@ -1,1068 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/* This file is also a Helma module, referenced by its path! */
-
-AceLexer = (function lexer_init() {
-
-// utility functions, make this file self-contained
-
-function forEach(array, func) {
- for(var i=0;i<array.length;i++) {
- var result = func(array[i], i);
- if (result) break;
- }
-}
-
-function map(array, func) {
- var result = [];
- // must remain compatible with "arguments" pseudo-array
- for(var i=0;i<array.length;i++) {
- if (func) result.push(func(array[i], i));
- else result.push(array[i]);
- }
- return result;
-}
-
-function filter(array, func) {
- var result = [];
- // must remain compatible with "arguments" pseudo-array
- for(var i=0;i<array.length;i++) {
- if (func(array[i], i)) result.push(array[i]);
- }
- return result;
-}
-
-function isArray(testObject) {
- return testObject && typeof testObject === 'object' &&
- !(testObject.propertyIsEnumerable('length')) &&
- typeof testObject.length === 'number';
-}
-
-// these three lines inspired by Steven Levithan's XRegExp
-var singleLineRegex = /(?:[^[\\.]+|\\(?:[\S\s]|$)|\[\^?]?(?:[^\\\]]+|\\(?:[\S\s]|$))*]?)+|\./g;
-var backReferenceRegex = /(?:[^\\[]+|\\(?:[^0-9]|$)|\[\^?]?(?:[^\\\]]+|\\(?:[\S\s]|$))*]?)+|\\([0-9]+)/g;
-var parenFindingRegex = /(?:[^[(\\]+|\\(?:[\S\s]|$)|\[\^?]?(?:[^\\\]]+|\\(?:[\S\s]|$))*]?|\((?=\?))+|(\()/g;
-
-// Creates a function that, when called with (string, startIndex), finds the first of the patterns that
-// matches the string starting at startIndex (and anchored there). Expects startIndex < string.length.
-// The function returns a structure containing "whichCase", a number 0..(patterns.length-1) giving the
-// index of the pattern that matched, or -1 if no pattern did, and "result", an array of the kind
-// returned by RegExp.exec called on that pattern, or the array that would be returned by matching /[\S\s]/
-// (any single character) if no other pattern matched. Supports the flags 'i', 'm', and 's', where the
-// effect of 's' is to make dots match all characters, including newlines.
-// Patterns in general are not allowed to match zero-width strings, but a pattern that is specified
-// as a regular expression literal with the 'm' flag is considered special, and may be zero-width,
-// though as a consequence the match cannot include the final newline of the document. (Other flags
-// on regular expression literals are ignored; use the "flags" argument instead.)
-function makeRegexSwitch(patterns, flags) {
- var numPatterns = patterns.length;
- var patternStrings = map(patterns, function (p) {
- if ((typeof p) == "string")
- return p; // a string
- else return p.source; // assume it's a regex
- });
- var patternZeros = map(patterns, function (p) {
- // using "multiline" is a special way to indicate the reg-ex is zero-width
- return ((typeof p) != "string") && p.multiline;
- });
- patternStrings.push("[\\S\\s]"); // default case
- patternZeros.push(false);
- // how many capturing groups each pattern has
- var numGroups = map(patternStrings, function (p) {
- var count = 0;
- p.replace(parenFindingRegex, function (full,paren,offset) { if (paren) count++; });
- return count;
- });
- // the group number for each case of the switch
- var caseGroupNums = [];
- var idx = 1;
- forEach(numGroups, function (n) { caseGroupNums.push(idx); idx += n+1; });
- // make a big alternation of capturing groups
- var alternation = map(patternStrings, function(p, pi) {
- // correct the back-reference numbers
- p = p.replace(backReferenceRegex, function (full, num) {
- if (num) return "\\"+((+num)+caseGroupNums[pi]);
- else return full;
- });
- var extra = (patternZeros[pi] ? "[\\S\\s]": ""); // tack on another char for zero-widths
- return '('+p+extra+')';
- }).join('|');
- // process regex flags
- flags = (flags || "");
- var realFlags = "g";
- for(var i=0;i<flags.length;i++) {
- var f = flags.charAt(i);
- if (f == "i" || f == "m") realFlags += f;
- else if (f == "s") {
- alternation = alternation.replace(singleLineRegex,
- function (x) { return x==='.' ? "[\\S\\s]" : x; });
- }
- }
- //console.log(alternation);
- var bigRegex = new RegExp(alternation, realFlags);
- return function (string, matchIndex) {
- bigRegex.lastIndex = matchIndex;
- var execResult = bigRegex.exec(string);
- var whichCase;
- var resultArray = [];
- // search linearly for which case matched in the alternation
- for(var i=0;i<=numPatterns;i++) {
- var groupNum = caseGroupNums[i];
- if (execResult[groupNum]) {
- whichCase = i;
- for(var j=0;j<=numGroups[i];j++) {
- var r = execResult[groupNum+j];
- if (patternZeros[i] && j==0) {
- r = r.substring(0, r.length-1);
- }
- resultArray[j] = r;
- }
- break;
- }
- }
- if (whichCase == numPatterns)
- whichCase = -1; // default case
- return {whichCase: whichCase, result: resultArray};
- }
-}
-
-
-var tokenClasses = {
- 'Token': '',
-
- 'Text': '',
- 'TEST': 'test',
- 'Whitespace': 'w',
- 'Error': 'err',
- 'Other': 'x',
- 'Dirty': 'dirty',
-
- 'Keyword': 'k',
- 'Keyword.Constant': 'kc',
- 'Keyword.Declaration': 'kd',
- 'Keyword.Pseudo': 'kp',
- 'Keyword.Reserved': 'kr',
- 'Keyword.Type': 'kt',
-
- 'Name': 'n',
- 'Name.Attribute': 'na',
- 'Name.Builtin': 'nb',
- 'Name.Builtin.Pseudo': 'bp',
- 'Name.Class': 'nc',
- 'Name.Constant': 'no',
- 'Name.Decorator': 'nd',
- 'Name.Entity': 'ni',
- 'Name.Exception': 'ne',
- 'Name.Function': 'nf',
- 'Name.Property': 'py',
- 'Name.Label': 'nl',
- 'Name.Namespace': 'nn',
- 'Name.Other': 'nx',
- 'Name.Tag': 'nt',
- 'Name.Variable': 'nv',
- 'Name.Variable.Class': 'vc',
- 'Name.Variable.Global': 'vg',
- 'Name.Variable.Instance': 'vi',
-
- 'Literal': 'l',
- 'Literal.Date': 'ld',
-
- 'String': 's',
- 'String.Backtick': 'sb',
- 'String.Char': 'sc',
- 'String.Doc': 'sd',
- 'String.Double': 's2',
- 'String.Escape': 'se',
- 'String.Heredoc': 'sh',
- 'String.Interpol': 'si',
- 'String.Other': 'sx',
- 'String.Regex': 'sr',
- 'String.Single': 's1',
- 'String.Symbol': 'ss',
-
- 'Number': 'm',
- 'Number.Float': 'mf',
- 'Number.Hex': 'mh',
- 'Number.Integer': 'mi',
- 'Number.Integer.Long': 'il',
- 'Number.Oct': 'mo',
-
- 'Operator': 'o',
- 'Operator.Word': 'ow',
-
- 'Punctuation': 'p',
-
- 'Comment': 'c',
- 'Comment.Multiline': 'cm',
- 'Comment.Preproc': 'cp',
- 'Comment.Single': 'c1',
- 'Comment.Special': 'cs',
-
- 'Generic': 'g',
- 'Generic.Deleted': 'gd',
- 'Generic.Emph': 'ge',
- 'Generic.Error': 'gr',
- 'Generic.Heading': 'gh',
- 'Generic.Inserted': 'gi',
- 'Generic.Output': 'go',
- 'Generic.Prompt': 'gp',
- 'Generic.Strong': 'gs',
- 'Generic.Subheading': 'gu',
- 'Generic.Traceback': 'gt'
-}
-
-
-function makeTokenProducer(regexData, flags) {
- var data = {};
- var procCasesMap = {};
-
- // topological sort of state dependencies
- var statesToProcess = [];
- var sortedStates = [];
- var sortedStatesMap = {};
- for(var state in regexData) statesToProcess.push(state);
- while (statesToProcess.length > 0) {
- var state = statesToProcess.shift();
- var stateReady = true;
- forEach(regexData[state], function (c) {
- if ((typeof c) == "object" && c.include) {
- var otherState = c.include;
- if (/!$/.exec(otherState)) {
- otherState = otherState.substring(0, otherState.length-1);
- }
- if (! sortedStatesMap[otherState]) {
- stateReady = false;
- return true;
- }
- }
- });
- if (stateReady) {
- sortedStates.push(state);
- sortedStatesMap[state] = true;
- }
- else {
- // move to end of queue
- statesToProcess.push(state);
- }
- }
-
- forEach(sortedStates, function(state) {
- var cases = regexData[state];
- var procCases = [];
- forEach(cases, function (c) {
- if ((typeof c) == "object" && c.include) {
- var otherState = c.include;
- var isBang = false;
- if (/!$/.exec(otherState)) {
- // "bang" include, returns to other state
- otherState = otherState.substring(0, otherState.length-1);
- isBang = true;
- }
- forEach(procCasesMap[otherState], function (d) {
- var dd = [d[0], d[1], d[2]];
- if (isBang) {
- if (! (d[2] && d[2][0] && d[2][0].indexOf('#pop') != 0)) {
- dd[2] = ['#pop', otherState].concat(d[2] || []);
- }
- }
- procCases.push(dd);
- });
- }
- else procCases.push(c);
- });
- procCasesMap[state] = procCases;
- data[state] = {
- switcher: makeRegexSwitch(map(procCases, function(x) { return x[0]; }), flags),
- tokenTypes: map(procCases, function(x) { return x[1]; }),
- stateEffects: map(procCases, function(y) {
- var x = y[2];
- if (!x) return [];
- if (isArray(x)) return x;
- return [x];
- })
- }
- });
-
- // mutates stateStack, calls tokenFunc on each new token in order, returns new index
- return function(string, startIndex, stateStack, tokenFunc) {
- var stateBefore = stateStack.join('/');
-
- while (true) { // loop until non-zero-length token
- var stateData = data[stateStack[stateStack.length-1]];
- var switcherResult = stateData.switcher(string, startIndex);
- var whichCase = switcherResult.whichCase;
- var regexResult = switcherResult.result;
- var tokenTypes, stateEffects;
- if (whichCase < 0) {
- tokenTypes = 'Error';
- stateEffects = null;
- }
- else {
- tokenTypes = stateData.tokenTypes[whichCase];
- stateEffects = stateData.stateEffects[whichCase];
- }
-
- if (stateEffects) {
- forEach(stateEffects, function (se) {
- if (se === '#pop') stateStack.pop();
- else if (se === '#popall') {
- while (stateStack.length > 0) stateStack.pop();
- }
- else stateStack.push(se);
- });
- }
- var stateAfter = stateStack.join('/');
-
- if (regexResult[0].length > 0) {
- if ((typeof tokenTypes) === "object" && tokenTypes.bygroups) {
- var types = tokenTypes.bygroups;
- forEach(types, function (t,i) {
- var tkn = { width:regexResult[i+1].length, type:t };
- if (i == 0) tkn.stateBefore = stateBefore;
- if (i == (types.length-1)) tkn.stateAfter = stateAfter;
- tokenFunc(tkn);
- });
- }
- else {
- tokenFunc({ width:regexResult[0].length, type:tokenTypes,
- stateBefore:stateBefore, stateAfter:stateAfter });
- }
- return startIndex + regexResult[0].length;
- }
- }
- }
-}
-
-function makeSimpleLexer(tokenProducer) {
- function lexString(str, tokenFunc) {
- var state = ['root'];
- var idx = 0;
- while (idx < str.length) {
- var i = idx;
- idx = tokenProducer(str, idx, state, function (tkn) {
- tokenFunc(str.substr(i, tkn.width), tkn.type);
- i += tkn.width;
- });
- }
- }
- function lexAsLines(str, tokenFunc, newLineFunc) {
- str += "\n";
- var nextNewline = str.indexOf('\n');
- var curIndex = 0;
-
- lexString(str, function(txt, typ) {
- var wid = txt.length;
- var widthLeft = wid;
- while (widthLeft > 0 && curIndex + wid > nextNewline) {
- var w = nextNewline - curIndex;
- if (w > 0) {
- tokenFunc(str.substr(curIndex, w), typ);
- }
- curIndex += (w+1);
- widthLeft -= (w+1);
- if (curIndex < str.length) {
- newLineFunc();
- nextNewline = str.indexOf("\n", curIndex);
- }
- }
- if (widthLeft > 0) {
- tokenFunc(str.substr(curIndex, widthLeft), typ);
- curIndex += widthLeft;
- }
- });
- }
- return {lexString:lexString, lexAsLines:lexAsLines};
-}
-
-var txtTokenProducer = makeTokenProducer(
- {
- 'root': [
- [/.*?\n/, 'Text'],
- [/.+/, 'Text']
- ]
- }, 's');
-
-var jsTokenProducer = makeTokenProducer(
- {
- 'root': [
- [/\/\*[^\w\n]+appjet:version[^\w\n]+[0-9.]+[^\w\n]+\*\/[^\w\n]*(?=\n)/,
- 'Comment.Special', 'main'],
- [/(?:)/m, 'Text', ['main', 'regex-ready', 'linestart']]
- ],
- 'whitespace' : [
- [/\n/, 'Text', 'linestart'],
- [/[^\S\n]+/, 'Text'],
- [/\/\*/, 'Comment', 'longcomment']
- ],
- 'common' : [
- {include:'whitespace'},
- [/\"/, 'String.Double', 'dstr'],
- [/\'/, 'String.Single', 'sstr']
- ],
- 'regex-ready' : [
- {include:'whitespace'},
- [/\/(?:[^[\\\n\/]|\\.|\[\^?]?(?:[^\\\]\n]|\\.)+\]?)+\/[gim]*/, 'String.Regex'],
- [/(?:)/m, 'Text', '#pop']
- ],
- 'main': [
- [/\"\"\"/, 'String.Doc', 'mstr'],
- {include:"common"},
- [/<!--/, 'Comment'],
- [/\/\/.*?(?=\n)/, 'Comment'],
- [/[\{\}\[\]\(;]/, 'Punctuation', 'regex-ready'],
- [/[\).]/, 'Punctuation'],
- [/[~\^\*!%&<>\|=:,\/?\\]/, 'Operator', 'regex-ready'],
- [/[+-]/, 'Operator'],
- ['(import|break|case|catch|const|continue|default|delete|do|else|'+
- 'export|for|function|if|in|instanceof|label|new|return|switch|this|'+
- 'throw|try|typeof|var|void|while|with|abstract|boolean|byte|catch|char|'+
- 'class|const|debugger|double|enum|extends|final|finally|float|goto|implements|'+
- 'int|interface|long|native|package|private|protected|public|short|static|super|'+
- 'synchronized|throws|transient|volatile|let|yield)\\b', 'Keyword'],
- [/(true|false|null|NaN|Infinity|undefined)\b/, 'Keyword.Constant'],
- [/[$a-zA-Z_][a-zA-Z0-9_]*/, 'Name.Other'],
- [/[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?/, 'Number.Float'],
- [/0x[0-9a-f]+/, 'Number.Hex'],
- [/[0-9]+/, 'Number.Integer']
- ],
- 'csscommon': [ // common outside of style rule brackets
- {include:'common'},
- [/\{/, 'Punctuation', 'csscontent'],
- [/\:[a-zA-Z0-9_-]+/, 'Name.Decorator'],
- [/\.[a-zA-Z0-9_-]+/, 'Name.Class'],
- [/\#[a-zA-Z0-9_-]+/, 'Name.Function'],
- [/[a-zA-Z0-9_-]+/, 'Name.Tag'],
- [/[~\^\*!%&\[\]\(\)<>\|+=@:;,.\/?-]/, 'Operator']
- ],
- 'cssmain': [
- [/(@media)([^\S\n]+)(\w+)([^\S\n]*)(\{)/, {bygroups:['Keyword', 'Text', 'String',
- 'Text', 'Punctuation']}, 'cssmedia'],
- {include:'csscommon'}
- ],
- 'cssmedia': [
- {include:'csscommon'},
- [/\}/, 'Punctuation', '#pop']
- ],
- 'csscontent': [
- {include:'common'},
- [/\}/, 'Punctuation', '#pop'],
- [/url\(.*?\)/, 'String.Other'],
- ['(azimuth|background-attachment|background-color|'+
- 'background-image|background-position|background-repeat|'+
- 'background|border-bottom-color|border-bottom-style|'+
- 'border-bottom-width|border-left-color|border-left-style|'+
- 'border-left-width|border-right|border-right-color|'+
- 'border-right-style|border-right-width|border-top-color|'+
- 'border-top-style|border-top-width|border-bottom|'+
- 'border-collapse|border-left|border-width|border-color|'+
- 'border-spacing|border-style|border-top|border|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|'+
- 'font-size-adjust|font-stretch|font-style|font-variant|'+
- 'font-weight|font|height|letter-spacing|line-height|'+
- 'list-style-type|list-style-image|list-style-position|'+
- 'list-style|margin-bottom|margin-left|margin-right|'+
- 'margin-top|margin|marker-offset|marks|max-height|max-width|'+
- 'min-height|min-width|opacity|orphans|outline|outline-color|'+
- 'outline-style|outline-width|overflow|padding-bottom|'+
- 'padding-left|padding-right|padding-top|padding|page|'+
- 'page-break-after|page-break-before|page-break-inside|'+
- 'pause-after|pause-before|pause|pitch|pitch-range|'+
- 'play-during|position|quotes|richness|right|size|'+
- 'speak-header|speak-numeral|speak-punctuation|speak|'+
- 'speech-rate|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|bottom|left|'+
- 'above|absolute|always|armenian|aural|auto|avoid|baseline|'+
- 'behind|below|bidi-override|blink|block|bold|bolder|both|'+
- 'capitalize|center-left|center-right|center|circle|'+
- 'cjk-ideographic|close-quote|collapse|condensed|continuous|'+
- 'crop|crosshair|cross|cursive|dashed|decimal-leading-zero|'+
- 'decimal|default|digits|disc|dotted|double|e-resize|embed|'+
- 'extra-condensed|extra-expanded|expanded|fantasy|far-left|'+
- 'far-right|faster|fast|fixed|georgian|groove|hebrew|help|'+
- 'hidden|hide|higher|high|hiragana-iroha|hiragana|icon|'+
- 'inherit|inline-table|inline|inset|inside|invert|italic|'+
- 'justify|katakana-iroha|katakana|landscape|larger|large|'+
- 'left-side|leftwards|level|lighter|line-through|list-item|'+
- 'loud|lower-alpha|lower-greek|lower-roman|lowercase|ltr|'+
- 'lower|low|medium|message-box|middle|mix|monospace|'+
- 'n-resize|narrower|ne-resize|no-close-quote|no-open-quote|'+
- 'no-repeat|none|normal|nowrap|nw-resize|oblique|once|'+
- 'open-quote|outset|outside|overline|pointer|portrait|px|'+
- 'relative|repeat-x|repeat-y|repeat|rgb|ridge|right-side|'+
- 'rightwards|s-resize|sans-serif|scroll|se-resize|'+
- 'semi-condensed|semi-expanded|separate|serif|show|silent|'+
- 'slow|slower|small-caps|small-caption|smaller|soft|solid|'+
- 'spell-out|square|static|status-bar|super|sw-resize|'+
- 'table-caption|table-cell|table-column|table-column-group|'+
- 'table-footer-group|table-header-group|table-row|'+
- 'table-row-group|text|text-bottom|text-top|thick|thin|'+
- 'transparent|ultra-condensed|ultra-expanded|underline|'+
- 'upper-alpha|upper-latin|upper-roman|uppercase|url|'+
- 'visible|w-resize|wait|wider|x-fast|x-high|x-large|x-loud|'+
- 'x-low|x-small|x-soft|xx-large|xx-small|yes)\\b', 'Keyword'],
- ['(indigo|gold|firebrick|indianred|yellow|darkolivegreen|'+
- 'darkseagreen|mediumvioletred|mediumorchid|chartreuse|'+
- 'mediumslateblue|black|springgreen|crimson|lightsalmon|brown|'+
- 'turquoise|olivedrab|cyan|silver|skyblue|gray|darkturquoise|'+
- 'goldenrod|darkgreen|darkviolet|darkgray|lightpink|teal|'+
- 'darkmagenta|lightgoldenrodyellow|lavender|yellowgreen|thistle|'+
- 'violet|navy|orchid|blue|ghostwhite|honeydew|cornflowerblue|'+
- 'darkblue|darkkhaki|mediumpurple|cornsilk|red|bisque|slategray|'+
- 'darkcyan|khaki|wheat|deepskyblue|darkred|steelblue|aliceblue|'+
- 'gainsboro|mediumturquoise|floralwhite|coral|purple|lightgrey|'+
- 'lightcyan|darksalmon|beige|azure|lightsteelblue|oldlace|'+
- 'greenyellow|royalblue|lightseagreen|mistyrose|sienna|'+
- 'lightcoral|orangered|navajowhite|lime|palegreen|burlywood|'+
- 'seashell|mediumspringgreen|fuchsia|papayawhip|blanchedalmond|'+
- 'peru|aquamarine|white|darkslategray|ivory|dodgerblue|'+
- 'lemonchiffon|chocolate|orange|forestgreen|slateblue|olive|'+
- 'mintcream|antiquewhite|darkorange|cadetblue|moccasin|'+
- 'limegreen|saddlebrown|darkslateblue|lightskyblue|deeppink|'+
- 'plum|aqua|darkgoldenrod|maroon|sandybrown|magenta|tan|'+
- 'rosybrown|pink|lightblue|palevioletred|mediumseagreen|'+
- 'dimgray|powderblue|seagreen|snow|mediumblue|midnightblue|'+
- 'paleturquoise|palegoldenrod|whitesmoke|darkorchid|salmon|'+
- 'lightslategray|lawngreen|lightgreen|tomato|hotpink|'+
- 'lightyellow|lavenderblush|linen|mediumaquamarine|green|'+
- 'blueviolet|peachpuff)\\b', 'Name.Builtin'],
- [/\!important/, 'Comment.Preproc'],
- [/\#[a-zA-Z0-9]{1,6}/, 'Number'],
- [/[\.-]?[0-9]*[\.]?[0-9]+(em|px|\%|pt|pc|in|mm|cm|ex)/, 'Number'],
- [/-?[0-9]+/, 'Number'],
- [/[~\^\*!%&<>\|+=@:,.\/?-]+/, 'Operator'],
- [/[\[\]();]+/, 'Punctuation'],
- [/[a-zA-Z][a-zA-Z0-9]+/, 'Name']
- ],
- 'linestart': [
- [/\/\*[^\w\n]+appjet:css[^\w\n]+\*\/[^\w\n]*(?=\n)/, 'Comment.Special',
- ['#popall', 'root', 'cssmain']],
- [/\/\*[^\w\n]+appjet:(\w+)[^\w\n]+\*\/[^\w\n]*(?=\n)/, 'Comment.Special',
- ['#popall', 'root', 'main', 'regex-ready']],
- [/(?:)/m, 'Text', '#pop']
- ],
- 'dstr': [
- [/\"/, 'String.Double', '#pop'],
- [/(?=\n)/m, 'String.Double', '#pop'],
- [/(\\\\|\\\"|[^\"\n])+/, 'String.Double']
- ],
- 'sstr': [
- [/\'/, 'String.Single', '#pop'],
- [/(?=\n)/m, 'String.Single', '#pop'],
- [/(\\\\|\\\'|[^\'\n])+/, 'String.Single']
- ],
- 'longcomment': [
- [/\*\//, 'Comment', '#pop'],
- [/\n/, 'Comment'],
- [/.+?(?:\n|(?=\*\/))/, 'Comment']
- ],
- 'mstr': [
- [/(\\\"\"\"|\n)/, 'String.Doc'],
- [/\"\"\"/, 'String.Doc', '#pop'],
- [/.+?(?=\\"""|"""|\n)/, 'String.Doc']
- ]
- }
-);
-
-function escapeHTML(s) {
- var re = /[&<>\'\" ]/g;
- if (! re.MAP) {
- // persisted across function calls!
- re.MAP = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&#34;',
- "'": '&#39;',
- ' ': '&#160;'
- };
- }
- return s.replace(re, function(c) { return re.MAP[c]; });
-}
-
-var simpleLexer = makeSimpleLexer(jsTokenProducer);
-
-function codeStringToHTML(codeString) {
- var atLineStart = true;
- var html = [];
- function tokenFunc(txt, type) {
- var cls = tokenClasses[type];
- if (cls) html.push('<tt class="',tokenClasses[type],'">');
- else html.push('<tt>');
- html.push(escapeHTML(txt),'</tt>');
- atLineStart = false;
- }
- function newLineFunc() {
- html.push('<br/>\n');
- atLineStart = true;
- }
- simpleLexer.lexAsLines(codeString, tokenFunc, newLineFunc);
- if (atLineStart) html.push('<br/>\n');
- return html.join('');
-}
-
-/* ========== Incremental Lexer for ACE ========== */
-
-function makeIncrementalLexer(tokenProducer) {
-
- var tokens = newSkipList();
- var buffer = "";
- var nextId = 1;
- var dirtyTokenKeys = [];
- var uncoloredRanges = [];
-
- //top.dbg_uncoloredRanges = function() { return uncoloredRanges; }
- //top.dbg_dirtyTokenKeys = function() { return dirtyTokenKeys; }
-
- function mergeRangesIfTouching(a, b) {
- // if a = [a0,a1] and b = [b0,b1] are overlapping or touching, return a single merged range
- // else return null
- var a0 = a[0], a1 = a[1], b0 = b[0], b1 = b[1];
- if (a1 < b0) return null;
- if (b1 < a0) return null;
- var c0 = ((a0 < b0) ? a0 : b0);
- var c1 = ((a1 > b1) ? a1 : b1);
- return [c0,c1];
- }
-
- function addUncoloredRange(rng) {
- // shouldn't this merge existing ranges if the new range overlaps multiple ones?
- var done = false;
- forEach(uncoloredRanges, function (x, i) {
- var merged = mergeRangesIfTouching(x, rng);
- if (merged) {
- uncoloredRanges[i] = merged;
- done = true;
- return true;
- }
- });
- if (! done) {
- uncoloredRanges.push(rng);
- }
- }
-
- function removeUncoloredRange(rng) {
- var i = uncoloredRanges.length-1;
- while (i >= 0) {
- removeUncoloredRangeFrom(rng, i);
- i--;
- }
- }
-
- function removeUncoloredRangeFrom(rangeToRemove, containingRangeIndex) {
- var idx = containingRangeIndex;
- var cont = uncoloredRanges[idx];
- var rem0 = rangeToRemove[0], rem1 = rangeToRemove[1];
- // limit to containing range
- if (rem0 < cont[0]) rem0 = cont[0];
- if (rem1 > cont[1]) rem1 = cont[1];
- if (rem1 <= rem0) return;
- // splice out uncoloredRanes[containingRangeIndex] for 0, 1, or 2 ranges
- uncoloredRanges.splice(idx, 1);
- if (cont[0] < rem0)
- uncoloredRanges.splice(idx, 0, [cont[0], rem0]);
- if (rem1 < cont[1])
- uncoloredRanges.splice(idx, 0, [rem1, cont[1]]);
- }
-
- function prepareTokens(tokenArray) {
- forEach(tokenArray, function (t) {
- t.key = "$"+(nextId++);
- });
- return tokenArray;
- }
-
- function roundBackToTokenBoundary(charOffset) {
- return tokens.indexOfOffset(charOffset);
- }
- function roundForwardToTokenBoundary(charOffset) {
- var tokenEnd;
- if (charOffset == tokens.totalWidth())
- tokenEnd = tokens.length();
- else {
- var endToken = tokens.keyAtOffset(charOffset);
- tokenEnd = tokens.indexOfKey(endToken);
- // round up to nearest token boundary
- if (charOffset > tokens.offsetOfKey(endToken)) {
- tokenEnd++;
- }
- }
- return tokenEnd;
- }
-
- // findLexingStartPoint and findLexingEndPoint take a character boundary
- // (0 .. buffer.length) and return a token boundary (0 .. tokens.length())
- // that, if not at the document edge, is such that the next token outside
- // the boundary has a pre/post lexing state associated with it (i.e is not
- // a dirty-region token or in the middle of a multi-token lexing rule).
-
- function findLexingStartPoint(startChar) {
- if (tokens.length() == 0) return 0;
- var tokenStart = roundBackToTokenBoundary(startChar);
- // expand to not break up a series of tokens from the same
- // lexing rule, and to include dirty regions
- if (tokenStart > 0) {
- var tokenBefore = tokens.atIndex(tokenStart - 1);
- while (tokenBefore && (! tokenBefore.stateAfter)) {
- tokenStart--;
- tokenBefore = tokens.prev(tokenBefore);
- }
- }
- return tokenStart;
- }
-
- function findLexingEndPoint(endChar) {
- if (tokens.length() == 0) return 0;
- var tokenEnd = roundForwardToTokenBoundary(endChar);
- // expand to not break up a series of tokens from the same
- // lexing rule, and to include dirty regions
- if (tokenEnd < tokens.length()) {
- var tokenAfter = tokens.atIndex(tokenEnd);
- while (tokenAfter && (! tokenAfter.stateBefore)) {
- tokenEnd++;
- tokenAfter = tokens.next(tokenAfter);
- }
- }
- return tokenEnd;
- }
-
- function updateBuffer(newBuffer, spliceStart, charsRemoved, charsAdded) {
- buffer = newBuffer;
-
- // back up to new line
- if (spliceStart > 0) {
- var newStart = buffer.lastIndexOf('\n', spliceStart-1) + 1;
- var charsBack = spliceStart - newStart;
- spliceStart -= charsBack;
- charsRemoved += charsBack;
- charsAdded += charsBack;
- }
- // expand to lexing points
- var tokenRangeStart = findLexingStartPoint(spliceStart);
- var tokenRangeEnd = findLexingEndPoint(spliceStart + charsRemoved);
-
- var dirtyWidth = 0;
- // make sure to mark at least one token dirty so that deletions correctly cause
- // rehighlighting; in practice doesn't come up often except when an entire line
- // is cleanly deleted, like deleting a blank line (which doesn't usually affect highlighting)
- while (dirtyWidth == 0) {
- var curStart = tokens.offsetOfIndex(tokenRangeStart);
- var curEnd = tokens.offsetOfIndex(tokenRangeEnd);
- dirtyWidth = (curEnd - curStart) + (charsAdded - charsRemoved);
- if (dirtyWidth == 0) {
- if (curEnd >= tokens.totalWidth()) break;
- tokenRangeEnd = findLexingEndPoint(curEnd+1);
- }
- }
-
- var dirtyTokens = []; // 0 or 1 of them
- if (dirtyWidth > 0) {
- dirtyTokens.push({ width: dirtyWidth, type: 'Dirty' });
- }
-
- //console.log("%d, %d, %d, %d", charsRemoved, charsAdded,
- //(curEnd - curStart), dirtyWidth);
-
- tokens.splice(tokenRangeStart, tokenRangeEnd - tokenRangeStart,
- prepareTokens(dirtyTokens));
-
- if (tokens.totalWidth() != buffer.length) {
- console.error("updateBuffer: Bad total token width: "+
- tokens.totalWidth()+" not "+buffer.length);
- }
-
- forEach(dirtyTokens, function (t) { dirtyTokenKeys.push(t.key); });
- dirtyTokenKeys = filter(dirtyTokenKeys, function (k) { return tokens.containsKey(k); });
- //console.log("after update: %s", toSource(tokens.slice()));
-
- function applySpliceToIndex(i) {
- if (i <= spliceStart) return i;
- if (i >= (spliceStart + charsRemoved)) return i + charsAdded - charsRemoved;
- return spliceStart;
- }
- for(var i=uncoloredRanges.length-1; i>=0; i--) {
- var r = uncoloredRanges[i];
- r[0] = applySpliceToIndex(r[0]);
- r[1] = applySpliceToIndex(r[1]);
- if (r[1] <= r[0]) uncoloredRanges.splice(i, 1);
- }
- }
-
- function processDirtyToken(dirtyToken, isTimeUp, stopAtChar) {
-
- //console.time("lexing");
- //var p = PROFILER("lex", false);
- var stateStack;
- if (! tokens.prev(dirtyToken)) stateStack = ['root'];
- else stateStack = tokens.prev(dirtyToken).stateAfter.split('/');
- var newTokens = [];
- var dirtyTokenIndex = tokens.indexOfEntry(dirtyToken);
- var tokenCount = 0;
- var startTime = (new Date()).getTime();
- var stopBasedOnChar = (typeof(stopAtChar) == "number");
- //p.mark("tokenize");
-
- var curOffset = tokens.offsetOfEntry(dirtyToken);
- var startedOffset = curOffset;
- var oldToken = dirtyToken;
- var oldTokenOffset = curOffset;
- var done = false;
-
- while ((! done) && (! isTimeUp()) && (! (stopBasedOnChar && curOffset >= stopAtChar))) {
- curOffset = tokenProducer(buffer, curOffset, stateStack,
- function (t) { newTokens.push(t); });
- while (oldToken && (oldTokenOffset + oldToken.width <= curOffset)) {
- oldTokenOffset += oldToken.width;
- oldToken = tokens.next(oldToken);
- }
- if (curOffset == tokens.totalWidth()) {
- // hit the end
- done = true;
- }
- else if (oldTokenOffset == curOffset) {
- // at a token boundary, the beginning of oldTokenOffset
- if (stateStack.join('/') === oldToken.stateBefore) {
- // state matches up, we can stop
- done = true;
- }
- }
- }
-
- var endedOffset = curOffset;
- var dist = endedOffset - startedOffset;
- var tokensToRemove;
- var newDirtyToken;
- if (dist < dirtyToken.width) {
- tokens.setEntryWidth(dirtyToken, dirtyToken.width - dist);
- tokensToRemove = 0;
- newDirtyToken = dirtyToken;
- }
- else {
- var nextLexingPoint = findLexingEndPoint(endedOffset);
- var lexingPointChar = tokens.offsetOfIndex(nextLexingPoint);
- if (lexingPointChar == endedOffset && (! done) && endedOffset < tokens.totalWidth()) {
- // happened to stop at token boundary before end, but not done lexing,
- // so make next token dirty
- nextLexingPoint = findLexingEndPoint(endedOffset+1);
- lexingPointChar = tokens.offsetOfIndex(nextLexingPoint);
- }
- var dirtyCharsLeft = lexingPointChar - endedOffset;
- if (dirtyCharsLeft > 0) {
- newDirtyToken = { width: dirtyCharsLeft, type: 'Dirty' };
- newTokens.push(newDirtyToken);
- }
- tokensToRemove = nextLexingPoint - dirtyTokenIndex;
- }
-
- //p.mark("prepare");
- prepareTokens(newTokens);
- //p.mark("remove");
- tokens.splice(dirtyTokenIndex, tokensToRemove, []);
- //p.mark("insert");
- tokens.splice(dirtyTokenIndex, 0, newTokens);
- if (tokens.totalWidth() != buffer.length)
- console.error("processDirtyToken: Bad total token width: "+
- tokens.totalWidth()+" not "+buffer.length);
- //p.end();
-
- addUncoloredRange([startedOffset, endedOffset]);
-
- //console.log("processed chars %d to %d", startedOffset, endedOffset);
- //console.timeEnd("lexing");
-
- return (newDirtyToken && newDirtyToken.key);
- }
-
- function lexSomeDirty(filter, isTimeUp) {
- var newDirtyTokenKeys = [];
-
- forEach(dirtyTokenKeys, function (dirtyKey) {
- if (! tokens.containsKey(dirtyKey)) return;
- var dirtyToken = tokens.atKey(dirtyKey);
- var filterResult;
- if ((! isTimeUp()) && ((filterResult = filter(dirtyToken)))) {
- var stopAtChar;
- if ((typeof filterResult) == "object" && (typeof filterResult.stopAtChar) == "number") {
- stopAtChar = filterResult.stopAtChar;
- }
- var tkn = processDirtyToken(dirtyToken, isTimeUp, filterResult.stopAtChar);
- if (tkn) newDirtyTokenKeys.push(tkn);
- }
- else {
- // leave the token behind
- newDirtyTokenKeys.push(dirtyKey);
- }
-
- if (tokens.totalWidth() != buffer.length)
- console.error("Bad total token width: "+tokens.totalWidth()+" not "+buffer.length);
-
- });
-
- dirtyTokenKeys = newDirtyTokenKeys;
- }
-
- function lexCharRange(charRange, isTimeUp) {
- //var startTime = (new Date()).getTime();
- //function isTimeUp() { return ((new Date()).getTime() - startTime) > timeLimit; }
-
- if (isTimeUp()) return;
-
- lexSomeDirty(function (dirtyToken) {
- var start = tokens.offsetOfEntry(dirtyToken);
- var end = start + dirtyToken.width;
- if (end <= charRange[0]) return false;
- if (start >= charRange[1]) return false;
- //console.log("tokenStart: %d, tokenEnd: %d, visStart: %d, visEnd: %d",
- //start, end, charRange[0], charRange[1]);
- var result = {};
- if (charRange[1] < end) {
- result.stopAtChar = charRange[1];
- }
- return result;
- }, isTimeUp);
-
- //if (isTimeUp()) return;
-
- /*
- // highlight the visible area
- var i = uncoloredRanges.length-1;
- // iterate backwards because we change the array
- while (i >= 0) {
- var rng = uncoloredRanges[i];
- var start = rng[0], end = rng[1];
- if (start < viewRange[0]) start = viewRange[0];
- if (end > viewRange[1]) end = viewRange[1];
- if (end > start) {
- var charsRecolored = recolorFunc(start, end-start,
- isTimeUp, getSpansForRange);
- removeUncoloredSubrange([start, start+charsRecolored], i);
- }
- if (isTimeUp()) break;
- i--;
- }*/
- }
-
- function tokenToString(tkn) {
- return toSource({width:tkn.width, type:tkn.type, stateBefore:tkn.stateBefore, stateAfter:tkn.stateAfter});
- }
-
- // Calls func(startChar, endChar) on each range of characters that needs to be colored
- // in the DOM, based on calls to getSpansForRange (which removes chars from consideration)
- // and lexCharRange (which calculates new colors and adds chars for consideration).
- // There are usually relatively few uncolored ranges, each of which may be many lines,
- // even the whole document.
- // func must return true iff any tokens are accessed through getSpansForRange during
- // the call. func should not do new lexing.
- function forEachUncoloredRange(func, isTimeUp) {
- var i = 0;
- // uncoloredRanges will change during this function!
- // Terminates is time runs out, whole document is colored,
- // or the func "passes" on all ranges by returning false.
- while (i < uncoloredRanges.length && ! isTimeUp()) {
- var rng = uncoloredRanges[i];
- var returnVal = func(rng[0], rng[1], isTimeUp);
- if (returnVal) {
- // func did something, uncolored ranges may have changed around
- i = 0;
- }
- else {
- i++;
- }
- }
- }
-
- // Like forEachUncoloredRange, but "cropped" to the char range given. For example,
- // if no "uncolored ranges" extend by a non-zero amount into the char range,
- // func will never be called.
- function forEachUncoloredSubrange(startChar, endChar, func, isTimeUp) {
- forEachUncoloredRange(function (s, e, isTimeUp2) {
- if (s < startChar) s = startChar;
- if (e > endChar) e = endChar;
- if (e > s) {
- return func(s, e, isTimeUp2);
- }
- return false;
- }, isTimeUp);
- }
-
- // This function takes note of what it's passed, and assumes that part of the
- // DOM has been taken care of (unless justPeek).
- // The "func" takes arguments tokenWidth and tokenClass, and is called on each
- // token in the range, with the widths adding up to the range size.
- function getSpansForRange(startChar, endChar, func, justPeek) {
-
- if (startChar == endChar) return;
-
- var startToken = tokens.atOffset(startChar);
- var startTokenStart = tokens.offsetOfEntry(startToken);
- var curOffset = startChar;
- var curToken = startToken;
- while (curOffset < endChar) {
- var spanEnd;
- if (curToken === startToken) {
- spanEnd = startTokenStart + startToken.width;
- }
- else {
- spanEnd = curOffset + curToken.width;
- }
- if (spanEnd > endChar) spanEnd = endChar;
- if (spanEnd > curOffset) {
- func(spanEnd - curOffset, tokenClasses[curToken.type]);
- }
- curOffset = spanEnd;
- curToken = tokens.next(curToken);
- }
-
- if (! justPeek) removeUncoloredRange([startChar, endChar]);
- }
-
- function markRangeUncolored(start, end) {
- addUncoloredRange([start, end]);
- }
-
- return {
- updateBuffer: updateBuffer,
- lexCharRange: lexCharRange,
- getSpansForRange: getSpansForRange,
- forEachUncoloredSubrange: forEachUncoloredSubrange,
- markRangeUncolored: markRangeUncolored
- };
-}
-
-/* ========== End Incremental Lexer ========== */
-
-tokenProds = {js: jsTokenProducer, txt: txtTokenProducer};
-
-function getTokenProducer(type) {
- return tokenProds[type || 'txt'] || tokenProds['txt'];
-}
-
-function getIncrementalLexer(type) {
- return makeIncrementalLexer(getTokenProducer(type));
-}
-function getSimpleLexer(type) {
- return makeSimpleLexer(getTokenProducer(type));
-}
-
-return {getIncrementalLexer:getIncrementalLexer, getSimpleLexer:getSimpleLexer,
- codeStringToHTML:codeStringToHTML};
-
-})();
diff --git a/trunk/infrastructure/ace/www/linestylefilter.js b/trunk/infrastructure/ace/www/linestylefilter.js
deleted file mode 100644
index 0ac578b..0000000
--- a/trunk/infrastructure/ace/www/linestylefilter.js
+++ /dev/null
@@ -1,247 +0,0 @@
-// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.linestylefilter
-// %APPJET%: import("etherpad.collab.ace.easysync2.Changeset");
-
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// requires: easysync2.Changeset
-
-var linestylefilter = {};
-
-linestylefilter.ATTRIB_CLASSES = {
- 'bold':'tag:b',
- 'italic':'tag:i',
- 'underline':'tag:u',
- 'strikethrough':'tag:s'
-};
-
-linestylefilter.getAuthorClassName = function(author) {
- return "author-"+author.replace(/[^a-y0-9]/g, function(c) {
- if (c == ".") return "-";
- return 'z'+c.charCodeAt(0)+'z';
- });
-};
-
-// lineLength is without newline; aline includes newline,
-// but may be falsy if lineLength == 0
-linestylefilter.getLineStyleFilter = function(lineLength, aline,
- textAndClassFunc, apool) {
-
- if (lineLength == 0) return textAndClassFunc;
-
- var nextAfterAuthorColors = textAndClassFunc;
-
- var authorColorFunc = (function() {
- var lineEnd = lineLength;
- var curIndex = 0;
- var extraClasses;
- var leftInAuthor;
-
- function attribsToClasses(attribs) {
- var classes = '';
- Changeset.eachAttribNumber(attribs, function(n) {
- var key = apool.getAttribKey(n);
- if (key) {
- var value = apool.getAttribValue(n);
- if (value) {
- if (key == 'author') {
- classes += ' '+linestylefilter.getAuthorClassName(value);
- }
- else if (key == 'list') {
- classes += ' list:'+value;
- }
- else if (linestylefilter.ATTRIB_CLASSES[key]) {
- classes += ' '+linestylefilter.ATTRIB_CLASSES[key];
- }
- }
- }
- });
- return classes.substring(1);
- }
-
- var attributionIter = Changeset.opIterator(aline);
- var nextOp, nextOpClasses;
- function goNextOp() {
- nextOp = attributionIter.next();
- nextOpClasses = (nextOp.opcode && attribsToClasses(nextOp.attribs));
- }
- goNextOp();
- function nextClasses() {
- if (curIndex < lineEnd) {
- extraClasses = nextOpClasses;
- leftInAuthor = nextOp.chars;
- goNextOp();
- while (nextOp.opcode && nextOpClasses == extraClasses) {
- leftInAuthor += nextOp.chars;
- goNextOp();
- }
- }
- }
- nextClasses();
-
- return function(txt, cls) {
- while (txt.length > 0) {
- if (leftInAuthor <= 0) {
- // prevent infinite loop if something funny's going on
- return nextAfterAuthorColors(txt, cls);
- }
- var spanSize = txt.length;
- if (spanSize > leftInAuthor) {
- spanSize = leftInAuthor;
- }
- var curTxt = txt.substring(0, spanSize);
- txt = txt.substring(spanSize);
- nextAfterAuthorColors(curTxt, (cls&&cls+" ")+extraClasses);
- curIndex += spanSize;
- leftInAuthor -= spanSize;
- if (leftInAuthor == 0) {
- nextClasses();
- }
- }
- };
- })();
- return authorColorFunc;
-};
-
-linestylefilter.getAtSignSplitterFilter = function(lineText,
- textAndClassFunc) {
- var at = /@/g;
- at.lastIndex = 0;
- var splitPoints = null;
- var execResult;
- while ((execResult = at.exec(lineText))) {
- if (! splitPoints) {
- splitPoints = [];
- }
- splitPoints.push(execResult.index);
- }
-
- if (! splitPoints) return textAndClassFunc;
-
- return linestylefilter.textAndClassFuncSplitter(textAndClassFunc,
- splitPoints);
-};
-
-linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/;
-linestylefilter.REGEX_URLCHAR = new RegExp('('+/[-:@a-zA-Z0-9_.,~%+\/\\?=&#;()$]/.source+'|'+linestylefilter.REGEX_WORDCHAR.source+')');
-linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt):\/\/|mailto:)/.source+linestylefilter.REGEX_URLCHAR.source+'*(?![:.,;])'+linestylefilter.REGEX_URLCHAR.source, 'g');
-
-linestylefilter.getURLFilter = function(lineText, textAndClassFunc) {
- linestylefilter.REGEX_URL.lastIndex = 0;
- var urls = null;
- var splitPoints = null;
- var execResult;
- while ((execResult = linestylefilter.REGEX_URL.exec(lineText))) {
- if (! urls) {
- urls = [];
- splitPoints = [];
- }
- var startIndex = execResult.index;
- var url = execResult[0];
- urls.push([startIndex, url]);
- splitPoints.push(startIndex, startIndex + url.length);
- }
-
- if (! urls) return textAndClassFunc;
-
- function urlForIndex(idx) {
- for(var k=0; k<urls.length; k++) {
- var u = urls[k];
- if (idx >= u[0] && idx < u[0]+u[1].length) {
- return u[1];
- }
- }
- return false;
- }
-
- var handleUrlsAfterSplit = (function() {
- var curIndex = 0;
- return function(txt, cls) {
- var txtlen = txt.length;
- var newCls = cls;
- var url = urlForIndex(curIndex);
- if (url) {
- newCls += " url:"+url;
- }
- textAndClassFunc(txt, newCls);
- curIndex += txtlen;
- };
- })();
-
- return linestylefilter.textAndClassFuncSplitter(handleUrlsAfterSplit,
- splitPoints);
-};
-
-linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) {
- var nextPointIndex = 0;
- var idx = 0;
-
- // don't split at 0
- while (splitPointsOpt &&
- nextPointIndex < splitPointsOpt.length &&
- splitPointsOpt[nextPointIndex] == 0) {
- nextPointIndex++;
- }
-
- function spanHandler(txt, cls) {
- if ((! splitPointsOpt) || nextPointIndex >= splitPointsOpt.length) {
- func(txt, cls);
- idx += txt.length;
- }
- else {
- var splitPoints = splitPointsOpt;
- var pointLocInSpan = splitPoints[nextPointIndex] - idx;
- var txtlen = txt.length;
- if (pointLocInSpan >= txtlen) {
- func(txt, cls);
- idx += txt.length;
- if (pointLocInSpan == txtlen) {
- nextPointIndex++;
- }
- }
- else {
- if (pointLocInSpan > 0) {
- func(txt.substring(0, pointLocInSpan), cls);
- idx += pointLocInSpan;
- }
- nextPointIndex++;
- // recurse
- spanHandler(txt.substring(pointLocInSpan), cls);
- }
- }
- }
- return spanHandler;
-};
-
-// domLineObj is like that returned by domline.createDomLine
-linestylefilter.populateDomLine = function(textLine, aline, apool,
- domLineObj) {
- // remove final newline from text if any
- var text = textLine;
- if (text.slice(-1) == '\n') {
- text = text.substring(0, text.length-1);
- }
-
- function textAndClassFunc(tokenText, tokenClass) {
- domLineObj.appendSpan(tokenText, tokenClass);
- }
-
- var func = textAndClassFunc;
- func = linestylefilter.getURLFilter(text, func);
- func = linestylefilter.getLineStyleFilter(text.length, aline,
- func, apool);
- func(text, '');
-};
diff --git a/trunk/infrastructure/ace/www/magicdom.js b/trunk/infrastructure/ace/www/magicdom.js
deleted file mode 100644
index 4bad3d4..0000000
--- a/trunk/infrastructure/ace/www/magicdom.js
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-function makeMagicDom(rootDomNode, contentWindow){
- function nodeToString(node) {
- if (isNodeText(node)) return '"'+node.nodeValue+'"';
- else return '&lt;'+node.tagName+'&gt;';
- }
-
- var doc = rootDomNode.ownerDocument || rootDomNode.document;
-
- function childIndex(dnode) {
- var idx = 0;
- var n = dnode;
- while (n.previousSibling) {
- idx++;
- n = n.previousSibling;
- }
- return idx;
- }
-
- function ensureNormalized(dnode) {
- function mergePair(text1, text2) {
- var theParent = text1.parentNode;
- var newTextNode = mdom.doc.createTextNode(text1.nodeValue+""+text2.nodeValue);
- theParent.insertBefore(newTextNode, text1);
- theParent.removeChild(text1);
- theParent.removeChild(text2);
- return newTextNode;
- }
-
- var n = dnode;
- if (!isNodeText(n)) return;
- while (n.previousSibling && isNodeText(n.previousSibling)) {
- n = mergePair(n.previousSibling, n);
- }
- while (n.nextSibling && isNodeText(n.nextSibling)) {
- n = mergePair(n, n.nextSibling);
- }
- }
-
- function nextUniqueId() {
- // returns new unique identifier string;
- // not actually checked for uniqueness, but unique
- // wrt magicdom.
- // is document-unique to allow document.getElementById even
- // in theoretical case of multiple magicdoms per doc
- var doc = mdom.doc;
- var nextId = (getAssoc(doc, "nextId") || 1);
- setAssoc(doc, "nextId", nextId+1);
- return "magicdomid"+nextId;
- }
-
- var nodeProto = {
- parent: function() {
- return wrapDom(((! this.isRoot) && this.dom.parentNode) || null);
- },
- index: function() {
- return childIndex(this.dom);
- },
- equals: function (otherNode) {
- return otherNode && otherNode.dom && (this.dom == otherNode.dom);
- },
- prev: function() {
- return wrapDom(this.dom.previousSibling || null);
- },
- next: function() {
- return wrapDom(this.dom.nextSibling || null);
- },
- remove: function() {
- if (! this.isRoot) {
- var dnode = this.dom;
- var prevSib = dnode.previousSibling;
- var nextSib = dnode.nextSibling;
- var normalizeNeeded = (prevSib && isNodeText(prevSib) && nextSib && isNodeText(nextSib));
- var theParent = dnode.parentNode;
- theParent.removeChild(dnode);
- if (normalizeNeeded) {
- ensureNormalized(prevSib);
- }
- }
- },
- addNext: function (newNode) {
- var dnode = this.dom;
- var nextSib = dnode.nextSibling;
- if (nextSib) {
- dnode.parentNode.insertBefore(newNode.dom, nextSib);
- }
- else {
- dnode.parentNode.appendChild(newNode.dom);
- }
- if (newNode.isText) ensureNormalized(newNode.dom);
- },
- addPrev: function (newNode) {
- var dnode = this.dom;
- dnode.parentNode.insertBefore(newNode.dom, dnode);
- if (newNode.isText) ensureNormalized(newNode.dom);
- },
- replaceWith: function (newNodes) { // var-args
- this.replaceWithArray(arguments);
- },
- replaceWithArray: function (newNodes) {
- var addFunc;
- if (this.next()) {
- var next = this.next();
- addFunc = function (n) { next.addPrev(n); };
- }
- else {
- var parent = this.parent();
- addFunc = function (n) { parent.appendChild(n); };
- }
- // when using "this" functions, have to keep text
- // nodes from merging inappropriately
- var tempNode = mdom.newElement("span");
- this.addNext(tempNode);
- this.remove();
- forEach(newNodes, function (n) {
- addFunc(n);
- });
- tempNode.remove();
- },
- getProp: function (propName) {
- return getAssoc(this.dom, propName);
- },
- setProp: function (propName, value) {
- setAssoc(this.dom, propName, value);
- },
- // not consistent between browsers in how line-breaks are handled
- innerText: function() {
- var dnode = this.dom;
- if ((typeof dnode.innerText) == "string") return dnode.innerText;
- if ((typeof dnode.textContent) == "string") return dnode.textContent;
- if ((typeof dnode.nodeValue) == "string") return dnode.nodeValue;
- return "";
- },
- depth: function() {
- try { // ZZZ
- var d = 0;
- var n = this;
- while (! n.isRoot) {
- d++;
- n = n.parent();
- }
- return d;
- }
- catch (e) {
- parent.BAD_NODE = this.dom;
- throw e;
- }
- }
- };
-
- var textNodeProto = extend(object(nodeProto), {
- isText: true,
- text: function() {
- return this.dom.nodeValue;
- },
- eachChild: function() {},
- childCount: function() { return 0; },
- eachDescendant: function() {},
- // precondition: 0 <= start < end <= length
- wrapRange: function(start, end, newNode) {
- var origText = this.text();
- var text1 = null;
- if (start > 0) {
- text1 = mdom.newText(origText.substring(0, start));
- }
- var text2 = mdom.newText(origText.substring(start, end));
- var text3 = null;
- if (end < origText.length) {
- text3 = mdom.newText(origText.substring(end, origText.length));
- }
- newNode.appendChild(text2);
- var nodesToUse = []
- if (text1) nodesToUse.push(text1);
- nodesToUse.push(newNode);
- if (text3) nodesToUse.push(text3);
- this.replaceWithArray(nodesToUse);
- return [text1, newNode, text3];
- }
- });
-
- var elementNodeProto = extend(object(nodeProto), {
- isText: false,
- childCount: function() {
- return this.dom.childNodes.length;
- },
- child: function (i) {
- return wrapDom(this.dom.childNodes.item(i));
- },
- firstChild: function() {
- return ((this.childCount() > 0) && this.child(0)) || null;
- },
- lastChild: function() {
- return ((this.childCount() > 0) && this.child(this.childCount()-1)) || null;
- },
- appendChild: function (newNode) {
- this.dom.appendChild(newNode.dom);
- if (newNode.isText) {
- ensureNormalized(newNode.dom);
- }
- },
- prependChild: function (newNode) {
- if (this.childCount() > 0) {
- this.child(0).addPrev(newNode);
- }
- else {
- this.appendChild(newNode);
- }
- },
- eachChild: function (func) {
- for(var i=0;i<this.childCount();i++) {
- var result = func(this.child(i), i);
- if (result) break;
- }
- },
- eachDescendant: function (func) {
- this.eachChild(function (n) {
- var result = func(n);
- if (! result) n.eachDescendant(func);
- });
- },
- dumpContents: function() {
- var mnode = this, dnode = this.dom;
- if (mnode.childCount() < 1) {
- mnode.remove();
- }
- else {
- var theParent = dnode.parentNode;
- var n;
- while ((n = dnode.firstChild)) {
- dnode.removeChild(n);
- theParent.insertBefore(n, dnode);
- ensureNormalized(n);
- }
- mnode.remove();
- }
- },
- uniqueId: function() {
- // not actually guaranteed to be unique, e.g. if user copy-pastes
- // nodes with ids
- var dnode = this.dom;
- if (dnode.id) return dnode.id;
- dnode.id = nextUniqueId();
- return dnode.id;
- }
- });
-
- function wrapDom(dnode) {
- if (! dnode) return dnode;
- var mnode;
- if (isNodeText(dnode)) {
- mnode = object(textNodeProto);
- }
- else {
- mnode = object(elementNodeProto);
- }
- mnode.isRoot = (dnode == rootDomNode);
- mnode.dom = dnode;
- return mnode;
- }
-
- var mdom = {};
- mdom.root = wrapDom(rootDomNode);
- mdom.doc = doc;
- mdom.win = contentWindow;
- mdom.byId = function (id) {
- return wrapDom(mdom.doc.getElementById(id));
- }
- mdom.newText = function (txt) {
- return wrapDom(mdom.doc.createTextNode(txt));
- }
- mdom.newElement = function (tagName) {
- return wrapDom(mdom.doc.createElement(tagName));
- }
- mdom.wrapDom = wrapDom;
-
- return mdom;
-}
diff --git a/trunk/infrastructure/ace/www/multilang_lexer.js b/trunk/infrastructure/ace/www/multilang_lexer.js
deleted file mode 100644
index 9617981..0000000
--- a/trunk/infrastructure/ace/www/multilang_lexer.js
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-AceLexer = (function lexer_init() {
-
-function makeIncrementalLexer(lineParser) {
-
- var parseLine = lineParser.parseLine;
- var initialState = lineParser.initialState;
- var getClassesForScope = lineParser.getClassesForScope;
-
- var lineData = newSkipList(); // one entry per line
- var buffer = ""; // full text of document, each line ending with \n
- var lineStatus = ""; // one char per line in buffer, (d)irty/(u)ncolored/(c)olored
- var nextLineDataId = 1;
-
- // "dirty" lines are unparsed lines. Other lines have properties startState,endState.
- // "uncolored" lines are parsed but the data has not been handled by ACE.
-
- function roundBackToLineIndex(charOffset) { // charOffset is [0,document length]
- return lineData.indexOfOffset(charOffset);
- // result is [0,num lines]
- }
-
- function roundForwardToLineIndex(charOffset) { // charOffset is [0,document length]
- var idx = lineData.indexOfOffset(charOffset);
- var newCharOffset = lineData.offsetOfIndex(idx);
- if (newCharOffset < charOffset) {
- // rounded back, round forward instead
- return idx + 1;
- }
- return idx;
- // result is [0,num lines]
- }
-
- function updateBuffer(newBuffer, spliceStart, charsRemoved, charsAdded) {
- // newBuffer is string to replace buffer, other args explain the splice
- // that happened between the old buffer and newBuffer
-
- // determine range of lines (and character offsets of line boundaries) affected
- var spliceStartLineIndex = roundBackToLineIndex(spliceStart);
- var spliceStartCharOffset = lineData.offsetOfIndex(spliceStartLineIndex);
- var spliceEndLineIndex = roundForwardToLineIndex(spliceStart + charsRemoved);
- var spliceEndCharOffset = lineData.offsetOfIndex(spliceEndLineIndex);
-
- var extraBeginChars = spliceStart - spliceStartCharOffset;
- var extraEndChars = spliceEndCharOffset - (spliceStart + charsRemoved);
- var newChars = newBuffer.substring(spliceStart - extraBeginChars,
- spliceStart + charsAdded + extraEndChars);
-
- var newLineEntries = [];
- newChars.replace(/[^\n]*\n/g, function(line) {
- newLineEntries.push({ width: line.length, key: String(nextLineDataId++) });
- });
-
- lineData.splice(spliceStartLineIndex, spliceEndLineIndex - spliceStartLineIndex,
- newLineEntries);
-
- var newDirtyStatus = "";
- for(var i=0;i<newLineEntries.length;i++) newDirtyStatus += "d";
- var extraDirty = 0;
- if ((! newDirtyStatus) && spliceEndLineIndex < lineStatus.length &&
- spliceEndLineIndex > spliceStartLineIndex) {
- // pure deletion of one or more lines, mark the next line after
- // the deletion as dirty to trigger relexing
- newDirtyStatus = "d";
- extraDirty = 1;
- }
- lineStatus = lineStatus.substring(0, spliceStartLineIndex) +
- newDirtyStatus + lineStatus.substring(spliceEndLineIndex + extraDirty);
-
- buffer = newBuffer;
- }
-
- function findBeginningOfDirtyRegion(dirtyLineIndex) {
- // search backwards for a line that is either the first line
- // or is preceded by a non-dirty line.
- var cleanLine = Math.max(lineStatus.lastIndexOf("c", dirtyLineIndex),
- lineStatus.lastIndexOf("u", dirtyLineIndex));
- // cleanLine is now either -1 (if all lines are dirty back to beginning of doc)
- // or the index of a clean line
- return cleanLine + 1;
- }
-
- function findEndOfUncoloredRegion(uncoloredLineIndex) {
- // search forwards for a line that is not uncolored,
- // or return number of lines in doc if end of doc is hit.
- var idx1 = lineStatus.indexOf("c", uncoloredLineIndex);
- var idx2 = lineStatus.indexOf("d", uncoloredLineIndex);
- if (idx1 < 0) {
- if (idx2 < 0) return lineStatus.length;
- else return idx2;
- }
- else {
- if (idx2 < 0) return idx1;
- else return Math.min(idx1, idx2);
- }
- }
-
- function getLineText(lineIndex) {
- var lineEntry = lineData.atIndex(lineIndex);
- var lineTextStart = lineData.offsetOfIndex(lineIndex);
- var lineTextEnd = lineTextStart + lineEntry.width;
- return buffer.substring(lineTextStart, lineTextEnd);
- }
-
- function setLineStatus(lineIndex, status) {
- lineStatus = lineStatus.substring(0, lineIndex) + status +
- lineStatus.substring(lineIndex+1);
- }
-
- function lexCharRange(charRange, isTimeUp) {
- if (isTimeUp()) return;
-
- var lexStart = roundBackToLineIndex(charRange[0]);
- var lexEnd = roundForwardToLineIndex(charRange[1]);
-
- // can't parse a dirty line in the middle of a dirty region,
- // no sensible start state; so find beginning of dirty region
- var nextCandidate = findBeginningOfDirtyRegion(lexStart);
-
- while (! isTimeUp()) {
- // find a dirty line to parse; if may be before lexStart,
- // but stop at lexEnd.
- var nextDirty = lineStatus.indexOf("d", nextCandidate);
- if (nextDirty < 0 || nextDirty >= lexEnd) {
- break;
- }
- var theLineIndex = nextDirty;
- var theLineEntry = lineData.atIndex(theLineIndex);
- var lineText = getLineText(theLineIndex);
-
- // assert: previous line is not dirty
- var startState;
- if (theLineIndex > 0) {
- startState = lineData.atIndex(theLineIndex-1).endState;
- }
- else {
- startState = initialState;
- }
-
- var tokenWidths = [];
- var tokenNames = [];
- var tokenFunc = function(str, cls) {
- tokenWidths.push(str.length);
- tokenNames.push(cls);
- }
- var endState = parseLine(lineText, startState, tokenFunc);
-
- theLineEntry.startState = startState;
- theLineEntry.endState = endState;
- theLineEntry.tokenWidths = tokenWidths;
- theLineEntry.tokenNames = tokenNames;
-
- setLineStatus(theLineIndex, "u");
-
- nextCandidate = theLineIndex + 1;
- if (nextCandidate < lineStatus.length &&
- lineStatus.charAt(nextCandidate) != "d" &&
- lineData.atIndex(nextCandidate).startState != endState) {
- // state has changed, lexing must continue past end of dirty
- // region
- setLineStatus(nextCandidate, "d");
- }
- }
- }
-
- function forEachUncoloredSubrange(startChar, endChar, func, isTimeUp) {
- var startLine = roundBackToLineIndex(startChar);
- var endLine = roundForwardToLineIndex(endChar);
-
- var nextCandidate = startLine;
-
- while (! isTimeUp()) {
- var nextUncolored = lineStatus.indexOf("u", nextCandidate);
- if (nextUncolored < 0 || nextUncolored >= endLine) {
- break;
- }
- var uncoloredEndLine = findEndOfUncoloredRegion(nextUncolored);
-
- var rangeStart = Math.max(startChar, lineData.offsetOfIndex(nextUncolored));
- var rangeEnd = Math.min(endChar, lineData.offsetOfIndex(uncoloredEndLine));
-
- func(rangeStart, rangeEnd, isTimeUp);
-
- nextCandidate = uncoloredEndLine;
- }
- }
-
- function getSpansForRange(startChar, endChar, func, justPeek) {
- var startLine = roundBackToLineIndex(startChar);
- var endLine = roundForwardToLineIndex(endChar);
-
- function doToken(tokenStart, tokenWidth, tokenClass) {
- // crop token to [startChar,endChar] range
- if (tokenStart + tokenWidth <= startChar) return;
- if (tokenStart >= endChar) return;
- if (tokenStart < startChar) {
- tokenWidth -= (startChar - tokenStart);
- tokenStart = startChar;
- }
- if (tokenStart + tokenWidth > endChar) {
- tokenWidth -= (tokenStart + tokenWidth - endChar);
- }
- if (tokenWidth <= 0) return;
- func(tokenWidth, tokenClass);
- }
-
- for(var i=startLine; i<endLine; i++) {
- var status = lineStatus.charAt(i);
- var lineEntry = lineData.atIndex(i);
- var charOffset = lineData.offsetOfIndex(i);
- if (status == "d") {
- doToken(charOffset, lineEntry.width, "dirty");
- }
- else {
- var tokenWidths = lineEntry.tokenWidths;
- var tokenNames = lineEntry.tokenNames;
- for(var j=0;j<tokenWidths.length;j++) {
- var w = tokenWidths[j];
- doToken(charOffset, w, getClassesForScope(tokenNames[j]));
- charOffset += w;
- }
- if (status != "c" && ! justPeek) {
- setLineStatus(i, "c");
- }
- }
- }
- }
-
- function markRangeUncolored(startChar, endChar) {
- var startLine = roundBackToLineIndex(startChar);
- var endLine = roundForwardToLineIndex(endChar);
-
- function stripColors(statuses) {
- var a = [];
- for(var i=0;i<statuses.length;i++) {
- var x = statuses.charAt(i);
- a.push((x == 'c') ? 'u' : x);
- }
- return a.join('');
- }
-
- lineStatus = lineStatus.substring(0, startLine) +
- stripColors(lineStatus.substring(startLine, endLine)) +
- lineStatus.substring(endLine);
- }
-
- function _vars() {
- return {lineData:lineData, buffer:buffer, lineStatus:lineStatus, nextLineDataId:nextLineDataId,
- lineParser:lineParser};
- }
-
- return {
- updateBuffer: updateBuffer,
- lexCharRange: lexCharRange,
- getSpansForRange: getSpansForRange,
- forEachUncoloredSubrange: forEachUncoloredSubrange,
- markRangeUncolored: markRangeUncolored,
- _vars: _vars
- };
-}
-
-function makeSimpleLexer(lineParser) {
- var parseLine = lineParser.parseLine;
- var initialState = lineParser.initialState;
- var getClassesForScope = lineParser.getClassesForScope;
-
- function lexAsLines(str, tokenFunc, newLineFunc) {
- if (str.charAt(str.length-1) != '\n') {
- str = str+'\n';
- }
- function doToken(txt, scope) {
- tokenFunc(txt, getClassesForScope(scope));
- }
- var state = initialState;
- str.replace(/[^\n]*\n/g, function(line) {
- state = parseLine(line, state, doToken);
- newLineFunc();
- });
- }
-
- function lexString(str, tokenFunc) {
- lexAsLines(str, tokenFunc, function() {});
- }
-
- return {lexString:lexString, lexAsLines:lexAsLines};
-}
-
-function codeStringToHTML(codeString) {
- var simpleLexer = makeSimpleLexer(grammars["source.js"]);
- var atLineStart = true;
- var html = [];
- function tokenFunc(txt, type) {
- var cls = type;
- if (cls) html.push('<tt class="',cls,'">');
- else html.push('<tt>');
- html.push(escapeHTML(txt),'</tt>');
- atLineStart = false;
- }
- function newLineFunc() {
- html.push('<br/>\n');
- atLineStart = true;
- }
- simpleLexer.lexAsLines(codeString, tokenFunc, newLineFunc);
- if (atLineStart) html.push('<br/>\n');
- return html.join('');
-}
-
-function escapeHTML(s) {
- var re = /[&<>\'\" ]/g;
- if (! re.MAP) {
- // persisted across function calls!
- re.MAP = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&#34;',
- "'": '&#39;',
- ' ': '&#160;'
- };
- }
- return s.replace(re, function(c) { return re.MAP[c]; });
-}
-
-function getIncrementalLexer(type) {
- return makeIncrementalLexer(grammars["text.html.basic"]);//grammars[type]);
-}
-function getSimpleLexer(type) {
- return makeSimpleLexer(grammars[type]);
-}
-
-return {getIncrementalLexer:getIncrementalLexer, getSimpleLexer:getSimpleLexer,
- codeStringToHTML:codeStringToHTML};
-
-})();
diff --git a/trunk/infrastructure/ace/www/processing.js b/trunk/infrastructure/ace/www/processing.js
deleted file mode 100644
index 988ef76..0000000
--- a/trunk/infrastructure/ace/www/processing.js
+++ /dev/null
@@ -1,1714 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Processing.js - John Resig (http://ejohn.org/)
- * MIT Licensed
- * http://ejohn.org/blog/processingjs/
- *
- * This is a port of the Processing Visualization Language.
- * More information: http://processing.org/
- */
-
-(function(){
-
-this.Processing = function Processing( aElement, aCode )
-{
- var p = buildProcessing( aElement );
- p.init( aCode );
- return p;
-};
-
-function log()
-{
- try
- {
- console.log.apply( console, arguments );
- }
- catch(e)
- {
- try
- {
- opera.postError.apply( opera, arguments );
- }
- catch(e){}
- }
-}
-
-function parse( aCode, p )
-{
- // Angels weep at this parsing code :-(
-
- // Remove end-of-line comments
- aCode = aCode.replace(/\/\/ .*\n/g, "\n");
-
- // Weird parsing errors with %
- aCode = aCode.replace(/([^\s])%([^\s])/g, "$1 % $2");
-
- // Simple convert a function-like thing to function
- aCode = aCode.replace(/(?:static )?(\w+ )(\w+)\s*(\([^\)]*\)\s*{)/g, function(all, type, name, args)
- {
- if ( name == "if" || name == "for" || name == "while" )
- {
- return all;
- }
- else
- {
- return "Processing." + name + " = function " + name + args;
- }
- });
-
- // Force .length() to be .length
- aCode = aCode.replace(/\.length\(\)/g, ".length");
-
- // foo( int foo, float bar )
- aCode = aCode.replace(/([\(,]\s*)(\w+)((?:\[\])+| )\s*(\w+\s*[\),])/g, "$1$4");
- aCode = aCode.replace(/([\(,]\s*)(\w+)((?:\[\])+| )\s*(\w+\s*[\),])/g, "$1$4");
-
- // float[] foo = new float[5];
- aCode = aCode.replace(/new (\w+)((?:\[([^\]]*)\])+)/g, function(all, name, args)
- {
- return "new ArrayList(" + args.slice(1,-1).split("][").join(", ") + ")";
- });
-
- aCode = aCode.replace(/(?:static )?\w+\[\]\s*(\w+)\[?\]?\s*=\s*{.*?};/g, function(all)
- {
- return all.replace(/{/g, "[").replace(/}/g, "]");
- });
-
- // int|float foo;
- var intFloat = /(\n\s*(?:int|float)(?:\[\])?(?:\s*|[^\(]*?,\s*))([a-z]\w*)(;|,)/i;
- while ( intFloat.test(aCode) )
- {
- aCode = aCode.replace(new RegExp(intFloat), function(all, type, name, sep)
- {
- return type + " " + name + " = 0" + sep;
- });
- }
-
- // float foo = 5;
- aCode = aCode.replace(/(?:static )?(\w+)((?:\[\])+| ) *(\w+)\[?\]?(\s*[=,;])/g, function(all, type, arr, name, sep)
- {
- if ( type == "return" )
- return all;
- else
- return "var " + name + sep;
- });
-
- // Fix Array[] foo = {...} to [...]
- aCode = aCode.replace(/=\s*{((.|\s)*?)};/g, function(all,data)
- {
- return "= [" + data.replace(/{/g, "[").replace(/}/g, "]") + "]";
- });
-
- // static { ... } blocks
- aCode = aCode.replace(/static\s*{((.|\n)*?)}/g, function(all, init)
- {
- // Convert the static definitons to variable assignments
- //return init.replace(/\((.*?)\)/g, " = $1");
- return init;
- });
-
- // super() is a reserved word
- aCode = aCode.replace(/super\(/g, "superMethod(");
-
- var classes = ["int", "float", "boolean", "string"];
-
- function ClassReplace(all, name, extend, vars, last)
- {
- classes.push( name );
-
- var static = "";
-
- vars = vars.replace(/final\s+var\s+(\w+\s*=\s*.*?;)/g, function(all,set)
- {
- static += " " + name + "." + set;
- return "";
- });
-
- // Move arguments up from constructor and wrap contents with
- // a with(this), and unwrap constructor
- return "function " + name + "() {with(this){\n " +
- (extend ? "var __self=this;function superMethod(){extendClass(__self,arguments," + extend + ");}\n" : "") +
- // Replace var foo = 0; with this.foo = 0;
- // and force var foo; to become this.foo = null;
- vars
- .replace(/,\s?/g, ";\n this.")
- .replace(/\b(var |final |public )+\s*/g, "this.")
- .replace(/this.(\w+);/g, "this.$1 = null;") +
- (extend ? "extendClass(this, " + extend + ");\n" : "") +
- "<CLASS " + name + " " + static + ">" + (typeof last == "string" ? last : name + "(");
- }
-
- var matchClasses = /(?:public |abstract |static )*class (\w+)\s*(?:extends\s*(\w+)\s*)?{\s*((?:.|\n)*?)\b\1\s*\(/g;
- var matchNoCon = /(?:public |abstract |static )*class (\w+)\s*(?:extends\s*(\w+)\s*)?{\s*((?:.|\n)*?)(Processing)/g;
-
- aCode = aCode.replace(matchClasses, ClassReplace);
- aCode = aCode.replace(matchNoCon, ClassReplace);
-
- var matchClass = /<CLASS (\w+) (.*?)>/, m;
-
- while ( (m = aCode.match( matchClass )) )
- {
- var left = RegExp.leftContext,
- allRest = RegExp.rightContext,
- rest = nextBrace(allRest),
- className = m[1],
- staticVars = m[2] || "";
-
- allRest = allRest.slice( rest.length + 1 );
-
- rest = rest.replace(new RegExp("\\b" + className + "\\(([^\\)]*?)\\)\\s*{", "g"), function(all, args)
- {
- args = args.split(/,\s*?/);
-
- if ( args[0].match(/^\s*$/) )
- args.shift();
-
- var fn = "if ( arguments.length == " + args.length + " ) {\n";
-
- for ( var i = 0; i < args.length; i++ )
- {
- fn += " var " + args[i] + " = arguments[" + i + "];\n";
- }
-
- return fn;
- });
-
- // Fix class method names
- // this.collide = function() { ... }
- // and add closing } for with(this) ...
- rest = rest.replace(/(?:public )?Processing.\w+ = function (\w+)\((.*?)\)/g, function(all, name, args)
- {
- return "ADDMETHOD(this, '" + name + "', function(" + args + ")";
- });
-
- var matchMethod = /ADDMETHOD([\s\S]*?{)/, mc;
- var methods = "";
-
- while ( (mc = rest.match( matchMethod )) )
- {
- var prev = RegExp.leftContext,
- allNext = RegExp.rightContext,
- next = nextBrace(allNext);
-
- methods += "addMethod" + mc[1] + next + "});"
-
- rest = prev + allNext.slice( next.length + 1 );
-
- }
-
- rest = methods + rest;
-
- aCode = left + rest + "\n}}" + staticVars + allRest;
- }
-
- // Do some tidying up, where necessary
- aCode = aCode.replace(/Processing.\w+ = function addMethod/g, "addMethod");
-
- function nextBrace( right )
- {
- var rest = right;
- var position = 0;
- var leftCount = 1, rightCount = 0;
-
- while ( leftCount != rightCount )
- {
- var nextLeft = rest.indexOf("{");
- var nextRight = rest.indexOf("}");
-
- if ( nextLeft < nextRight && nextLeft != -1 )
- {
- leftCount++;
- rest = rest.slice( nextLeft + 1 );
- position += nextLeft + 1;
- }
- else
- {
- rightCount++;
- rest = rest.slice( nextRight + 1 );
- position += nextRight + 1;
- }
- }
-
- return right.slice(0, position - 1);
- }
-
- // Handle (int) Casting
- aCode = aCode.replace(/\(int\)/g, "0|");
-
- // Remove Casting
- aCode = aCode.replace(new RegExp("\\((" + classes.join("|") + ")(\\[\\])?\\)", "g"), "");
-
- // Convert 3.0f to just 3.0
- aCode = aCode.replace(/(\d+)f/g, "$1");
-
- // Force numbers to exist
- //aCode = aCode.replace(/([^.])(\w+)\s*\+=/g, "$1$2 = ($2||0) +");
-
- // Force characters-as-bytes to work
- aCode = aCode.replace(/('[a-zA-Z0-9]')/g, "$1.charCodeAt(0)");
-
- // Convert #aaaaaa into color
- aCode = aCode.replace(/#([a-f0-9]{6})/ig, function(m, hex){
- var num = toNumbers(hex);
- return "color(" + num[0] + "," + num[1] + "," + num[2] + ")";
- });
-
- function toNumbers( str ){
- var ret = [];
- str.replace(/(..)/g, function(str){
- ret.push( parseInt( str, 16 ) );
- });
- return ret;
- }
-
-//log(aCode);
-
- return aCode;
-}
-
-function buildProcessing( curElement ){
-
- var p = {};
-
- // init
- p.PI = Math.PI;
- p.TWO_PI = 2 * p.PI;
- p.HALF_PI = p.PI / 2;
- p.P3D = 3;
- p.CORNER = 0;
- p.CENTER = 1;
- p.CENTER_RADIUS = 2;
- p.RADIUS = 2;
- p.POLYGON = 1;
- p.TRIANGLES = 6;
- p.POINTS = 7;
- p.LINES = 8;
- p.TRIANGLE_STRIP = 9;
- p.CORNERS = 10;
- p.CLOSE = true;
- p.RGB = 1;
- p.HSB = 2;
-
- // "Private" variables used to maintain state
- var curContext = curElement.getContext("2d");
- var doFill = true;
- var doStroke = true;
- var loopStarted = false;
- var hasBackground = false;
- var doLoop = true;
- var curRectMode = p.CORNER;
- var curEllipseMode = p.CENTER;
- var inSetup = false;
- var inDraw = false;
- var curBackground = "rgba(204,204,204,1)";
- var curFrameRate = 1000;
- var curShape = p.POLYGON;
- var curShapeCount = 0;
- var opacityRange = 255;
- var redRange = 255;
- var greenRange = 255;
- var blueRange = 255;
- var pathOpen = false;
- var mousePressed = false;
- var keyPressed = false;
- var firstX, firstY, prevX, prevY;
- var curColorMode = p.RGB;
- var curTint = -1;
- var curTextSize = 12;
- var curTextFont = "Arial";
- var getLoaded = false;
- var start = (new Date).getTime();
-
- // Global vars for tracking mouse position
- p.pmouseX = 0;
- p.pmouseY = 0;
- p.mouseX = 0;
- p.mouseY = 0;
-
- // Will be replaced by the user, most likely
- p.mouseDragged = undefined;
- p.mouseMoved = undefined;
- p.mousePressed = undefined;
- p.mouseReleased = undefined;
- p.keyPressed = undefined;
- p.keyReleased = undefined;
- p.draw = undefined;
- p.setup = undefined;
-
- // The height/width of the canvas
- p.width = curElement.width - 0;
- p.height = curElement.height - 0;
-
- // In case I ever need to do HSV conversion:
- // http://srufaculty.sru.edu/david.dailey/javascript/js/5rml.js
- p.color = function color( aValue1, aValue2, aValue3, aValue4 )
- {
- var aColor = "";
-
- if ( arguments.length == 3 )
- {
- aColor = p.color( aValue1, aValue2, aValue3, opacityRange );
- }
- else if ( arguments.length == 4 )
- {
- var a = aValue4 / opacityRange;
- a = isNaN(a) ? 1 : a;
-
- if ( curColorMode == p.HSB )
- {
- var rgb = HSBtoRGB(aValue1, aValue2, aValue3);
- var r = rgb[0], g = rgb[1], b = rgb[2];
- }
- else
- {
- var r = getColor(aValue1, redRange);
- var g = getColor(aValue2, greenRange);
- var b = getColor(aValue3, blueRange);
- }
-
- aColor = "rgba(" + r + "," + g + "," + b + "," + a + ")";
- }
- else if ( typeof aValue1 == "string" )
- {
- aColor = aValue1;
-
- if ( arguments.length == 2 )
- {
- var c = aColor.split(",");
- c[3] = (aValue2 / opacityRange) + ")";
- aColor = c.join(",");
- }
- }
- else if ( arguments.length == 2 )
- {
- aColor = p.color( aValue1, aValue1, aValue1, aValue2 );
- }
- else if ( typeof aValue1 == "number" )
- {
- aColor = p.color( aValue1, aValue1, aValue1, opacityRange );
- }
- else
- {
- aColor = p.color( redRange, greenRange, blueRange, opacityRange );
- }
-
- // HSB conversion function from Mootools, MIT Licensed
- function HSBtoRGB(h, s, b)
- {
- h = (h / redRange) * 100;
- s = (s / greenRange) * 100;
- b = (b / blueRange) * 100;
- if (s == 0){
- return [b, b, b];
- } else {
- var hue = h % 360;
- var f = hue % 60;
- var br = Math.round(b / 100 * 255);
- var p = Math.round((b * (100 - s)) / 10000 * 255);
- var q = Math.round((b * (6000 - s * f)) / 600000 * 255);
- var t = Math.round((b * (6000 - s * (60 - f))) / 600000 * 255);
- switch (Math.floor(hue / 60)){
- case 0: return [br, t, p];
- case 1: return [q, br, p];
- case 2: return [p, br, t];
- case 3: return [p, q, br];
- case 4: return [t, p, br];
- case 5: return [br, p, q];
- }
- }
- }
-
- function getColor( aValue, range )
- {
- return Math.round(255 * (aValue / range));
- }
-
- return aColor;
- }
-
- p.nf = function( num, pad )
- {
- var str = "" + num;
- while ( pad - str.length )
- str = "0" + str;
- return str;
- };
-
- p.AniSprite = function( prefix, frames )
- {
- this.images = [];
- this.pos = 0;
-
- for ( var i = 0; i < frames; i++ )
- {
- this.images.push( prefix + p.nf( i, ("" + frames).length ) + ".gif" );
- }
-
- this.display = function( x, y )
- {
- p.image( this.images[ this.pos ], x, y );
-
- if ( ++this.pos >= frames )
- this.pos = 0;
- };
-
- this.getWidth = function()
- {
- return getImage(this.images[0]).width;
- };
-
- this.getHeight = function()
- {
- return getImage(this.images[0]).height;
- };
- };
-
- function buildImageObject( obj )
- {
- var pixels = obj.data;
- var data = p.createImage( obj.width, obj.height );
-
- if ( data.__defineGetter__ && data.__lookupGetter__ && !data.__lookupGetter__("pixels") )
- {
- var pixelsDone;
- data.__defineGetter__("pixels", function()
- {
- if ( pixelsDone )
- return pixelsDone;
-
- pixelsDone = [];
-
- for ( var i = 0; i < pixels.length; i += 4 )
- {
- pixelsDone.push( p.color(pixels[i], pixels[i+1], pixels[i+2], pixels[i+3]) );
- }
-
- return pixelsDone;
- });
- }
- else
- {
- data.pixels = [];
-
- for ( var i = 0; i < pixels.length; i += 4 )
- {
- data.pixels.push( p.color(pixels[i], pixels[i+1], pixels[i+2], pixels[i+3]) );
- }
- }
-
- return data;
- }
-
- p.createImage = function createImage( w, h, mode )
- {
- var data = {
- width: w,
- height: h,
- pixels: new Array( w * h ),
- get: function(x,y)
- {
- return this.pixels[w*y+x];
- },
- _mask: null,
- mask: function(img)
- {
- this._mask = img;
- },
- loadPixels: function()
- {
- },
- updatePixels: function()
- {
- }
- };
-
- return data;
- }
-
- p.createGraphics = function createGraphics( w, h )
- {
- var canvas = document.createElement("canvas");
- var ret = buildProcessing( canvas );
- ret.size( w, h );
- ret.canvas = canvas;
- return ret;
- }
-
- p.beginDraw = function beginDraw()
- {
-
- }
-
- p.endDraw = function endDraw()
- {
-
- }
-
- p.tint = function tint( rgb, a )
- {
- curTint = a;
- }
-
- function getImage( img ) {
- if ( typeof img == "string" )
- {
- return document.getElementById(img);
- }
-
- if ( img.img || img.canvas )
- {
- return img.img || img.canvas;
- }
-
- img.data = [];
-
- for ( var i = 0, l = img.pixels.length; i < l; i++ )
- {
- var c = (img.pixels[i] || "rgba(0,0,0,1)").slice(5,-1).split(",");
- img.data.push( parseInt(c[0]), parseInt(c[1]), parseInt(c[2]), parseFloat(c[3]) * 100 );
- }
-
- var canvas = document.createElement("canvas")
- canvas.width = img.width;
- canvas.height = img.height;
- var context = canvas.getContext("2d");
- context.putImageData( img, 0, 0 );
-
- img.canvas = canvas;
-
- return canvas;
- }
-
- p.image = function image( img, x, y, w, h )
- {
- x = x || 0;
- y = y || 0;
-
- var obj = getImage(img);
-
- if ( curTint >= 0 )
- {
- var oldAlpha = curContext.globalAlpha;
- curContext.globalAlpha = curTint / opacityRange;
- }
-
- if ( arguments.length == 3 )
- {
- curContext.drawImage( obj, x, y );
- }
- else
- {
- curContext.drawImage( obj, x, y, w, h );
- }
-
- if ( curTint >= 0 )
- {
- curContext.globalAlpha = oldAlpha;
- }
-
- if ( img._mask )
- {
- var oldComposite = curContext.globalCompositeOperation;
- curContext.globalCompositeOperation = "darker";
- p.image( img._mask, x, y );
- curContext.globalCompositeOperation = oldComposite;
- }
- }
-
- p.exit = function exit()
- {
-
- }
-
- p.save = function save( file )
- {
-
- }
-
- p.loadImage = function loadImage( file )
- {
- var img = document.getElementById(file);
- if ( !img )
- return;
-
- var h = img.height, w = img.width;
-
- var canvas = document.createElement("canvas");
- canvas.width = w;
- canvas.height = h;
- var context = canvas.getContext("2d");
-
- context.drawImage( img, 0, 0 );
- var data = buildImageObject( context.getImageData( 0, 0, w, h ) );
- data.img = img;
- return data;
- }
-
- p.loadFont = function loadFont( name )
- {
- return {
- name: name,
- width: function( str )
- {
- if ( curContext.mozMeasureText )
- return curContext.mozMeasureText( typeof str == "number" ?
- String.fromCharCode( str ) :
- str) / curTextSize;
- else
- return 0;
- }
- };
- }
-
- p.textFont = function textFont( name, size )
- {
- curTextFont = name;
- p.textSize( size );
- }
-
- p.textSize = function textSize( size )
- {
- if ( size )
- {
- curTextSize = size;
- }
- }
-
- p.textAlign = function textAlign()
- {
-
- }
-
- p.text = function text( str, x, y )
- {
- if ( str && curContext.mozDrawText )
- {
- curContext.save();
- curContext.mozTextStyle = curTextSize + "px " + curTextFont.name;
- curContext.translate(x, y);
- curContext.mozDrawText( typeof str == "number" ?
- String.fromCharCode( str ) :
- str );
- curContext.restore();
- }
- }
-
- p.char = function char( key )
- {
- //return String.fromCharCode( key );
- return key;
- }
-
- p.println = function println()
- {
-
- }
-
- p.map = function map( value, istart, istop, ostart, ostop )
- {
- return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
- };
-
- String.prototype.replaceAll = function(re, replace)
- {
- return this.replace(new RegExp(re, "g"), replace);
- };
-
- p.Point = function Point( x, y )
- {
- this.x = x;
- this.y = y;
- this.copy = function()
- {
- return new Point( x, y );
- }
- }
-
- p.Random = function()
- {
- var haveNextNextGaussian = false;
- var nextNextGaussian;
-
- this.nextGaussian = function()
- {
- if (haveNextNextGaussian) {
- haveNextNextGaussian = false;
-
- return nextNextGaussian;
- } else {
- var v1, v2, s;
- do {
- v1 = 2 * p.random(1) - 1; // between -1.0 and 1.0
- v2 = 2 * p.random(1) - 1; // between -1.0 and 1.0
- s = v1 * v1 + v2 * v2;
- } while (s >= 1 || s == 0);
- var multiplier = Math.sqrt(-2 * Math.log(s)/s);
- nextNextGaussian = v2 * multiplier;
- haveNextNextGaussian = true;
-
- return v1 * multiplier;
- }
- };
- }
-
- p.ArrayList = function ArrayList( size, size2, size3 )
- {
- var array = new Array( 0 | size );
-
- if ( size2 )
- {
- for ( var i = 0; i < size; i++ )
- {
- array[i] = [];
-
- for ( var j = 0; j < size2; j++ )
- {
- var a = array[i][j] = size3 ? new Array( size3 ) : 0;
- for ( var k = 0; k < size3; k++ )
- {
- a[k] = 0;
- }
- }
- }
- }
- else
- {
- for ( var i = 0; i < size; i++ )
- {
- array[i] = 0;
- }
- }
-
- array.size = function()
- {
- return this.length;
- };
- array.get = function( i )
- {
- return this[ i ];
- };
- array.remove = function( i )
- {
- return this.splice( i, 1 );
- };
- array.add = function( item )
- {
- for ( var i = 0; this[ i ] != undefined; i++ ) {}
- this[ i ] = item;
- };
- array.clone = function()
- {
- var a = new ArrayList( size );
- for ( var i = 0; i < size; i++ )
- {
- a[ i ] = this[ i ];
- }
- return a;
- };
- array.isEmpty = function()
- {
- return !this.length;
- };
- array.clear = function()
- {
- this.length = 0;
- };
-
- return array;
- }
-
- p.colorMode = function colorMode( mode, range1, range2, range3, range4 )
- {
- curColorMode = mode;
-
- if ( arguments.length >= 4 )
- {
- redRange = range1;
- greenRange = range2;
- blueRange = range3;
- }
-
- if ( arguments.length == 5 )
- {
- opacityRange = range4;
- }
-
- if ( arguments.length == 2 )
- {
- p.colorMode( mode, range1, range1, range1, range1 );
- }
- }
-
- p.beginShape = function beginShape( type )
- {
- curShape = type;
- curShapeCount = 0;
- }
-
- p.endShape = function endShape( close )
- {
- if ( curShapeCount != 0 )
- {
- curContext.lineTo( firstX, firstY );
-
- if ( doFill )
- curContext.fill();
-
- if ( doStroke )
- curContext.stroke();
-
- curContext.closePath();
- curShapeCount = 0;
- pathOpen = false;
- }
-
- if ( pathOpen )
- {
- curContext.closePath();
- }
- }
-
- p.vertex = function vertex( x, y, x2, y2, x3, y3 )
- {
- if ( curShapeCount == 0 && curShape != p.POINTS )
- {
- pathOpen = true;
- curContext.beginPath();
- curContext.moveTo( x, y );
- }
- else
- {
- if ( curShape == p.POINTS )
- {
- p.point( x, y );
- }
- else if ( arguments.length == 2 )
- {
- if ( curShape == p.TRIANGLE_STRIP && curShapeCount == 2 )
- {
- curContext.moveTo( prevX, prevY );
- curContext.lineTo( firstX, firstY );
- }
-
- curContext.lineTo( x, y );
- }
- else if ( arguments.length == 4 )
- {
- if ( curShapeCount > 1 )
- {
- curContext.moveTo( prevX, prevY );
- curContext.quadraticCurveTo( firstX, firstY, x, y );
- curShapeCount = 1;
- }
- }
- else if ( arguments.length == 6 )
- {
- curContext.bezierCurveTo( x, y, x2, y2, x3, y3 );
- curShapeCount = -1;
- }
- }
-
- prevX = firstX;
- prevY = firstY;
- firstX = x;
- firstY = y;
-
-
- curShapeCount++;
-
- if ( curShape == p.LINES && curShapeCount == 2 ||
- (curShape == p.TRIANGLES || curShape == p.TRIANGLE_STRIP) && curShapeCount == 3 )
- {
- p.endShape();
- }
-
- if ( curShape == p.TRIANGLE_STRIP && curShapeCount == 3 )
- {
- curShapeCount = 2;
- }
- }
-
- p.curveTightness = function()
- {
-
- }
-
- // Unimplmented - not really possible with the Canvas API
- p.curveVertex = function( x, y, x2, y2 )
- {
- p.vertex( x, y, x2, y2 );
- }
-
- p.bezierVertex = p.vertex
-
- p.rectMode = function rectMode( aRectMode )
- {
- curRectMode = aRectMode;
- }
-
- p.imageMode = function()
- {
-
- }
-
- p.ellipseMode = function ellipseMode( aEllipseMode )
- {
- curEllipseMode = aEllipseMode;
- }
-
- p.dist = function dist( x1, y1, x2, y2 )
- {
- return Math.sqrt( Math.pow( x2 - x1, 2 ) + Math.pow( y2 - y1, 2 ) );
- }
-
- p.year = function year()
- {
- return (new Date).getYear() + 1900;
- }
-
- p.month = function month()
- {
- return (new Date).getMonth();
- }
-
- p.day = function day()
- {
- return (new Date).getDay();
- }
-
- p.hour = function hour()
- {
- return (new Date).getHours();
- }
-
- p.minute = function minute()
- {
- return (new Date).getMinutes();
- }
-
- p.second = function second()
- {
- return (new Date).getSeconds();
- }
-
- p.millis = function millis()
- {
- return (new Date).getTime() - start;
- }
-
- p.ortho = function ortho()
- {
-
- }
-
- p.translate = function translate( x, y )
- {
- curContext.translate( x, y );
- }
-
- p.scale = function scale( x, y )
- {
- curContext.scale( x, y || x );
- }
-
- p.rotate = function rotate( aAngle )
- {
- curContext.rotate( aAngle );
- }
-
- p.pushMatrix = function pushMatrix()
- {
- curContext.save();
- }
-
- p.popMatrix = function popMatrix()
- {
- curContext.restore();
- }
-
- p.redraw = function redraw()
- {
- if ( hasBackground )
- {
- p.background();
- }
-
- inDraw = true;
- p.pushMatrix();
- p.draw();
- p.popMatrix();
- inDraw = false;
- }
-
- p.loop = function loop()
- {
- if ( loopStarted )
- return;
-
- var looping = setInterval(function()
- {
- try
- {
- p.redraw();
- }
- catch(e)
- {
- clearInterval( looping );
- throw e;
- }
- }, 1000 / curFrameRate );
-
- loopStarted = true;
- }
-
- p.frameRate = function frameRate( aRate )
- {
- curFrameRate = aRate;
- }
-
- p.background = function background( img )
- {
- if ( arguments.length )
- {
- if ( img && img.img )
- {
- curBackground = img;
- }
- else
- {
- curBackground = p.color.apply( this, arguments );
- }
- }
-
-
- if ( curBackground.img )
- {
- p.image( curBackground, 0, 0 );
- }
- else
- {
- var oldFill = curContext.fillStyle;
- curContext.fillStyle = curBackground + "";
- curContext.fillRect( 0, 0, p.width, p.height );
- curContext.fillStyle = oldFill;
- }
- }
-
- p.sq = function sq( aNumber )
- {
- return aNumber * aNumber;
- }
-
- p.sqrt = function sqrt( aNumber )
- {
- return Math.sqrt( aNumber );
- }
-
- p.int = function int( aNumber )
- {
- return Math.floor( aNumber );
- }
-
- p.min = function min( aNumber, aNumber2 )
- {
- return Math.min( aNumber, aNumber2 );
- }
-
- p.max = function max( aNumber, aNumber2 )
- {
- return Math.max( aNumber, aNumber2 );
- }
-
- p.ceil = function ceil( aNumber )
- {
- return Math.ceil( aNumber );
- }
-
- p.floor = function floor( aNumber )
- {
- return Math.floor( aNumber );
- }
-
- p.float = function float( aNumber )
- {
- return typeof aNumber == "string" ?
- p.float( aNumber.charCodeAt(0) ) :
- parseFloat( aNumber );
- }
-
- p.byte = function byte( aNumber )
- {
- return aNumber || 0;
- }
-
- p.random = function random( aMin, aMax )
- {
- return arguments.length == 2 ?
- aMin + (Math.random() * (aMax - aMin)) :
- Math.random() * aMin;
- }
-
- // From: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
- p.noise = function( x, y, z )
- {
- return arguments.length >= 2 ?
- PerlinNoise_2D( x, y ) :
- PerlinNoise_2D( x, x );
- }
-
- function Noise(x, y)
- {
- var n = x + y * 57;
- n = (n<<13) ^ n;
- return Math.abs(1.0 - (((n * ((n * n * 15731) + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0));
- }
-
- function SmoothedNoise(x, y)
- {
- var corners = ( Noise(x-1, y-1)+Noise(x+1, y-1)+Noise(x-1, y+1)+Noise(x+1, y+1) ) / 16;
- var sides = ( Noise(x-1, y) +Noise(x+1, y) +Noise(x, y-1) +Noise(x, y+1) ) / 8;
- var center = Noise(x, y) / 4;
- return corners + sides + center;
- }
-
- function InterpolatedNoise(x, y)
- {
- var integer_X = Math.floor(x);
- var fractional_X = x - integer_X;
-
- var integer_Y = Math.floor(y);
- var fractional_Y = y - integer_Y;
-
- var v1 = SmoothedNoise(integer_X, integer_Y);
- var v2 = SmoothedNoise(integer_X + 1, integer_Y);
- var v3 = SmoothedNoise(integer_X, integer_Y + 1);
- var v4 = SmoothedNoise(integer_X + 1, integer_Y + 1);
-
- var i1 = Interpolate(v1 , v2 , fractional_X);
- var i2 = Interpolate(v3 , v4 , fractional_X);
-
- return Interpolate(i1 , i2 , fractional_Y);
- }
-
- function PerlinNoise_2D(x, y)
- {
- var total = 0;
- var p = 0.25;
- var n = 3;
-
- for ( var i = 0; i <= n; i++ )
- {
- var frequency = Math.pow(2, i);
- var amplitude = Math.pow(p, i);
-
- total = total + InterpolatedNoise(x * frequency, y * frequency) * amplitude;
- }
-
- return total;
- }
-
- function Interpolate(a, b, x)
- {
- var ft = x * p.PI;
- var f = (1 - p.cos(ft)) * .5;
- return a*(1-f) + b*f;
- }
-
- p.red = function( aColor )
- {
- return parseInt(aColor.slice(5));
- }
-
- p.green = function( aColor )
- {
- return parseInt(aColor.split(",")[1]);
- }
-
- p.blue = function( aColor )
- {
- return parseInt(aColor.split(",")[2]);
- }
-
- p.alpha = function( aColor )
- {
- return parseInt(aColor.split(",")[3]);
- }
-
- p.abs = function abs( aNumber )
- {
- return Math.abs( aNumber );
- }
-
- p.cos = function cos( aNumber )
- {
- return Math.cos( aNumber );
- }
-
- p.sin = function sin( aNumber )
- {
- return Math.sin( aNumber );
- }
-
- p.pow = function pow( aNumber, aExponent )
- {
- return Math.pow( aNumber, aExponent );
- }
-
- p.constrain = function constrain( aNumber, aMin, aMax )
- {
- return Math.min( Math.max( aNumber, aMin ), aMax );
- }
-
- p.sqrt = function sqrt( aNumber )
- {
- return Math.sqrt( aNumber );
- }
-
- p.atan2 = function atan2( aNumber, aNumber2 )
- {
- return Math.atan2( aNumber, aNumber2 );
- }
-
- p.radians = function radians( aAngle )
- {
- return ( aAngle / 180 ) * p.PI;
- }
-
- p.size = function size( aWidth, aHeight )
- {
- var fillStyle = curContext.fillStyle;
- var strokeStyle = curContext.strokeStyle;
-
- curElement.width = p.width = aWidth;
- curElement.height = p.height = aHeight;
-
- curContext.fillStyle = fillStyle;
- curContext.strokeStyle = strokeStyle;
- }
-
- p.noStroke = function noStroke()
- {
- doStroke = false;
- }
-
- p.noFill = function noFill()
- {
- doFill = false;
- }
-
- p.smooth = function smooth()
- {
-
- }
-
- p.noLoop = function noLoop()
- {
- doLoop = false;
- }
-
- p.fill = function fill()
- {
- doFill = true;
- curContext.fillStyle = p.color.apply( this, arguments );
- }
-
- p.stroke = function stroke()
- {
- doStroke = true;
- curContext.strokeStyle = p.color.apply( this, arguments );
- }
-
- p.strokeWeight = function strokeWeight( w )
- {
- curContext.lineWidth = w;
- }
-
- p.point = function point( x, y )
- {
- var oldFill = curContext.fillStyle;
- curContext.fillStyle = curContext.strokeStyle;
- curContext.fillRect( Math.round( x ), Math.round( y ), 1, 1 );
- curContext.fillStyle = oldFill;
- }
-
- p.get = function get( x, y )
- {
- if ( arguments.length == 0 )
- {
- var c = p.createGraphics( p.width, p.height );
- c.image( curContext, 0, 0 );
- return c;
- }
-
- if ( !getLoaded )
- {
- getLoaded = buildImageObject( curContext.getImageData(0, 0, p.width, p.height) );
- }
-
- return getLoaded.get( x, y );
- }
-
- p.set = function set( x, y, color )
- {
- var oldFill = curContext.fillStyle;
- curContext.fillStyle = color;
- curContext.fillRect( Math.round( x ), Math.round( y ), 1, 1 );
- curContext.fillStyle = oldFill;
- }
-
- p.arc = function arc( x, y, width, height, start, stop )
- {
- if ( width <= 0 )
- return;
-
- if ( curEllipseMode == p.CORNER )
- {
- x += width / 2;
- y += height / 2;
- }
-
- curContext.beginPath();
-
- curContext.moveTo( x, y );
- curContext.arc( x, y, curEllipseMode == p.CENTER_RADIUS ? width : width/2, start, stop, false );
-
- if ( doFill )
- curContext.fill();
-
- if ( doStroke )
- curContext.stroke();
-
- curContext.closePath();
- }
-
- p.line = function line( x1, y1, x2, y2 )
- {
- curContext.lineCap = "round";
- curContext.beginPath();
-
- curContext.moveTo( x1 || 0, y1 || 0 );
- curContext.lineTo( x2 || 0, y2 || 0 );
-
- curContext.stroke();
-
- curContext.closePath();
- }
-
- p.bezier = function bezier( x1, y1, x2, y2, x3, y3, x4, y4 )
- {
- curContext.lineCap = "butt";
- curContext.beginPath();
-
- curContext.moveTo( x1, y1 );
- curContext.bezierCurveTo( x2, y2, x3, y3, x4, y4 );
-
- curContext.stroke();
-
- curContext.closePath();
- }
-
- p.triangle = function triangle( x1, y1, x2, y2, x3, y3 )
- {
- p.beginShape();
- p.vertex( x1, y1 );
- p.vertex( x2, y2 );
- p.vertex( x3, y3 );
- p.endShape();
- }
-
- p.quad = function quad( x1, y1, x2, y2, x3, y3, x4, y4 )
- {
- p.beginShape();
- p.vertex( x1, y1 );
- p.vertex( x2, y2 );
- p.vertex( x3, y3 );
- p.vertex( x4, y4 );
- p.endShape();
- }
-
- p.rect = function rect( x, y, width, height )
- {
- if ( width == 0 && height == 0 )
- return;
-
- curContext.beginPath();
-
- var offsetStart = 0;
- var offsetEnd = 0;
-
- if ( curRectMode == p.CORNERS )
- {
- width -= x;
- height -= y;
- }
-
- if ( curRectMode == p.RADIUS )
- {
- width *= 2;
- height *= 2;
- }
-
- if ( curRectMode == p.CENTER || curRectMode == p.RADIUS )
- {
- x -= width / 2;
- y -= height / 2;
- }
-
- curContext.rect(
- Math.round( x ) - offsetStart,
- Math.round( y ) - offsetStart,
- Math.round( width ) + offsetEnd,
- Math.round( height ) + offsetEnd
- );
-
- if ( doFill )
- curContext.fill();
-
- if ( doStroke )
- curContext.stroke();
-
- curContext.closePath();
- }
-
- p.ellipse = function ellipse( x, y, width, height )
- {
- x = x || 0;
- y = y || 0;
-
- if ( width <= 0 && height <= 0 )
- return;
-
- curContext.beginPath();
-
- if ( curEllipseMode == p.RADIUS )
- {
- width *= 2;
- height *= 2;
- }
-
- var offsetStart = 0;
-
- // Shortcut for drawing a circle
- if ( width == height )
- curContext.arc( x - offsetStart, y - offsetStart, width / 2, 0, Math.PI * 2, false );
-
- if ( doFill )
- curContext.fill();
-
- if ( doStroke )
- curContext.stroke();
-
- curContext.closePath();
- }
-
- p.link = function( href, target )
- {
- window.location = href;
- }
-
- p.loadPixels = function()
- {
- p.pixels = buildImageObject( curContext.getImageData(0, 0, p.width, p.height) ).pixels;
- }
-
- p.updatePixels = function()
- {
- var colors = /(\d+),(\d+),(\d+),(\d+)/;
- var pixels = {};
- var data = pixels.data = [];
- pixels.width = p.width;
- pixels.height = p.height;
-
- var pos = 0;
-
- for ( var i = 0, l = p.pixels.length; i < l; i++ ) {
- var c = (p.pixels[i] || "rgba(0,0,0,1)").match(colors);
- data[pos] = parseInt(c[1]);
- data[pos+1] = parseInt(c[2]);
- data[pos+2] = parseInt(c[3]);
- data[pos+3] = parseFloat(c[4]) * 100;
- pos += 4;
- }
-
- curContext.putImageData(pixels, 0, 0);
- }
-
- p.extendClass = function extendClass( obj, args, fn )
- {
- if ( arguments.length == 3 )
- {
- fn.apply( obj, args );
- }
- else
- {
- args.call( obj );
- }
- }
-
- p.addMethod = function addMethod( object, name, fn )
- {
- if ( object[ name ] )
- {
- var args = fn.length;
-
- var oldfn = object[ name ];
- object[ name ] = function()
- {
- if ( arguments.length == args )
- return fn.apply( this, arguments );
- else
- return oldfn.apply( this, arguments );
- };
- }
- else
- {
- object[ name ] = fn;
- }
- }
-
- p.init = function init(code){
- p.stroke( 0 );
- p.fill( 255 );
-
- // Canvas has trouble rendering single pixel stuff on whole-pixel
- // counts, so we slightly offset it (this is super lame).
- curContext.translate( 0.5, 0.5 );
-
- if ( code )
- {
- (function(Processing){with (p){
- eval(parse(code, p));
- }})(p);
- }
-
- if ( p.setup )
- {
- inSetup = true;
- p.setup();
- }
-
- inSetup = false;
-
- if ( p.draw )
- {
- if ( !doLoop )
- {
- p.redraw();
- }
- else
- {
- p.loop();
- }
- }
-
- attach( curElement, "mousemove", function(e)
- {
- p.pmouseX = p.mouseX;
- p.pmouseY = p.mouseY;
- p.mouseX = e.clientX - curElement.offsetLeft;
- p.mouseY = e.clientY - curElement.offsetTop;
-
- if ( p.mouseMoved )
- {
- p.mouseMoved();
- }
-
- if ( mousePressed && p.mouseDragged )
- {
- p.mouseDragged();
- }
- });
-
- attach( curElement, "mousedown", function(e)
- {
- mousePressed = true;
-
- if ( typeof p.mousePressed == "function" )
- {
- p.mousePressed();
- }
- else
- {
- p.mousePressed = true;
- }
- });
-
- attach( curElement, "mouseup", function(e)
- {
- mousePressed = false;
-
- if ( typeof p.mousePressed != "function" )
- {
- p.mousePressed = false;
- }
-
- if ( p.mouseReleased )
- {
- p.mouseReleased();
- }
- });
-
- attach( document, "keydown", function(e)
- {
- keyPressed = true;
-
- p.key = e.keyCode + 32;
-
- if ( e.shiftKey )
- {
- p.key = String.fromCharCode(p.key).toUpperCase().charCodeAt(0);
- }
-
- if ( typeof p.keyPressed == "function" )
- {
- p.keyPressed();
- }
- else
- {
- p.keyPressed = true;
- }
- });
-
- attach( document, "keyup", function(e)
- {
- keyPressed = false;
-
- if ( typeof p.keyPressed != "function" )
- {
- p.keyPressed = false;
- }
-
- if ( p.keyReleased )
- {
- p.keyReleased();
- }
- });
-
- function attach(elem, type, fn)
- {
- if ( elem.addEventListener )
- elem.addEventListener( type, fn, false );
- else
- elem.attachEvent( "on" + type, fn );
- }
- };
-
- return p;
-}
-
-})();
diff --git a/trunk/infrastructure/ace/www/profiler.js b/trunk/infrastructure/ace/www/profiler.js
deleted file mode 100644
index 24b68a2..0000000
--- a/trunk/infrastructure/ace/www/profiler.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// author: David Greenspan
-// a basic profiler
-// e.g. var p = PROFILER("somename", true);
-// p.mark("abc"); abc();
-// p.mark("xyz"); var x = xyz();
-// p.literal(x, "someNumber");
-// p.end();
-
-// Note that IE/Win only has 16 ms time resolution for each run.
-
-var _profilersByName = {};
-function PROFILER(name, enabled) {
- if (!_profilersByName['$'+name]) {
- _profilersByName['$'+name] = _makeProfiler(name, enabled);
- }
- var p = _profilersByName['$'+name];
- p.start();
- return p;
-}
-
-function resetProfiler(name) {
- delete _profilersByName['$'+name];
-}
-
-function _makeProfiler(name, enabled) {
- enabled = (enabled !== false);
-
- var _profileTime;
- var _profileResults;
- var _profileTotal;
- var _profileHistory = [];
- var running = false;
-
- function profileStart(name) {
- _profileResults = [];
- _profileTotal = 0;
- if (name) _profileResults.push(name);
- running = true;
- _profileTime = (new Date()).getTime();
- }
-
- function profileMark(name) {
- var stopTime = (new Date()).getTime();
- var dt = stopTime - _profileTime;
- _profileResults.push(dt);
- _profileTotal += dt;
- if (name) _profileResults.push(name);
- _profileTime = (new Date()).getTime();
- }
-
- function profileLiteral(value, name) {
- _profileResults.push(value);
- if (name) _profileResults.push("%="+name);
- }
-
- function profileEnd(name) {
- if (running == false) return;
- var stopTime = (new Date()).getTime();
- var dt = stopTime - _profileTime;
- _profileResults.push(dt);
- _profileTotal += dt;
- if (name) _profileResults.push(name);
- _profileResults.unshift(_profileTotal,"=");
- _profileHistory.push(_profileResults);
- if (dumpProfileDataTimeout)
- top.clearTimeout(dumpProfileDataTimeout);
- dumpProfileDataTimeout = top.setTimeout(dumpProfileData, 800);
- running = false;
- }
-
- var dumpProfileDataTimeout = null;
-
- function dumpProfileData() {
- var data = _profileHistory[0].slice();
- forEach(_profileHistory.slice(1), function (h) {
- forEach(h, function (x, i) {
- if ((typeof x) == "number") data[i] += x;
- });
- });
- data = map(data, function (x) {
- if ((typeof x) == "number") return String(x/_profileHistory.length).substring(0,4);
- return x;
- });
- data.push("("+_profileHistory.length+")");
- top.pad.dmesg(data.join(" ").replace(/ %/g,''));
- dumpProfileDataTimeout = null;
- }
-
- function noop() {}
- function cancel() {
- running = false;
- }
-
- if (enabled) {
- return {start:profileStart, mark:profileMark, literal:profileLiteral, end:profileEnd,
- cancel:cancel};
- }
- else {
- return {start:noop, mark:noop, literal:noop, end:noop, cancel:noop};
- }
-}
diff --git a/trunk/infrastructure/ace/www/skiplist.js b/trunk/infrastructure/ace/www/skiplist.js
deleted file mode 100644
index e6c2e04..0000000
--- a/trunk/infrastructure/ace/www/skiplist.js
+++ /dev/null
@@ -1,347 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-
-
-function newSkipList() {
- var PROFILER = window.PROFILER;
- if (!PROFILER) {
- PROFILER = function() { return {start:noop, mark:noop, literal:noop, end:noop, cancel:noop}; };
- }
- function noop() {}
-
- // if there are N elements in the skiplist, "start" is element -1 and "end" is element N
- var start = {key:null, levels: 1, upPtrs:[null], downPtrs:[null], downSkips:[1], downSkipWidths:[0]};
- var end = {key:null, levels: 1, upPtrs:[null], downPtrs:[null], downSkips:[null], downSkipWidths:[null]};
- var numNodes = 0;
- var totalWidth = 0;
- var keyToNodeMap = {};
- start.downPtrs[0] = end;
- end.upPtrs[0] = start;
- // a "point" object at location x allows modifications immediately after the first
- // x elements of the skiplist, such as multiple inserts or deletes.
- // After an insert or delete using point P, the point is still valid and points
- // to the same index in the skiplist. Other operations with other points invalidate
- // this point.
- function _getPoint(targetLoc) {
- var numLevels = start.levels;
- var lvl = numLevels-1;
- var i = -1, ws = 0;
- var nodes = new Array(numLevels);
- var idxs = new Array(numLevels);
- var widthSkips = new Array(numLevels);
- nodes[lvl] = start;
- idxs[lvl] = -1;
- widthSkips[lvl] = 0;
- while (lvl >= 0) {
- var n = nodes[lvl];
- while (n.downPtrs[lvl] &&
- (i + n.downSkips[lvl] < targetLoc)) {
- i += n.downSkips[lvl];
- ws += n.downSkipWidths[lvl];
- n = n.downPtrs[lvl];
- }
- nodes[lvl] = n;
- idxs[lvl] = i;
- widthSkips[lvl] = ws;
- lvl--;
- if (lvl >= 0) {
- nodes[lvl] = n;
- }
- }
- return {nodes:nodes, idxs:idxs, loc:targetLoc, widthSkips:widthSkips, toString: function() {
- return "getPoint("+targetLoc+")"; } };
- }
- function _getNodeAtOffset(targetOffset) {
- var i = 0;
- var n = start;
- var lvl = start.levels-1;
- while (lvl >= 0 && n.downPtrs[lvl]) {
- while (n.downPtrs[lvl] && (i + n.downSkipWidths[lvl] <= targetOffset)) {
- i += n.downSkipWidths[lvl];
- n = n.downPtrs[lvl];
- }
- lvl--;
- }
- if (n === start) return (start.downPtrs[0] || null);
- else if (n === end) return (targetOffset == totalWidth ? (end.upPtrs[0] || null) : null);
- return n;
- }
- function _entryWidth(e) { return (e && e.width) || 0; }
- function _insertKeyAtPoint(point, newKey, entry) {
- var p = PROFILER("insertKey", false);
- var newNode = {key:newKey, levels: 0, upPtrs:[], downPtrs:[], downSkips:[], downSkipWidths:[]};
- p.mark("donealloc");
- var pNodes = point.nodes;
- var pIdxs = point.idxs;
- var pLoc = point.loc;
- var widthLoc = point.widthSkips[0] + point.nodes[0].downSkipWidths[0];
- var newWidth = _entryWidth(entry);
- p.mark("loop1");
- while (newNode.levels == 0 || Math.random() < 0.01) {
- var lvl = newNode.levels;
- newNode.levels++;
- if (lvl == pNodes.length) {
- // assume we have just passed the end of point.nodes, and reached one level greater
- // than the skiplist currently supports
- pNodes[lvl] = start;
- pIdxs[lvl] = -1;
- start.levels++;
- end.levels++;
- start.downPtrs[lvl] = end;
- end.upPtrs[lvl] = start;
- start.downSkips[lvl] = numNodes+1;
- start.downSkipWidths[lvl] = totalWidth;
- point.widthSkips[lvl] = 0;
- }
- var me = newNode;
- var up = pNodes[lvl];
- var down = up.downPtrs[lvl];
- var skip1 = pLoc - pIdxs[lvl];
- var skip2 = up.downSkips[lvl] + 1 - skip1;
- up.downSkips[lvl] = skip1;
- up.downPtrs[lvl] = me;
- me.downSkips[lvl] = skip2;
- me.upPtrs[lvl] = up;
- me.downPtrs[lvl] = down;
- down.upPtrs[lvl] = me;
- var widthSkip1 = widthLoc - point.widthSkips[lvl];
- var widthSkip2 = up.downSkipWidths[lvl] + newWidth - widthSkip1;
- up.downSkipWidths[lvl] = widthSkip1;
- me.downSkipWidths[lvl] = widthSkip2;
- }
- p.mark("loop2");
- p.literal(pNodes.length, "PNL");
- for(var lvl=newNode.levels; lvl<pNodes.length; lvl++) {
- var up = pNodes[lvl];
- up.downSkips[lvl]++;
- up.downSkipWidths[lvl] += newWidth;
- }
- p.mark("map");
- keyToNodeMap['$KEY$'+newKey] = newNode;
- numNodes++;
- totalWidth += newWidth;
- p.end();
- }
- function _getNodeAtPoint(point) {
- return point.nodes[0].downPtrs[0];
- }
- function _incrementPoint(point) {
- point.loc++;
- for(var i=0;i<point.nodes.length;i++) {
- if (point.idxs[i] + point.nodes[i].downSkips[i] < point.loc) {
- point.idxs[i] += point.nodes[i].downSkips[i];
- point.widthSkips[i] += point.nodes[i].downSkipWidths[i];
- point.nodes[i] = point.nodes[i].downPtrs[i];
- }
- }
- }
- function _deleteKeyAtPoint(point) {
- var elem = point.nodes[0].downPtrs[0];
- var elemWidth = _entryWidth(elem.entry);
- for(var i=0;i<point.nodes.length;i++) {
- if (i < elem.levels) {
- var up = elem.upPtrs[i];
- var down = elem.downPtrs[i];
- var totalSkip = up.downSkips[i] + elem.downSkips[i] - 1;
- up.downPtrs[i] = down;
- down.upPtrs[i] = up;
- up.downSkips[i] = totalSkip;
- var totalWidthSkip = up.downSkipWidths[i] + elem.downSkipWidths[i] - elemWidth;
- up.downSkipWidths[i] = totalWidthSkip;
- }
- else {
- var up = point.nodes[i];
- var down = up.downPtrs[i];
- up.downSkips[i]--;
- up.downSkipWidths[i] -= elemWidth;
- }
- }
- delete keyToNodeMap['$KEY$'+elem.key];
- numNodes--;
- totalWidth -= elemWidth;
- }
- function _propagateWidthChange(node) {
- var oldWidth = node.downSkipWidths[0];
- var newWidth = _entryWidth(node.entry);
- var widthChange = newWidth - oldWidth;
- var n = node;
- var lvl = 0;
- while (lvl < n.levels) {
- n.downSkipWidths[lvl] += widthChange;
- lvl++;
- while (lvl >= n.levels && n.upPtrs[lvl-1]) {
- n = n.upPtrs[lvl-1];
- }
- }
- totalWidth += widthChange;
- }
- function _getNodeIndex(node, byWidth) {
- var dist = (byWidth ? 0 : -1);
- var n = node;
- while (n !== start) {
- var lvl = n.levels-1;
- n = n.upPtrs[lvl];
- if (byWidth) dist += n.downSkipWidths[lvl];
- else dist += n.downSkips[lvl];
- }
- return dist;
- }
- /*function _debugToString() {
- var array = [start];
- while (array[array.length-1] !== end) {
- array[array.length] = array[array.length-1].downPtrs[0];
- }
- function getIndex(node) {
- if (!node) return null;
- for(var i=0;i<array.length;i++) {
- if (array[i] === node)
- return i-1;
- }
- return false;
- }
- var processedArray = map(array, function(node) {
- var x = {key:node.key, levels: node.levels, downSkips: node.downSkips,
- upPtrs: map(node.upPtrs, getIndex), downPtrs: map(node.downPtrs, getIndex),
- downSkipWidths: node.downSkipWidths};
- return x;
- });
- return map(processedArray, function (x) { return x.toSource(); }).join("\n");
- }*/
-
- function _getNodeByKey(key) {
- return keyToNodeMap['$KEY$'+key];
- }
-
- // Returns index of first entry such that entryFunc(entry) is truthy,
- // or length() if no such entry. Assumes all falsy entries come before
- // all truthy entries.
- function _search(entryFunc) {
- var low = start;
- var lvl = start.levels-1;
- var lowIndex = -1;
- function f(node) {
- if (node === start) return false;
- else if (node === end) return true;
- else return entryFunc(node.entry);
- }
- while (lvl >= 0) {
- var nextLow = low.downPtrs[lvl];
- while (!f(nextLow)) {
- lowIndex += low.downSkips[lvl];
- low = nextLow;
- nextLow = low.downPtrs[lvl];
- }
- lvl--;
- }
- return lowIndex+1;
- }
-
-/*
-The skip-list contains "entries", JavaScript objects that each must have a unique "key" property
-that is a string.
-*/
- var self = {
- length: function() { return numNodes; },
- atIndex: function(i) {
- if (i < 0) console.warn("atIndex("+i+")");
- if (i >= numNodes) console.warn("atIndex("+i+">="+numNodes+")");
- return _getNodeAtPoint(_getPoint(i)).entry;
- },
- // differs from Array.splice() in that new elements are in an array, not varargs
- splice: function(start, deleteCount, newEntryArray) {
- if (start < 0) console.warn("splice("+start+", ...)");
- if (start + deleteCount > numNodes) {
- console.warn("splice("+start+", "+deleteCount+", ...), N="+numNodes);
- console.warn("%s %s %s", typeof start, typeof deleteCount, typeof numNodes);
- console.trace();
- }
-
- if (! newEntryArray) newEntryArray = [];
- var pt = _getPoint(start);
- for(var i=0;i<deleteCount;i++) {
- _deleteKeyAtPoint(pt);
- }
- for(var i=(newEntryArray.length-1);i>=0;i--) {
- var entry = newEntryArray[i];
- _insertKeyAtPoint(pt, entry.key, entry);
- var node = _getNodeByKey(entry.key);
- node.entry = entry;
- }
- },
- next: function (entry) {
- return _getNodeByKey(entry.key).downPtrs[0].entry || null;
- },
- prev: function (entry) {
- return _getNodeByKey(entry.key).upPtrs[0].entry || null;
- },
- push: function(entry) {
- self.splice(numNodes, 0, [entry]);
- },
- slice: function(start, end) {
- // act like Array.slice()
- if (start === undefined) start = 0;
- else if (start < 0) start += numNodes;
- if (end === undefined) end = numNodes;
- else if (end < 0) end += numNodes;
-
- if (start < 0) start = 0;
- if (start > numNodes) start = numNodes;
- if (end < 0) end = 0;
- if (end > numNodes) end = numNodes;
-
- dmesg(String([start,end,numNodes]));
- if (end <= start) return [];
- var n = self.atIndex(start);
- var array = [n];
- for(var i=1;i<(end-start);i++) {
- n = self.next(n);
- array.push(n);
- }
- return array;
- },
- atKey: function(key) { return _getNodeByKey(key).entry; },
- indexOfKey: function(key) { return _getNodeIndex(_getNodeByKey(key)); },
- indexOfEntry: function (entry) { return self.indexOfKey(entry.key); },
- containsKey: function(key) { return !!(_getNodeByKey(key)); },
- // gets the last entry starting at or before the offset
- atOffset: function(offset) { return _getNodeAtOffset(offset).entry; },
- keyAtOffset: function(offset) { return self.atOffset(offset).key; },
- offsetOfKey: function(key) { return _getNodeIndex(_getNodeByKey(key), true); },
- offsetOfEntry: function(entry) { return self.offsetOfKey(entry.key); },
- setEntryWidth: function(entry, width) { entry.width = width; _propagateWidthChange(_getNodeByKey(entry.key)); },
- totalWidth: function() { return totalWidth; },
- offsetOfIndex: function(i) {
- if (i < 0) return 0;
- if (i >= numNodes) return totalWidth;
- return self.offsetOfEntry(self.atIndex(i));
- },
- indexOfOffset: function(offset) {
- if (offset <= 0) return 0;
- if (offset >= totalWidth) return numNodes;
- return self.indexOfEntry(self.atOffset(offset));
- },
- search: function(entryFunc) {
- return _search(entryFunc);
- },
- //debugToString: _debugToString,
- debugGetPoint: _getPoint,
- debugDepth: function() { return start.levels; }
- }
- return self;
-}
diff --git a/trunk/infrastructure/ace/www/spanlist.js b/trunk/infrastructure/ace/www/spanlist.js
deleted file mode 100644
index 756a411..0000000
--- a/trunk/infrastructure/ace/www/spanlist.js
+++ /dev/null
@@ -1,279 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-function newSpanList() {
- function encodeInt(num) {
- num = num & 0x1fffffff;
- // neither 16-bit char can be 0x0001 or mistakable for the other
- return String.fromCharCode(((num >> 15) & 0x3fff) | 0x4000) +
- String.fromCharCode((num & 0x7fff) | 0x8000);
- }
- function decodeInt(str) {
- return ((str.charCodeAt(0) & 0x3fff) << 15) | (str.charCodeAt(1) & 0x7fff);
- }
- function indexOfInt(str, n) {
- var result = str.indexOf(encodeInt(n));
- if (result < 0) return result;
- return result/2;
- }
- function intAt(str, i) {
- var idx = i*2;
- return decodeInt(str.substr(idx, 2));
- }
- function numInts(str) { return str.length/2; }
- function subrange(str, start, end) {
- return str.substring(start*2, end*2);
- }
- var nil = "\1\1";
- var repeatNilCache = [''];
- function repeatNil(times) {
- while (times >= repeatNilCache.length) {
- repeatNilCache.push(repeatNilCache[repeatNilCache.length-1] + nil);
- }
- return repeatNilCache[times];
- }
- function indexOfNonnil(str, start) {
- startIndex = (start || 0)*2;
- var nonnilChar = /[^\1]/g;
- nonnilChar.lastIndex = startIndex;
- var result = nonnilChar.exec(str);
- if (! result) {
- return str.length/2;
- }
- return (nonnilChar.lastIndex - 1)/2;
- }
- function intSplice(str, start, delCount, newStr) {
- return str.substring(0, start*2) + newStr + str.substring((start+delCount)*2);
- }
-
- function entryWidth(entry) {
- if ((typeof entry) == "number") return entry;
- return (entry && entry.width) || 1;
- }
-
- // "func" is a function over 0..(numItems-1) that is monotonically
- // "increasing" with index (false, then true). Finds the boundary
- // between false and true, a number between 0 and numItems inclusive.
- function binarySearch(numItems, func) {
- if (numItems < 1) return 0;
- if (func(0)) return 0;
- if (! func(numItems-1)) return numItems;
- var low = 0; // func(low) is always false
- var high = numItems-1; // func(high) is always true
- while ((high - low) > 1) {
- var x = Math.floor((low+high)/2); // x != low, x != high
- if (func(x)) high = x;
- else low = x;
- }
- return high;
- }
-
- var NEXT_ID = 1;
- var entryList = ""; // e.g. 2, 4, 3, 6
- var charList = ""; // e.g. nil, nil, nil, 2, nil, 4, nil, nil, nil, nil, 3, 6
- var keyToId = {};
- var idToKey = {};
- var idToEntry = {};
- var idToNextId = {};
- var idToPrevId = {};
- var length = 0;
- var totalWidth = 0;
-
- function idAtIndex(i) { return intAt(entryList, i); }
- function indexOfId(id) { return indexOfInt(entryList, id); }
- function offsetOfId(id) {
- if (! id) return totalWidth;
- var entry = idToEntry[id];
- var wid = entryWidth(entry);
- var lastCharLoc = indexOfInt(charList, id);
- return lastCharLoc + 1 - wid;
- }
- function idAtOffset(n) {
- return intAt(charList, indexOfNonnil(charList, n));
- }
-
- var self = {
- length: function() { return length; },
- totalWidth: function() { return totalWidth; },
- next: function (entryOrKey) {
- if ((typeof entryOrKey) == "object") {
- var entry = entryOrKey;
- var id = idToNextId[keyToId[entry.key]];
- if (id) return idToEntry[id];
- return null;
- }
- else {
- var k = entryOrKey;
- var id = idToNextId[keyToId[k]];
- if (id) return idToKey[id];
- return null;
- }
- },
- prev: function (entryOrKey) {
- if ((typeof entryOrKey) == "object") {
- var entry = entryOrKey;
- var id = idToPrevId[keyToId[entry.key]];
- if (id) return idToEntry[id];
- return null;
- }
- else {
- var k = entryOrKey;
- var id = idToPrevId[keyToId[k]];
- if (id) return idToKey[id];
- return null;
- }
- },
- atKey: function (k) { return idToEntry[keyToId[k]]; },
- atIndex: function (i) { return idToEntry[idAtIndex(i)]; },
- keyAtIndex: function(i) { return idToKey[idAtIndex(i)]; },
- keyAtOffset: function(n) { return idToKey[idAtOffset(n)]; },
- containsKey: function (k) { return !! keyToId[k]; },
- indexOfKey: function (k) { return indexOfId(keyToId[k]); },
- indexOfEntry: function (entry) { return self.indexOfKey(entry.key); },
- setKeyWidth: function (k, width) {
- var id = keyToId[k];
- var charStart = offsetOfId(id);
- var oldWidth = entryWidth(idToEntry[id]);
- var toDelete = 0;
- var toInsert = 0;
- if (width < oldWidth) toDelete = oldWidth - width;
- else if (width > oldWidth) toInsert = width - oldWidth;
- charList = intSplice(charList, charStart, toDelete, repeatNil(toInsert));
- totalWidth += (width - oldWidth);
- },
- setEntryWidth: function (entry, width) {
- return self.setKeyWidth(entry.key, width);
- },
- getEntryWidth: function (entry) {
- return entryWidth(entry);
- },
- getKeyWidth: function (k) {
- return entryWidth(idToEntry[keyToId[k]]);
- },
- offsetOfKey: function(k) { return offsetOfId(keyToId[k]); },
- offsetOfEntry: function(entry) { return self.offsetOfKey(entry.key); },
- offsetOfIndex: function (i) {
- if (i < 0) return 0;
- else if (i >= length) {
- return totalWidth;
- }
- else {
- return offsetOfId(idAtIndex(i));
- }
- },
- atOffset: function (n) {
- return idToEntry[idAtOffset(n)];
- },
- indexOfOffset: function (n) {
- if (n < 0) return 0;
- else if (n >= totalWidth) return length;
- return indexOfId(idAtOffset(n));
- },
- search: function(entryFunc) {
- return binarySearch(length, function (i) {
- return entryFunc(idToEntry[idAtIndex(i)]);
- });
- },
- push: function(entry, optKey) {
- self.splice(length, 0, [entry], (optKey && [optKey]));
- },
- // entries can be objects with a 'key' property, possibly a 'width' property,
- // and any other properties; OR they can be just a width number, for an
- // ultra-light-weight representation. In the latter case the key array is
- // used to get the keys. Some functions become useless with this usage, i.e.
- // the ones that use an entry for identity.
- splice: function (start, deleteCount, newEntryArray, optKeyArray) {
- var charStart = self.offsetOfIndex(start);
- var charsToDelete = 0;
- var idBefore = ((start == 0) ? null : intAt(entryList, start-1));
- // idAfter is mutated into id of node following deleted nodes
- var idAfter = ((start == length) ? null : (idBefore ? idToNextId[idBefore] :
- intAt(entryList, start)));
- if (deleteCount > 0) {
- var deleteId = idAfter;
- for(var i=0;i<deleteCount;i++) {
- var nextId = idToNextId[deleteId];
- var entry = idToEntry[deleteId];
- var wid = entryWidth(entry);
- delete keyToId[idToKey[deleteId]];
- delete idToKey[deleteId];
- delete idToEntry[deleteId];
- delete idToNextId[deleteId];
- delete idToPrevId[deleteId];
- length--;
- totalWidth -= wid;
- charsToDelete += wid;
- deleteId = nextId;
- }
- idAfter = (deleteId || null);
- }
- var newChars = [];
- var newIds = [];
- var prevId = idBefore;
- if (newEntryArray && newEntryArray.length > 0) {
- for(var i=0,n=newEntryArray.length; i<n; i++) {
- var entry = newEntryArray[i];
- var newId = (NEXT_ID++);
- var encId = encodeInt(newId);
- newIds.push(encId);
- var wid = entryWidth(entry);
- newChars.push(repeatNil(wid-1), encId);
- var key = (optKeyArray ? optKeyArray[i] : entry.key);
- keyToId[key] = newId;
- idToKey[newId] = key;
- idToEntry[newId] = entry;
- if (prevId) {
- idToNextId[prevId] = newId;
- idToPrevId[newId] = prevId;
- }
- prevId = newId;
- length++;
- totalWidth += wid;
- }
- if (prevId && idAfter) {
- idToNextId[prevId] = idAfter;
- idToPrevId[idAfter] = prevId;
- }
- }
- else {
- if (idBefore && idAfter) {
- idToNextId[idBefore] = idAfter;
- idToPrevId[idAfter] = idBefore;
- }
- else if (idBefore) delete idToNextId[idBefore];
- else if (idAfter) delete idToPrevId[idAfter];
- }
- entryList = intSplice(entryList, start, deleteCount, newIds.join(''));
- charList = intSplice(charList, charStart, charsToDelete, newChars.join(''));
-
- if (length > 0) {
- // checkrep
- if (idToPrevId[idAtIndex(0)]) console.error("a");
- if (idToNextId[idAtIndex(length-1)]) console.error("b");
- for(var i=0;i<length-1;i++) {
- if (idToNextId[idAtIndex(i)] != idAtIndex(i+1)) console.error("c"+i);
- }
- for(var i=1;i<length;i++) {
- if (idToPrevId[idAtIndex(i)] != idAtIndex(i-1)) console.error("d"+i);
- }
- }
- }
- };
-
- return self;
-}
-
diff --git a/trunk/infrastructure/ace/www/syntax-new.css b/trunk/infrastructure/ace/www/syntax-new.css
deleted file mode 100644
index 30f1823..0000000
--- a/trunk/infrastructure/ace/www/syntax-new.css
+++ /dev/null
@@ -1,35 +0,0 @@
-.syntax .t1 {font-style:italic;color:#2AC300;}
-.syntax .t2 {color:#CC6633;}
-.syntax .t3 {font-weight:bold;color:#6699FF;}
-.syntax .t4 {color:#A700CC;}
-.syntax .t5 {color:#000000;}
-.syntax .t6 {font-weight:bold;color:#000CFF;}
-.syntax .t7 {color:#318495;}
-.syntax .t8 {color:#33CC33;}
-.syntax .t9 {color:#1A921C;}
-.syntax .t10 {font-weight:bold;color:#0C450D;}
-.syntax .t11 {font-weight:bold;color:#000099;}
-.syntax .t12 {}
-.syntax .t13 {}
-.syntax .t14 {}
-.syntax .t15 {color:#70727E;}
-.syntax .t16 {font-style:italic;color:#000000;}
-.syntax .t17 {color:#990099;}
-.syntax .t18 {color:#CC6633;}
-.syntax .t19 {color:#990099;}
-.syntax .t20 {color:#CC6633;}
-.syntax .t21 {color:#000000;}
-.syntax .t22 {color:#990000;font-weight:bold;}
-.syntax .t23 {}
-.syntax .t24 {}
-.syntax .t25 {}
-.syntax .t26 {color:#68685B;}
-.syntax .t27 {color:#888888;}
-.syntax .t28 {font-style:italic;}
-.syntax .t29 {color:#1C02FF;}
-.syntax .t30 {font-weight:bold;}
-.syntax .t31 {font-style:italic;}
-.syntax .t32 {font-weight:bold;color:#0C07FF;}
-.syntax .t33 {font-style:italic;color:#000000;}
-.syntax .t34 {color:#B90690;}
-.syntax .t35 {color:#666666;}
diff --git a/trunk/infrastructure/ace/www/syntax.css b/trunk/infrastructure/ace/www/syntax.css
deleted file mode 100644
index e018320..0000000
--- a/trunk/infrastructure/ace/www/syntax.css
+++ /dev/null
@@ -1,32 +0,0 @@
-/* ---------- Used by JavaScript Lexer ---------- */
-.syntax .c { color: #bd3f00; font-style: italic } /* Comment */
-.syntax .o { font-weight: bold; } /* Operator */
-.syntax .p { font-weight: bold; } /* Punctuation */
-.syntax .k { color: blue; } /* Keyword */
-.syntax .kc { color: purple } /* Keyword.Constant */
-.syntax .nx { } /* Name.Other */
-.syntax .mf { color: purple } /* Literal.Number.Float */
-.syntax .mh { color: purple } /* Literal.Number.Hex */
-.syntax .mi { color: purple } /* Literal.Number.Integer */
-.syntax .sr { color: purple } /* Literal.String.Regex */
-.syntax .s2 { color: purple } /* Literal.String.Double */
-.syntax .s1 { color: purple } /* Literal.String.Single */
-.syntax .sd { color: purple } /* Literal.String.Doc */
-.syntax .cs { color: #00aa33; font-weight: bold; font-style: italic } /* Comment.Special */
-.syntax .err { color: #cc0000; font-weight: bold; text-decoration: underline; } /* Error */
-
-/* css */
-.syntax .nt { font-weight: bold; } /* tag */
-.syntax .nc { color: #336; } /* class */
-.syntax .nf { color: #336; } /* id */
-.syntax .nd { color: #999; } /* :foo */
-.syntax .m { color: purple } /* number */
-.syntax .nb { color: purple } /* built-in */
-.syntax .cp { color: #bd3f00; } /* !important */
-
-.syntax .flash { background-color: #adf !important; }
-.syntax .flashbad { background-color: #f55 !important; }
-
-/*.syntax .test { background-color: #0f0; }*/
-/*.syntax .test { background: url(http://dl.getdropbox.com/u/88/blackvert.gif)
- repeat-y left top; }*/
diff --git a/trunk/infrastructure/ace/www/test.html b/trunk/infrastructure/ace/www/test.html
deleted file mode 100644
index 73fa45c..0000000
--- a/trunk/infrastructure/ace/www/test.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
- <head>
- <script src="bbtree.js"></script>
- </head>
- <body>
- &nbsp;
- </body>
-</html>
diff --git a/trunk/infrastructure/ace/www/testcode.js b/trunk/infrastructure/ace/www/testcode.js
deleted file mode 100644
index f393335..0000000
--- a/trunk/infrastructure/ace/www/testcode.js
+++ /dev/null
@@ -1,36 +0,0 @@
-function getTestCode() {
- var testCode = [
-'/* appjet:version 0.1 */',
-'(function(){',
-'/*',
-' * jQuery 1.2.1 - New Wave Javascript',
-' *',
-' * Copyright (c) 2007 John Resig (jquery.com)',
-' * Dual licensed under the MIT (MIT-LICENSE.txt)',
-' * and GPL (GPL-LICENSE.txt) licenses.',
-' *',
-' * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $',
-' * $Rev: 3353 $',
-' */',
-'',
-'// Map over jQuery in case of overwrite',
-'if ( typeof jQuery != "undefined" )',
-' var _jQuery = jQuery;',
-'',
-'var jQuery = window.jQuery = function(selector, context) {',
-' // If the context is a namespace object, return a new object',
-' return this instanceof jQuery ?',
-' this.init(selector, context) :',
-' new jQuery(selector, context);',
-'};',
-'',
-'// Map over the $ in case of overwrite',
-'if ( typeof $ != "undefined" )',
-' var _$ = $;',
-' ',
-'// Map the jQuery namespace to the \'$\' one',
-'window.$ = jQuery;',
-'',
-'var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;'].join('\n');
- return testCode;
-}
diff --git a/trunk/infrastructure/ace/www/toSource.js b/trunk/infrastructure/ace/www/toSource.js
deleted file mode 100644
index bf96df7..0000000
--- a/trunk/infrastructure/ace/www/toSource.js
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- based on: http://www.JSON.org/json2.js
- 2008-07-15
-*/
-toSource = function () {
-
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- Date.prototype.toJSON = function (key) {
-
- return this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z';
- };
-
- String.prototype.toJSON =
- Number.prototype.toJSON =
- Boolean.prototype.toJSON = function (key) {
- return this.valueOf();
- };
-
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-
- function quote(string) {
-
- // If the string contains no control characters, no quote characters, and no
- // backslash characters, then we can safely slap some quotes around it.
- // Otherwise we must also replace the offending characters with safe escape
- // sequences.
-
- escapeable.lastIndex = 0;
- return escapeable.test(string) ?
- '"' + string.replace(escapeable, function (a) {
- var c = meta[a];
- if (typeof c === 'string') {
- return c;
- }
- return '\\u' + ('0000' +
- (+(a.charCodeAt(0))).toString(16)).slice(-4);
- }) + '"' :
- '"' + string + '"';
- }
-
-
- function str(key, holder) {
-
- // Produce a string from holder[key].
-
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
- // If the value has a toJSON method, call it to obtain a replacement value.
-
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
- // If we were called with a replacer function, then call the replacer to
- // obtain a replacement value.
-
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
- // What happens next depends on the value's type.
-
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
-
- // JSON numbers must be finite. Encode non-finite numbers as null.
-
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
-
- // If the value is a boolean or null, convert it to a string. Note:
- // typeof null does not produce 'null'. The case is included here in
- // the remote chance that this gets fixed someday.
-
- return String(value);
-
- // If the type is 'object', we might be dealing with an object or an array or
- // null.
-
- case 'object':
-
- // Due to a specification blunder in ECMAScript, typeof null is 'object',
- // so watch out for that case.
-
- if (!value) {
- return 'null';
- }
-
- // Make an array to hold the partial results of stringifying this object value.
-
- gap += indent;
- partial = [];
-
- if (!(value instanceof Object)) {
- function domNodeIndex(nd) {
- if (nd.parentNode && nd.parentNode.childNodes.length) {
- var nds = nd.parentNode.childNodes;
- var i = 0;
- while (i < nds.length && nds.item(i) !== nd) {
- i++;
- }
- if (i < nds.length) {
- return "("+i+")";
- }
- }
- return "";
- }
- if (value.nodeType == 3) {
- return "['"+value.nodeValue+domNodeIndex(value)+"']";
- }
- else if (value.tagName) {
- return "["+value.tagName+domNodeIndex(value)+"]";
- }
- else {
- return '(special)';
- }
- }
-
- // If the object has a dontEnum length property, we'll treat it as an array.
-
- if (typeof value.length === 'number' &&
- !(value.propertyIsEnumerable('length'))) {
-
- // The object is an array. Stringify every element. Use null as a placeholder
- // for non-JSON values.
-
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
- // Join all of the elements together, separated with commas, and wrap them in
- // brackets.
-
- v = partial.length === 0 ? '[]' :
- gap ? '[\n' + gap +
- partial.join(',\n' + gap) + '\n' +
- mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
- // If the replacer is an array, use it to select the members to be stringified.
-
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- k = rep[i];
- if (typeof k === 'string') {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- } else {
-
- // Otherwise, iterate through all of the keys in the object.
-
- for (k in value) {
- if (Object.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
- // Join all of the member texts together, separated with commas,
- // and wrap them in braces.
-
- v = partial.length === 0 ? '{}' :
- gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
- mind + '}' : '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
- }
-
- return function (value, replacer, space) {
-
- // The stringify method takes a value and an optional replacer, and an optional
- // space parameter, and returns a JSON text. The replacer can be a function
- // that can replace values, or an array of strings that will select the keys.
- // A default replacer method can be provided. Use of the space parameter can
- // produce text that is more easily readable.
-
- var i;
- gap = '';
- indent = '';
-
- // If the space parameter is a number, make an indent string containing that
- // many spaces.
-
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
-
- // If the space parameter is a string, it will be used as the indent string.
-
- } else if (typeof space === 'string') {
- indent = space;
- }
-
- // If there is a replacer, it must be a function or an array.
- // Otherwise, throw an error.
-
- rep = replacer;
- if (replacer && typeof replacer !== 'function' &&
- (typeof replacer !== 'object' ||
- typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
- // Make a fake root object containing our value under the key of ''.
- // Return the result of stringifying the value.
-
- return str('', {'': value});
- }
-}();
diff --git a/trunk/infrastructure/ace/www/undomodule.js b/trunk/infrastructure/ace/www/undomodule.js
deleted file mode 100644
index b8a56f9..0000000
--- a/trunk/infrastructure/ace/www/undomodule.js
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-undoModule = (function() {
- var stack = (function() {
- var stackElements = [];
- // two types of stackElements:
- // 1) { elementType: UNDOABLE_EVENT, eventType: "anything", [backset: <changeset>,]
- // [selStart: <char number>, selEnd: <char number>, selFocusAtStart: <boolean>] }
- // 2) { elementType: EXTERNAL_CHANGE, changeset: <changeset> }
- // invariant: no two consecutive EXTERNAL_CHANGEs
- var numUndoableEvents = 0;
-
- var UNDOABLE_EVENT = "undoableEvent";
- var EXTERNAL_CHANGE = "externalChange";
-
- function clearStack() {
- stackElements.length = 0;
- stackElements.push({ elementType: UNDOABLE_EVENT, eventType: "bottom" });
- numUndoableEvents = 1;
- }
- clearStack();
-
- function pushEvent(event) {
- var e = extend({}, event);
- e.elementType = UNDOABLE_EVENT;
- stackElements.push(e);
- numUndoableEvents++;
- //dmesg("pushEvent backset: "+event.backset);
- }
-
- function pushExternalChange(cs) {
- var idx = stackElements.length-1;
- if (stackElements[idx].elementType == EXTERNAL_CHANGE) {
- stackElements[idx].changeset = Changeset.compose(stackElements[idx].changeset, cs, getAPool());
- }
- else {
- stackElements.push({elementType: EXTERNAL_CHANGE, changeset: cs});
- }
- }
-
- function _exposeEvent(nthFromTop) {
- // precond: 0 <= nthFromTop < numUndoableEvents
- var targetIndex = stackElements.length - 1 - nthFromTop;
- var idx = stackElements.length - 1;
- while (idx > targetIndex || stackElements[idx].elementType == EXTERNAL_CHANGE) {
- if (stackElements[idx].elementType == EXTERNAL_CHANGE) {
- var ex = stackElements[idx];
- var un = stackElements[idx-1];
- if (un.backset) {
- var excs = ex.changeset;
- var unbs = un.backset;
- un.backset = Changeset.follow(excs, un.backset, false, getAPool());
- ex.changeset = Changeset.follow(unbs, ex.changeset, true, getAPool());
- if ((typeof un.selStart) == "number") {
- var newSel = Changeset.characterRangeFollow(excs, un.selStart, un.selEnd);
- un.selStart = newSel[0];
- un.selEnd = newSel[1];
- if (un.selStart == un.selEnd) {
- un.selFocusAtStart = false;
- }
- }
- }
- stackElements[idx-1] = ex;
- stackElements[idx] = un;
- if (idx >= 2 && stackElements[idx-2].elementType == EXTERNAL_CHANGE) {
- ex.changeset = Changeset.compose(stackElements[idx-2].changeset,
- ex.changeset, getAPool());
- stackElements.splice(idx-2, 1);
- idx--;
- }
- }
- else {
- idx--;
- }
- }
- }
-
- function getNthFromTop(n) {
- // precond: 0 <= n < numEvents()
- _exposeEvent(n);
- return stackElements[stackElements.length - 1 - n];
- }
-
- function numEvents() {
- return numUndoableEvents;
- }
-
- function popEvent() {
- // precond: numEvents() > 0
- _exposeEvent(0);
- numUndoableEvents--;
- return stackElements.pop();
- }
-
- return {numEvents:numEvents, popEvent:popEvent, pushEvent: pushEvent,
- pushExternalChange: pushExternalChange, clearStack: clearStack,
- getNthFromTop:getNthFromTop};
- })();
-
- // invariant: stack always has at least one undoable event
-
- var undoPtr = 0; // zero-index from top of stack, 0 == top
-
- function clearHistory() {
- stack.clearStack();
- undoPtr = 0;
- }
-
- function _charOccurrences(str, c) {
- var i = 0;
- var count = 0;
- while (i >= 0 && i < str.length) {
- i = str.indexOf(c, i);
- if (i >= 0) {
- count++;
- i++;
- }
- }
- return count;
- }
-
- function _opcodeOccurrences(cs, opcode) {
- return _charOccurrences(Changeset.unpack(cs).ops, opcode);
- }
-
- function _mergeChangesets(cs1, cs2) {
- if (! cs1) return cs2;
- if (! cs2) return cs1;
-
- // Rough heuristic for whether changesets should be considered one action:
- // each does exactly one insertion, no dels, and the composition does also; or
- // each does exactly one deletion, no ins, and the composition does also.
- // A little weird in that it won't merge "make bold" with "insert char"
- // but will merge "make bold and insert char" with "insert char",
- // though that isn't expected to come up.
- var plusCount1 = _opcodeOccurrences(cs1, '+');
- var plusCount2 = _opcodeOccurrences(cs2, '+');
- var minusCount1 = _opcodeOccurrences(cs1, '-');
- var minusCount2 = _opcodeOccurrences(cs2, '-');
- if (plusCount1 == 1 && plusCount2 == 1 && minusCount1 == 0 && minusCount2 == 0) {
- var merge = Changeset.compose(cs1, cs2, getAPool());
- var plusCount3 = _opcodeOccurrences(merge, '+');
- var minusCount3 = _opcodeOccurrences(merge, '-');
- if (plusCount3 == 1 && minusCount3 == 0) {
- return merge;
- }
- }
- else if (plusCount1 == 0 && plusCount2 == 0 && minusCount1 == 1 && minusCount2 == 1) {
- var merge = Changeset.compose(cs1, cs2, getAPool());
- var plusCount3 = _opcodeOccurrences(merge, '+');
- var minusCount3 = _opcodeOccurrences(merge, '-');
- if (plusCount3 == 0 && minusCount3 == 1) {
- return merge;
- }
- }
- return null;
- }
-
- function reportEvent(event) {
- var topEvent = stack.getNthFromTop(0);
-
- function applySelectionToTop() {
- if ((typeof event.selStart) == "number") {
- topEvent.selStart = event.selStart;
- topEvent.selEnd = event.selEnd;
- topEvent.selFocusAtStart = event.selFocusAtStart;
- }
- }
-
- if ((! event.backset) || Changeset.isIdentity(event.backset)) {
- applySelectionToTop();
- }
- else {
- var merged = false;
- if (topEvent.eventType == event.eventType) {
- var merge = _mergeChangesets(event.backset, topEvent.backset);
- if (merge) {
- topEvent.backset = merge;
- //dmesg("reportEvent merge: "+merge);
- applySelectionToTop();
- merged = true;
- }
- }
- if (! merged) {
- stack.pushEvent(event);
- }
- undoPtr = 0;
- }
-
- }
-
- function reportExternalChange(changeset) {
- if (changeset && ! Changeset.isIdentity(changeset)) {
- stack.pushExternalChange(changeset);
- }
- }
-
- function _getSelectionInfo(event) {
- if ((typeof event.selStart) != "number") {
- return null;
- }
- else {
- return {selStart: event.selStart, selEnd: event.selEnd,
- selFocusAtStart: event.selFocusAtStart};
- }
- }
-
- // For "undo" and "redo", the change event must be returned
- // by eventFunc and NOT reported through the normal mechanism.
- // "eventFunc" should take a changeset and an optional selection info object,
- // or can be called with no arguments to mean that no undo is possible.
- // "eventFunc" will be called exactly once.
-
- function performUndo(eventFunc) {
- if (undoPtr < stack.numEvents()-1) {
- var backsetEvent = stack.getNthFromTop(undoPtr);
- var selectionEvent = stack.getNthFromTop(undoPtr+1);
- var undoEvent = eventFunc(backsetEvent.backset, _getSelectionInfo(selectionEvent));
- stack.pushEvent(undoEvent);
- undoPtr += 2;
- }
- else eventFunc();
- }
-
- function performRedo(eventFunc) {
- if (undoPtr >= 2) {
- var backsetEvent = stack.getNthFromTop(0);
- var selectionEvent = stack.getNthFromTop(1);
- eventFunc(backsetEvent.backset, _getSelectionInfo(selectionEvent));
- stack.popEvent();
- undoPtr -= 2;
- }
- else eventFunc();
- }
-
- function getAPool() {
- return undoModule.apool;
- }
-
- return {clearHistory:clearHistory, reportEvent:reportEvent, reportExternalChange:reportExternalChange,
- performUndo:performUndo, performRedo:performRedo, enabled: true,
- apool: null}; // apool is filled in by caller
-})(); \ No newline at end of file
diff --git a/trunk/infrastructure/ace/www/virtual_lines.js b/trunk/infrastructure/ace/www/virtual_lines.js
deleted file mode 100644
index 86e3dea..0000000
--- a/trunk/infrastructure/ace/www/virtual_lines.js
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- * Copyright 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS-IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function makeVirtualLineView(lineNode) {
-
- // how much to jump forward or backward at once in a charSeeker before
- // constructing a DOM node and checking the coordinates (which takes a
- // significant fraction of a millisecond). From the
- // coordinates and the approximate line height we can estimate how
- // many lines we have moved. We risk being off if the number of lines
- // we move is on the order of the line height in pixels. Fortunately,
- // when the user boosts the font-size they increase both.
- var maxCharIncrement = 20;
- var seekerAtEnd = null;
-
- function getNumChars() {
- return lineNode.textContent.length;
- }
-
- function getNumVirtualLines() {
- if (! seekerAtEnd) {
- var seeker = makeCharSeeker();
- seeker.forwardByWhile(maxCharIncrement);
- seekerAtEnd = seeker;
- }
- return seekerAtEnd.getVirtualLine() + 1;
- }
-
- function getVLineAndOffsetForChar(lineChar) {
- var seeker = makeCharSeeker();
- seeker.forwardByWhile(maxCharIncrement, null, lineChar);
- var theLine = seeker.getVirtualLine();
- seeker.backwardByWhile(8, function() { return seeker.getVirtualLine() == theLine; });
- seeker.forwardByWhile(1, function() { return seeker.getVirtualLine() != theLine; });
- var lineStartChar = seeker.getOffset();
- return {vline:theLine, offset:(lineChar - lineStartChar)};
- }
-
- function getCharForVLineAndOffset(vline, offset) {
- // returns revised vline and offset as well as absolute char index within line.
- // if offset is beyond end of line, for example, will give new offset at end of line.
- var seeker = makeCharSeeker();
- // go to start of line
- seeker.binarySearch(function() {
- return seeker.getVirtualLine() >= vline;
- });
- var lineStart = seeker.getOffset();
- var theLine = seeker.getVirtualLine();
- // go to offset, overshooting the virtual line only if offset is too large for it
- seeker.forwardByWhile(maxCharIncrement, null, lineStart+offset);
- // get back into line
- seeker.backwardByWhile(1, function() { return seeker.getVirtualLine() != theLine; }, lineStart);
- var lineChar = seeker.getOffset();
- var theOffset = lineChar - lineStart;
- // handle case of last virtual line; should be able to be at end of it
- if (theOffset < offset && theLine == (getNumVirtualLines()-1)) {
- var lineLen = getNumChars();
- theOffset += lineLen-lineChar;
- lineChar = lineLen;
- }
-
- return { vline:theLine, offset:theOffset, lineChar:lineChar };
- }
-
- return {getNumVirtualLines:getNumVirtualLines, getVLineAndOffsetForChar:getVLineAndOffsetForChar,
- getCharForVLineAndOffset:getCharForVLineAndOffset,
- makeCharSeeker: function() { return makeCharSeeker(); } };
-
- function deepFirstChildTextNode(nd) {
- nd = nd.firstChild;
- while (nd && nd.firstChild) nd = nd.firstChild;
- if (nd.data) return nd;
- return null;
- }
-
- function makeCharSeeker(/*lineNode*/) {
-
- function charCoords(tnode, i) {
- var container = tnode.parentNode;
-
- // treat space specially; a space at the end of a virtual line
- // will have weird coordinates
- var isSpace = (tnode.nodeValue.charAt(i) === " ");
- if (isSpace) {
- if (i == 0) {
- if (container.previousSibling && deepFirstChildTextNode(container.previousSibling)) {
- tnode = deepFirstChildTextNode(container.previousSibling);
- i = tnode.length-1;
- container = tnode.parentNode;
- }
- else {
- return {top:container.offsetTop, left:container.offsetLeft};
- }
- }
- else {
- i--; // use previous char
- }
- }
-
-
- var charWrapper = document.createElement("SPAN");
-
- // wrap the character
- var tnodeText = tnode.nodeValue;
- var frag = document.createDocumentFragment();
- frag.appendChild(document.createTextNode(tnodeText.substring(0, i)));
- charWrapper.appendChild(document.createTextNode(tnodeText.substr(i, 1)));
- frag.appendChild(charWrapper);
- frag.appendChild(document.createTextNode(tnodeText.substring(i+1)));
- container.replaceChild(frag, tnode);
-
- var result = {top:charWrapper.offsetTop,
- left:charWrapper.offsetLeft + (isSpace ? charWrapper.offsetWidth : 0),
- height:charWrapper.offsetHeight};
-
- while (container.firstChild) container.removeChild(container.firstChild);
- container.appendChild(tnode);
-
- return result;
- }
-
- var lineText = lineNode.textContent;
- var lineLength = lineText.length;
-
- var curNode = null;
- var curChar = 0;
- var curCharWithinNode = 0
- var curTop;
- var curLeft;
- var approxLineHeight;
- var whichLine = 0;
-
- function nextNode() {
- var n = curNode;
- if (! n) n = lineNode.firstChild;
- else n = n.nextSibling;
- while (n && ! deepFirstChildTextNode(n)) {
- n = n.nextSibling;
- }
- return n;
- }
- function prevNode() {
- var n = curNode;
- if (! n) n = lineNode.lastChild;
- else n = n.previousSibling;
- while (n && ! deepFirstChildTextNode(n)) {
- n = n.previousSibling;
- }
- return n;
- }
-
- var seeker;
- if (lineLength > 0) {
- curNode = nextNode();
- var firstCharData = charCoords(deepFirstChildTextNode(curNode), 0);
- approxLineHeight = firstCharData.height;
- curTop = firstCharData.top;
- curLeft = firstCharData.left;
-
- function updateCharData(tnode, i) {
- var coords = charCoords(tnode, i);
- whichLine += Math.round((coords.top - curTop) / approxLineHeight);
- curTop = coords.top;
- curLeft = coords.left;
- }
-
- seeker = {
- forward: function(numChars) {
- var oldChar = curChar;
- var newChar = curChar + numChars;
- if (newChar > (lineLength-1))
- newChar = lineLength-1;
- while (curChar < newChar) {
- var curNodeLength = deepFirstChildTextNode(curNode).length;
- var toGo = curNodeLength - curCharWithinNode;
- if (curChar + toGo > newChar || ! nextNode()) {
- // going to next node would be too far
- var n = newChar - curChar;
- if (n >= toGo) n = toGo-1;
- curChar += n;
- curCharWithinNode += n;
- break;
- }
- else {
- // go to next node
- curChar += toGo;
- curCharWithinNode = 0;
- curNode = nextNode();
- }
- }
- updateCharData(deepFirstChildTextNode(curNode), curCharWithinNode);
- return curChar - oldChar;
- },
- backward: function(numChars) {
- var oldChar = curChar;
- var newChar = curChar - numChars;
- if (newChar < 0) newChar = 0;
- while (curChar > newChar) {
- if (curChar - curCharWithinNode <= newChar || !prevNode()) {
- // going to prev node would be too far
- var n = curChar - newChar;
- if (n > curCharWithinNode) n = curCharWithinNode;
- curChar -= n;
- curCharWithinNode -= n;
- break;
- }
- else {
- // go to prev node
- curChar -= curCharWithinNode+1;
- curNode = prevNode();
- curCharWithinNode = deepFirstChildTextNode(curNode).length-1;
- }
- }
- updateCharData(deepFirstChildTextNode(curNode), curCharWithinNode);
- return oldChar - curChar;
- },
- getVirtualLine: function() { return whichLine; },
- getLeftCoord: function() { return curLeft; }
- };
- }
- else {
- curLeft = lineNode.offsetLeft;
- seeker = { forward: function(numChars) { return 0; },
- backward: function(numChars) { return 0; },
- getVirtualLine: function() { return 0; },
- getLeftCoord: function() { return curLeft; }
- };
- }
- seeker.getOffset = function() { return curChar; };
- seeker.getLineLength = function() { return lineLength; };
- seeker.toString = function() {
- return "seeker[curChar: "+curChar+"("+lineText.charAt(curChar)+"), left: "+seeker.getLeftCoord()+", vline: "+seeker.getVirtualLine()+"]";
- };
-
- function moveByWhile(isBackward, amount, optCondFunc, optCharLimit) {
- var charsMovedLast = null;
- var hasCondFunc = ((typeof optCondFunc) == "function");
- var condFunc = optCondFunc;
- var hasCharLimit = ((typeof optCharLimit) == "number");
- var charLimit = optCharLimit;
- while (charsMovedLast !== 0 && ((! hasCondFunc) || condFunc())) {
- var toMove = amount;
- if (hasCharLimit) {
- var untilLimit = (isBackward ? curChar - charLimit : charLimit - curChar);
- if (untilLimit < toMove) toMove = untilLimit;
- }
- if (toMove < 0) break;
- charsMovedLast = (isBackward ? seeker.backward(toMove) : seeker.forward(toMove));
- }
- }
-
- seeker.forwardByWhile = function(amount, optCondFunc, optCharLimit) {
- moveByWhile(false, amount, optCondFunc, optCharLimit);
- }
- seeker.backwardByWhile = function(amount, optCondFunc, optCharLimit) {
- moveByWhile(true, amount, optCondFunc, optCharLimit);
- }
- seeker.binarySearch = function(condFunc) {
- // returns index of boundary between false chars and true chars;
- // positions seeker at first true char, or else last char
- var trueFunc = condFunc;
- var falseFunc = function() { return ! condFunc(); };
- seeker.forwardByWhile(20, falseFunc);
- seeker.backwardByWhile(20, trueFunc);
- seeker.forwardByWhile(10, falseFunc);
- seeker.backwardByWhile(5, trueFunc);
- seeker.forwardByWhile(1, falseFunc);
- return seeker.getOffset() + (condFunc() ? 0 : 1);
- }
-
- return seeker;
- }
-
-}